{% block mediagoblin_head %}
<!--[if lte IE 8]><link rel="stylesheet"
href="{{ request.staticdirect('/extlib/leaflet/leaflet.ie.css') }}" /><![endif]-->
+
+ <link rel="stylesheet" type="text/css" href="{{ request.staticdirect('/css/lightbox.css') }}">
<script type="text/javascript"
src="{{ request.staticdirect('/js/comment_show.js') }}"></script>
<script type="text/javascript"
src="{{ request.staticdirect('/js/keyboard_navigation.js') }}"></script>
+ <script type="text/javascript"
+ src="{{ request.staticdirect('/js/lightbox.js') }}"></script>
{% template_hook("location_head") %}
{% template_hook("media_head") %}
#}
{% if media.media_files.has_key('medium') %}
<a href="{{ request.app.public_store.file_url(
- media.media_files['original']) }}">
+ media.media_files['original']) }}" class="lightbox">
<img class="media_image"
src="{{ display_media }}"
alt="{% trans media_title=media.title -%}
{% endif %}
<ul style="list-style:none">
{% for comment in comments %}
- {% set comment_author = comment.get_actor %}
+ {% set comment_object = comment.comment() %}
+ {% set comment_author = comment_object.get_actor %}
<li id="comment-{{ comment.id }}"
{%- if pagination.active_id == comment.id %}
class="comment_wrapper comment_active">
user=media.get_actor.username,
media=media.slug_or_id) }}#comment"
class="comment_whenlink">
- <span title='{{- comment.created.strftime("%I:%M%p %Y-%m-%d") -}}'>
- {%- trans formatted_time=timesince(comment.created) -%}
+ <span title='{{- comment_object.created.strftime("%I:%M%p %Y-%m-%d") -}}'>
+ {%- trans formatted_time=timesince(comment_object.created) -%}
{{ formatted_time }} ago
{%- endtrans -%}
</span></a>:
</div>
<div class="comment_content">
{% autoescape False -%}
- {{ comment.content_html }}
+ {{ comment_object.content_html }}
{%- endautoescape %}
</div>
<div>
</a>
</p>
{%- endif %}
+ {%- if media.subtitle_files|count %}
+ <h3>{% trans %}Subtitles{% endtrans %}</h3>
+ <ul>
+ {%- for subtitle in media.subtitle_files %}
+ <li>
+ <!-- <a href="{{ request.app.public_store.file_url(subtitle.filepath) }}"> -->
+ <a href="{{ request.urlgen('mediagoblin.edit.edit_subtitles',
+ path=subtitle.filepath) }}">
+ {{- subtitle.name -}}
+ <!-- </a> -->
+ </li>
+ {%- endfor %}
+ </ul>
+ {%- 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 %}
+ <h3>{% trans %}Subtitles{% endtrans %}</h3>
+ {%- endif %}
+ <p>
+ <a href="{{ request.urlgen('mediagoblin.edit.subtitles',
+ user=media.get_actor.username,
+ media_id=media.id) }}">
+ {%- trans %}Add subtitle{% endtrans -%}
+ </a>
+ </p>
+ {%- endif %}
{% block mediagoblin_sidebar %}
{% endblock %}