Added UPC search option to numeric search. Changed heading in preferences.
authorGarry Collum <gcollum@gmail.com>
Tue, 31 May 2016 16:55:04 +0000 (12:55 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 10 Aug 2016 16:21:04 +0000 (12:21 -0400)
Open-ILS/src/kcpl_templates/opac/myopac/prefs_settings.tt2 [new file with mode: 0644]
Open-ILS/src/kcpl_templates/opac/parts/advanced/numeric.tt2 [new file with mode: 0644]

diff --git a/Open-ILS/src/kcpl_templates/opac/myopac/prefs_settings.tt2 b/Open-ILS/src/kcpl_templates/opac/myopac/prefs_settings.tt2
new file mode 100644 (file)
index 0000000..c47802f
--- /dev/null
@@ -0,0 +1,142 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/org_selector.tt2";
+    WRAPPER "opac/parts/myopac/prefs_base.tt2";
+    myopac_page = "prefs";
+    prefs_page = 'prefs_settings' %]
+
+    <h3 class="sr-only">[% l('Search and History Preferences') %]</h3>
+
+    <form method='post'>
+
+       <table class="full-width data_grid" id="acct_search_main"
+            title="[% l('Search and History Preferences') %]">
+            <tbody>
+
+                [% IF ctx.confirm_history_delete %]
+                <tr><td colspan='2'>
+                  <div id='clear-history-confirm' class='renew-summary'>
+                  [% l('Disabling checkout or holds history will permanently remove all items from your history.') %]
+                  <br/>
+                  [% l('Are you sure you wish to continue?') %]
+                  </div>
+                  <a href="[% mkurl() %]">[% l('Cancel') %]</a>
+                  <input type='hidden' name='history_delete_confirmed' value='1'/>
+                  <input type="submit" value="[% l('Confirm') %]" class="opac-button"/>
+                </td></tr>
+                [% ELSIF ctx.updated_user_settings %]
+                <tr><td colspan='2'>
+                    <div class='renew-summary'>
+                        [% l('Account Successfully Updated') %]
+                    </div>
+                </td></tr>
+                [% END %]
+
+                [%- setting = 'opac.hits_per_page' -%]
+                <tr >
+                    <td width='20%'><label for='[% setting %]'>[% l("Search hits per page") %]</label></td>
+                    <td>
+                        <select id='[% setting %]' name='[% setting %]'>
+                            [%  UNLESS ctx.user_setting_map.$setting;
+                                    ctx.user_setting_map.$setting = 10;
+                                END;
+                                FOR val IN [5, 8, 10, 15, 20, 25, 50] %]
+                                <option value='[% val | uri %]' 
+                                    [% IF ctx.user_setting_map.$setting == val %]
+                                        selected='selected'[% END %]>[% val | html %]</option>
+                            [% END %]
+                        </select>
+                        <a href="#"><img alt="[% l('Search Hits Help') %]" 
+                            src="[% ctx.media_prefix %]/images/question-mark.png"
+                        /></a>
+                    </td>
+                </tr>
+                [%- setting = 'opac.default_search_location'; -%]
+                <tr >
+                    <td width='20%'><label for='[% setting %]'>[% l("Preferred search/results location") %]</label></td>
+                    <td>
+                        [%- thang = ctx.user.home_ou.id;
+                            IF ctx.user_setting_map.$setting;
+                                thang = ctx.user_setting_map.$setting;
+                            END;
+                            id = setting;
+                            INCLUDE build_org_selector name=setting value=thang;
+                        %]
+                    </td>
+                </tr>
+                [%- setting = 'opac.default_pickup_location'; -%]
+                <tr>
+                    <td width='20%'><label for='[% setting %]'>[% l("Preferred pickup location") %]</label></td>
+                    <td>
+                        [%- thang = ctx.user.home_ou.id;
+                            IF ctx.user_setting_map.$setting;
+                                thang = ctx.user_setting_map.$setting;
+                            END;
+                            id = setting;
+                            INCLUDE build_org_selector name=setting value=thang can_have_vols_only=1;
+                        %]
+                    </td>
+                </tr>
+                [%- setting = 'history.circ.retention_start' -%]
+                <tr>
+                    [% circ_name = l('Keep history of checked out items?') %]
+                    <td><label for='[% setting %]'>[% circ_name%]</label></td>
+                    <td>
+                        <input id='[% setting %]' name='[% setting %]' 
+                            type="checkbox" title="[% circ_name %]"
+                            [% IF ctx.user_setting_map.$setting 
+                              AND !ctx.clear_circ_history; %] checked='checked' [% END %]/>
+                    </td>
+                </tr>
+                [%- setting = 'history.hold.retention_start' -%]
+                <tr>
+                    [% hold_name =  l('Keep history of holds?') %]
+                    <td><label for='[% setting %]'>[% hold_name %]</label></td>
+                    <td>
+                        <input id='[% setting %]' name='[% setting %]' 
+                            type="checkbox" title="[% hold_name %]"
+                            [% IF ctx.user_setting_map.$setting
+                              AND !ctx.clear_hold_history; %] checked='checked' [% END %]/>
+                    </td>
+                </tr>
+                [%- setting = 'opac.temporary_list_no_warn' -%]
+                <tr>
+                    [% skip_warn =  l('Skip warning when adding to temporary book list?') %]
+                    <td><label for='[% setting %]'>[% skip_warn %]</label></td>
+                    <td>
+                        <input id='[% setting %]' name='[% setting %]' 
+                            type="checkbox" title="[% skip_warn %]"
+                            [% IF ctx.user_setting_map.$setting %] checked='checked' [% END %]/>
+                    </td>
+                </tr>
+                [%- setting = 'circ.holds_behind_desk'; IF ctx.behind_desk_supported -%]
+                <tr>
+                    [% behind_desk = l('Pickup holds from behind the desk when possible?') %]
+                    <td><label for='[% setting %]'>[% behind_desk %]</label></td>
+                    <td>
+                        <input id='[% setting %]' name='[% setting %]' 
+                            type="checkbox" title="[% behind_desk %]"
+                            [% IF ctx.user_setting_map.$setting %] checked='checked' [% END %]/>
+                    </td>
+                </tr>
+                [% END %]
+
+                <!--
+                <tr>
+                    <td><label for='prefs_def_font'>[% l("Default Font Size") %]</label></td>
+                    <td>
+                        <select id='prefs_def_font'>
+                            <option value='regular'>[% l("Regular Font") %]</option>
+                            <option value='large'>[% l("Large Font") %]</option>
+                        </select>
+                    </td>
+                </tr>
+                -->
+
+            </tbody>
+        </table>
+        [% IF !ctx.confirm_history_delete %]
+        <input type="submit" value="[% l('Save') %]" class="opac-button"/>
+        [% END %]
+    </form>
+    [% INCLUDE "opac/parts/myopac/prefs_hints.tt2" %]
+[% END %]
diff --git a/Open-ILS/src/kcpl_templates/opac/parts/advanced/numeric.tt2 b/Open-ILS/src/kcpl_templates/opac/parts/advanced/numeric.tt2
new file mode 100644 (file)
index 0000000..2735f7c
--- /dev/null
@@ -0,0 +1,30 @@
+<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" />
+    <div id='adv_numeric_block'>
+            <label for="numeric_qtype"><strong>[% l("Field:") %]</strong></label>
+                <select id="numeric_qtype" name="qtype">
+                    <!-- TODO: Pull labels from config.metabib_field.label -->
+                    <option value="item_barcode">[% l('Item Barcode') %]</option>
+                    <option value="identifier|isbn">[% l('ISBN') %]</option>
+                    <option value="identifier|upc">[% l('UPC') %]</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>
+                </select>
+       
+                <input type="text" name="query" size="16" autofocus placeholder='[% l("Identifier") %]' />
+           <br/>
+            [%- lib_select_id="numeric_search_library" -%]
+            <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
+                  %]
+            </label>
+           <br/>
+                <input type="submit" alt="[% l('Search') %]"
+                    value="[% l('Search') %]" class="opac-button" />
+    </div>
+</form>