diff gpp/templates/weblinks/navigation.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
children db40c2754580
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gpp/templates/weblinks/navigation.html	Sun Apr 19 21:00:06 2009 +0000
@@ -0,0 +1,15 @@
+<div class="weblinks-search">
+<form action="{% url weblinks-search page=1 %}" method="post">
+   <p>{{ search_form.text }} <input type="submit" value="Search" /></p>
+</form>
+</div>
+
+<ul class="app-menu">
+<li><a href="{% url weblinks.views.link_index %}">Categories</a></li>
+<li><a href="{% url weblinks.views.new_links %}">New</a></li>
+<li><a href="{% url weblinks.views.popular_links %}">Popular</a></li>
+<li><a href="{% url weblinks.views.random_link %}" target="_blank">Random</a></li>
+{% if user.is_authenticated %}
+<li><a href="{% url weblinks.views.add_link %}">Add</a></li>
+{% endif %}
+</ul>