fix pagination links
[mygpo.git] / mygpo / web / templates / episodes.html
blob11d7847b90fe66a9c0d20af5cf252ae91754e4eb
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 %}{{ "/podcast/"|main_menu }}{% endblock %}
10 {% block sectionmenu %}
11 {% if podcast.title %}
12 {{ "/podcast/"|section_menu:podcast.title }}
13 {% else %}
14 {{ "/podcast/"|section_menu:"Unnamed Podcast" }}
15 {% endif %}
16 {% endblock %}
18 {% block title %}{{ podcast.title|default:"Unnamed Podcast"|striptags }}{% endblock %}
20 {% block header %}
22 {% if podcast.logo_url %}
23 <div id="podcastlogo">
24 <a href="{% podcast_link_target podcast %}">
25 {{ podcast|podcast_logo_big }}
26 </a>
27 </div>
28 {% endif %}
30 <h1>
31 {% if podcast.title %}
32 {{ podcast.title|striptags }}
33 {% else %}
34 {% trans "Unnamed Podcast" %}
35 {%endif%}
36 </h1>
38 <small class="description">
39 {% trans "links" %}:
40 <a href="{{podcast.url}}">
41 {% trans "feed" %}
42 </a>
43 {% if podcast.link %},
44 <a href="{{podcast.link}}">{% trans "website" %}</a>
45 {% endif %},
46 {% blocktrans with podcast.subscriber_count as subscriber_count and podcast.listener_count as listener_count %}{{subscriber_count}} subscribers, {{listener_count}} listeners{% endblocktrans %}
47 </small>
49 {% if related_podcasts %}
50 <div class="related-podcasts">
51 <strong>{% trans "Also available" %}</strong>
52 {% for p in related_podcasts %}
53 {% podcast_group_link p p.group_member_name %}
54 {% endfor %}
55 </div>
56 {% endif %}
58 {% if podcast.description %}
59 <p class="description">{{ podcast.description|striptags }}</p>
60 {% endif %}
62 {% endblock %}
66 {% block content %}
68 {% if episode %}
69 <div class="first-episode">
71 <h2>{{ episode.title }} <small>{{ episode.released|naturalday }}</small></h2>
72 <div class="description">
73 {{ episode.description|default:""|striptags|truncatewords:"100" }}
74 </div>
75 <a href="{% episode_link_target episode podcast %}">more...</a>
77 </div>
78 {% endif %}
80 {% if episodes %}
82 <h3>{% trans "All Episodes" %}</h3>
83 <table class="list episode_list" id="episodes">
84 <tr>
85 <th></th>
86 <th>{% trans "Title" %}</th>
87 <th>{% trans "Released" %}</th>
88 <th>{% trans "Listeners" %}</th>
89 </tr>
91 {% for episode in episodes %}
92 <tr>
93 <td>{{ episode.action|episode_status_icon }}</td>
94 <td class="short">
95 <div class="title">{% episode_link episode podcast %}</div>
96 <p class="description short">{{ episode.description|default:""|striptags }}</p>
97 </td>
98 <td>{{ episode.released|default:""|date:"Y-m-d" }}</td>
99 <td>
100 {% if episode.listeners %}
101 {% vertical_bar episode.listeners max_listeners %}
102 {% endif %}
103 </td>
104 </tr>
105 {% endfor %}
106 </table>
107 {% endif %}
109 <div class="pagination pagination-centered">
110 <ul>
111 {% for page in page_list %}
112 <li>
113 {% if page == "..." %}
114 <span>{{ page }}</span>
115 {% else %}
117 {% if page == current_page %}
118 <a href="{% podcast_link_target podcast "podcast-all-episodes" %}?page={{ page }}"><strong>{{ page }}</strong></a>
119 {% else %}
120 <a href="{% podcast_link_target podcast "podcast-all-episodes" %}?page={{ page }}">{{ page }}</a>
121 {% endif %}
122 {% endif %}
123 </li>
124 {% endfor %}
125 </ul>
126 </div>
129 {% endblock %}
132 {% block sidebar %}
134 {% if is_publisher %}
135 <div class="well">
136 <h4>{% trans "Publisher Pages" %}</h4>
138 <a class="btn" href="{% podcast_link_target podcast "podcast-publisher-episodes" %}"><i class="icon-wrench"></i> {% trans "Go" %}</a>
139 </div>
140 {% endif %}
143 {% endblock %}
145 {% block ads %}
146 {% comment %}disable ads on podcast pages{% endcomment %}
147 {% endblock %}