refactoring in publisher and Podcast model code
[mygpo.git] / mygpo / publisher / templates / publisher / episodes.html
blob7793efce166a75686049282edd771587afb7a470
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load humanize %}
4 {% load episodes %}
5 {% load podcasts %}
6 {% load charts %}
8 {% load menu %}
9 {% block mainmenu %}{{ "/publisher/"|main_menu }}{% endblock %}
10 {% block sectionmenu %}{{ "/publisher/podcast/"|section_menu:podcast.title }}{% endblock %}
12 {% block title %}{{ podcast.title|default:"Unnamed Podcast"|striptags }}{% endblock %}
14 {% block content %}
15 {% if podcast.logo_url %}
16 <div id="podcastlogo">{{ podcast|podcast_logo_big }}</div>
17 {% endif %}
19 <h1>{% trans "Publisher Pages:" %} {% if podcast.title %}{{ podcast.title|striptags }}{% else %}{% trans "Unnamed Podcast" %}{%endif%}</h1>
21 <p><a href="{% url podcast-publisher-detail podcast.id %}">{% trans "Return to Podcast Page" %}</a></p>
23 {% if not episodes|length_is:"0" %}
25 <h2>{% trans "Episodes" %}</h2>
26 <table class="list">
27 <tr>
28 <th>{% trans "Title" %}</th>
29 <th>{% trans "Released" %}</th>
30 <th>{% trans "Listeners" %}</th>
31 </tr>
33 <tr>
34 <th colspan="3">Data Missing</th>
35 </tr>
36 {% for episode in episodes %}
37 {% if not episode.title %}
38 <tr>
39 <td colspan="3"><a href="{% url episode-publisher-detail episode.id %}">{{ episode.url }}</a></td>
40 </tr>
41 {% endif %}
42 {% endfor %}
44 <tr>
45 <th colspan="3">Feed-Data Available</th>
46 </tr>
47 {% for episode in episodes %}
48 {% if episode.title %}
49 <tr>
50 <td><a href="{% url episode-publisher-detail episode.id %}">{{ episode.title|default:"Unknown Episode"|striptags }}</a></td>
51 <td>{{ episode.timestamp|default:""|naturalday }}</td>
52 <td>
53 {% if episode.listener_count %}
54 {{ episode.listener_count|vertical_bar:max_listeners }}
55 {% endif %}
56 </td>
57 </tr>
58 {% endif %}
59 {% endfor %}
60 </table>
61 {% endif %}
63 {% endblock %}