comparison gpp/templates/weblinks/base.html @ 21:884839ddbfde

Webinks: added a navigation template tag so views don't have to keep constructing the searc form. Also provided a count of search results on the template.
author Brian Neal <bgneal@gmail.com>
date Sun, 19 Apr 2009 21:00:06 +0000
parents dbd703f7d63a
children 952e05cb3d80
comparison
equal deleted inserted replaced
20:c0d0779b266f 21:884839ddbfde
1 {% extends 'base.html' %} 1 {% extends 'base.html' %}
2 {% load weblinks_tags %}
2 {% block custom_css %} 3 {% block custom_css %}
3 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/weblinks.css" /> 4 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/weblinks.css" />
4 {% block weblinks_css %}{% endblock %} 5 {% block weblinks_css %}{% endblock %}
5 {% endblock %} 6 {% endblock %}
6 {% block content %} 7 {% block content %}
7 <h2>Web Links</h2> 8 <h2>Web Links</h2>
8 9 {% weblinks_navigation %}
9 <div class="weblinks-search">
10 <form action="{% url weblinks-search page=1 %}" method="post">
11 <p>{{ search_form.text }} <input type="submit" value="Search" /></p>
12 </form>
13 </div>
14
15 <ul class="app-menu">
16 <li><a href="{% url weblinks.views.link_index %}">Categories</a></li>
17 <li><a href="{% url weblinks.views.new_links %}">New</a></li>
18 <li><a href="{% url weblinks.views.popular_links %}">Popular</a></li>
19 <li><a href="{% url weblinks.views.random_link %}" target="_blank">Random</a></li>
20 {% if user.is_authenticated %}
21 <li><a href="{% url weblinks.views.add_link %}">Add</a></li>
22 {% endif %}
23 </ul>
24
25 <div class="weblinks-content"> 10 <div class="weblinks-content">
26 {% block weblinks_content %} 11 {% block weblinks_content %}
27 {% endblock %} 12 {% endblock %}
28 </div> 13 </div>
29 {% endblock %} 14 {% endblock %}