remove print statement in logo.py
[mygpo.git] / mygpo / share / templates / list.html
blobe1ea799163c156376e004a0c481319d3aeed2952
1 {% extends "base.html" %}
3 {% load i18n %}
4 {% load podcasts %}
5 {% load charts %}
6 {% load math %}
7 {% load utils %}
9 {% load menu %}
11 {% block mainmenu %}
12 {% if is_own %}
13 {{ "/share/"|main_menu }}
14 {% else %}
15 {{ "/directory/"|main_menu }}
16 {% endif %}
17 {% endblock %}
19 {% block sectionmenu %}
20 {% if is_own %}
21 {{ "/share/lists/"|section_menu }}
22 {% else %}
23 {{ "/lists/"|section_menu }}
24 {% endif %}
25 {% endblock %}
27 {% block title %}
28 {% blocktrans with podcastlist.title as list_title and owner.username as ownername %}"{{ list_title }}" by {{ ownername }}{% endblocktrans %}
29 {% endblock %}
31 {% block header %}
32 <h1>{{ podcastlist.title }}</h1>
33 {% url "user" owner.username as user-lists-url %}
34 <small class="description">
35 {% blocktrans with owner.username as ownername %}a podcast list by <a href="{{ user-lists-url }}">{{ ownername }}</a>{% endblocktrans %}
36 {% if podcastlist.get_rating %}
37 &middot; {{ podcastlist.get_rating }} <i class="icon-thumbs-up"></i>
38 {% endif %}
39 </small>
40 {% endblock %}
43 {% block content %}
45 <table class="list">
46 <tr>
47 <th></th>
48 <th>{% trans "Podcast" %}</th>
49 <th>{% trans "Subscribers" %}</th>
50 </tr>
52 {% for podcast in podcastlist.podcasts %}
54 <tr>
55 <td class="logo">{{ podcast|podcast_logo }}</td>
56 <td>
57 {% podcast_group_link podcast %}
58 </td>
59 <td>{% vertical_bar podcast.subscriber_count max_subscribers %}</td>
61 {% if is_own %}
62 <td>
63 <form action="{% url "list-remove-podcast" owner.username podcastlist.slug podcast.get_id %}" method="post" target="_parent">
64 {% csrf_token %}
65 <button class="btn btn-danger btn-small" type="submit" >
66 <i class="icon-remove"></i>
67 </button>
68 </form>
69 </td>
70 {% endif %}
71 </tr>
72 {% empty %}
73 <tr>
74 <td colspan="3">{% trans "No Podcasts" %}</td>
75 </tr>
76 {% endfor %}
77 </table>
80 <form action="{% url "list-rate" owner.username podcastlist.slug %}?rate=1" method="post" style="display: inline;" >
81 {% csrf_token %}
82 <button class="btn" type="submit">
83 <i class="icon-thumbs-up"></i>
84 {% trans "Vote" %}
85 </button>
86 </form>
88 <a class="btn" href="{% url "list-opml" owner.username podcastlist.slug %}">
89 <i class="icon-download"></i>
90 {% trans "Download as OPML" %}
91 </a>
93 {% if flattr_autosubmit %}
94 <a href="{{ flattr_autosubmit }}">
95 <img src="https://api.flattr.com/button/flattr-badge-large.png"
96 alt="{% trans "Flattr this podcast list" %}" />
97 </a>
98 {% endif %}
100 {% if is_own %}
102 <hr />
104 <h2>Add Podcast</h2>
105 <form method="get" action="{% url "list-search" owner.username podcastlist.slug %}" class="form-inline" target="results">
106 <div class="input-prepend input-append">
107 <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>
108 </div>
109 </form>
111 <iframe name="results" class="results">
112 </iframe>
114 {% endif %}
116 {% endblock %}
120 {% block sidebar %}
121 {% if not is_own and user.is_authenticated %}
122 <div class="well">
123 <h4>{% trans "Your own Podcast Lists" %}</h4>
124 <p>{% trans "Create and share your own podcast lists "%}</p>
125 <a class="btn btn-primary" href="{% url "lists-overview" %}">{% trans "Go" %}</a>
126 </div>
128 {% endif %}
129 {% endblock %}
132 {% block javascript %}
134 <script language="javascript">
135 <!--
136 function submitForm(formid)
138 document.forms[formid].submit();
139 return true;
142 </script>
144 {% endblock %}