diff options
Diffstat (limited to 'mediagoblin/templates/mediagoblin/user_pages/media.html')
-rw-r--r-- | mediagoblin/templates/mediagoblin/user_pages/media.html | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 17beffb2..4b02b684 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -20,6 +20,8 @@ {% import "/mediagoblin/utils/wtforms.html" as wtforms_util %} {% from "mediagoblin/utils/pagination.html" import render_pagination %} +{% block title %}{{ media.title }} — {{ super() }}{% endblock %} + {% block mediagoblin_content %} {% if media %} <div class="grid_11 alpha"> @@ -60,17 +62,17 @@ {%- endtrans %} </p> <h3></h3> - {% if request.user %} + {% if request.user and comments.count() %} <p><a href="#comment_form">{% trans %}Post a comment{% endtrans %}</a></p> {% endif %} {% if comments %} {% for comment in comments %} {% set comment_author = comment.author() %} {% if pagination.active_id == comment._id %} - <div class="comment_wrapper comment_active" id="comment-{{ 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_content">{% autoescape False %}{{ comment.content_html }} @@ -81,7 +83,7 @@ {{ comment_author['username'] }}</a> {% trans %}at{% endtrans %} <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment', - comment = comment['_id'], + comment = comment._id, user = media.uploader().username, media = media._id) }}#comment"> {{ comment.created.strftime("%I:%M%p %Y-%m-%d") }} @@ -112,7 +114,7 @@ <div class="grid_5 omega"> {% include "mediagoblin/utils/prev_next.html" %} - {% if media['uploader'] == request.user['_id'] or + {% if media['uploader'] == request.user._id or request.user['is_admin'] %} <h3>{% trans %}Actions{% endtrans %}</h3> <p> @@ -149,7 +151,7 @@ {% endif %} {% if app_config['allow_attachments'] - and (media['uploader'] == request.user['_id'] + and (media['uploader'] == request.user._id or request.user['is_admin']) %} <p> <a href="{{ request.urlgen('mediagoblin.edit.attachments', |