LP#1719967 - Add alert message field to volcopy editor
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Thu, 12 Oct 2017 21:31:37 +0000 (17:31 -0400)
committerMike Rylander <mrylander@gmail.com>
Mon, 16 Oct 2017 19:22:57 +0000 (15:22 -0400)
As 1676608 was deferred to 3.1, this adds a copy alert_message
field, to the volcopy editor. The defaults tab "Alerts" checkbox has
been replaced by "Alert Message" and this new field will be active until replaced by
the changes of 3.1.

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>

Signed-off-by: Mike Rylander <mrylander@gmail.com>

Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2
Open-ILS/src/templates/staff/cat/volcopy/t_defaults.tt2
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index 1d01491..bba9ab1 100644 (file)
@@ -98,7 +98,7 @@
             <b>[% l('Status') %]</b>
         </div>
         <div class="col-md-4">
-            <b>[% l('Statistical Categories') %]</b>
+            <b>[% l('Copy Alert') %]</b>
         </div>
     </div>
 
                 <div class="col-md-6">
                     <b>[% l('Reference?') %]</b>
                 </div>
+                
             </div>
 
             <div class="row">
         </div>
 
         <div class="col-md-4">
+            
+            <div class="row" >
+                <div class="col-xs-12">
+                    <div class="row">
+                        <div class="nullable col-xs-12">
+                            <input class="form-control" type="text" ng-model="working.alert_message"
+                                ng-disabled="!defaults.attributes.alert_message" placeholder="Alert message" />
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+            <div class="row pad-vert"></div>
             <div class="row">
                 <div class="col-xs-12">
-                    <select class="form-control" ng-disabled="!defaults.statcats"
-                        ng-model="working.statcat_filter"
-                        ng-options="o.id() as o.shortname() for o in statcat_filter_list">
-                      <option value="">[% l('Filter by Library') %]</option>
-                    </select>
+                    <div class="row bg-info">
+                        <div class="col-xs-12">
+                            <b>Statistical Categories</b>
+                        </div>
+                    </div>
+                    <div class="row">
+                           <select class="form-control" ng-disabled="!defaults.statcats"
+                               ng-model="working.statcat_filter"
+                               ng-options="o.id() as o.shortname() for o in statcat_filter_list">
+                             <option value="">[% l('Filter by Library') %]</option>
+                           </select>
+                    </div>
                 </div>
             </div>
 
                     </div>
                 </div>
             </div>
+
         </div>
 
     </div>
index c3cc46c..89e4ebe 100644 (file)
                 </div>
                 <div class="col-xs-6">
                     <label>
-                        <input type="checkbox" ng-change="saveDefaults()" ng-model="defaults.attributes.alerts"/>
-                        [% l('Alerts') %]
+                        <input type="checkbox" ng-change="saveDefaults()" ng-model="defaults.attributes.alert_message"/>
+                        <!-- <input type="checkbox" ng-change="saveDefaults()" ng-model="defaults.attributes.alerts"/> -->
+                        [% l('Alert Message') %]
                     </label>
                 </div>
             </div>
index 11fa2a7..a0ddade 100644 (file)
@@ -843,7 +843,8 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
             location : true,
             holdable : true,
             age_protect : true,
-            floating : true
+            floating : true,
+            alert_message : true
         }
     };
 
@@ -1586,6 +1587,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
         createSimpleUpdateWatcher('mint_condition');
         createSimpleUpdateWatcher('opac_visible');
         createSimpleUpdateWatcher('ref');
+        createSimpleUpdateWatcher('alert_message');
 
         $scope.saveCompletedCopies = function (and_exit) {
             var cnHash = {};
@@ -2162,6 +2164,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
                 createSimpleUpdateWatcher('mint_condition');
                 createSimpleUpdateWatcher('opac_visible');
                 createSimpleUpdateWatcher('ref');
+                createSimpleUpdateWatcher('alert_message');
 
                 $scope.suffix_list = [];
                 itemSvc.get_suffixes(egCore.auth.user().ws_ou()).then(function(list){