]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/staff/cat/volcopy/t_copy_alerts.tt2
LP#1538691: Use items instead of copies
[Evergreen.git] / Open-ILS / src / templates / staff / cat / volcopy / t_copy_alerts.tt2
1 <form ng-submit="ok(copy_alert)" role="form">
2     <div class="modal-header">
3       <button type="button" class="close" ng-click="cancel()" 
4         aria-hidden="true">&times;</button>
5       <h4 class="modal-title">[% l('New Item Alert') %]</h4>
6     </div>
7     <div class="modal-body">
8       <div class="row">
9         <div class="col-md-6 form-inline">
10           <label for="copy-alert-type-selector"> [% l('Type') %]</label>
11           <select id="copy-alert-type-selector" class="form-control"
12             ng-model="copy_alert.alert_type"
13             ng-options="at.id() as at.name() for at in alert_types | orderBy:'name()'">
14           </select>
15         </div>
16         <div class="col-md-3">
17           <label>
18             <input type="checkbox" ng-model="copy_alert.temp"/>
19             [% l('Temporary') %]
20           </label>
21         </div>
22       </div>
23       <div class="row pad-vert">
24         <div class="col-md-12">
25           <textarea class="form-control" 
26             ng-model="copy_alert.note" placeholder="[% l('Alert...') %]">
27           </textarea>
28         </div>
29       </div>
30     </div>
31     <div class="modal-footer">
32       <div class="row">
33         <div class="col-md-10 pull-right">
34           <input type="submit" class="btn btn-primary" value="[% l('OK') %]"/>
35           <button class="btn btn-warning" ng-click="cancel($event)">[% l('Cancel') %]</button>
36         </div>
37       </div>
38
39       <div class="row pad-vert" ng-if="copy_alert_list.length &gt; 0"> 
40         <div class="col-md-12">
41           <div class="row">
42             <div class="col-md-12">
43               <hr/>
44             </div>
45           </div>
46           <div class="row">
47             <div class="col-md-12">
48               <h4 class="pull-left">[% l('Existing Item Alerts') %]</h4>
49             </div>
50           </div>
51         </div>
52       </div>
53
54       <div class="row" ng-repeat="a in copy_alert_list | orderBy:'id()'" ng-init="temp = (a.temp() == 't'); note = a.note(); acked = (a.ack_time() !== null); alert_type = a.alert_type().id()">
55         <div class="col-md-12">
56           <div class="row">
57             <div class="col-md-6 form-inline">
58               <label for="copy-alert-type-select-{{a.id()}}">[% l('Type') %]</label>
59               <select id="copy-alert-type-select-{{a.id()}}" class="form-control"
60                       ng-model="alert_type"
61                       ng-change="a.alert_type(alert_type) && a.ischanged(1)"
62                       ng-options="at.id() as at.name() for at in alert_types | orderBy:'name()'">
63               </select>
64             </div>
65             <div class="col-md-3">
66               <label>
67                 <input type="checkbox" ng-model="temp" ng-change="a.temp(temp ? 't' : 'f') && a.ischanged(1)" ng-disabled="acked"/>
68                 [% l('Temporary') %]
69               </label>
70             </div>
71             <div class="col-md-3">
72               <label>
73                 <input type="checkbox" ng-model="acked" ng-change="(acked ? a.ack_time('now') : a.ack_time(null)) && a.ischanged(1)"/>
74                 [% l('Clear?') %]
75               </label>
76             </div>
77           </div>
78           <div class="row pad-vert">
79             <div class="col-md-12">
80               <textarea class="form-control" ng-change="a.note(note) && a.ischanged(1)"
81                 ng-model="note" placeholder="[% l('Alert...') %]" ng-disabled="acked">
82               </textarea>
83             </div>
84           </div>
85           <div class="row">
86             <div class="col-md-12">
87               <hr/>
88             </div>
89           </div>
90         </div>
91       </div>
92
93     </div>
94 </form>