add "Feed Checker" to podcast publisher page
[mygpo.git] / mygpo / publisher / templates / publisher / podcast.html
blobde4d1c529a78ebee5bf29de5e104c9837a761127
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>
46 <div class="description">
47 {% blocktrans with podcast.title as ptitle %}This is the publisher page of <strong>{{ ptitle }}</strong>. You can see some stats and provide additional data for the podcast page.{% endblocktrans %}
48 <a class="btn" href="{% podcast_link_target podcast %}">{% trans "Go to Podcast Page" %}</a>
49 </div>
50 {% endblock %}
53 {% block content %}
54 <h2>Podcast Data</h2>
55 <p>{% trans "The podcast information is regularly retrieved from the podcast feed" %}</p>
56 <pre><a href="{{ podcast.url }}">{{ podcast.url }}</a></pre>
57 <p>{% trans "Last update: " %}{{ podcast.last_update|naturaltime }}</p>
59 <form action="{% podcast_link_target podcast "podcast-publisher-update" %}" method="post">
60 {% csrf_token %}
61 <button class="btn" type="submit">{% trans "Update now" %}</button>
62 </form>
64 <h2>Additional Data</h2>
66 <form class="form-horizontal" action="{% podcast_link_target podcast "podcast-publisher-save" %}" method="post">
67 {% csrf_token %}
68 <div class="control-group">
69 <label class="control-label" for="inputTwitter">
70 <i class="icon-twitter"></i> {% trans "Twitter" %}
71 </label>
72 <div class="controls">
73 <div class="input-prepend">
74 <span class="add-on">@</span>
75 <input type="text" id="inputTwitter" name="twitter" placeholder="username" value="{{ podcast.twitter }}">
76 </div>
77 </div>
78 </div>
79 <div class="control-group">
80 <div class="controls">
81 <button type="submit" class="btn">Save</button>
82 </div>
83 </div>
84 </form>
86 <div class="accordion" id="accordion-check">
87 <h2>{% trans "Feed Check" %}</h2>
88 <div class="accordion-group">
90 <div class="accordion-heading">
91 <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-check" href="#collapseFlattr">
92 <i class="icon-check{% if not podcast.flattr_url %}-empty{% endif %}"></i>
93 {% trans "Flattr" %}
94 </a>
95 </div>
97 <div id="collapseFlattr" class="accordion-body collapse">
98 <div class="accordion-inner">
99 <p>
100 {% blocktrans with site.domain as sitename %}{{ sitename }} supports <a href="https://flattr.com/">Flattr</a>. When you provide <a href="http://developers.flattr.net/feed/">payment URLs</a> in your podcast feed, your listeners can support you financially by flattring your content.{% endblocktrans %}
101 </p>
102 {% if podcast.flattr_url %}
103 <div class="alert alert-success">
104 {% blocktrans %} We discovered payment URLs in your pdocast feed. Your listeners can automatically flattr your content!{% endblocktrans %}
105 </div>
106 {% else %}
107 <div class="alert alert-warning">
108 {% blocktrans %}We did not find <a href="http://developers.flattr.net/feed/">payment URLs</a> in your pdocast feed. Add them so your listeners can support you!</a>{% endblocktrans %}
109 </div>
110 {% endif %}
111 </div>
112 </div>
115 <div class="accordion-heading">
116 <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-check" href="#collapsePubSub">
117 <i class="icon-check{% if not pubsubscription %}-empty{% endif %}"></i>
118 {% trans "PubSubHubbub" %}
119 </a>
120 </div>
123 <div id="collapsePubSub" class="accordion-body collapse">
124 <div class="accordion-inner">
126 {% blocktrans with site.domain as sitename %}If you publish your podcast feed through a <a href="https://code.google.com/p/pubsubhubbub/">PubSubHubbu</a> hub, {{ sitename }} can immediatelly update your podcast when a new episode is released.{% endblocktrans %}
127 </p>
128 {% if pubsubscription and pubsubscription.mode == 'subscribe' %}
129 {% if pubsubscription.verified %}
130 <div class="alert alert-success">
131 {% blocktrans with podcast.hub as hub %}Your podcast is published through <a href="{{ hub }}">{{ hub }}</a> and should update immediatelly for each new episode.{% endblocktrans %}
132 </div>
133 {% else %}
134 <div class="alert alert-warning">
135 {% blocktrans with podcast.hub as hub %}Your podcast is published through <a href="{{ hub }}">{{ hub }}</a> but our subscription has not yet been verified.{% endblocktrans %}
136 </div>
137 {% endif %}
138 {% else %}
139 <div class="alert alert-warning">
140 {% blocktrans %}We did not find a hub in your podcast feed. Your feed is updated regularly, but there might be some delay until a new episode shows up on {{ sitename }}.{% endblocktrans %}
141 </div>
142 {% endif %}
143 </div>
144 </div>
147 <div class="accordion-heading">
148 <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion-check" href="#collapseLicense">
149 <i class="icon-check{% if not podcast.license %}-empty{% endif %}"></i>
150 {% trans "License Information" %}
151 </a>
152 </div>
155 <div id="collapseLicense" class="accordion-body collapse">
156 <div class="accordion-inner">
158 {% blocktrans with site.domain as sitename %}You should include license information in your feed so that users and {{ sitename }} can know, under which conditions your content can be used.{% endblocktrans %}
159 </p>
160 {% if podcast.license %}
161 <div class="alert alert-success">
162 {% blocktrans with podcast.license as license %}We found the following license in your podcast: <a href="{{ license }}">{{ license }}</a>{% endblocktrans %}
163 </div>
164 {% else %}
165 <div class="alert alert-warning">
166 {% blocktrans %}We did not find a license in your podcast feed. Refer to <a href="https://github.com/gpodder/podcast-feed-best-practice/blob/master/podcast-feed-best-practice.md#license"> gPodder Podcast Feed Best Practice</a> on how to include license information.{% endblocktrans %}
167 </div>
168 {% endif %}
169 </div>
170 </div>
173 </div>
174 </div>
177 <h2>Episodes</h2>
178 <p>View and edit <a href="{% podcast_link_target podcast "podcast-publisher-episodes" %}">episode</a> data.</p>
181 <h2>{% trans "Link" %}</h2>
182 <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>
183 <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>
184 <p><a href="http://{{ site.domain }}{% url "subscribe-by-url" %}?url={{ feedurl_quoted }}"><img src="http://{{ site.domain }}/media/author_subscribe.png" /></a></p>
186 <h2>Stats</h2>
188 {% if group %}
189 <a href="{% podcast_group_link_target group "group-publisher" %}">{% trans "Show Group Stats" %}</a>
190 {% endif %}
192 {% if timeline_data %}
193 <h3>Listener Timeline</h3>
194 <div id="chart_div" style="width: 700px; height: 240px;"></div>
195 {% endif %}
198 {% if subscriber_data %}
199 <h3>Subscriptions</h3>
200 <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>
201 {{ subscriber_data|bar_chart }}
202 {% endif %}
204 {% if heatmap %}
205 <h3>Heatmap</h3>
206 <div>
207 {% trans "This diagram shows which parts of the podcast's episodes are listened the most by users." %}
208 {% trans "Red parts are often skipped, green parts never." %}
209 </div>
210 {{ heatmap|episode_heatmap_visualization }}
211 {% endif %}
213 {% endblock %}