mediagoblin.git
11 years agoCreate a active_user_from_url decorator
Sebastian Spaeth [Wed, 5 Dec 2012 12:37:19 +0000 (13:37 +0100)]
Create a active_user_from_url decorator

This can be used for URL patterns containing a <user> element. It will look
up the corresponding user among all active users and return a 404 NOT FOUND
page if there is no such active user. It then passes the User() instance as
url_user keyword argument to the decorated view function.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoRemove gridify_*
Sebastian Spaeth [Tue, 4 Dec 2012 16:28:53 +0000 (17:28 +0100)]
Remove gridify_*

We injected a gridify_list and gridify_cursor function into each jinja2
template that we render. This was used to split the list of media_entries
into batches of 5 for nicer table columns. However, jinja2 has a nice |batch
filter built in that does the job for us just as well with less code (on our side)

Less code=good

so let's merge this one.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoWe arean't using header_dropdown.js anymore because the dropdown is gone!
Christopher Allan Webber [Tue, 4 Dec 2012 15:34:41 +0000 (09:34 -0600)]
We arean't using header_dropdown.js anymore because the dropdown is gone!

11 years agomake media_manager a property of MediaEntry in mixin.py
Sebastian Spaeth [Tue, 4 Dec 2012 08:57:56 +0000 (09:57 +0100)]
make media_manager a property of MediaEntry in mixin.py

In all cases where get_media_manager(_media_type_as_string) was called in
our code base we ultimately passed in a "MediaEntry().media_type" to get
the matching MEDIA_MANAGER. It so makes sense to make this a function of
the MediaEntry rather than a global function in mediagoblin.media_types and
passing around media_entry.media_type as arguments all the time.

It saves a few import statements and arguments. I also made it so the
Media_manager property is cached for subsequent calls, although I am not too
sure that this is needed (there are other cases for which this would make
more sense)

Also add a get_media_manager test to the media submission tests. It submits
an image and checks that both media.media_type and media.media_manager
return the right thing. Not sure if these tests could not be merged with an
existing submission test, but it can't hurt to have things explicit.

TODO: Right now we iterate through all existing media_managers to find the
right one based on the string of its module name. This should be made a simple
dict lookup to avoid all the extra work.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoFallback to "en_US" if browser does not send preferred languages
Sebastian Spaeth [Tue, 4 Dec 2012 08:44:07 +0000 (09:44 +0100)]
Fallback to "en_US" if browser does not send preferred languages

E.g. in our test suite we don't send an "accepted languages" header, which
caused the language matching to fail. So we need to explicitely fallback to
en_US, in case request.accepted_languages is None. This fixes the tests and
all cases where user browsers don't send preferred languages.

This also fixes issue #562, the AVAILABLE_LOCALES are already case-normalized
and we don't need to fudge the preferred language through the lower_upper_locale
thing for each and every request.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoMoving thingiview.js into extlib/
Christopher Allan Webber [Mon, 3 Dec 2012 20:57:52 +0000 (14:57 -0600)]
Moving thingiview.js into extlib/

11 years agoSwitch stl processing over to using the workbench
Christopher Allan Webber [Sun, 2 Dec 2012 20:14:15 +0000 (14:14 -0600)]
Switch stl processing over to using the workbench

Previously this was writing directly to the public store... that won't
work with cloudfiles backend, for example :)

11 years agoCorrecting minor typo in exception string: Empyt->Empty
Christopher Allan Webber [Sun, 2 Dec 2012 17:33:32 +0000 (11:33 -0600)]
Correcting minor typo in exception string: Empyt->Empty

11 years agoRemoving unused conversions subdir
Christopher Allan Webber [Sun, 2 Dec 2012 17:28:54 +0000 (11:28 -0600)]
Removing unused conversions subdir

11 years agoMoving blender render files to be accessed via pkg_resources
Christopher Allan Webber [Sun, 2 Dec 2012 02:16:15 +0000 (20:16 -0600)]
Moving blender render files to be accessed via pkg_resources

Previously the .blend and .py files had to be in the same directory
mediagoblin/celery launched from.  This is now fixed so it pulls them
out of the package proper.

11 years agoRemoving render_test.py, which isn't used
Christopher Allan Webber [Sun, 2 Dec 2012 01:46:49 +0000 (19:46 -0600)]
Removing render_test.py, which isn't used

