92973eb41b27655cc1a6fda549b1e58380506fae
[mygpo.git] / mygpo / share / templates / list_search.html
blob92973eb41b27655cc1a6fda549b1e58380506fae
1 {% extends "embed.html" %}
3 {% load i18n %}
4 {% load podcasts %}
5 {% load charts %}
7 {% block head %}
8 <base target="_parent" />
9 {% endblock %}
11 {% block content %}
13 {% if results %}
14 <table class="list">
15 {% for podcast in results %}
16 <tr>
17 <td class="logo">{{ podcast|podcast_logo }}</td>
18 <td>{% podcast_group_link podcast %}</td>
19 <td>{% vertical_bar podcast.subscriber_count max_subscribers %}</td>
20 <td>
21 <form action="{% url "list-add-podcast" user.username listname podcast.get_id %}" method="post" target="_parent">
22 {% csrf_token %}
23 <button class="btn btn-success btn-small" type="submit">
24 <i class="icon-plus"></i>
25 </button>
26 </form>
27 </td>
28 </tr>
29 {% endfor %}
30 </table>
32 <div class="pagination">
34 {% if results.has_previous %}
35 <a href="{% url "list-search" user.username listname %}?q={{ q }}&page={{ results.previous_page_number }}">«</a>
36 {% endif %}
38 {% for page in page_list %}
39 <span class="page-link">
40 {% if page == "..." %}
41 {{ page }}
42 {% else %}
44 {% if page == results.number %}
45 <strong>{{ page }}</strong>
46 {% else %}
47 <a href="{% url "list-search" user.username listname %}?q={{ q }}&page={{ page }}">{{ page }}</a>
48 {% endif %}
49 {% endif %}
50 </span>
51 {% endfor %}
53 {% if results.has_next %}
54 <a href="{% url "list-search" user.username listname %}?q={{ q }}&page={{ results.next_page_number }}">»</a>
55 {% endif %}
57 </div>
59 {% else %}
61 <div>{% trans "Nothing found" %}</div>
63 {% endif %}
65 {% endblock %}