more adaptations to Bootstrap 3
[mygpo.git] / mygpo / web / templates / history.html
blob4043dcc8e7a41219e85f2b7b63e258407ac03dd8
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 %}
73 <ul class="pagination">
74 <li>
75 {% if page > 0 %}
76 <a href="?page={{page|add:"-1"}}">«« {% trans "Later" %}</a>
77 {% else %}
78 <span>«« {% trans "Later" %}</span>
79 {% endif %}
80 </li>
81 <li>
82 {% if page != 0 %}
83 <a href="?page=0">{% trans "Now" %}</a>
84 {% else %}
85 <span>{% trans "Now" %}</span>
86 {% endif %}
87 </li>
88 <li>
89 {% if history %}
90 <a href="?page={{page|add:"1"}}">{% trans "Earlier" %} »»</a>
91 {% else %}
92 <span>{% trans "Earlier" %} »»</span>
93 {% endif %}
94 </li>
95 </ul>
97 {% endblock %}