Make opac/results.tt2 remember facet when sorting, etc.
authorJason Stephenson <jstephenson@mvlc.org>
Wed, 25 Jul 2012 17:43:38 +0000 (13:43 -0400)
committerDan Scott <dscott@laurentian.ca>
Mon, 13 Aug 2012 14:51:48 +0000 (10:51 -0400)
Add a hidden field in the search form and set its value to the value
of the CGI 'facet' param if the facet parameter is set.  This appears
to work for multiple facets.  Clearing a facet is as simple as clicking
on the gray-backgounded facet name.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/templates/opac/results.tt2

index 875a8d2..976c5e9 100644 (file)
@@ -15,6 +15,9 @@
     page_count = ctx.page_size == 0 ? 1 : POSIX.ceil(ctx.hit_count / ctx.page_size);
 %]
     <form action="[% ctx.opac_root %]/results" method="GET">
+    [% IF CGI.param('facet') %]
+    <input type="hidden" name="facet" value="[% CGI.param('facet') %]" />
+    [% END %]
     <div id="search-wrapper">
         [% INCLUDE "opac/parts/searchbar.tt2" took_care_of_form=1 %]
     </div>