11 years agoRemoved debug info from the sidebar.
Aeva Ntsc [Tue, 16 Oct 2012 07:11:34 +0000 (02:11 -0500)]
Removed debug info from the sidebar.

11 years agotweaking the template
Aeva Ntsc [Tue, 16 Oct 2012 06:55:04 +0000 (01:55 -0500)]
tweaking the template

11 years agoFixed the binary stl loader.
Aeva Ntsc [Tue, 16 Oct 2012 06:54:27 +0000 (01:54 -0500)]
Fixed the binary stl loader.

11 years agoDisabled thingiview for obj models, since thingiview's support for them seems to...
Aeva Ntsc [Tue, 16 Oct 2012 06:02:05 +0000 (01:02 -0500)]
Disabled thingiview for obj models, since thingiview's support for them seems to be broken.

11 years agoAdded a table to store the file extension of a model.
Aeva Ntsc [Tue, 16 Oct 2012 06:01:34 +0000 (01:01 -0500)]
Added a table to store the file extension of a model.

11 years agoUpdated the template for viewing stl models.
Aeva Ntsc [Tue, 16 Oct 2012 05:38:39 +0000 (00:38 -0500)]
Updated the template for viewing stl models.

11 years agoAdded preview rendering for a bunch of different shots.
Aeva Ntsc [Tue, 16 Oct 2012 05:38:08 +0000 (00:38 -0500)]
Added preview rendering for a bunch of different shots.

11 years agoCatching ValueError when trying to use ObjModel on binary stl files.
Aeva Ntsc [Tue, 16 Oct 2012 05:37:44 +0000 (00:37 -0500)]
Catching ValueError when trying to use ObjModel on binary stl files.

11 years agoAdded script for manually testing the blender renderer.
Aeva Ntsc [Tue, 16 Oct 2012 05:35:37 +0000 (00:35 -0500)]
Added script for manually testing the blender renderer.

11 years agoAdded blender renderer
Aeva Ntsc [Tue, 16 Oct 2012 05:35:09 +0000 (00:35 -0500)]
Added blender renderer

11 years agomade 3d viewer a little cleaner
Aeva Ntsc [Mon, 15 Oct 2012 15:10:32 +0000 (10:10 -0500)]
made 3d viewer a little cleaner

11 years agodisabled auto rotate
Aeva Ntsc [Mon, 15 Oct 2012 15:10:04 +0000 (10:10 -0500)]
disabled auto rotate

11 years agoAdded the stl/obj mediatype.
Aeva Ntsc [Mon, 15 Oct 2012 06:36:26 +0000 (01:36 -0500)]
Added the stl/obj mediatype.

11 years agoAdded a rudimentary template for the stl/obj viewer.
Aeva Ntsc [Mon, 15 Oct 2012 06:35:59 +0000 (01:35 -0500)]
Added a rudimentary template for the stl/obj viewer.

11 years agoAdded the thingiview.js library.
Aeva Ntsc [Mon, 15 Oct 2012 06:34:11 +0000 (01:34 -0500)]
Added the thingiview.js library.

11 years agoAdded the thingiview.js library.
Aeva Ntsc [Mon, 15 Oct 2012 06:33:38 +0000 (01:33 -0500)]
Added the thingiview.js library.

11 years agoCommitting extracted and compiled translations
Christopher Allan Webber [Mon, 3 Dec 2012 19:23:55 +0000 (13:23 -0600)]
Committing extracted and compiled translations

11 years agoCommitting present MediaGoblin translations before pushing extracted messages
Christopher Allan Webber [Mon, 3 Dec 2012 19:23:02 +0000 (13:23 -0600)]
Committing present MediaGoblin translations before pushing extracted messages

11 years agoFix translations around.
Elrond [Mon, 3 Dec 2012 13:19:28 +0000 (14:19 +0100)]
Fix translations around.

This includes:
- Mark more strings for translation
- Don't mark html-only nonsense for translation
- Mark a better part for translation.

11 years agoGo back to pre-login URL after loging in
Sebastian Spaeth [Mon, 26 Nov 2012 16:03:24 +0000 (17:03 +0100)]
Go back to pre-login URL after loging in

Simply append the current URL (sans querystring) as a ?next= parameter
to the login URL. This will always take us back to the original page
where we were pre-login.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoProvide jinja2 urlencode filter
Sebastian Spaeth [Mon, 26 Nov 2012 20:24:35 +0000 (21:24 +0100)]
Provide jinja2 urlencode filter

