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