Suppress Bib Call Number index in TPAC
authorDan Scott <dscott@laurentian.ca>
Thu, 26 Jul 2012 19:16:11 +0000 (15:16 -0400)
committerDan Scott <dscott@laurentian.ca>
Tue, 31 Jul 2012 17:26:16 +0000 (13:26 -0400)
The Bib Call Number index is a non-standard and therefore non-functional
index for most libraries (unless they happen to have placed all of their
call numbers in a given MARC field in the corresponding bib records).
Suppress its visibility in the Conifer TPAC.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/templates_conifer/opac/parts/advanced/numeric.tt2 [new file with mode: 0644]
Open-ILS/src/templates_conifer/opac/parts/qtype_selector.tt2 [new file with mode: 0644]

diff --git a/Open-ILS/src/templates_conifer/opac/parts/advanced/numeric.tt2 b/Open-ILS/src/templates_conifer/opac/parts/advanced/numeric.tt2
new file mode 100644 (file)
index 0000000..55e49f7
--- /dev/null
@@ -0,0 +1,29 @@
+<form action="[% ctx.opac_root %]/results" method="GET">
+    <div class="header_middle">[% l("Numeric Search") %]</div>
+    <input type="hidden" name="contains" value="contains" />
+    <input type="hidden" name="_special" value="1" />
+    [% IF loc %]<input type="hidden" name="loc" value="[% loc %]" />[% END %]
+    <table>
+        <tr>
+            <td>
+                <select name="qtype">
+                    <!-- TODO: Pull labels from config.metabib_field.label -->
+                    <option value="identifier|isbn">[% l('ISBN') %]</option>
+                    <option value="identifier|issn">[% l('ISSN') %]</option>
+                    <option value="cnbrowse">[% l('Call Number (Shelf Browse)') %]</option>
+                    <option value="identifier|lccn">[% l('LCCN') %]</option>
+                    <option value="identifier|tcn">[% l('TCN') %]</option>
+                    <option value="item_barcode">[% l('Item Barcode') %]</option>
+                </select>
+            </td>
+            <td>
+                <input type="text" name="query" size="16" autofocus />
+            </td>
+        </tr>
+        <tr>
+            <td colspan="2" align="right">
+                <input type="submit" alt="[% l('Search') %]"
+                    value="[% l('Search') %]" class="opac-button" />
+            </td>
+    </table>
+</form>
diff --git a/Open-ILS/src/templates_conifer/opac/parts/qtype_selector.tt2 b/Open-ILS/src/templates_conifer/opac/parts/qtype_selector.tt2
new file mode 100644 (file)
index 0000000..df826bf
--- /dev/null
@@ -0,0 +1,16 @@
+[%  query_types = [
+    {value => "keyword", label => l("Keyword")},
+    {value => "title", label => l("Title")},
+    {value => "jtitle", label => l("Journal Title")},
+    {value => "author", label => l("Author")},
+    {value => "subject", label => l("Subject")},
+    {value => "series", label => l("Series")},
+] %]
+<select name="qtype"[% IF id; ' id="'; id ; '"' ; END %]>
+    [%  query_type = query_type || CGI.param('qtype');
+        FOR qt IN query_types -%]
+    <option value='[% qt.value | html %]'[%
+        query_type == qt.value ? ' selected="selected"' : ''
+    %]>[% qt.label | html %]</option>
+    [% END -%]
+</select>