lp1424690 Change search box on call number search results screen
authorChristine Morgan <cmorgan@noblenet.org>
Fri, 4 Sep 2015 02:46:27 +0000 (22:46 -0400)
committerKathy Lussier <klussier@masslnc.org>
Sat, 5 Sep 2015 01:40:39 +0000 (21:40 -0400)
When on the call number browse results screen, provide the call number
search box at the top  of the screen instead of a keyword search box. If the
user is already searching by call number, they are likely to expect to
continue searching by call number in this box. Links are also provided to
bring the user to a basic, advanced or browse search.

Signed-off-by: Christine Morgan <cmorgan@noblenet.org>
Open-ILS/src/templates/opac/cnbrowse.tt2
Open-ILS/src/templates/opac/css/style.css.tt2
Open-ILS/src/templates/opac/parts/advanced/cnbrowse.tt2 [new file with mode: 0644]
Open-ILS/src/templates/opac/parts/record/cnbrowse.tt2

index a0908f6..a878d40 100644 (file)
@@ -8,9 +8,17 @@
     INCLUDE "opac/parts/topnav.tt2";
     ctx.page_title = l("Call Number Browse"); %]
     <h2 class="sr-only">[% l('Call Number Browse') %]</h2>
-    [% INCLUDE "opac/parts/searchbar.tt2" %]
-    <div id="content-wrapper">
-        <div id="main-content">
+    <div id="cn-search-bar-wrapper">
+       <span class="search_catalog_lbl mobile_hide">[% l('Search the Catalog') %]</span>
+                    <span style="padding: 10px 0 5px 20px;"><a href="[% mkurl(ctx.opac_root _ '/home', {locg => CGI.param('locg')}, 1) %]"
+                    class="adv_search_catalog_lbl">[%l('Basic Search')%]</a></span>
+                    <span style="padding: 10px 0 5px 20px;"><a href="[% mkurl(ctx.opac_root _ '/advanced', {locg => CGI.param('locg')}, 1) %]"
+                    class="adv_search_catalog_lbl">[%l('Advanced Search')%]</a></span>
+            <span style="padding: 10px 0 5px 20px;" class="browse_the_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/browse') %]">[%
+                    l('Browse the Catalog')%]</a></span>
+                </div>
+      <div id="content-wrapper">
+          <div id="main-content">
             <div class="cnbrowse_div">
                 [% INCLUDE "opac/parts/record/cnbrowse.tt2" %]
             </div>
index ff8c6ad..adaca2c 100644 (file)
@@ -1214,6 +1214,28 @@ a.dash-link:hover { text-decoration: underline !important; }
     height: 1px;
     padding-bottom: 1ex;
 }
+
+#cn_search_box {
+        min-width: 20%;
+        height: 1.1em;
+        font-size: 15px;
+        border: 1px solid [% css_colors.border_standard %];
+}
+
+#cn-search-bar-wrapper {
+       padding: 10px 0 0 20px;
+       background: [% css_colors.background %];
+}
+
+#browse_block {
+       padding-top: 10px;
+}
+
+#shelf_browse_label {
+       color: [% css_colors.primary %];
+       font-weight: bold;
+}
+
 .cn_browse_item { padding: 2ex; }
 .results-paginator-list { padding-left: 1em; }
 .results-paginator-selected { color: [% css_colors.text_alert %]; }
diff --git a/Open-ILS/src/templates/opac/parts/advanced/cnbrowse.tt2 b/Open-ILS/src/templates/opac/parts/advanced/cnbrowse.tt2
new file mode 100644 (file)
index 0000000..5673387
--- /dev/null
@@ -0,0 +1,22 @@
+<form action="[% ctx.opac_root %]/results" method="get">
+
+    <input type="hidden" name="contains" value="contains" />
+    <input type="hidden" name="_special" value="1" />
+    <div id='browse_block'>
+            <label for="numeric_qtype" id="shelf_browse_label">[% l("Call Number Browse: ") %]</label>
+                <select class='hidden' id="numeric_qtype" name="qtype">
+                    <option value="cnbrowse">[% l('Call Number Browse') %]</option>
+                </select>
+
+                <input type="text" id="cn_search_box" name="query" autofocus placeholder='[% l("Call Number") %]' />
+            [%- lib_select_id="numeric_search_library" -%]
+            <label id="search_locg_label" for="[% lib_select_id %]"><!--<strong>[% l("Search Library:") %]</strong>-->
+                  [% PROCESS "opac/parts/org_selector.tt2";
+                     INCLUDE build_org_selector id=lib_select_id #show_loc_groups=1 --Remove location groups because they don't work in cnbrowse - NOBLE
+                  %]
+            </label>
+                <input type="submit" alt="[% l('Search') %]"
+                    value="[% l('Search') %]" class="opac-button" />
+        </div>
+</form>
+
index 2dba5e5..67712b0 100644 (file)
@@ -1,3 +1,5 @@
+[% INCLUDE "opac/parts/advanced/cnbrowse.tt2" %]
+
 [% 
     cnoffset = CGI.param('cnoffset');
     cnoffset = cnoffset.match('^-?\d+$') ? cnoffset : 0; # verify cnoffset is a sane value