use new style {% url "view" %} template syntax
[mygpo.git] / mygpo / web / templates / history.html
blobc2744e359318bd3947a3631a2fd075084e599ad4
1 {% extends "base.html" %}
2 {% load url from future %}
3 {% load i18n %}
4 {% load humanize %}
5 {% load devices %}
6 {% load podcasts %}
7 {% load episodes %}
9 {% load menu %}
10 {% block mainmenu %}{{ "/history/"|main_menu }}{% endblock %}
11 {% block sectionmenu %}{{ "/history/"|section_menu }}{% endblock %}
13 {% block title %}{% trans "Subscription and Episode History" %}{% if device %} {% trans "for" %} {{ device.name|striptags }}{% endif %}{% endblock %}
15 {% block header %}
16 <h1>{% trans "Subscription and Episode History" %}{% if device %} {% trans "for" %} {{ device.name|striptags }}{% endif %}</h1>
17 {% endblock %}
20 {% block content %}
22 {% if device %}
23 <a href="{% url "device" device.uid %}">{% trans "Back to" %} {{ device|device_icon }} {{ device.name|striptags}}</a>
24 {% endif %}
26 {% if not history|length_is:"0" %}
27 <table class="list">
29 {% for s in history %}
30 <tr>
31 <td class="logo">
32 {% if s.podcast %}
33 {{ s.podcast|podcast_logo }}
34 {% endif %}
35 </td>
37 <td>
38 {% if s.type == "Subscription" %}
39 {% if s.podcast %}
40 {% podcast_group_link s.podcast %}
41 {% endif %}
42 {% else %}
43 {% if s.episode %}
44 {% episode_link s.episode s.podcast %}
45 {% if s.podcast %}
46 <br /><span class="from_podcast">{% podcast_group_link s.podcast %}</span>
47 {% endif %}
48 {% endif %}
49 {% endif %}
50 </td>
51 <td style="width: 80px;"><span title="{{ s.timestamp }}">{{ s.timestamp|date:"Y-m-d" }}</span></td>
52 <td style="text-align: center;">
53 {% if s.type == "Subscription" %}
54 {{ s|podcast_status_icon }}
55 {% else %}
56 {{ s|episode_status_icon }}
57 {% endif %}
58 </td>
59 <td>
60 {% if s.device %}
61 <a href="{% url "device" s.device.uid %}">{{ s.device|device_icon }}&nbsp;{{ s.device.name|striptags }}</a>
62 {% endif %}
63 </td>
64 </tr>
65 {% endfor %}
66 </table>
68 {% else %}
70 <p>{% trans "Nothing happened yet." %}</p>
72 {% endif %}
75 <div class="pagination">
76 <ul>
77 {% if page > 0 %}
78 <li>
79 <a href="?page={{page|add:"-1"}}">«« {% trans "Later" %}</a>
80 </li>
81 {% endif %}
82 {% if page != 0 %}
83 <li>
84 <a href="?page=0">{% trans "Now" %}</a>
85 </li>
86 {% endif %}
87 {% if history %}
88 <li>
89 <a href="?page={{page|add:"1"}}">{% trans "Earlier" %} »»</a>
90 </li>
91 {% endif %}
92 </ul>
93 </div>
95 {% endblock %}