aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/user_pages
Commit message (Collapse)AuthorAgeFilesLines
* use media.get_uploader and fix typoRodney Ewing2013-08-261-2/+3
|
* added user upload limitsRodney Ewing2013-08-261-0/+4
|
* -skip persona test is requests is not installedRodney Ewing2013-08-191-2/+3
| | | | - should use request.urlgen for location
* media_confirm_delete: redirect to next, then prev, then user homeAlon Levy2013-08-171-2/+6
| | | | | | | | | Instead of redirecting directly to user's home. Makes the flow for mass or just a few deletions easier. For really large deletions it would still make sense to have a dedicated view, but this is still way better then losing context by jumping back to the home view. Signed-off-by: Alon Levy <alon@pobox.com>
* Render 404 if not ajax requestRodney Ewing2013-08-071-0/+4
|
* Changed how the comment was encoded/read.Emily O'Leary2013-08-071-9/+4
| | | | | Fixed CSRF + Post with comment preview. Merged with latest master
* Changed the target of the markdown links for opening in a new tab as ↵Emily O'Leary2013-08-071-2/+2
| | | | suggested by joar.
* Added comment preview functionality to user pages. It works by passing the ↵Emily O'Leary2013-08-073-2/+22
| | | | | | comment's value as a JSON string to a new handler that lives at /ajax/comment/preview. The query string is decoded, unquoted, and has its leading and trailing quotes removed to match the input that cleaned_markdown_conversion expects. It does this in real time with a 500ms lag by using a timer. Initially I tried the onChange handler but you need to lose focus for that to process. The javascript timer is only invoked if the add comment button is pressed. A request is only sent if the comment box is not empty and the current value is not the same as the last value.
* modified gmg to use plugin media_types and converted image media_type to new ↵Rodney Ewing2013-07-021-1/+1
| | | | plugin style
* New notificationsJoar Wandborg2013-06-091-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added request.notifications - Email configuration fixes - Set config_spec default SMTP port to `0` and switch to SSL/non-SSL default if `port == 0` - Added email_smtp_use_ssl configuration setting - Added migrations for notification tables - Added __repr__ to MediaComment(Mixin) - Added MediaComment.get_entry => MediaEntry - Added CommentSubscription, CommentNotification, Notification, ProcessingNotification tables - Added notifications.task to celery init - Fixed a bug in the video transcoder where pygst would hijack the --help argument. - Added notifications - views - silence - subscribe - routes - utility methods - celery task - Added half-hearted .active comment CSS style - Added quick JS to show header_dropdown - Added fragment template to show notifications in header_dropdown - Added fragment template to show subscribe/unsubscribe buttons on media/comment pages - Updated celery setup tests with notifications.task - Tried to fix test_misc tests that I broke - Added notification tests - Added and extended tests.tools fixtures - Integrated new notifications into media_home, media_post_comment views - Bumped SQLAlchemy dependency to >= 0.8.0 since we need polymorphic for the notifications to work
* Merge remote-tracking branch 'refs/remotes/dthompson/453_disable_comments'Christopher Allan Webber2013-05-101-1/+7
|\
| * Do not allow comments to be posted when they are disabled.David Thompson2013-04-131-1/+7
| |
* | Use collection.url_for_self more; Add missing /a.Elrond2013-05-051-3/+1
| | | | | | | | | | | | | | | | Using collection.url_for_self(request.urlgen) instead of request.urlgen(lengthy) is so much nicer, so using it around the place. Also added a few missing </a> in one template.
* | Create redir_obj and use it around.Elrond2013-04-281-13/+7
| | | | | | | | | | | | | | | | This is a shortcut function to redirect to the main page for an object. Objects currently supported: media entries and collections. And go around and replace various places to use this.
* | Fix translations for collections and drop useless try.Elrond2013-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't do: _("With some value: %s" % value) Please do: _("WIth some value: %s") % value Fixed for collection messages. Also removed a try: some_code. except Exception as e: raise No point in doing that. Fixing the indentation of some_code comes in an extra commit, because changing indentation is annoying enough alone, so don't mix it with other changes.
* | Switching non-forms back to using normal pass_to_ugettextChristopher Allan Webber2013-04-241-1/+1
| |
* | Fix-bug-667-Use-lazy_pass_to_ugettext-for-forms.Aditi Mittal2013-04-242-2/+2
| |
* | Create add_media_to_collection()Elrond2013-04-232-12/+23
|/ | | | | | | | The ideas is by Alon Levy. Not only media_collect, but also other places might want to add media to a collection. So refactor this into a function for easier usage.
* Use WTForms data field in user_pages/views.pyHans Lo2013-03-281-1/+1
| | | | Missed case in a previous commit.
* Use WTForms data field in user_pages/views.pyHans Lo2013-03-241-4/+4
|
* 655: Fix collection fetching for media_collect()Elrond2013-03-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | The problem is: Collection.query.filter_by(id=X, ...) 1. X = form.collection.data This works nicely for the completely empty form (X = None). It does not work for a selected collection, because X will be the collection, not its id. 2. X = request.form.get('collection') (old code). This one works mostly, except for the completely empty form on postgres, because in this case X = u"__None" and postgres does not like comparing an integer column with a string. Fix: collection = form.collection.data if collection and collection.creator != request.user.id: collection = None
* Elrond points out that we should use form.collection.dataChristopher Allan Webber2013-03-041-1/+1
| | | | | | | That's true; I'm not sure what it's fixing, but he thinks it's fixing something. Anyway, it's correct :) This commit sponsored by Philippe Gauthier. Thanks!
* Three fixes to collection adding view, one of them a serious security bugChristopher Allan Webber2013-03-041-3/+3
| | | | | | | | | | | | | | - Don't let people who aren't the authors of a collection from adding things to it (handled by forcing the user check in the query) - request url in case invalid collection selected fixed - collection_item.author doesn't yet exist; removing the selection (we might want multiple people to be able to edit a collection in the future but that future does not yet exist; as Elrond said, remove this "false hope") Thanks to Elrond to pointing out these issues. And thanks to David Kindler for sponsoring this commit!
* Fix some media page redirects in media_collect.Elrond2013-03-011-3/+3
| | | | Use .slug_or_id instead of only .id.
* Fixup _("...") % (...) in media_collect.Elrond2013-03-011-6/+6
| | | | | | | Get some messages translated. Bad: _("..." % (...)) Good: _("...") % (...)
* Use media.id for collecting media too.Elrond2013-02-242-2/+2
| | | | Also remove some useless whitespace while at it.
* Use the media id for attachmemt editing.Elrond2013-02-241-1/+1
| | | | And remove some stray white space from the output.
* Making the tags on media pages point to the user's tag listing specifically.Christopher Allan Webber2013-02-211-1/+1
| | | | This commit sponsored by Torsten Meissner. Thanks, Torsten!
* Fixing user gallery tags filter to be on slug rather than name.Christopher Allan Webber2013-02-211-1/+1
| | | | This commit sponsored by Kat Walsh. Thanks, Kat!
* Merge remote-tracking branch 'refs/remotes/spaetz/WIP/user_tag_gallery'Christopher Allan Webber2013-02-212-3/+15
|\
| * Implement user's tag filtered gallery pageSebastian Spaeth2013-01-212-3/+15
| | | | | | | | | | | | | | | | tags used to be global, you could only browse media by tag for all users. This patch implements a view that allows us to browse only a user's tagged media. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | Fix errors in collection viewsJoar Wandborg2013-02-181-0/+5
| | | | | | | | When a collection does not exist, render the 404 page.
* | Change from email format in tag URI to domain formatJoar Wandborg2013-02-131-2/+2
| | | | | | | | Also fixed a bug (thanks pyflakes)
* | Address concerns in Issue #543Joar Wandborg2013-02-131-8/+10
| | | | | | | | | | | | | | - Fixed PEP-008 issues. - Removed .user-{user} from the tag URI and put it before the domain, such as {user}@{host} instead. - Use year from collection.created instead of current year.
* | Mark "Collection" for translation in media_collect.Elrond2013-02-051-1/+3
| |
* | Moved MediaComment form descriptions to apt. placeJoar Wandborg2013-01-221-2/+5
|/
* Fix linking to comments.Elrond2013-01-172-3/+4
| | | | | | | | | | | | | | when linking to a comment in a MediaEntry, the page did not contain a <a name="comment"> because, well: We fetched a string comment-id from the routing. And the pagination code tried to compare that to the int id on the comment. Fix is to let routing fetch an int from the url. Easy. Relatedly remove duplicated comment_id fetching from the URL in the view.
* Return to media collection page if no collection selectedSebastian Spaeth2013-01-171-0/+4
| | | | | | | | | | schendje rightly pointed out that we should not return to the media homepage if we did not select a collection on the "collect" page, but should actually return to the collect page. This is an improvement of the user experience ;-) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Merge branch '540_User_delete_deletes_related_entries'Sebastian Spaeth2013-01-171-16/+1
|\
| * Implement MediaEntry().delete() (#540)Sebastian Spaeth2013-01-171-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | Deleting a MediaEntry instance will automatically delete all related comments and files/attachments. This moves implementation logic out of views.py and allows to make use of this functionality when e.g. deleting a User() account. Whenever a MediaEntry entry is deleted, this will also sql-delete the corresponding MediaFile entry. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | Merge remote-tracking branch 'refs/remotes/elrond/misc/use_media_id'Christopher Allan Webber2013-01-162-5/+6
|\ \
| * | Start to use the media_id in "admin" URLs.Elrond2013-01-112-5/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | We have a bunch of URLs that are more for internal use. At least they're definitely not intended to be posted somewhere for long term useage. When those things affect a media, it's much better to reference the media by its id. This can't change, ever. This is better for races. Like someone posting a comment while the owner corrects a typo in the slug.
* | collection browsing: rename view/template user_collections -> collection_listStefano Zacchiroli2013-01-152-4/+4
| | | | | | | | | | Rationale, avoid confusion between views user_collection and user_collections (note trailing "s"). Ditto for the collection(s).html templates.
* | collection browsing: remove pagination supportStefano Zacchiroli2013-01-151-6/+2
| | | | | | | | | | | | | | rationale: we do not expect hundreds of collection (and it was likely broken anyhow) thanks to Elrond der Elbenfuerst for pointing this out
* | collections: add support to browse existing collectionsStefano Zacchiroli2013-01-152-0/+21
|/ | | | | | | - add a route at /u/<user>/collections/ (note trailing 's') that lists all existing collections - move there the "Create new collection" link, if the user is logged in - add a new link "Browse collections" from root.html
* Remove custom GMQuery classSebastian Spaeth2013-01-071-1/+1
| | | | | | | | | We provided a custom GMQuery class that offered a .sort() method for compatibility with the Mongo syntax. Now that we have settled for sqlalchemy which uses the order_by() method, we can safely remove this custom class and move a little closer to "pure" and native sqlalchemy usage. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Move db.sql.models* to db.models*Sebastian Spaeth2013-01-071-1/+1
|
* Remove mediagoblin.db.sql.fake.DESCENDINGSebastian Spaeth2013-01-071-3/+2
| | | | | | | | This is the last remnant that requires us to keep db.sql.fake.py. Use ModelName.desc() or sqlalchemy.sql.expression.desc(column) to achieve descending sorts. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Remove ObjectId from the treeSebastian Spaeth2012-12-251-2/+2
| | | | | | | This was one of the last remaining Mongo holdouts and has been removed from the tree herewith. Good bye, ObjectId. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Mongo removal: Remove the validate=True arg to obj.save()Elrond2012-12-241-3/+3
| | | | | all callers were forced to use validate=True anyway. So remove this useless stuff.