Tpac: Make the staff saved searches a collapse/expand thing user/senator/tpac-collapsible-saved-searches
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 27 Oct 2011 22:20:00 +0000 (18:20 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 27 Oct 2011 22:20:00 +0000 (18:20 -0400)
Collapsed by default. This makes the facet display more accessible in
the case of long search histories.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/templates/opac/parts/staff_saved_searches.tt2
Open-ILS/web/css/skin/default/opac/style.css

index fb8ce21..a1704f4 100644 (file)
@@ -1,8 +1,26 @@
 [% IF ctx.saved_searches.size %]
-    <div class="saved-searches-header big-strong">[% l("Your recent searches:") %]</div>
-    [% FOR s IN ctx.saved_searches %]
-    <ul>
-        <li><a href="[% ctx.opac_root %]/results?query=[% s | uri %]&amp;_adv=1">[% s | html %]</a></li>
-    </ul>
+
+    <div class="saved-searches-header">
+        <div class="text">
+            [% l("Recent searches") %]
+        </div>
+        <div class="button">
+            [% IF CGI.param('expand_recent') %]
+            <a href="[% mkurl('', {}, ['expand_recent']) %]" title="[% l('Collapse') %]"><img src="[% ctx.media_prefix %]/images/adv_search_minus_btn.png" alt="[% l('Collapse') %]" /></a>
+            [% ELSE %]
+            <a href="[% mkurl('', {'expand_recent' => 1}) %]" title="[% l('Expand') %]"><img src="[% ctx.media_prefix %]/images/adv_search_plus_btn.png" alt="[% l('Expand') %]" /></a>
+            [% END %]
+        </div>
+        <div class="clear">&nbsp;</div>
+    </div>
+    <div class="clear">&nbsp;</div>
+    <div class="saved-searches">
+    [% IF CGI.param('expand_recent') %]
+        [% FOR s IN ctx.saved_searches %]
+        <ul>
+            <li><a href="[% ctx.opac_root %]/results?query=[% s | uri %]&amp;_adv=1">[% s | html %]</a></li>
+        </ul>
+        [% END %]
     [% END %]
+    </div>
 [% END %]
index e3a425d..8c3aa91 100644 (file)
@@ -1166,3 +1166,11 @@ table.bookbag-specific {
     margin-bottom: 2ex;
 }
 .save-notes { padding-bottom: 1.5ex; }
+.saved-searches-header { width: 100%; font-weight: bold; font-size: 120%; }
+.saved-searches-header .button { float: right; width: 28px; }
+.saved-searches-header .text { float: left; padding-right: 1em; margin: 0.5ex 0;}
+.saved-searches-header {font-weight: bold; font-size: 120%; }
+.saved-searches { border-bottom: 1px solid #666; }
+#staff-saved-search { /* wraps .saved-searches-header anad .saved-searches on the record page */
+    border-right: 1px solid #333;
+}