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" %} -
-
- {% block mediagoblin_media %} +
+ {% include "mediagoblin/utils/prev_next.html" %} +
+
+
+ {% block mediagoblin_media %} +
{% set display_media = request.app.public_store.file_url( media.get_display_media()[1]) %} {# if there's a medium file size, that means the medium size @@ -53,7 +61,7 @@ #} {% if media.media_files.has_key('medium') %} + media.media_files['original']) }}" class="lightbox"> {% trans media_title=media.title -%}
@@ -65,28 +73,32 @@
                alt= {% endif %} - {% endblock %} -
+
+ {% endblock %} + + {% if request.user and request.user.has_privilege('commenter') %} +
{% if app_config['allow_comments'] %} {{ wtforms_util.render_divs(comment_form) }}
{% autoescape False -%} - {{ comment.content_html }} + {{ comment_object.content_html }} {%- endautoescape %}
+
+ {% if app_config.allow_reporting %} + + {% trans %}Report{% endtrans %} + {% endif %} +
{% endfor %} {{ render_pagination(request, pagination, media.url_for_self(request.urlgen)) }} + {% else %} +
{% endif %}
-
+ +
+ + +

{% 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 %}

+ + {%- 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 %} -
+ {%- set model = media %} + {% template_hook("location_info") %} + {% template_hook("media_sideinfo") %} + +
+
{% endblock %}