Fix logic for show details by default
authorDan Scott <dscott@laurentian.ca>
Mon, 13 Aug 2012 23:24:59 +0000 (19:24 -0400)
committerDan Scott <dscott@laurentian.ca>
Mon, 13 Aug 2012 23:24:59 +0000 (19:24 -0400)
If the CGI param was set, then the hidden input field was not created -
meaning that the next search would fail to show the details. Switching
the logic around sorts that out nicely.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/templates/opac/parts/searchbar.tt2

index 969c47b..702043d 100644 (file)
@@ -31,7 +31,7 @@
             l(' in '); INCLUDE build_org_selector show_loc_groups=1
     %]
     <span>
-    [%- IF (show_more_details.default == 'true' OR show_more_details.default == 'hide') AND !CGI.param('detail_record_view') %]
+    [%- IF show_more_details.default == 'hide' OR (show_more_details.default == 'true' AND !CGI.param('detail_record_view')) %]
         <input id="detail" type="hidden" name="detail_record_view" value="1"/>
     [%- END %]
         <input id='search-submit-go' type="submit" value="[% l('Search') %]" alt="[% l('Search') %]" class="opac-button"