Author: floguy
Date: Sat Oct 4 16:02:36 2008
New Revision: 1018
Modified:
trunk/projects/complete_project/templates/things/ordering.html
trunk/projects/complete_project/templates/things/search.html
Log:
Changed search and ordering templates to take advantage of the new features
in django-things like persisted search.
Modified: trunk/projects/complete_project/templates/things/ordering.html
==============================================================================
--- trunk/projects/complete_project/templates/things/ordering.html
(original)
+++ trunk/projects/complete_project/templates/things/ordering.html Sat Oct
4 16:02:36 2008
@@ -1,16 +1,17 @@
+{% load things_tags %}
<p>Order by:
{% for f in fields %}
{% ifequal f field %}
{% if descending %}
- <a href="{{ f.full_url_asc }}">{{ f.verbose_name_asc }}
↑</a>
+ <a href="{{ f.full_url_asc }}{% persist_getvars
request %}">{{ f.verbose_name_asc }} ↑</a>
{% else %}
- <a href="{{ f.full_url_desc }}">{{ f.verbose_name_desc }}
↓</a>
+ <a href="{{ f.full_url_desc }}{% persist_getvars
request %}">{{ f.verbose_name_desc }} ↓</a>
{% endif %}
{% else %}
{% if f.default_sort_descending %}
- <a href="{{ f.full_url_desc }}">{{ f.verbose_name_desc
}}</a>
+ <a href="{{ f.full_url_desc }}{% persist_getvars
request %}">{{ f.verbose_name_desc }}</a>
{% else %}
- <a href="{{ f.full_url_asc }}">{{ f.verbose_name_asc }}</a>
+ <a href="{{ f.full_url_asc }}{% persist_getvars
request %}">{{ f.verbose_name_asc }}</a>
{% endif %}
{% endifequal %}
{% endfor %}
Modified: trunk/projects/complete_project/templates/things/search.html
==============================================================================
--- trunk/projects/complete_project/templates/things/search.html
(original)
+++ trunk/projects/complete_project/templates/things/search.html Sat Oct
4
16:02:36 2008
@@ -1,6 +1,10 @@
+{% load things_tags %}
{% if search_enabled %}
<form method="GET" action="">
<input type="text" name="search" value="{{ terms }}" />
<input type="submit" value="Search" />
+ {% if terms %}
+ <a href="{% clear_search_url request %}">Clear Search Terms</a>
+ {% endif %}
</form>
{% endif %}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---