adapt templates to Bootstrap 3
[mygpo.git] / mygpo / publisher / templates / publisher / episode.html
blob814bda2188af36366ee13f2efcee5464f2f1e229
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load humanize %}
4 {% load episodes %}
5 {% load podcasts %}
6 {% load charts %}
7 {% load pcharts %}
9 {% load menu %}
10 {% block mainmenu %}{{ "/publisher/"|main_menu }}{% endblock %}
11 {% block sectionmenu %}{{ "/publisher/podcast/"|section_menu:podcast.title }}{% endblock %}
13 {% block title %}{{ episode.title|default:"Unnamed Episode"|striptags }}{% endblock %}
15 {% block head %}
16 {% if timeline_data %}
17 {{ timeline_data|timeline }}
18 {% endif %}
19 {% endblock %}
22 {% block header %}
23 {% if podcast.logo_url %}
24 <div id="podcastlogo">
25 <a href="{% podcast_link_target podcast "podcast-publisher-detail" %}">
26 {{ podcast|podcast_logo_big }}
27 </a>
28 </div>
29 {% endif %}
31 <h1>{% if episode.title %}{{ episode.title|striptags }}{% else %}{% trans "Unnamed Episode" %}{%endif%} <small>{% trans "Publisher Pages" %}</small></h1>
32 <small class="description">
33 {% trans "from" %} {% podcast_group_link podcast %}&middot;
34 {% if not episode.outdated or "hide-outdated-urls" not in podcast.restrictions %}
35 <a href="{{episode.url}}" title="{% trans "Download" %}">
36 <i class="icon-download"></i>
37 </a>
38 {% endif %}
39 {% if episode.link and episode.link != episode.url %}&middot;
40 <a href="{{episode.link}}" title="{% trans "Website" %}">
41 <i class="icon-external-link"></i>
42 </a>
43 {% endif %}
44 {% if episode.listeners %}&middot;
45 {{ episode.listeners }} {% trans "listeners" %}
46 {% endif %}
47 </small>
49 {% endblock %}
52 {% block content %}
54 <div class="btn-group">
55 <a class="btn btn-default" href="{% podcast_link_target podcast "podcast-publisher-episodes" %}">{% trans "Episode List" %}</a>
56 <a class="btn btn-default" href="{% podcast_link_target podcast "podcast-publisher-detail" %}">{% trans "Podcast Page" %}</a>
57 </div>
60 <h2>{% trans "URL" %}</h2>
61 <p>{% trans "You can configure the URL of this episode. Previous keys will automatically be added to the alternative keys and always redirect to the current URL." %}</p>
63 <form class="form-inline" action="{% episode_link_target episode podcast "publisher-set-episode-slug" %}" method="post">
64 {% csrf_token %}
65 <div class="form-group">
66 <label for="slug">
67 http{% if is_secure %}s{% endif %}://{{ domain }}/podcast/{{ podcast.slug }}/
68 </label>
69 <input class="input-sm" placeholder="{% get_id episode %}" type="text" value="{{ episode.slug|default:"" }}" name="slug"></input>
70 </div>
72 <button class="btn btn-default" type="submit">{% trans "Save" %}</button>
73 </form>
75 <strong>Alternative Keys</strong>
76 <ul>
77 {% for slug in episode.merged_slugs %}
78 <li>{{ slug }}</li>
79 {% empty %}
80 <li><em>{% trans "none" %}</em></li>
81 {% endfor %}
82 </ul>
86 <h2>{% trans "Episode data" %}</h2>
87 <p>{% trans "Last update: " %} {{ episode.last_update|naturaltime }}</p>
89 {% if timeline_data %}
90 <h3>Listener Timeline</h3>
91 <div id="chart_div" style="width: 700px; height: 240px;"></div>
92 {% endif %}
94 {% if heatmap %}
95 <h3>Heatmap</h3>
96 {{ heatmap|episode_heatmap_visualization }}
97 <div>{% trans "Red parts are often skipped, green parts never." %}</div>
98 {% endif %}
100 {% endblock %}