diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 7434664c..caa99eb7 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -23,143 +23,139 @@ {% block title %}{{ media.title }} — {{ super() }}{% endblock %} {% block mediagoblin_content %} - {% if media %} -
{{ media.description_html }}
- {% endautoescape %} -- {% trans date=media.created.strftime("%Y-%m-%d"), - user_url=request.urlgen( - 'mediagoblin.user_pages.user_home', - user=media.get_uploader().username), - username=media.get_uploader().username -%} - By {{ username }} on {{ date }} - {%- endtrans %} -
- - {% if request.user and comments.count() %} -{% trans %}Post a comment{% endtrans %}
- {% endif %} - {% if comments %} - {% for comment in comments %} - {% set comment_author = comment.author() %} - {% if pagination.active_id == comment._id %} -{{ media.description_html }}
+ {% endautoescape %} ++ {% trans date=media.created.strftime("%Y-%m-%d"), + user_url=request.urlgen( + 'mediagoblin.user_pages.user_home', + user=media.get_uploader().username), + username=media.get_uploader().username -%} + By {{ username }} on {{ date }} + {%- endtrans %} +
+ + {% if request.user and comments.count() %} +{% trans %}Post a comment{% endtrans %}
+ {% endif %} + {% if comments %} + {% for comment in comments %} + {% set comment_author = comment.author() %} + {% if pagination.active_id == comment._id %} ++ {% set edit_url = request.urlgen('mediagoblin.edit.edit_media', + user= media.get_uploader().username, + media= media._id) %} + {% trans %}Edit{% endtrans %} +
++ {% set delete_url = request.urlgen('mediagoblin.user_pages.media_confirm_delete', + user= media.get_uploader().username, + media= media._id) %} + {% trans %}Delete{% endtrans %} +
{% endif %} -- {% set edit_url = request.urlgen('mediagoblin.edit.edit_media', - user= media.get_uploader().username, - media= media._id) %} - {% trans %}Edit{% endtrans %} -
-- {% set delete_url = request.urlgen('mediagoblin.user_pages.media_confirm_delete', - user= media.get_uploader().username, - media= media._id) %} - {% trans %}Delete{% endtrans %} -
- {% endif %} + {% if app_config['allow_attachments'] + and (media['uploader'] == request.user._id + or request.user['is_admin']) %} ++ Add attachment +
+ {% endif %} - {% if media.attachment_files|count %} -- Add attachment -
- {% endif %} - - {% if media.tags %} - {% include "mediagoblin/utils/tags.html" %} - {% endif %} -{% trans %}Sorry, no such media found.{% endtrans %}
- {% endif %} + {% if media.tags %} + {% include "mediagoblin/utils/tags.html" %} + {% endif %} +