LP#1583729 Item status screen column options do not include age protection
authorMichele Morgan <mmorgan@noblenet.org>
Tue, 16 Aug 2016 18:47:43 +0000 (14:47 -0400)
committerMike Rylander <mrylander@gmail.com>
Thu, 18 Aug 2016 19:34:23 +0000 (15:34 -0400)
Adds the age_protect field to several missing copy interfaces:

XUL client:

- Item status list view column picker
- Item status alternate view
- Holdings Maintenance column picker

Web client:

- Item status alternate view
- Holdings view column picker

Also addresses an issue with displaying the circ modifier in some item
interfaces.

Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>

Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2
Open-ILS/web/js/ui/default/staff/cat/item/app.js
Open-ILS/web/js/ui/default/staff/cat/services/holdings.js
Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/server/cat/copy_browser.js
Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.js
Open-ILS/xul/staff_client/server/circ/alternate_copy_summary.xul
Open-ILS/xul/staff_client/server/circ/util.js
Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
Open-ILS/xul/staff_client/server/locale/en-US/common.properties

index 8bbfb45..bd618ac 100644 (file)
     <eg-grid-field label="[% l('Circulate As MARC Type') %]" path="circ_as_type"></eg-grid-field>
     <eg-grid-field label="[% l('Circulate') %]"              datatype="bool" path="circulate"></eg-grid-field>
     <eg-grid-field label="[% l('Holdable') %]"               datatype="bool" path="holdable"></eg-grid-field>
+    <eg-grid-field label="[% l('Age-based Hold Protection') %]" path="age_protect.name"></eg-grid-field>
     <eg-grid-field label="[% l('Reference') %]"              datatype="bool" path="ref"></eg-grid-field>
   
   </eg-grid>
index c21c9cd..1ab16a5 100644 (file)
     <div class="flex-cell">[% l('Circ Modifier') %]</div>
     <div class="flex-cell well">{{copy.circ_modifier().name()}}</div>
 
+    <div class="flex-cell">[% l('Age-based Hold Protection') %]</div>
+    <div class="flex-cell well">{{copy.age_protect().name()}}</div>
     <!-- empty -->
     <div class="flex-cell"></div>
     <div class="flex-cell"></div>
index a8781dc..922a531 100644 (file)
@@ -59,7 +59,7 @@ function(egCore) {
     service.flesh = {   
         flesh : 3, 
         flesh_fields : {
-            acp : ['call_number','location','status','location','floating'],
+            acp : ['call_number','location','status','location','floating','circ_modifier','age_protect'],
             acn : ['record','prefix','suffix'],
             bre : ['simple_record','creator','editor']
         },
index 2742915..71255a4 100644 (file)
@@ -15,7 +15,7 @@ function(egCore , $q) {
     service.prototype.flesh = {   
         flesh : 2, 
         flesh_fields : {
-            acp : ['status','location','circ_lib','parts'],
+            acp : ['status','location','circ_lib','parts','age_protect'],
             acn : ['prefix','suffix','copies']
         }
     }
index bbdf8ac..3dd1b4a 100644 (file)
 <!ENTITY staff.circ.alternate_copy_summary.Edition.label "Edition">
 <!ENTITY staff.circ.alternate_copy_summary.Floating.label "Floating">
 <!ENTITY staff.circ.alternate_copy_summary.Holdable.label "Holdable">
+<!ENTITY staff.circ.alternate_copy_summary.Age_Protect.label "Age-based Hold Protection">
 <!ENTITY staff.circ.alternate_copy_summary.Hold_Shelf_Location.label "Hold Shelf Location">
 <!ENTITY staff.circ.alternate_copy_summary.Holds_Transit.label "Holds/Transit">
 <!ENTITY staff.circ.alternate_copy_summary.Holds_Transit.accesskey "">
index 532ec1b..327b45b 100644 (file)
@@ -1758,6 +1758,7 @@ cat.copy_browser.prototype = {
                             'fine_level',
                             'circulate',
                             'holdable',
+                            'age_protect',
                             'opac_visible',
                             'ref',
                             'deposit',
index 74b7ae3..43c52ff 100644 (file)
@@ -191,7 +191,12 @@ function load_item() {
 
         if (details.copy) {
             set("stat_cat_entries", details.copy.stat_cat_entries()); 
-            set("age_protect", details.copy.age_protect()); 
+            var ap = details.copy.age_protect();
+            if (typeof data.hash.crahp[ap] != 'undefined') {
+                set("age_protect", data.lookup('crahp',details.copy.age_protect()).name());
+            } else {
+                set("age_protect","");
+            }
             set("alert_message", details.copy.alert_message()); 
             set("barcode", details.copy.barcode()); 
             if (typeof details.copy.call_number() == 'object') {
index 3c4ba95..a06ea95 100644 (file)
                                 <textbox name="copy_id" readonly="true" context="clipboard"/>
                                 <label value="&staff.circ.alternate_copy_summary.Holdable.label;" />
                                 <textbox name="holdable" readonly="true" context="clipboard"/>
-                                <spacer /><spacer />
+                                <label value="&staff.circ.alternate_copy_summary.Age_Protect.label;" />
+                                <textbox name="age_protect" readonly="true" context="clipboard"/>
                                 <label value="&staff.circ.alternate_copy_summary.Checkin_Time.label;" />
                                 <textbox name="checkin_time" readonly="true" context="clipboard"/>
                             </row>
index 3f473e8..9d372d8 100644 (file)
@@ -922,6 +922,21 @@ circ.util.columns = function(modify,params) {
             }
         },
         {
+            'id' : 'age_protect',
+            'fm_class' : 'acp',
+            'label' : document.getElementById('circStrings').getString('staff.circ.utils.age_protect'),
+            'flex' : 1,
+            'primary' : false,
+            'hidden' : true,
+            'editable' : false, 'render' : function(my) {
+                if (Number(my.acp.age_protect())>=0) {
+                    return data.lookup("crahp", my.acp.age_protect() ).name();
+                } else {
+                    return my.acp.age_protect().name();
+                }
+            }
+        },
+        {
             'id' : 'floating',
             'fm_class' : 'acp',
             'label' : document.getElementById('circStrings').getString('staff.circ.utils.floating'),
index d5bb8d1..0e6cd05 100644 (file)
@@ -256,6 +256,7 @@ staff.circ.utils.fine_level.high=High
 staff.circ.utils.circulate=Circulate?
 staff.circ.utils.deleted=Deleted?
 staff.circ.utils.holdable=Holdable?
+staff.circ.utils.age_protect=Age-based Hold Protection
 staff.circ.utils.floating=Floating?
 staff.circ.utils.hold_note=Hold Note(s) Count
 staff.circ.utils.hold_note_text=Hold Note(s) Text
index 4717683..78ce724 100644 (file)
@@ -48,6 +48,7 @@ staff.acp_label_location=Location
 staff.acp_label_price=Price
 staff.acp_label_cost=Acquisition Cost
 staff.acp_label_status=Status
+staff.acp_label_age_protect=Age-based Hold Protection
 staff.ahr_current_copy_label=Current Copy
 staff.ahr_current_copy_location_label=Current Copy Location
 staff.ahr_email_notify_label=Email Notify