X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=mediagoblin%2Ftemplates%2Fmediagoblin%2Fuser_pages%2Fmedia.html;h=17beffb26fb3806c1eb576b5e8ceb939e6cf80c9;hb=157c60267e0c0e464f89779a190d8b2d11d5a4be;hp=477eae61fe4128ce3ec9bc43a37ba2a03ebf6f40;hpb=af2fcba5c4ce16bde1a2267b95803bc2afc9e572;p=mediagoblin.git diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 477eae61..17beffb2 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -1,6 +1,6 @@ {# # GNU MediaGoblin -- federated, autonomous media hosting -# Copyright (C) 2011 Free Software Foundation, Inc +# Copyright (C) 2011 MediaGoblin contributors. See AUTHORS. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -23,45 +23,46 @@ {% block mediagoblin_content %} {% if media %}
- {% if media.media_files.medium %} - - {% else %} - - {% endif %} +
+ {% set display_media = request.app.public_store.file_url( + media.get_display_media(media.media_files)) %} -

- {{media.title}} -

+ {# if there's a medium file size, that means the medium size + # isn't the original... so link to the original! + #} + {% if media['media_files'].has_key('medium') %} + + Image for {{ media.title }} + + {% else %} + Image for {{ media.title }} + {% endif %} +
+

+ {{ media.title }} +

{% autoescape False %}

{{ media.description_html }}

{% endautoescape %} - -

- — uploaded on - {{ "%4d-%02d-%02d"|format(media.created.year, - media.created.month, media.created.day) }} - by - - {{- media.uploader().username }} +

+ {% trans date=media.created.strftime("%Y-%m-%d"), + user_url=request.urlgen( + 'mediagoblin.user_pages.user_home', + user=media.uploader().username), + username=media.uploader().username -%} + By {{ username }} on {{ date }} + {%- endtrans %}

-
- -

Comments

+

{% if request.user %} -
- {{ wtforms_util.render_field_div(comment_form.field_comment) }} -
- -
-
+

{% trans %}Post a comment{% endtrans %}

{% endif %} - {% if comments %} {% for comment in comments %} {% set comment_author = comment.author() %} @@ -71,58 +72,97 @@ {% else %}
{% endif %} - {% endfor %} + {% if request.user %} +
+ {{ wtforms_util.render_divs(comment_form) }} +
+ + {{ csrf_token }} +
+
+ {% endif %} + {{ render_pagination(request, pagination, request.urlgen('mediagoblin.user_pages.media_home', user = media.uploader().username, media = media._id)) }}
{% endif %} +
{% include "mediagoblin/utils/prev_next.html" %} -

Sidebar content here!

-

- {% if media['uploader'] == request.user['_id'] or - request.user['is_admin'] %} -

- edit -

-

- delete -

- {% endif %} -

+ + {% if media['uploader'] == request.user['_id'] or + request.user['is_admin'] %} +

{% trans %}Actions{% endtrans %}

+

+ {% set edit_url = request.urlgen('mediagoblin.edit.edit_media', + user= media.uploader().username, + media= media._id) %} + + {% trans %}edit{% endtrans %} +

+

+ {% set delete_url = request.urlgen('mediagoblin.user_pages.media_confirm_delete', + user= media.uploader().username, + media= media._id) %} + + {% trans %}delete{% endtrans %} +

+ {% endif %} + + {% if media.attachment_files|count %} +

Attachments

+ + {% endif %} + + {% if app_config['allow_attachments'] + and (media['uploader'] == request.user['_id'] + or request.user['is_admin']) %} +

+ Add attachment +

+ {% endif %} + + {% if media.tags %} + {% include "mediagoblin/utils/tags.html" %} + {% endif %}
{% else %} -

Sorry, no such media found.

+

{% trans %}Sorry, no such media found.{% endtrans %}

{% endif %} {% endblock %}