remove gevent monkey-patch from feed-downloader
[mygpo.git] / mygpo / directory / templates / search.html
blobccb531a72a6545cb08ff0af7bdbce3b2cf244a36
1 {% extends 'base.html' %}
3 {% load i18n %}
4 {% load podcasts %}
5 {% load charts %}
7 {% load menu %}
8 {% block mainmenu %}{{ "/search/"|main_menu }}{% endblock %}
9 {% block sectionmenu %}{{ "/search/"|section_menu }}{% endblock %}
11 {% block title %}{% trans "Search" %}{% endblock %}
13 {% block header %}
14 <h1>{% trans "Search" %}</h1>
15 {% endblock %}
18 {% block content %}
20 <form class="form-inline" method="get" action="{% url "search" %}" class="search">
21 <div class="input-prepend input-append">
22 <span class="add-on"><i class="icon-search"></i></span><input class="input-xxlarge" type="text" name="q" {% if q %}value="{{ q }}"{% endif %} ><button class="btn btn-primary" type="submit">{% trans "Search" %}</button>
23 </div>
24 </form>
26 {% if q %}
27 {% if results %}
28 <table class="list">
29 <tr>
30 <th></th>
31 <th>{% trans "Podcast" %}</th>
32 <th>{% trans "Subscribers" %}</th>
33 </tr>
35 {% for podcast in results %}
36 <tr>
37 <td class="logo">{{ podcast|podcast_logo }}</td>
38 <td>{% podcast_group_link podcast %}</td>
39 <td>{% vertical_bar podcast.subscriber_count max_subscribers %}</td>
40 </tr>
41 {% endfor %}
42 </table>
44 <div class="pagination pagination-centered">
45 <ul>
46 {% if results.has_previous %}
47 <li>
48 <a href="{% url "search" %}?q={{ q }}&page={{ results.previous_page_number }}">«</a>
49 </li>
50 {% endif %}
52 {% for page in page_list %}
53 <li>
54 {% if page == "..." %}
55 <a href=#" class="disabled">
56 {{ page }}
57 </a>
58 {% else %}
60 {% if page == results.number %}
61 <strong>{{ page }}</strong>
62 {% else %}
63 <a href="{% url "search" %}?q={{ q }}&page={{ page }}">{{ page }}</a>
64 {% endif %}
65 {% endif %}
66 </li>
67 {% endfor %}
69 {% if results.has_next %}
70 <li>
71 <a href="{% url "search" %}?q={{ q }}&page={{ results.next_page_number }}">»</a>
72 </li>
73 {% endif %}
74 </ul>
75 </div>
77 {% else %}
79 <div>{% trans "Nothing found" %}</div>
81 {% endif %}
83 {% endif %}
85 {% endblock %}
88 {% block sidebar %}
90 <div class="well">
91 <h4>{% trans "Search API" %}</h4>
92 <p>{% trans "Access the following address to search for <em>tech</em> podcasts." %}</p>
93 <a href="/search.opml?q=tech">
94 <pre>http://{{domain}}/search.opml?q=tech</pre>
95 </a>
96 </div>
97 {% endblock %}