]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/staff/serials/t_notes.tt2
LP#1708291: web staff client serials module
[working/Evergreen.git] / Open-ILS / src / templates / staff / serials / t_notes.tt2
1 <form ng-submit="ok(note)" role="form">
2     <div class="modal-header">
3       <button type="button" class="close" ng-click="cancel()" 
4         aria-hidden="true">&times;</button>
5       <h4 ng-if="note_type == 'subscription'" class="modal-title">[% l('New Subscription Note') %]</h4>
6       <h4 ng-if="note_type == 'distribution'" class="modal-title">[% l('New Distribution Note') %]</h4>
7       <h4 ng-if="note_type == 'item'"         class="modal-title">[% l('New Item Note') %]</h4>
8     </div>
9     <div class="modal-body">
10       <div class="row">
11         <div class="col-md-6">
12           <input class="form-control" type="text"
13             ng-model="note.title" placeholder="[% l('Title...') %]"/>
14         </div>
15         <div class="col-md-3">
16           <label>
17             <input type="checkbox" ng-model="note.pub"/>
18             [% l('Public Note') %]
19           </label>
20           <label>
21             <input type="checkbox" ng-model="note.alert"/>
22             [% l('Alert Note') %]
23           </label>
24         </div>
25       </div>
26       <div class="row pad-vert">
27         <div class="col-md-12">
28           <textarea class="form-control" 
29             ng-model="note.value" placeholder="[% l('Note...') %]">
30           </textarea>
31         </div>
32       </div>
33     </div>
34     <div class="modal-footer">
35       <div class="row">
36         <div class="col-md-2">
37           <input type="text" class="form-control" ng-hide="!require_initials" 
38             ng-model="initials" placeholder="[% l('Initials') %]" ng-required="require_initials"/>
39         </div>
40         <div class="col-md-10 pull-right">
41           <input type="submit" class="btn btn-primary" value="[% l('OK') %]"/>
42           <button class="btn btn-warning" ng-click="cancel($event)">[% l('Cancel') %]</button>
43         </div>
44       </div>
45
46       <div class="row pad-vert" ng-if="note_list.length &gt; 0"> 
47         <div class="col-md-12">
48           <div class="row">
49             <div class="col-md-12">
50               <hr/>
51             </div>
52           </div>
53           <div class="row">
54             <div class="col-md-12">
55               <h4 ng-if="note_type == 'subscription'" class="pull-left">[% l('Existing Subscription Notes') %]</h4>
56               <h4 ng-if="note_type == 'distribution'" class="pull-left">[% l('Existing Distribution Notes') %]</h4>
57               <h4 ng-if="note_type == 'item'"         class="pull-left">[% l('Existing Item Notes') %]</h4>
58             </div>
59           </div>
60         </div>
61       </div>
62
63       <div class="row" ng-repeat="n in note_list" ng-init="pub = n.pub() == 't'; alert = n.alert() == 't'; title = n.title(); value = n.value(); deleted = n.isdeleted()">
64         <div class="col-md-12">
65           <div class="row">
66             <div class="col-md-6">
67               <input class="form-control" type="text" ng-change="n.title(title) && n.ischanged(1)"
68                 ng-model="title" placeholder="[% l('Title...') %]" ng-disabled="deleted"/>
69             </div>
70             <div class="col-md-3">
71               <label>
72                 <input type="checkbox" ng-model="pub" ng-change="n.pub(pub) && n.ischanged(1)" ng-disabled="deleted"/>
73                 [% l('Public Note') %]
74               </label>
75               <label>
76                 <input type="checkbox" ng-model="alert" ng-change="n.alert(alert) && n.ischanged(1)" ng-disabled="deleted"/>
77                 [% l('Alert Note') %]
78               </label>
79             </div>
80             <div class="col-md-3">
81               <label>
82                 <input type="checkbox" ng-model="deleted" ng-change="n.isdeleted(deleted)"/>
83                 [% l('Deleted?') %]
84               </label>
85             </div>
86           </div>
87           <div class="row pad-vert">
88             <div class="col-md-12">
89               <textarea class="form-control" ng-change="n.value(value) && n.ischanged(1)"
90                 ng-model="value" placeholder="[% l('Note...') %]" ng-disabled="deleted">
91               </textarea>
92             </div>
93           </div>
94           <div class="row">
95             <div class="col-md-12">
96               <hr/>
97             </div>
98           </div>
99         </div>
100       </div>
101
102     </div>
103 </form>