ade65aecd5b2ec083e131baf09cd6eadeb78d574
[mygpo.git] / mygpo / directory / templates / toplist.html
blobade65aecd5b2ec083e131baf09cd6eadeb78d574
1 {% extends "base.html" %}
3 {% load i18n %}
4 {% load podcasts %}
5 {% load charts %}
6 {% load math %}
7 {% load utils %}
9 {% load menu %}
10 {% block mainmenu %}{{ "/toplist/"|main_menu }}{% endblock %}
11 {% block sectionmenu %}{{ "/toplist/"|section_menu }}{% endblock %}
13 {% block title %}{% trans "Toplist" %}{% endblock %}
15 {% block header %}
16 <h1>{% trans "Toplist" %}</h1>
17 {% endblock %}
19 {% block content %}
20 <table class="list">
21 <tr>
22 <th></th>
23 <th></th>
24 <th></th>
25 <th>{% trans "Podcast" %}</th>
26 <th>{% trans "Subscribers" %}</th>
27 </tr>
28 {% for oldpos, podcast in entries %}
29 <tr>
30 <td class="numeric toplist-pos">
31 {% ifchanged podcast.subscriber_count %}
32 {{ forloop.counter }}
33 {% endifchanged %}
34 </td>
35 <td class="oldposition">
36 {% if oldpos %}
37 {% if oldpos|subtract:forloop.counter %}
38 {{ oldpos|subtract:forloop.counter|format_diff }}
39 {% endif %}
40 {% else %}
41 <img src="/media/charts-new.png" alt="new">
42 {% endif %}
43 </td>
44 <td class="logo">{{ podcast|podcast_logo }}</td>
45 <td>
46 {% podcast_group_link podcast %}
47 </td>
48 <td>{% vertical_bar podcast.subscriber_count max_subscribers %}</td>
49 </tr>
50 {% empty %}
51 <tr>
52 <td colspan="5">
53 {% trans "Currently not available" %}
54 </td>
55 </tr>
56 {% endfor %}
57 </table>
59 {% endblock %}
62 {% block sidebar %}
64 <div class="well">
66 <h4>{% trans "Language" %}</h4>
67 <form class="form-inline" action="{% url "toplist" %}" method="get">
68 <select class="input-medium" name="lang">
70 {% if language == "" %}
71 <option selected="selected" value="">{% trans "all" %}</option>
72 {% else %}
73 <option value="">{% trans "all" %}</option>
74 {% endif %}
77 {% for key, name in all_languages.iteritems %}
78 {% if language == key %}
79 <option selected="selected" value="{{ key }}">{{ name }}</option>
80 {% else %}
81 <option value="{{ key }}">{{ name }}</option>
82 {% endif %}
83 {% endfor %}
84 </select>
85 <input class="btn btn-primary" type="submit" value="{% trans "OK" %}" />
86 </form>
87 </div>
89 <div class="well">
90 <h4>{% trans "Client Access" %}</h4>
92 <p>Access <a href="{% url "toplist-opml" 30 "opml" %}">http://{{ url }}{% url "toplist-opml" 30 "opml" %}</a> for the Top-30.</p>
93 </div>
95 {% endblock %}