add Flattr buttons for podcast lists
[mygpo.git] / mygpo / share / templates / list.html
blobb180370603235de93733d6f593517fc058593385
1 {% extends "base.html" %}
3 {% load url from future %}
4 {% load i18n %}
5 {% load podcasts %}
6 {% load charts %}
7 {% load math %}
8 {% load utils %}
10 {% load menu %}
12 {% block mainmenu %}
13 {% if is_own %}
14 {{ "/share/"|main_menu }}
15 {% else %}
16 {{ "/directory/"|main_menu }}
17 {% endif %}
18 {% endblock %}
20 {% block sectionmenu %}
21 {% if is_own %}
22 {{ "/share/lists/"|section_menu }}
23 {% else %}
24 {{ "/lists/"|section_menu }}
25 {% endif %}
26 {% endblock %}
28 {% block title %}
29 {% blocktrans with podcastlist.title as list_title and owner.username as ownername %}"{{ list_title }}" by {{ ownername }}{% endblocktrans %}
30 {% endblock %}
32 {% block header %}
33 <h1>{{ podcastlist.title }}</h1>
34 {% url "user" owner.username as user-lists-url %}
35 <small class="description">
36 {% blocktrans with owner.username as ownername %}a podcast list by <a href="{{ user-lists-url }}">{{ ownername }}</a>{% endblocktrans %}
37 {% if podcastlist.get_rating %}
38 &middot; {{ podcastlist.get_rating }} <i class="icon-thumbs-up"></i>
39 {% endif %}
40 </small>
41 {% endblock %}
44 {% block content %}
46 <table class="list">
47 <tr>
48 <th></th>
49 <th>{% trans "Podcast" %}</th>
50 <th>{% trans "Subscribers" %}</th>
51 </tr>
53 {% for podcast in podcastlist.podcasts %}
55 <tr>
56 <td class="logo">{{ podcast|podcast_logo }}</td>
57 <td>
58 {% podcast_group_link podcast %}
59 </td>
60 <td>{% vertical_bar podcast.subscriber_count max_subscribers %}</td>
62 {% if is_own %}
63 <td>
64 <form action="{% url "list-remove-podcast" owner.username podcastlist.slug podcast.get_id %}" method="post" target="_parent">
65 {% csrf_token %}
66 <button class="btn btn-danger btn-small" type="submit" >
67 <i class="icon-remove"></i>
68 </button>
69 </form>
70 </td>
71 {% endif %}
72 </tr>
73 {% empty %}
74 <tr>
75 <td colspan="3">{% trans "No Podcasts" %}</td>
76 </tr>
77 {% endfor %}
78 </table>
81 <form action="{% url "list-rate" owner.username podcastlist.slug %}?rate=1" method="post" style="display: inline;" >
82 {% csrf_token %}
83 <button class="btn" type="submit">
84 <i class="icon-thumbs-up"></i>
85 {% trans "Vote" %}
86 </button>
87 </form>
89 <a class="btn" href="{% url "list-opml" owner.username podcastlist.slug %}">
90 <i class="icon-download"></i>
91 {% trans "Download as OPML" %}
92 </a>
94 {% if flattr_autosubmit %}
95 <a href="{{ flattr_autosubmit }}">
96 <img src="https://api.flattr.com/button/flattr-badge-large.png"
97 alt="{% trans "Flattr this podcast list" %}" />
98 </a>
99 {% endif %}
101 {% if is_own %}
103 <hr />
105 <h2>Add Podcast</h2>
106 <form method="get" action="{% url "list-search" owner.username podcastlist.slug %}" class="form-inline" target="results">
107 <div class="input-prepend input-append">
108 <span class="add-on"><i class="icon-search"></i></span><input type="text" class="input-xxlarge" name="q" {% if q %}value="{{ q }}"{% endif %} ><button class="btn btn-primary" type="submit">{% trans "Search" %}</button>
109 </div>
110 </form>
112 <iframe name="results" class="results">
113 </iframe>
115 {% endif %}
117 {% endblock %}
121 {% block sidebar %}
122 {% if not is_own and user.is_authenticated %}
123 <div class="well">
124 <h4>{% trans "Your own Podcast Lists" %}</h4>
125 <p>{% trans "Create and share your own podcast lists "%}</p>
126 <a class="btn btn-primary" href="{% url "lists-overview" %}">{% trans "Go" %}</a>
127 </div>
129 {% endif %}
130 {% endblock %}
133 {% block javascript %}
135 <script language="javascript">
136 <!--
137 function submitForm(formid)
139 document.forms[formid].submit();
140 return true;
143 </script>
145 {% endblock %}