use new style {% url "view" %} template syntax
[mygpo.git] / mygpo / publisher / templates / publisher / home.html
blob4d97e4ecfa7eeda31e5d6c5e97f61b2304a73c79
1 {% extends "base.html" %}
2 {% load url from future %}
3 {% load i18n %}
4 {% load podcasts %}
6 {% load menu %}
7 {% block mainmenu %}{{ "/publisher/"|main_menu }}{% endblock %}
8 {% block sectionmenu %}{{ "/publisher/"|section_menu }}{% endblock %}
10 {% block title %}{% trans "Podcasts Published by Me" %}{% endblock %}
12 {% block header %}
13 <h1>{% trans "Podcasts Published by Me" %}</h1>
14 {% endblock %}
17 {% block content %}
19 {% if not podcasts|length_is:"0" %}
20 <table class="list">
22 {% for s in podcasts %}
23 <tr>
24 <td>{{ s|podcast_logo }}</td>
25 <td><a class="listlink" href="{% podcast_link_target s "podcast-publisher-detail" %}">{{ s.display_title|striptags }}</a></td>
26 </tr>
27 {% endfor %}
28 </table>
29 {% endif %}
31 <h2>{% trans "Update your podcasts" %}</h2>
32 <p>{% trans "To update all of your published podcasts automatically, you can request the following URL" %}</p>
33 <pre><a href="{% url publisher-update user.username %}?token={{ update_token }}">http://{{ site }}{% url publisher-update user.username %}?token={{ update_token }}</a></pre>
34 <form action="{% url publisher-new-update-token user.username %}" method="post">
35 {% csrf_token %}
36 <button type="submit" class="btn">{% trans "Create a new token" %}</button>
37 </form>
39 {% if user.is_staff %}
40 <div class="well">
41 <h2>Staff Only</h2>
42 <p>{% trans "Go to the publisher page of any podcast by entering its feed URL" %}</p>
43 <form class="form-inline" action="{% url "podcast-publisher-search" %}" method="post">
44 {% csrf_token %}
45 <div class="input-prepend input-append">
46 <span class="add-on"><i class="icon-link"></i></span><input type="text" class="input-xlarge" name="url" id="id_url" />
47 <button class="btn" type="submit">{% trans "Go" %}</button>
48 </div>
49 </form>
50 </div>
51 {% endif %}
53 {% endblock %}