Improving the whitespace around the {% trans %} adjustments from tilly-q
[mediagoblin.git] / mediagoblin / templates / mediagoblin / fragments / header_notifications.html
CommitLineData
7949d88a 1{% set notifications = get_notifications(request.user.id) %}
2d7b6bde
JW
2{% if notifications %}
3 <div class="header_notifications">
4 <h3>{% trans %}New comments{% endtrans %}</h3>
5 <ul>
6 {% for notification in notifications %}
7 {% set comment = notification.subject %}
8 {% set comment_author = comment.get_author %}
9 {% set media = comment.get_entry %}
10 <li class="comment_wrapper">
11 <div class="comment_author">
12 <img src="{{ request.staticdirect('/images/icon_comment.png') }}" />
13 <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
14 user=comment_author.username) }}"
15 class="comment_authorlink">
16 {{- comment_author.username -}}
17 </a>
18 <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment',
19 comment=comment.id,
20 user=media.get_uploader.username,
21 media=media.slug_or_id) }}#comment"
22 class="comment_whenlink">
23 <span title='{{- comment.created.strftime("%I:%M%p %Y-%m-%d") -}}'>
24 {%- trans formatted_time=timesince(comment.created) -%}
25 {{ formatted_time }} ago
26 {%- endtrans -%}
27 </span>
28 </a>:
29 </div>
30 <div class="comment_content">
31 {% autoescape False -%}
32 {{ comment.content_html }}
33 {%- endautoescape %}
34 </div>
35
36 </li>
37 {% endfor %}
38 </ul>
d0708da7
RE
39 <a href="{{ request.urlgen('mediagoblin.notifications.mark_all_comment_notifications_seen') }}?next={{
40 request.base_url|urlencode }}" id="mark_all_comments_seen">
41 {% trans %}Mark all read{% endtrans %}
42 </a>
2d7b6bde
JW
43 </div>
44{% endif %}