disable Manage button in Alerts column when there are no alerts
authorGalen Charlton <gmc@esilibrary.com>
Tue, 25 Oct 2016 14:50:32 +0000 (10:50 -0400)
committerMike Rylander <mrylander@gmail.com>
Thu, 31 Aug 2017 17:44:08 +0000 (13:44 -0400)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/templates/staff/cat/catalog/t_holdings.tt2
Open-ILS/src/templates/staff/cat/item/t_list.tt2
Open-ILS/src/templates/staff/circ/patron/t_checkout.tt2

index 7ef5f5f..c6bf4e0 100644 (file)
     <eg-grid-field label="[% l('Reference') %]"              datatype="bool" path="ref"></eg-grid-field>
     <eg-grid-field label="[% l('Alerts') %]" path="copy_alert_count" handlers="gridCellHandlers" visible compiled>
       {{item['copy_alert_count']}}
-      <button class="btn btn-sm btn-default" ng-click="col.handlers.copyAlertsEdit(item['id'])">[% l('Manage') %]</button>
+      <button ng-disabled="item['copy_alert_count'] <= 0" class="btn btn-sm btn-default" ng-click="col.handlers.copyAlertsEdit(item['id'])">[% l('Manage') %]</button>
     </eg-grid-field>
   
   </eg-grid>
index b239993..5a5d5be 100644 (file)
   <eg-grid-field label="[% l('Transaction Complete') %]"  path="_circ.xact_finish" datatype="timestamp" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Alerts') %]" path="copy_alert_count" handlers="gridCellHandlers" visible compiled>
     {{item['copy_alert_count']}}
-    <button class="btn btn-sm btn-default" ng-click="col.handlers.copyAlertsEdit(item['id'])">[% l('Manage') %]</button>
+    <button ng-disabled="item['copy_alert_count'] <= 0" class="btn btn-sm btn-default" ng-click="col.handlers.copyAlertsEdit(item['id'])">[% l('Manage') %]</button>
   </eg-grid-field>
   
 </eg-grid>
index 60e9cb1..52619e1 100644 (file)
 
   <eg-grid-field label="[% l('Alerts') %]" path="copy_alert_count" handlers="gridCellHandlers" visible compiled>
     {{item['copy_alert_count']}}
-    <button class="btn btn-sm btn-default" ng-click="col.handlers.copyAlertsEdit(item['acp'].id())">[% l('Manage') %]</button>
+    <button ng-disabled="item['copy_alert_count'] <= 0" class="btn btn-sm btn-default" ng-click="col.handlers.copyAlertsEdit(item['acp'].id())">[% l('Manage') %]</button>
   </eg-grid-field>
 
   <eg-grid-field path="circ.*" parent-idl-class="circ" hidden></eg-grid-field>