LP#1673857: add ability to set copy tags in volume/copy editor
[working/Evergreen.git] / Open-ILS / src / templates / staff / cat / volcopy / t_attr_edit.tt2
1 <style type="text/css">
2   .css-form input.ng-invalid {
3     background-color: #FA787E;
4   }
5   .css-form select.ng-invalid {
6     background-color: #FA787E;
7   }
8 </style>
9 <div class="container-fluid"><form novalidate class="css-form" name="forms.myForm">
10     <div class="row bg-info">
11         <div class="col-md-1">
12             <h5>[% l('Template') %]</h5>
13         </div>
14         <div class="col-md-2">
15             <eg-basic-combo-box list="template_name_list" selected="template_name"></eg-basic-combo-box>
16         </div>
17         <div class="col-md-1">
18             <button class="btn btn-default " ng-click="applyTemplate(template_name)" type="button">[% l('Apply') %]</button>
19         </div>
20         <div class="col-md-6">
21             <div class="row" ng-show="template_controls">
22                 <div class="col-md-4">
23                     <div class="btn-group">
24                         <label class="btn btn-default" ng-click="saveTemplate(template_name)">[% l('Save') %]</label>
25                         <label class="btn btn-default" ng-click="deleteTemplate(template_name)">[% l('Delete') %]</label>
26                     </div>
27                 </div>
28                 <div class="col-md-8">
29                     <div class="btn-group pull-right">
30                         <span class="btn btn-default btn-file">
31                             [% l('Import') %]
32                             <input type="file" eg-file-reader container="imported_templates.data">
33                         </span>
34                         <label class="btn btn-default"
35                             eg-json-exporter container="templates"
36                             default-file-name="'[% l('exported_copy_templates.json') %]'">
37                             [% l('Export') %]
38                         </label>
39                     </div>
40                 </div>
41             </div>
42         </div>
43         <div class="col-md-2">
44             <button class="btn btn-default pull-right" ng-click="clearWorking()" type="button">Clear</button>
45         </div>
46     </div>
47
48     <div class="row pad-vert" ng-if="template_controls && defaults.show_vol_template_controls">
49         <div class="row">
50             <div class="col-xs-12">
51                 <h4 class="center-block">[% l('Volume Attributes') %]</h4>
52             </div>
53         </div>
54     </div>
55
56     <div class="row pad-vert" ng-if="template_controls && defaults.show_vol_template_controls">
57         <div class="col-md-1 bg-info">
58             <b>[% l('Classification') %]</b>
59         </div>
60         <div class="nullable col-md-2" ng-class="{'bg-success': working.callnumber.classification !== undefined}">
61             <select class="form-control" ng-model="working.callnumber.classification" ng-options="cl.id() as cl.name() for cl in classification_list">
62                 <option value="">[% l('&lt;NONE&gt;') %]</option>
63             </select>
64         </div>
65         <div class="col-md-1 bg-info">
66             <b>[% l('Prefix') %]</b>
67         </div>
68         <div class="nullable col-xs-2" ng-class="{'bg-success': working.callnumber.prefix !== undefined}">
69             <select class="form-control" ng-model="working.callnumber.prefix" ng-options="p.id() as p.label() for p in prefix_list">
70                 <option value="">[% l('&lt;NONE&gt;') %]</option>
71             </select>
72         </div>
73         <div class="col-md-1 bg-info">
74             <b>[% l('Suffix') %]</b>
75         </div>
76         <div class="nullable col-md-2" ng-class="{'bg-success': working.callnumber.suffix !== undefined}">
77             <select class="form-control" ng-model="working.callnumber.suffix" ng-options="s.id() as s.label() for s in suffix_list">
78                 <option value="">[% l('&lt;NONE&gt;') %]</option>
79             </select>
80         </div>
81     </div>
82
83     <div class="row pad-vert" ng-if="template_controls && defaults.show_vol_template_controls">
84         <div class="row">
85             <div class="col-xs-12">
86                 <h4 class="center-block">[% l('Copy Attributes') %]</h4>
87             </div>
88         </div>
89     </div>
90
91     <div class="row pad-vert"></div>
92
93     <div class="row bg-info">
94         <div class="col-md-4">
95             <b>[% l('Circulate?') %]</b>
96         </div>
97         <div class="col-md-4">
98             <b>[% l('Status') %]</b>
99         </div>
100         <div class="col-md-4">
101             <b>[% l('Statistical Categories') %]</b>
102         </div>
103     </div>
104
105     <div class="row">
106         <div class="col-md-8">
107             <div class="row">
108                 <div class="col-md-6" ng-class="{'bg-success': working.circulate !== undefined}">
109                     <div class="row">
110                         <div class="col-xs-3">
111                             <label>
112                                 <input type="radio" ng-disabled="!defaults.attributes.circulate" ng-model="working.circulate" value="t"/>
113                                 [% l('Yes') %]
114                             </label>
115                         </div>
116                         <div class="col-xs-3">
117                             <label>
118                                 <input type="radio" ng-disabled="!defaults.attributes.circulate" ng-model="working.circulate" value="f"/>
119                                 [% l('No') %]
120                             </label>
121                         </div>
122                     </div>
123                 </div>
124                 <div class="col-md-6" ng-class="{'bg-success': working.status !== undefined}">
125                     <select class="form-control"
126                         ng-disabled="!defaults.attributes.status" ng-model="working.status"
127                         ng-options="s.id() as s.name() disable when magic_status_list.indexOf(s.id(),0) > -1 for s in status_list">
128                     </select>
129                 </div>
130             </div>
131
132             <div class="row pad-vert"></div>
133
134             <div class="row bg-info">
135                 <div class="col-md-6">
136                     <b>[% l('Circulation Library') %]</b>
137                 </div>
138                 <div class="col-md-6">
139                     <b>[% l('Reference?') %]</b>
140                 </div>
141             </div>
142
143             <div class="row">
144                 <div class="col-md-6" ng-class="{'bg-success': working.circ_lib !== undefined}">
145                     <eg-org-selector
146                         alldisabled="{{!defaults.attributes.circ_lib}}"
147                         selected="working.circ_lib"
148                         noDefault
149                         label="[% l('(Unset)') %]"
150                         disable-test="cant_have_vols"
151                     ></eg-org-selector>
152                 </div>
153                 <div class="col-md-6" ng-class="{'bg-success': working.ref !== undefined}">
154                     <div class="row">
155                         <div class="col-xs-3">
156                             <label>
157                                 <input type="radio" ng-disabled="!defaults.attributes.ref" ng-model="working.ref" value="t"/>
158                                 [% l('Yes') %]
159                             </label>
160                         </div>
161                         <div class="col-xs-3">
162                             <label>
163                                 <input type="radio" ng-disabled="!defaults.attributes.ref" ng-model="working.ref" value="f"/>
164                                 [% l('No') %]
165                             </label>
166                         </div>
167                     </div>
168                 </div>
169             </div>
170
171             <div class="row pad-vert"></div>
172
173             <div class="row bg-info">
174                 <div class="col-md-6">
175                     <b>[% l('Shelving Location') %]</b>
176                 </div>
177                 <div class="col-md-6">
178                     <b>[% l('OPAC Visible?') %]</b>
179                 </div>
180             </div>
181
182             <div class="row">
183                 <div class="col-md-6" ng-class="{'bg-success': working.location !== undefined}">
184                     <select class="form-control"
185                         ng-disabled="!defaults.attributes.location" ng-model="working.location"
186                         ng-options="l.id() as l.name() for l in location_list"
187                     ></select>
188                 </div>
189                 <div class="col-md-6" ng-class="{'bg-success': working.opac_visible !== undefined}">
190                     <div class="row">
191                         <div class="col-xs-3">
192                             <label>
193                                 <input type="radio" ng-disabled="!defaults.attributes.opac_visible" ng-model="working.opac_visible" value="t"/>
194                                 [% l('Yes') %]
195                             </label>
196                         </div>
197                         <div class="col-xs-3">
198                             <label>
199                                 <input type="radio" ng-disabled="!defaults.attributes.opac_visible" ng-model="working.opac_visible" value="f"/>
200                                 [% l('No') %]
201                             </label>
202                         </div>
203                     </div>
204                 </div>
205             </div>
206
207             <div class="row pad-vert"></div>
208
209             <div class="row bg-info">
210                 <div class="col-md-6">
211                     <b>[% l('Circulation Modifer') %]</b>
212                 </div>
213                 <div class="col-md-6">
214                     <b>[% l('Price') %]</b>
215                 </div>
216             </div>
217
218             <div class="row">
219                 <div class="nullable col-md-6" ng-class="{'bg-success': working.circ_modifier !== undefined}">
220                     <select class="form-control"
221                         ng-disabled="!defaults.attributes.circ_modifier" ng-model="working.circ_modifier"
222                         ng-options="m.code() as m.name() for m in circ_modifier_list | orderBy: 'name()'"
223                     >
224                         <option value="">[% l('&lt;NONE&gt;') %]</option>
225                     </select>
226                 </div>
227                 <div class="col-md-6" ng-class="{'bg-success': working.price !== undefined}">
228                     <input class="form-control" ng-disabled="!defaults.attributes.price" ng-model="working.price" type="number"/>
229                 </div>
230             </div>
231
232             <div class="row pad-vert"></div>
233
234             <div class="row bg-info">
235                 <div class="col-md-6">
236                     <b>[% l('Loan Duration') %]</b>
237                 </div>
238                 <div class="col-md-6">
239                     <b>[% l('Acquisition Cost') %]</b>
240                 </div>
241             </div>
242
243             <div class="row">
244                 <div class="col-md-6" ng-class="{'bg-success': working.loan_duration !== undefined}">
245                     <select class="form-control" ng-disabled="!defaults.attributes.loan_duration" ng-model="working.loan_duration">
246                         <option value="1">[% l('Short') %]</option>
247                         <option value="2" selected>[% l('Normal') %]</option>
248                         <option value="3">[% l('Extended') %]</option>
249                     </select>
250                 </div>
251                 <div class="col-md-6" ng-class="{'bg-success': working.cost !== undefined}">
252                     <input class="form-control" ng-disabled="!defaults.attributes.cost" ng-model="working.cost" type="number"/>
253                 </div>
254             </div>
255
256             <div class="row pad-vert"></div>
257
258             <div class="row bg-info">
259                 <div class="col-md-6">
260                     <b>[% l('Circulate as Type') %]</b>
261                 </div>
262                 <div class="col-md-6">
263                     <b>[% l('Deposit?') %]</b>
264                 </div>
265             </div>
266
267             <div class="row">
268                 <div class="nullable col-md-6" ng-class="{'bg-success': working.circ_as_type !== undefined}">
269                     <select class="form-control"
270                         ng-disabled="!defaults.attributes.circ_as_type" ng-model="working.circ_as_type"
271                         ng-options="t.code() as t.value() for t in circ_type_list">
272                       <option value="">[% l('&lt;NONE&gt;') %]</option>
273                     </select>
274                 </div>
275                 <div class="col-md-6" ng-class="{'bg-success': working.deposit !== undefined}">
276                     <div class="row">
277                         <div class="col-xs-3">
278                             <label>
279                                 <input type="radio" ng-disabled="!defaults.attributes.deposit" ng-model="working.deposit" value="t"/>
280                                 [% l('Yes') %]
281                             </label>
282                         </div>
283                         <div class="col-xs-3">
284                             <label>
285                                 <input type="radio" ng-disabled="!defaults.attributes.deposit" ng-model="working.deposit" value="f"/>
286                                 [% l('No') %]
287                             </label>
288                         </div>
289                     </div>
290                 </div>
291             </div>
292
293             <div class="row pad-vert"></div>
294
295             <div class="row bg-info">
296                 <div class="col-md-6">
297                     <b>[% l('Holdable?') %]</b>
298                 </div>
299                 <div class="col-md-6">
300                     <b>[% l('Deposit Amount') %]</b>
301                 </div>
302             </div>
303
304             <div class="row">
305                 <div class="col-md-6" ng-class="{'bg-success': working.holdable !== undefined}">
306                     <div class="row">
307                         <div class="col-xs-3">
308                             <label>
309                                 <input type="radio" ng-disabled="!defaults.attributes.holdable" ng-model="working.holdable" value="t"/>
310                                 [% l('Yes') %]
311                             </label>
312                         </div>
313                         <div class="col-xs-3">
314                             <label>
315                                 <input type="radio" ng-disabled="!defaults.attributes.holdable" ng-model="working.holdable" value="f"/>
316                                 [% l('No') %]
317                             </label>
318                         </div>
319                     </div>
320                 </div>
321                 <div class="col-md-6" ng-class="{'bg-success': working.deposit_amount !== undefined}">
322                     <input class="form-control" ng-disabled="!defaults.attributes.deposit_amount" ng-model="working.deposit_amount" type="number"/>
323                 </div>
324             </div>
325
326             <div class="row pad-vert"></div>
327
328             <div class="row bg-info">
329                 <div class="col-md-6">
330                     <b>[% l('Age-based Hold Protection') %]</b>
331                 </div>
332                 <div class="col-md-6">
333                     <b>[% l('Quality') %]</b>
334                 </div>
335             </div>
336
337             <div class="row">
338                 <div class="col-md-6" ng-class="{'bg-success': working.age_protect !== undefined}">
339                     <select class="form-control"
340                         ng-disabled="!defaults.attributes.age_protect" ng-model="working.age_protect"
341                         ng-options="a.id() as a.name() for a in age_protect_list"
342                     ></select>
343                 </div>
344                 <div class="col-md-6" ng-class="{'bg-success': working.mint_condition !== undefined}">
345                     <div class="row">
346                         <div class="col-xs-3">
347                             <label>
348                                 <input type="radio" ng-disabled="!defaults.attributes.mint_condition" ng-model="working.mint_condition" value="t"/>
349                                 [% l('Good') %]
350                             </label>
351                         </div>
352                         <div class="col-xs-3">
353                             <label>
354                                 <input type="radio" ng-disabled="!defaults.attributes.mint_condition" ng-model="working.mint_condition" value="f"/>
355                                 [% l('Damaged') %]
356                             </label>
357                         </div>
358                     </div>
359                 </div>
360             </div>
361
362             <div class="row pad-vert"></div>
363
364             <div class="row bg-info">
365                 <div class="col-md-6">
366                     <b>[% l('Fine Level') %]</b>
367                 </div>
368             </div>
369
370             <div class="row">
371                 <div class="col-md-6" ng-class="{'bg-success': working.fine_level !== undefined}">
372                     <select class="form-control" ng-disabled="!defaults.attributes.fine_level" ng-model="working.fine_level">
373                         <option value="1">[% l('Low') %]</option>
374                         <option value="2" selected>[% l('Normal') %]</option>
375                         <option value="3">[% l('High') %]</option>
376                     </select>
377                 </div>
378                 <div class="col-md-6">
379                     <button
380                       class="btn btn-default"
381                       ng-disabled="!defaults.copy_notes"
382                       ng-click="copy_notes_dialog(workingGridControls.selectedItems())"
383                       type="button">
384                         [% l('Copy Notes') %]
385                     </button>
386                 </div>
387             </div>
388
389             <div class="row pad-vert"></div>
390
391             <div class="row bg-info">
392                 <div class="col-md-6">
393                     <b>[% l('Floating') %]</b>
394                 </div>
395             </div>
396
397             <div class="row">
398                 <div class="col-md-6" ng-class="{'bg-success': working.floating !== undefined}">
399                     <select class="form-control"
400                         ng-disabled="!defaults.attributes.floating" ng-model="working.floating"
401                         ng-options="a.id() as a.name() for a in floating_list"
402                     ></select>
403                 </div>
404                 <div class="col-md-6">
405                     <button
406                       class="btn btn-default"
407                       ng-disabled="!defaults.copy_tags"
408                       ng-click="copy_tags_dialog(workingGridControls.selectedItems())"
409                       type="button">
410                         [% l('Copy Tags') %]
411                     </button>
412                 </div>
413             </div>
414         </div>
415
416         <div class="col-md-4">
417             <div class="row">
418                 <div class="col-xs-12">
419                     <select class="form-control" ng-disabled="!defaults.statcats"
420                         ng-model="working.statcat_filter"
421                         ng-options="o.id() as o.shortname() for o in statcat_filter_list">
422                       <option value="">[% l('Filter by Library') %]</option>
423                     </select>
424                 </div>
425             </div>
426
427             <div class="row pad-vert"></div>
428
429             <div class="row" ng-repeat="sc in statcats" ng-show="statcat_visible(sc.owner().id())">
430                 <div class="col-xs-12">
431                     <div class="row bg-info">
432                         <div class="col-xs-12">
433                             <span>{{ sc.owner().name() }} : {{ sc.name() }}</span>
434                         </div>
435                     </div>
436                     <div class="row">
437                         <div class="nullable col-xs-12" ng-class="{'bg-success': working.statcats[sc.id()] !== undefined}">
438                             <select class="form-control" ng-disabled="!defaults.statcats"
439                                 ng-change="statcatUpdate(sc.id())"
440                                 ng-model="working.statcats[sc.id()]"
441                                 ng-options="e.id() as e.value() for e in sc.entries()"
442                                 ng-required="sc.required() == 't'">
443                                 <option value="">[% l('&lt;NONE&gt;') %]</option>
444                             </select>
445                         </div>
446                     </div>
447                 </div>
448             </div>
449         </div>
450
451     </div>
452 </div>
453 </form></div>