X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=mediagoblin%2Ftemplates%2Fmediagoblin%2Fuser_pages%2Fmedia.html;h=a9c71c8e1f1e17127bfb7102b121ca42f4a444e6;hb=330f409ee91ad142a70617cf05a68916ef6c591e;hp=39935b40a25ffddd1bcd52bca0f6c18c47b381d8;hpb=4834ef8ec21e985290f5e0015ae9452070956170;p=mediagoblin.git diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 39935b40..a9c71c8e 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -25,27 +25,35 @@ {% block mediagoblin_head %} + + + + {% template_hook("location_head") %} {% template_hook("media_head") %} {% endblock mediagoblin_head %} - {% block mediagoblin_content %} -
+
{%- trans user_url=request.urlgen( 'mediagoblin.user_pages.user_home', - user=media.get_uploader.username), - username=media.get_uploader.username -%} + user=media.get_actor.username), + username=media.get_actor.username -%} â Browsing media by {{username}} {%- endtrans -%}
- {% include "mediagoblin/utils/prev_next.html" %} -{{ media.description_html }}
{% endautoescape %} - {% if comments %} +
{% for comment in comments %} - {% set comment_author = comment.get_author %} + {% set comment_object = comment.comment() %} + {% set comment_author = comment_object.get_actor %}-
@@ -132,31 +145,46 @@
-
- {%- trans formatted_time=timesince(comment.created) -%}
+
+ {%- trans formatted_time=timesince(comment_object.created) -%}
{{ formatted_time }} ago
{%- endtrans -%}
:
{% trans %}Added{% endtrans %}
- {%- trans formatted_time=timesince(media.created) -%} + {%- trans formatted_time=timesince(media.created) -%} {{ formatted_time }} ago {%- endtrans -%}
@@ -170,6 +198,10 @@ {% include "mediagoblin/utils/collections.html" %} + {% if app_config.allow_reporting %} + {% include "mediagoblin/utils/report.html" %} + {% endif %} + {% include "mediagoblin/utils/license.html" %} {% include "mediagoblin/utils/exif.html" %} @@ -188,25 +220,57 @@ {%- endif %} {%- if app_config['allow_attachments'] and request.user - and (media.uploader == request.user.id - or request.user.is_admin) %} + and (media.actor == request.user.id + or request.user.has_privilege('admin')) %} {%- if not media.attachment_files|count %}{% trans %}Attachments{% endtrans %}
{%- endif %}{%- trans %}Add attachment{% endtrans -%}
{%- endif %} - - {% template_hook("media_sideinfo") %} + {%- if media.subtitle_files|count %} +{% trans %}Subtitles{% endtrans %}
++ {%- for subtitle in media.subtitle_files %} +-
+
+
+ {{- subtitle.name -}}
+
+
+ {%- endfor %}
+
+ {%- endif %} + {%- if app_config['allow_subtitles'] + and request.user + and (media.actor == request.user.id + or request.user.has_privilege('admin')) %} + {%- if not media.subtitle_files|count %} +{% trans %}Subtitles{% endtrans %}
+ {%- endif %} ++ + {%- trans %}Add subtitle{% endtrans -%} + +
+ {%- endif %} {% block mediagoblin_sidebar %} {% endblock %} -