Astonishingly, the great jinja2 does not provide a builtin urlquote filter,
although it is obviously needed. (jina1 had one) This is:
https://github.com/mitsuhiko/jinja2/issues/17

Provide an urlencode filter, based on werkzeug's url_quote_plus function.
This is dead easy to implement and gives us all the freedom we want.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoAdd extlibs to packaging
Sebastian Spaeth [Mon, 3 Dec 2012 12:53:32 +0000 (13:53 +0100)]
Add extlibs to packaging

setup.py bdist fails as it can't find the extlib's. DOH, that is because
we don't package them.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoUse pypi-compatible license signature
Sebastian Spaeth [Sun, 2 Dec 2012 13:27:20 +0000 (14:27 +0100)]
Use pypi-compatible license signature

It complains about a non-compatible license string. so use the
GNU AGPL v3+ string that is listed at
http://pypi.python.org/pypi?%3Aaction=list_classifiers

With this change, we are able to create a  pypi mediagoblin package.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoen_US is always available
Sebastian Spaeth [Sun, 2 Dec 2012 01:35:04 +0000 (02:35 +0100)]
en_US is always available

We were using "en" as fallback only when no preferred language matched.
This is obviously bad. Always insert en_US as available locale, so we
can match it with the accept_languages.

Don't set available_locales as mg_global, per discussion with paroneaya,
make it a global var in translate.py

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoFixing bug where not all conditions returned a language in get_locale_from_request()
Christopher Allan Webber [Sun, 2 Dec 2012 01:36:52 +0000 (19:36 -0600)]
Fixing bug where not all conditions returned a language in get_locale_from_request()

Just had to change the indentation level of the last commit.

