aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix header width again: this is a better approachJef van Schendel2012-12-021-2/+2
|
* Fix header width issue on small screensJef van Schendel2012-12-021-0/+1
|
* Fix small user errorJef van Schendel2012-12-021-1/+1
|
* Give elements proper, more descriptive class namesJef van Schendel2012-12-021-3/+3
|
* Several edits to header dropdown:Jef van Schendel2012-12-021-8/+6
| | | | | | | - Style the up/down arrow as a button - Remove the Actions header - Remove redundant original "Add media" button - Style "Add media" and "Create new collection" links as buttons
* First commit to add header dropdownJef van Schendel2012-12-023-28/+34
|
* Fall back to "en" if we don't find matching translationsSebastian Spaeth2012-12-021-1/+1
| | | | | | | | In case of no matching translations, target_lang was "None" which blew up things. Fall back to "en" in case we don't find a corresponding translation. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Also package i18n/*.moSebastian Spaeth2012-12-021-0/+1
| | | | | | | .... and I wondered why my production site fails to display German pages... Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Honor user's browser language (#558)Sebastian Spaeth2012-12-025-12/+33
| | | | | | | | | | | | | Previously we would attempt to satisfy the user's first language preference, immediately falling back to english if that was not possible. Now, we will get the best match of the user's preferred languages. This requires storing the available locales on app startup, so we have mg_globals.available_locales ready to compare them against the list of preferred user languages. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Fix i18n in our browserSebastian Spaeth2012-12-013-18/+15
| | | | | | | | | | | | | | | | | | We only ever served english pages since the switch to werkzeug's requests. Fix this by actually checking the accepted languages that our web browser sends and using that or falling back to english. This is not optimal, imaging our browser sends "klingon, de" as accepted languages and we happen to not have a klingon translation ready (a deficiency that should be corrected immediately anyway!!). We would then fall back to english rather than sending the sensible and pleasant German language which the user would understand. This will require more backend work though. Removing the gettext.find() in mg_globals.py. It looked in the wrong directory anyway (mediagoblin/translations) and as that does not exist, had always returned None without anyone noticing. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* docs: Add trim_whitespaces plugin to relnotes and documentationSebastian Spaeth2012-12-012-9/+19
| | | | | | | | Rather than mentioning a hypothetical module restrictfive, we use the existing plugin mediagoblin-licenses that people can install. Also, mention that plugin in the release notes. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* trim_whitespace meddleware pluginSebastian Spaeth2012-12-012-0/+98
| | | | | | | | | | | | | Our HTML output is very verbose (=whitespacy) as our templates are written with an 80 char limit and lots of newlines between blocks, variables etc.... This is a plugin that naively strips of all but the first whitespace from the HTML response. We might want to have an all-fancy html tidy interface here at some point, but it nicely decreases the HTML size about a third on some simple pages. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Make ENABLED_MEDDLEWARES a list and not a tuple, so we can modify itSebastian Spaeth2012-12-011-2/+2
| | | | | | | | | | Plugins may want to insert meddlewares, so this list should be modifiable at very list (if we don't want to provide helper methods for this, which seems a tad overkill for now). This change is required for the upcoming trim_whitespace plugin. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Remove the NoOp meddlewareSebastian Spaeth2012-12-012-28/+0
| | | | | | | There is really no reason to provide and enable a meddleware that does exactly... NOTHING ...by default. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Implement licenses.get_license_by_urlSebastian Spaeth2012-11-302-1/+11
| | | | | | | | | Rather than exploding in the user's face (for example if we custom-configure licenses in our MG instance, and there are still media with now "unknown" licenses in the db), simply return a License object as a fallback, where all attributes are set to the URL we were handed. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Improve mediagoblin.tools.licensesSebastian Spaeth2012-11-301-34/+38
| | | | | | | | | "Objectify" our licenses to have .uri, .abbreviation, .name attributes that we can pass into the templates and use there. namedtuples are a good poor man's choice to make a License a class. (a named tuple really) Document and optimize licenses_as_choices(), it is a one-liner really. No need for verbose appends here...
* Use mediagoblin import machinerySebastian Spaeth2012-11-301-4/+5
| | | | | | | | | | | Rather than manually __importing__ the MEDIA_MANAGER, we should have been using tools.common.import_component in the first place. But even better to use the existing get_media_manager() function that exists for exactly our purpose. Also improve documentation of what happens in case of failure. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Remove importlib (python2.7'ism)Sebastian Spaeth2012-11-301-3/+1
| | | | | | | | importlib is cool, but only included in python2.7 which is beyond our minimum python version that we support. So simply use plain old __import__. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Merge remote-tracking branch 'spaetz/formerge/538_FORBIDDEN_admin_pages'Elrond2012-11-293-15/+34
|\ | | | | | | | | | | | | * spaetz/formerge/538_FORBIDDEN_admin_pages: Fix error page text Return code 403 when accessing admin pages Implement generic error pages
| * Fix error page textSebastian Spaeth2012-11-291-2/+2
| | | | | | | | | | | | | | Thanks to Elrond for noticing. We wrap error messages in <p> tags, so there is no need to start the error message with <p>. DOH Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
| * Return code 403 when accessing admin pagesSebastian Spaeth2012-11-291-3/+4
| | | | | | | | | | | | | | | | without being an admin. Previously we were just returning a 404 page and this confused the heck out of me, as I did not understand why the admin pages were not there at all (I was no admin). Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
| * Implement generic error pagesSebastian Spaeth2012-11-292-12/+30
| | | | | | | | | | | | | | | | | | | | | | Rather than having a 404.html, a 403.html, a 500.html,... we have a generic error.html template that we pass in an error code, a title and a (html'ish) error message. Implement the common render_404 and render_403 shortcuts. More exotic cases can be achieved by the generic render_error function. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | Merge remote-tracking branch 'spaetz/formerge/bundle_xml_templates_too'Elrond2012-11-291-1/+1
|\ \ | | | | | | | | | | | | * spaetz/formerge/bundle_xml_templates_too: Also package webfinger.xml
| * | Also package webfinger.xmlSebastian Spaeth2012-11-291-1/+1
| |/ | | | | | | | | | | | | | | MANIFEST.in did not include *.xml for our templates, so the webfinger template files got left out of our packaging with e.g. "setup.py install". Fixed. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | Merge remote-tracking branch 'spaetz/formerge/507_remove_routes'Elrond2012-11-292-8/+4
|\ \ | |/ |/| | | | | * spaetz/formerge/507_remove_routes: Purge routes package from MG (#507)
| * Purge routes package from MG (#507)Sebastian Spaeth2012-11-202-8/+4
| | | | | | | | | | | | | | | | | | We were not actually using the routes package anymore, but it was still mentioned in the documention. Adapt the plugin documentation to actually represent reality, although I don't like the API design. (but this is for another day) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | Merge some small bits by spaetz. Needed later.Elrond2012-11-282-6/+8
|\ \ | | | | | | | | | | | | | | | * commit '9437ea4742': Add commit argument to clean_orphan_tags Add "commit" argument to Base model delete()
| * | Add commit argument to clean_orphan_tagsSebastian Spaeth2012-11-281-4/+4
| | | | | | | | | | | | So we can prevent the session from being committed if we don't want it.
| * | Add "commit" argument to Base model delete()Elrond2012-11-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | In case we want to bundle db actions into a single transaction, we can now use delete(commit=False) to prevent the transaction from being committed immediately. This is useful when e.g. deleting a User() and thousands of his MediaEntries in a single commit. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | Merge remote-tracking branch 'spaetz/focus_on_user_creation'Jef van Schendel2012-11-271-0/+2
|\ \ \
| * | | Autofocus the username field on user creationSebastian Spaeth2012-11-261-0/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | On a page with the single purpose to enter new user data, we should auto-focus the username field. It is very annoying to have to click in that field before starting to type. Theoretically, there is the "autofocus" attribute in html5, but IE does not support that. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | Merge remote-tracking branch 'refs/remotes/elrond/sql/migrate_new_tables'Christopher Allan Webber2012-11-262-40/+130
|\ \ \ | |/ / |/| |
| * | SQL Migrations: Rewrite table creation completely.Elrond2012-11-242-40/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have migrations creating new tables. Those currently use "raw" table definitions. This easily gives errors (we already had this problem). So instead rewrite those to use declarative tables and use those to create new tables. Just copy the new table over to the migration, strip it down to the bare minimum, rename to _v0, base it on declarative_base() and be done! Do this for the current migrations.
* | | Merge remote-tracking branch 'spaetz/390_delim' into reviewElrond2012-11-261-15/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * spaetz/390_delim: No need to strip the tag 4 times Slightly shorten the media_tags_as_string function Remove tag delimiter configurability (#390), fixed pep-8 compliance
| * | | No need to strip the tag 4 timesSebastian Spaeth2012-11-161-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | spaetz' rule: Don't do sth 4 times when once suffices. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
| * | | Slightly shorten the media_tags_as_string functionSebastian Spaeth2012-11-141-5/+3
| | | | | | | | | | | | | | | | Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
| * | | Remove tag delimiter configurability (#390), fixed pep-8 compliancedunkyp2012-11-141-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardcode commas as tag delimiters per discussion in issue 390. Also improved PEP-8'ness of the file while touching. Includes some improvements suggested by gandaro. Reviewed-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | | Merge remote-tracking branch 'elrond/for-schendje'Christopher Allan Webber2012-11-262-7/+27
|\ \ \ \
| * | | | Some small template changesElrond2012-11-262-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Change the "dashboard": - Add a bunch of new links: Processing panel, Add media - Use <ul>+<li> for the *list* of possible actions 2) Add a title attribute to the "add media to collection" link
* | | | | geolocation now on by defaultChristopher Allan Webber2012-11-261-1/+1
| | | | |
* | | | | Merge remote-tracking branch 'remotes/spaetz/410_OSM_attrib_v2'Christopher Allan Webber2012-11-264-7/+25
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Add geolocation_visible setting to mediagoblin.iniSebastian Spaeth2012-11-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Place the geolocation_visible setting (defaults to false) in mediagoblin.ini to make it more discoverable (I needed to check the source to find out how to enable it). I'd vote for a default of true, we should come with some batteries included IMHO.. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
| * | | | Pop up OpenStreetMap license on demand (#410)Sebastian Spaeth2012-11-163-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only a short blurb "see map license" in the small map which will pop up the full license text via jquery when clicked. Adapt the license text as recommended by OpenStreetMap http://www.openstreetmap.org/copyright and link there. The disadvantage is that this only works when Javascript is enabled, but as the map only works when Javascript is enabled in the first place, this should not be too much of a limitation. TODO: Our esteemed web designer needs to have a look at the desired color style for this. Right now, I simply placed it in the message_warning class. This might want fine-tuning. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | | | | Stop unicode conversion warning during dbupdate.Elrond2012-11-241-1/+1
| |_|/ / |/| | | | | | | | | | | Just force the passed in name to MigrationManager() to unicode.
* | | | Marking "attachment" stuff for translation (thanks for catching AVRS)Christopher Allan Webber2012-11-241-2/+2
| | | |
* | | | Require werkzeug >= 0.7Elrond2012-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We need it, really. For csrf.py's request.scheme. Thanks to Sebastian Spaeth!
* | | | Very small typo fix in deploying docs.Elrond2012-11-201-2/+2
| |_|/ |/| | | | | | | | Thanks to #mediagoblin.
* | | Suggest checking out the wiki for additional recipesChristopher Allan Webber2012-11-191-0/+5
|/ /
* | Borrowing an image from Tango!Christopher Allan Webber2012-11-151-0/+6
| |
* | Simplify/Robustify the thumbnail URL usage in templatesSebastian Spaeth2012-11-1510-25/+37
|/ | | | | | | | | | | | | | | | | | | | | | So far templates required a very complex blurb to simply insert a thumbnail URL, exposing much of the internal logic to the template designer. In addition, we would fail with an error if for some reason the media_files['thumb'] entry was never populated. This adds the MediaEntry.thumb_url property that template designers can simply use. It will do the right thing, either fetching the proper thumbnail or hand back a generic icon specified in a media's MEDIA_MANAGER as "default_thumb". Add an image default fallback icon (stolen from Tangos, which are Public Domain since version 0.8.90 as I understand) since the one we referred to was not existing. Perhaps, a "broken image" icon would be better, but I'll leave that to our capable designers. All templates have been modified to make use of the new thumb_url function. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>