redesign podcast, episode subtitle line
[mygpo.git] / mygpo / publisher / templates / publisher / podcast.html
blob1f6dcfffec8ce9d2c4ffc5d4155d63cb5daaa882
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load humanize %}
4 {% load podcasts %}
5 {% load charts %}
6 {% load pcharts %}
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 head %}
15 {% if timeline_data %}
16 {{ timeline_data|timeline }}
17 {% endif %}
18 {% endblock %}
20 {% block header %}
21 {% if podcast.logo_url %}
22 <div id="podcastlogo">{{ podcast|podcast_logo_big }}</div>
23 {% endif %}
25 <h1>{% if podcast.title %}{{ podcast.title|striptags }}{% else %}{% trans "Unnamed Podcast" %}{%endif%} <small>{% trans "Publisher Pages" %}</small></h1>
26 <small class="description">
27 {% if podcast.author %}{% trans "by" %}
28 {{ podcast.author|striptags }}
29 {% endif %}
30 {% if podcast.twitter %}
31 <a href="https://twitter.com/{{ podcast.twitter|striptags }}"><i class="icon-twitter"></i></a>
32 {% endif %}&middot;
33 <a href="{{podcast.url}}" title="{% trans "Feed" %}">
34 <i class="icon-rss"></i>
35 </a>
36 {% if podcast.link %}&middot;
37 <a href="{{podcast.link}}" title="{% trans "Website" %}">
38 <i class="icon-external-link"></i>
39 </a>
40 {% endif %}
41 {% if podcast.subscriber_count %}&middot;
42 {{ podcast.subscriber_count }} {% trans "subscribers" %}
43 {% endif %}
44 </small>
45 {% endblock %}
48 {% block content %}
49 <h2>Podcast Data</h2>
50 <p>{% trans "The podcast information is regularly retrieved from the podcast feed" %}</p>
51 <pre><a href="{{ podcast.url }}">{{ podcast.url }}</a></pre>
52 <p>{% trans "Last update: " %}{{ podcast.last_update|naturaltime }}</p>
54 <form action="{% podcast_link_target podcast "podcast-publisher-update" %}" method="post">
55 {% csrf_token %}
56 <button class="btn" type="submit">{% trans "Update now" %}</button>
57 </form>
59 <h2>Additional Data</h2>
61 <form class="form-horizontal" action="{% podcast_link_target podcast "podcast-publisher-save" %}" method="post">
62 {% csrf_token %}
63 <div class="control-group">
64 <label class="control-label" for="inputTwitter">
65 <i class="icon-twitter"></i> {% trans "Twitter" %}
66 </label>
67 <div class="controls">
68 <div class="input-prepend">
69 <span class="add-on">@</span>
70 <input type="text" id="inputTwitter" placeholder="username" value="{{ podcast.twitter }}">
71 </div>
72 </div>
73 </div>
74 <div class="control-group">
75 <div class="controls">
76 <button type="submit" class="btn">Save</button>
77 </div>
78 </div>
79 </form>
81 <h2>Episodes</h2>
82 <p>View and edit <a href="{% podcast_link_target podcast "podcast-publisher-episodes" %}">episode</a> data.</p>
85 <h2>{% trans "Link" %}</h2>
86 <p>{% blocktrans with url as sitename %}You can paste this code on your website, so users of {{ sitename }} can directly subscribe to your podcast.{% endblocktrans %}</p>
87 <textarea style="width: 100%;" rows="2"><a href="http://{{ site.domain }}{% url subscribe-by-url %}?url={{ feedurl_quoted }}"><img src="http://{{ site.domain }}/media/author_subscribe.png" /></a></textarea>
88 <p><a href="http://{{ site.domain }}{% url subscribe-by-url %}?url={{ feedurl_quoted }}"><img src="http://{{ site.domain }}/media/author_subscribe.png" /></a></p>
90 <h2>Stats</h2>
92 {% if group %}
93 <a href="{% podcast_group_link_target group "group-publisher" %}">{% trans "Show Group Stats" %}</a>
94 {% endif %}
96 {% if timeline_data %}
97 <h3>Listener Timeline</h3>
98 <div id="chart_div" style="width: 700px; height: 240px;"></div>
99 {% endif %}
102 {% if subscriber_data %}
103 <h3>Subscriptions</h3>
104 <p>Please note that the chart shows subscriptions per user and device, so a single user subscribing to this podcast on 5 devices acccounts for 5 subscriptions.</p>
105 {{ subscriber_data|bar_chart }}
106 {% endif %}
108 {% if heatmap %}
109 <h3>Heatmap</h3>
110 <div>
111 {% trans "This diagram shows which parts of the podcast's episodes are listened the most by users." %}
112 {% trans "Red parts are often skipped, green parts never." %}
113 </div>
114 {{ heatmap|episode_heatmap_visualization }}
115 {% endif %}
117 {% endblock %}