diff options
Diffstat (limited to 'mediagoblin/templates/mediagoblin/user_pages/media.html')
-rw-r--r-- | mediagoblin/templates/mediagoblin/user_pages/media.html | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index cb06c7ba..11f2a2a1 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -79,15 +79,15 @@ {{ media.title }} </h2> {% if request.user and - (media.uploader == request.user._id or + (media.uploader == request.user.id or request.user.is_admin) %} {% set edit_url = request.urlgen('mediagoblin.edit.edit_media', user= media.get_uploader.username, - media= media._id) %} + media= media.id) %} <a class="button_action" href="{{ edit_url }}">{% trans %}Edit{% endtrans %}</a> {% set delete_url = request.urlgen('mediagoblin.user_pages.media_confirm_delete', user= media.get_uploader.username, - media= media._id) %} + media= media.id) %} <a class="button_action" href="{{ delete_url }}">{% trans %}Delete{% endtrans %}</a> {% endif %} {% autoescape False %} @@ -104,7 +104,7 @@ {% if request.user %} <form action="{{ request.urlgen('mediagoblin.user_pages.media_post_comment', user= media.get_uploader.username, - media=media._id) }}" method="POST" id="form_comment"> + media=media.id) }}" method="POST" id="form_comment"> <p> {% trans %}You can use <a href="http://daringfireball.net/projects/markdown/basics">Markdown</a> for formatting.{% endtrans %} </p> @@ -117,11 +117,11 @@ {% endif %} {% for comment in comments %} {% set comment_author = comment.get_author %} - {% if pagination.active_id == comment._id %} - <div class="comment_wrapper comment_active" id="comment-{{ comment._id }}"> + {% if pagination.active_id == comment.id %} + <div class="comment_wrapper comment_active" id="comment-{{ comment.id }}"> <a name="comment" id="comment"></a> {% else %} - <div class="comment_wrapper" id="comment-{{ comment._id }}"> + <div class="comment_wrapper" id="comment-{{ comment.id }}"> {% endif %} <div class="comment_author"> <img src="{{ request.staticdirect('/images/icon_comment.png') }}" /> @@ -131,7 +131,7 @@ </a> {% trans %}at{% endtrans %} <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment', - comment = comment._id, + comment = comment.id, user = media.get_uploader.username, media = media.slug_or_id) }}#comment"> {{ comment.created.strftime("%I:%M%p %Y-%m-%d") }} @@ -181,7 +181,7 @@ {% endif %} {% if app_config['allow_attachments'] and request.user - and (media.uploader == request.user._id + and (media.uploader == request.user.id or request.user.is_admin) %} {% if not media.attachment_files|count %} <h3>{% trans %}Attachments{% endtrans %}</h3> @@ -189,7 +189,7 @@ <p> <a href="{{ request.urlgen('mediagoblin.edit.attachments', user=media.get_uploader.username, - media=media._id) }}">{% trans %}Add attachment{% endtrans %}</a> + media=media.id) }}">{% trans %}Add attachment{% endtrans %}</a> </p> {% endif %} @@ -197,7 +197,7 @@ <p> <a type="submit" href="{{ request.urlgen('mediagoblin.user_pages.media_collect', user=media.get_uploader.username, - media=media._id) }}" + media=media.id) }}" class="button_action" title="{% trans %}Add media to collection{% endtrans %}"> <img src="{{ request.staticdirect('/images/icon_collect.png') }}" |