55532ece701a0de28e868d428ad687e6bd04dd0a
[mygpo.git] / mygpo / publisher / templates / publisher / podcast.html
blob55532ece701a0de28e868d428ad687e6bd04dd0a
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 <h2>{% trans "Flattr" %}</h2>
87 <p>
88 {% 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 %}
89 </p>
91 {% if podcast.flattr_url %}
92 <div class="alert alert-success">
93 {% blocktrans %} We discovered payment URLs in your pdocast feed. Your listeners can automatically flattr your content!{% endblocktrans %}
94 </div>
95 {% else %}
96 <div class="alert alert-info">
97 {% 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 %}
98 </div>
100 {% endif %}
103 <h2>{% trans "PubSubHubbub" %}</h2>
105 {% 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 %}
106 </p>
108 {% if pubsubscription and pubsubscription.mode == 'subscribe' %}
109 {% if pubsubscription.verified %}
110 <div class="alert alert-success">
111 {% 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 %}
112 </div>
113 {% else %}
114 <div class="alert alert-warning">
115 {% 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 %}
116 </div>
117 {% endif %}
118 {% else %}
119 <div class="alert alert-info">
120 {% 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 %}
121 </div>
122 {% endif %}
125 <h2>Episodes</h2>
126 <p>View and edit <a href="{% podcast_link_target podcast "podcast-publisher-episodes" %}">episode</a> data.</p>
129 <h2>{% trans "Link" %}</h2>
130 <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>
131 <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>
132 <p><a href="http://{{ site.domain }}{% url "subscribe-by-url" %}?url={{ feedurl_quoted }}"><img src="http://{{ site.domain }}/media/author_subscribe.png" /></a></p>
134 <h2>Stats</h2>
136 {% if group %}
137 <a href="{% podcast_group_link_target group "group-publisher" %}">{% trans "Show Group Stats" %}</a>
138 {% endif %}
140 {% if timeline_data %}
141 <h3>Listener Timeline</h3>
142 <div id="chart_div" style="width: 700px; height: 240px;"></div>
143 {% endif %}
146 {% if subscriber_data %}
147 <h3>Subscriptions</h3>
148 <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>
149 {{ subscriber_data|bar_chart }}
150 {% endif %}
152 {% if heatmap %}
153 <h3>Heatmap</h3>
154 <div>
155 {% trans "This diagram shows which parts of the podcast's episodes are listened the most by users." %}
156 {% trans "Red parts are often skipped, green parts never." %}
157 </div>
158 {{ heatmap|episode_heatmap_visualization }}
159 {% endif %}
161 {% endblock %}