LP#1761222: Add Fine Level, Loan Duration to Holdings View grid
authorRemington Steed <rjs7@calvin.edu>
Tue, 6 Nov 2018 16:17:33 +0000 (11:17 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 21 Feb 2020 18:34:51 +0000 (13:34 -0500)
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Tiffany Little <tlittle@georgialibraries.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
Open-ILS/web/js/ui/default/staff/cat/services/holdings.js

index 2cddd41..128a590 100644 (file)
     </eg-grid-field>
     <eg-grid-field label="[% l('Inventory Date') %]"          datatype="timestamp" path="latest_inventory.inventory_date"></eg-grid-field>
     <eg-grid-field label="[% l('Inventory Workstation') %]"   path="latest_inventory.inventory_workstation.name"></eg-grid-field>
+    <eg-grid-field label="[% l('Loan Duration') %]"           path="loan_duration" hidden>
+      <span>{{item['loan_duration'] | string_pick:'[% l('Short') %]':'[% l('Normal') %]':'[% l('Extended') %]'}}</span>
+    </eg-grid-field>
+    <eg-grid-field label="[% l('Fine Level') %]"              path="fine_level" hidden>
+      <span>{{item['fine_level'] | string_pick:'[% l('Low') %]':'[% l('Normal') %]':'[% l('High') %]'}}</span>
+    </eg-grid-field>
   
   </eg-grid>
 </div>
index d78c049..0354667 100644 (file)
@@ -436,4 +436,5 @@ function(egCore , $q) {
             }]
     }
 })
+.filter('string_pick', function() { return function(i){ return arguments[i] || ''; }; })
 ;