Merge pull request #95 from gpodder/dependabot/pip/python-dateutil-2.7.2
[mygpo.git] / mygpo / podcastlists / templates / list.html
blob00f2eaf0a004282d7f9f0160c3eaf79b4b019a29
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 entry in podcastlist.entries.all %}
54 <tr>
55 <td class="logo">{{ entry.content_object|podcast_logo }}</td>
56 <td>
57 {% podcast_group_link entry.content_object %}
58 </td>
59 <td>{% vertical_bar entry.content_object.subscriber_count max_subscribers %}</td>
61 {% if is_own %}
62 <td>
63 <form action="{% url "list-remove-podcast" owner.username podcastlist.slug entry.order %}" method="post" target="_parent">
64 {% csrf_token %}
65 <button class="btn btn-danger btn-sm" 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 btn-default" type="submit">
83 <i class="icon-thumbs-up"></i>
84 {% trans "Vote" %}
85 </button>
86 </form>
88 <a class="btn btn-default" href="{% url "list-opml" owner.username podcastlist.slug %}">
89 <i class="icon-download"></i>
90 {% trans "Download as OPML" %}
91 </a>
93 {% if is_own %}
95 <hr />
97 <h2>Add Podcast</h2>
99 <form method="get" action="{% url "list-search" owner.username podcastlist.slug %}" class="form-inline" target="results">
100 <div class="input-group">
101 <span class="input-group-addon"><i class="icon-search"></i></span>
102 <input class="form-control" type="text" name="q" {% if q %}value="{{ q }}"{% endif %} placeholder="{% trans "Search term or feed URL" %}" autofocus="autofocus">
103 <span class="input-group-btn">
104 <button class="btn btn-primary" type="submit">{% trans "Search" %}</button>
105 </span>
106 </div>
107 </form>
109 <iframe name="results" class="results">
110 </iframe>
112 {% endif %}
114 {% endblock %}
118 {% block sidebar %}
119 {% if not is_own and user.is_authenticated %}
120 <div class="well">
121 <h4>{% trans "Your own Podcast Lists" %}</h4>
122 <p>{% trans "Create and share your own podcast lists "%}</p>
123 <a class="btn btn-primary" href="{% url "lists-overview" %}">{% trans "Go" %}</a>
124 </div>
126 {% endif %}
127 {% endblock %}
130 {% block javascript %}
132 <script language="javascript">
133 <!--
134 function submitForm(formid)
136 document.forms[formid].submit();
137 return true;
140 </script>
142 {% endblock %}