X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=mediagoblin%2Ftemplates%2Fmediagoblin%2Fuser_pages%2Fmedia.html;h=a9c71c8e1f1e17127bfb7102b121ca42f4a444e6;hb=330f409ee91ad142a70617cf05a68916ef6c591e;hp=58b9cdce1808fc7a0742373e904c5d5ce1617467;hpb=6432755db3e5bcb2cdfa7720b5d14bfaaebc57be;p=mediagoblin.git diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 58b9cdce..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 %} - - {% trans %}Add a comment{% endtrans %} - +
{% for comment in comments %} - {% set comment_author = comment.get_author %} + {% set comment_object = comment.comment() %} + {% set comment_author = comment_object.get_actor %}-
@@ -117,46 +139,73 @@
+ user=comment_author.username) }}"
+ class="comment_authorlink">
{{- comment_author.username -}}
- {% trans %}at{% endtrans %}
-
- {{ timesince(comment.created) }}
-
- :
+ user=media.get_actor.username,
+ media=media.slug_or_id) }}#comment"
+ class="comment_whenlink">
+
+ {%- trans formatted_time=timesince(comment_object.created) -%}
+ {{ formatted_time }} ago
+ {%- endtrans -%}
+ :
{% 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 %} +Added on
-{{ formatted_time }}
- {%- endtrans %} + +{% trans %}Added{% endtrans %}
++ {%- trans formatted_time=timesince(media.created) -%} + {{ formatted_time }} ago + {%- endtrans -%} +
+ + {% block mediagoblin_after_added_sidebar %} + {% endblock %} + {% if media.tags %} {% include "mediagoblin/utils/tags.html" %} {% endif %} {% 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" %} - + {%- if media.attachment_files|count %}{% trans %}Attachments{% endtrans %}
@@ -171,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 %} -