11 years agoFall back to "en" if we don't find matching translations
Sebastian Spaeth [Sun, 2 Dec 2012 00:38:09 +0000 (01:38 +0100)]
Fall back to "en" if we don't find matching translations

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>
11 years agoAlso package i18n/*.mo
Sebastian Spaeth [Sun, 2 Dec 2012 00:09:35 +0000 (01:09 +0100)]
Also package i18n/*.mo

....
and I wondered why my production site fails to display German pages...

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
11 years agoHonor user's browser language (#558)
Sebastian Spaeth [Sat, 1 Dec 2012 23:29:30 +0000 (00:29 +0100)]
Honor user's browser language (#558)

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>
11 years agoFix i18n in our browser
Sebastian Spaeth [Sat, 1 Dec 2012 22:35:52 +0000 (23:35 +0100)]
Fix i18n in our browser

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>
11 years agodocs: Add trim_whitespaces plugin to relnotes and documentation
Sebastian Spaeth [Sat, 1 Dec 2012 19:31:18 +0000 (20:31 +0100)]
docs: Add trim_whitespaces plugin to relnotes and documentation

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>
11 years agotrim_whitespace meddleware plugin
Sebastian Spaeth [Thu, 29 Nov 2012 10:28:25 +0000 (11:28 +0100)]
trim_whitespace meddleware plugin

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>
11 years agoMake ENABLED_MEDDLEWARES a list and not a tuple, so we can modify it
Sebastian Spaeth [Thu, 29 Nov 2012 10:27:59 +0000 (11:27 +0100)]
Make ENABLED_MEDDLEWARES a list and not a tuple, so we can modify it

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>
11 years agoRemove the NoOp meddleware
Sebastian Spaeth [Thu, 29 Nov 2012 10:25:30 +0000 (11:25 +0100)]
Remove the NoOp meddleware

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>
12 years agoImplement licenses.get_license_by_url
Sebastian Spaeth [Mon, 26 Nov 2012 13:55:33 +0000 (14:55 +0100)]
Implement licenses.get_license_by_url

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>
12 years agoImprove mediagoblin.tools.licenses
Sebastian Spaeth [Mon, 26 Nov 2012 13:47:03 +0000 (14:47 +0100)]
Improve mediagoblin.tools.licenses

"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...

12 years agoUse mediagoblin import machinery
Sebastian Spaeth [Fri, 30 Nov 2012 13:25:26 +0000 (14:25 +0100)]
Use mediagoblin import machinery

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>
12 years agoRemove importlib (python2.7'ism)
Sebastian Spaeth [Fri, 30 Nov 2012 10:22:39 +0000 (11:22 +0100)]
Remove importlib (python2.7'ism)

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>
12 years agoMerge remote-tracking branch 'spaetz/formerge/538_FORBIDDEN_admin_pages'
Elrond [Thu, 29 Nov 2012 14:27:50 +0000 (15:27 +0100)]
Merge remote-tracking branch 'spaetz/formerge/538_FORBIDDEN_admin_pages'

* spaetz/formerge/538_FORBIDDEN_admin_pages:
  Fix error page text
  Return code 403 when accessing admin pages
  Implement generic error pages

12 years agoFix error page text
Sebastian Spaeth [Thu, 29 Nov 2012 13:51:24 +0000 (14:51 +0100)]
Fix error page text

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>
12 years agoMerge remote-tracking branch 'spaetz/formerge/bundle_xml_templates_too'
Elrond [Thu, 29 Nov 2012 13:34:16 +0000 (14:34 +0100)]
Merge remote-tracking branch 'spaetz/formerge/bundle_xml_templates_too'

* spaetz/formerge/bundle_xml_templates_too:
  Also package webfinger.xml

12 years agoAlso package webfinger.xml
Sebastian Spaeth [Thu, 29 Nov 2012 13:32:28 +0000 (14:32 +0100)]
Also package webfinger.xml

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>
12 years agoMerge remote-tracking branch 'spaetz/formerge/507_remove_routes'
Elrond [Thu, 29 Nov 2012 13:29:43 +0000 (14:29 +0100)]
Merge remote-tracking branch 'spaetz/formerge/507_remove_routes'

* spaetz/formerge/507_remove_routes:
  Purge routes package from MG (#507)

12 years agoReturn code 403 when accessing admin pages
Sebastian Spaeth [Thu, 15 Nov 2012 14:41:06 +0000 (15:41 +0100)]
Return code 403 when accessing admin pages

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>
12 years agoImplement generic error pages
Sebastian Spaeth [Thu, 29 Nov 2012 07:57:12 +0000 (08:57 +0100)]
Implement generic error pages

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>
12 years agoMerge some small bits by spaetz. Needed later.
Elrond [Wed, 28 Nov 2012 15:45:15 +0000 (16:45 +0100)]
Merge some small bits by spaetz. Needed later.

* commit '9437ea4742':
  Add commit argument to clean_orphan_tags
  Add "commit" argument to Base model delete()

12 years agoAdd commit argument to clean_orphan_tags
Sebastian Spaeth [Wed, 28 Nov 2012 13:36:58 +0000 (14:36 +0100)]
Add commit argument to clean_orphan_tags

So we can prevent the session from being committed if we don't want it.

12 years agoAdd "commit" argument to Base model delete()
Elrond [Wed, 28 Nov 2012 12:50:31 +0000 (13:50 +0100)]
Add "commit" argument to Base model delete()

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>
12 years agoMerge remote-tracking branch 'spaetz/focus_on_user_creation'
Jef van Schendel [Tue, 27 Nov 2012 12:56:38 +0000 (13:56 +0100)]
Merge remote-tracking branch 'spaetz/focus_on_user_creation'

12 years agoMerge remote-tracking branch 'refs/remotes/elrond/sql/migrate_new_tables'
Christopher Allan Webber [Mon, 26 Nov 2012 21:15:13 +0000 (15:15 -0600)]
Merge remote-tracking branch 'refs/remotes/elrond/sql/migrate_new_tables'

12 years agoAutofocus the username field on user creation
Sebastian Spaeth [Mon, 26 Nov 2012 20:38:29 +0000 (21:38 +0100)]
Autofocus the username field on user creation

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>
12 years agoMerge remote-tracking branch 'spaetz/390_delim' into review
Elrond [Mon, 26 Nov 2012 18:52:11 +0000 (19:52 +0100)]
Merge remote-tracking branch 'spaetz/390_delim' into review

* 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

12 years agoMerge remote-tracking branch 'elrond/for-schendje'
Christopher Allan Webber [Mon, 26 Nov 2012 18:50:17 +0000 (12:50 -0600)]
Merge remote-tracking branch 'elrond/for-schendje'

12 years agogeolocation now on by default
Christopher Allan Webber [Mon, 26 Nov 2012 17:57:33 +0000 (11:57 -0600)]
geolocation now on by default

12 years agoMerge remote-tracking branch 'remotes/spaetz/410_OSM_attrib_v2'
Christopher Allan Webber [Mon, 26 Nov 2012 17:53:59 +0000 (11:53 -0600)]
Merge remote-tracking branch 'remotes/spaetz/410_OSM_attrib_v2'

12 years agoSome small template changes
Elrond [Sun, 25 Nov 2012 23:29:39 +0000 (00:29 +0100)]
Some small template changes

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

12 years agoStop unicode conversion warning during dbupdate.
Elrond [Sat, 24 Nov 2012 21:57:46 +0000 (22:57 +0100)]
Stop unicode conversion warning during dbupdate.

Just force the passed in name to MigrationManager() to unicode.

12 years agoSQL Migrations: Rewrite table creation completely.
Elrond [Sat, 24 Nov 2012 18:19:18 +0000 (19:19 +0100)]
SQL Migrations: Rewrite table creation completely.

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.

12 years agoMarking "attachment" stuff for translation (thanks for catching AVRS)
Christopher Allan Webber [Fri, 23 Nov 2012 04:27:29 +0000 (22:27 -0600)]
Marking "attachment" stuff for translation (thanks for catching AVRS)

12 years agoRequire werkzeug >= 0.7
Elrond [Fri, 23 Nov 2012 23:15:41 +0000 (00:15 +0100)]
Require werkzeug >= 0.7

We need it, really. For csrf.py's request.scheme.

Thanks to Sebastian Spaeth!

12 years agoVery small typo fix in deploying docs.
Elrond [Tue, 20 Nov 2012 13:32:29 +0000 (14:32 +0100)]
Very small typo fix in deploying docs.

Thanks to #mediagoblin.

12 years agoPurge routes package from MG (#507)
Sebastian Spaeth [Tue, 20 Nov 2012 08:25:41 +0000 (09:25 +0100)]
Purge routes package from MG (#507)

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>
12 years agoSuggest checking out the wiki for additional recipes
Christopher Allan Webber [Mon, 19 Nov 2012 18:17:44 +0000 (12:17 -0600)]
Suggest checking out the wiki for additional recipes

12 years agoNo need to strip the tag 4 times
Sebastian Spaeth [Fri, 16 Nov 2012 12:18:37 +0000 (13:18 +0100)]
No need to strip the tag 4 times

spaetz' rule: Don't do sth 4 times when once suffices.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agoAdd geolocation_visible setting to mediagoblin.ini
Sebastian Spaeth [Wed, 14 Nov 2012 19:31:03 +0000 (20:31 +0100)]
Add geolocation_visible setting to mediagoblin.ini

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>
12 years agoPop up OpenStreetMap license on demand (#410)
Sebastian Spaeth [Wed, 14 Nov 2012 09:12:58 +0000 (10:12 +0100)]
Pop up OpenStreetMap license on demand (#410)

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>
12 years agoBorrowing an image from Tango!
Christopher Allan Webber [Thu, 15 Nov 2012 20:40:00 +0000 (14:40 -0600)]
Borrowing an image from Tango!

12 years agoSimplify/Robustify the thumbnail URL usage in templates
Sebastian Spaeth [Fri, 9 Nov 2012 09:13:04 +0000 (10:13 +0100)]
Simplify/Robustify the thumbnail URL usage in templates

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>
12 years agoSlightly shorten the media_tags_as_string function
Sebastian Spaeth [Wed, 14 Nov 2012 07:54:48 +0000 (08:54 +0100)]
Slightly shorten the media_tags_as_string function

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agoRemove tag delimiter configurability (#390), fixed pep-8 compliance
dunkyp [Tue, 6 Nov 2012 13:32:48 +0000 (13:32 +0000)]
Remove tag delimiter configurability (#390), fixed pep-8 compliance

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>
12 years agoMerge remote-tracking branch 'refs/remotes/spaetz/trac_475_email_notification_checkbox'
Christopher Allan Webber [Tue, 13 Nov 2012 14:55:14 +0000 (08:55 -0600)]
Merge remote-tracking branch 'refs/remotes/spaetz/trac_475_email_notification_checkbox'

12 years agoDon't put checkbox text on separate line (#475)
LotusEcho [Mon, 24 Sep 2012 20:15:34 +0000 (16:15 -0400)]
Don't put checkbox text on separate line (#475)

Manually render the "notify me" checkbox line in the account settings
to not put the form label as a heading but in the same line as the
checkbox.

Edit forms.py to use the label attribute for the caption.

Original patch modified by Sebastian Spaeth to 1) not translate the
checkbox label in the template, it is translated in forms.py already.
2) Simplify the HTML, manually constructing the <label> tag is not
necessary, WTforms does it automatically.

Author:    LotusEcho <Emma.C.Echo@gmail.com>
Modified-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agoRevert thumbnail styling and sizing; allows for 5 thumbnails per row
Jef van Schendel [Thu, 1 Nov 2012 16:10:16 +0000 (17:10 +0100)]
Revert thumbnail styling and sizing; allows for 5 thumbnails per row

12 years agoChange to 5 thumbnails per row
Jef van Schendel [Thu, 1 Nov 2012 16:03:45 +0000 (17:03 +0100)]
Change to 5 thumbnails per row

12 years agoChange thumbnail width to 212px
Jef van Schendel [Thu, 1 Nov 2012 15:59:27 +0000 (16:59 +0100)]
Change thumbnail width to 212px

12 years agoUpdate Airy's base.html
Jef van Schendel [Tue, 23 Oct 2012 14:12:11 +0000 (16:12 +0200)]
Update Airy's base.html

12 years agoMove <a> end tag
Jef van Schendel [Tue, 23 Oct 2012 14:11:06 +0000 (16:11 +0200)]
Move <a> end tag

12 years agoRemove obsolete dropdown styling
Jef van Schendel [Tue, 23 Oct 2012 14:09:40 +0000 (16:09 +0200)]
Remove obsolete dropdown styling

12 years agoDon't show link to original when the file is an image
Jef van Schendel [Tue, 23 Oct 2012 13:47:05 +0000 (15:47 +0200)]
Don't show link to original when the file is an image

12 years agoDon't show zoom in cursor if there is no larger version
Jef van Schendel [Tue, 23 Oct 2012 13:41:46 +0000 (15:41 +0200)]
Don't show zoom in cursor if there is no larger version

12 years agoFixed attachments
Joar Wandborg [Mon, 22 Oct 2012 23:09:09 +0000 (01:09 +0200)]
Fixed attachments

12 years agoMerge branch 'master' of gitorious.org:mediagoblin/mediagoblin
Christopher Allan Webber [Mon, 22 Oct 2012 16:07:01 +0000 (11:07 -0500)]
Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.

12 years agoSet the user page to two columns wide so we don't have this weird wrapping.
Christopher Allan Webber [Mon, 22 Oct 2012 16:06:15 +0000 (11:06 -0500)]
Set the user page to two columns wide so we don't have this weird wrapping.

This is a stopgap solution!

12 years agoReplace dropdown in top right with regular links
Jef van Schendel [Sun, 21 Oct 2012 19:49:39 +0000 (21:49 +0200)]
Replace dropdown in top right with regular links

12 years agoMove "Add collection" and "Change account settings" links to root.html
Jef van Schendel [Sun, 21 Oct 2012 19:18:08 +0000 (21:18 +0200)]
Move "Add collection" and "Change account settings" links to root.html

12 years agoAdd "Add collection" link to Airy theme
Jef van Schendel [Sun, 21 Oct 2012 18:36:30 +0000 (20:36 +0200)]
Add "Add collection" link to Airy theme

12 years agoMerge branch 'master' of gitorious.org:mediagoblin/mediagoblin
Jef van Schendel [Sun, 21 Oct 2012 00:17:57 +0000 (02:17 +0200)]
Merge branch 'master' of gitorious.org:mediagoblin/mediagoblin

12 years agoStyling edits to Airy theme
Jef van Schendel [Sun, 21 Oct 2012 00:17:38 +0000 (02:17 +0200)]
Styling edits to Airy theme

12 years agoAdded HTTP API auth plugin
Joar Wandborg [Sat, 20 Oct 2012 21:56:00 +0000 (23:56 +0200)]
Added HTTP API auth plugin

12 years agoImplement new RSS icon for Airy theme
Jef van Schendel [Sat, 20 Oct 2012 16:33:26 +0000 (18:33 +0200)]
Implement new RSS icon for Airy theme