webstaff: add drop-down for item type Z39.50 search field
authorGalen Charlton <gmc@esilibrary.com>
Thu, 1 Oct 2015 19:24:57 +0000 (19:24 +0000)
committerKathy Lussier <klussier@masslnc.org>
Tue, 2 Feb 2016 19:58:47 +0000 (14:58 -0500)
It should be noted that this works *only* for OCLC, as
not all targets support use attribute 1001, and the list
of values for that use attribute are target-defined.

A more general solution might be creating a new
config.z3950_attr_value_list table.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/cat/z3950/t_search_fields.tt2

index 377695e..753f998 100644 (file)
@@ -2,7 +2,20 @@
     <div ng-repeat="(code, search_field) in fields" class="z3950-search-field-list form-group">
         <label for="z3950-field-{{code}}" class="col-xs-6 control-label">{{search_field.label}}</label>
         <div class="col-xs-6">
-            <input type="text" class="form=control" id="z3950-field-{{code}}" ng-model="search_field.query">
+            <input type="text" class="form=control" id="z3950-field-{{code}}" ng-model="search_field.query" ng-if="code != 'item_type'">
+            <select ng-if="code == 'item_type'" ng-model="search_field.query">
+                <option value="">[% l('All Formats') %]</option>
+                <option value='art'>[% l('Papers or Articles') %]</option>
+                <option value='bks'>[% l('Books') %]</option>
+                <option value='com'>[% l('Computer files') %]</option>
+                <option value='map'>[% l('Maps') %]</option>
+                <option value='mix'>[% l('Mixed material') %]</option>
+                <option value='rec'>[% l('Sound recordings') %]</option>
+                <option value='sco'>[% l('Musical scores') %]</option>
+                <option value='ser'>[% l('Serials') %]</option>
+                <option value='url'>[% l('Internet Resources') %]</option>
+                <option value='vis'>[% l('Visual materials') %]</option>
+            </select>
         </div>
     </div>
 </div>