5b9181e5d58dc4f07d467996997a9d6b06eaed32
[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">[% l('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('Copy Alert') %]</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                 
142             </div>
143
144             <div class="row">
145                 <div class="col-md-6" ng-class="{'bg-success': working.circ_lib !== undefined}">
146                     <eg-org-selector
147                         alldisabled="{{!defaults.attributes.circ_lib}}"
148                         selected="working.circ_lib"
149                         noDefault
150                         label="[% l('(Unset)') %]"
151                         disable-test="cant_have_vols"
152                     ></eg-org-selector>
153                 </div>
154                 <div class="col-md-6" ng-class="{'bg-success': working.ref !== undefined}">
155                     <div class="row">
156                         <div class="col-xs-3">
157                             <label>
158                                 <input type="radio" ng-disabled="!defaults.attributes.ref" ng-model="working.ref" value="t"/>
159                                 [% l('Yes') %]
160                             </label>
161                         </div>
162                         <div class="col-xs-3">
163                             <label>
164                                 <input type="radio" ng-disabled="!defaults.attributes.ref" ng-model="working.ref" value="f"/>
165                                 [% l('No') %]
166                             </label>
167                         </div>
168                     </div>
169                 </div>
170             </div>
171
172             <div class="row pad-vert"></div>
173
174             <div class="row bg-info">
175                 <div class="col-md-6">
176                     <b>[% l('Shelving Location') %]</b>
177                 </div>
178                 <div class="col-md-6">
179                     <b>[% l('OPAC Visible?') %]</b>
180                 </div>
181             </div>
182
183             <div class="row">
184                 <div class="col-md-6" ng-class="{'bg-success': working.location !== undefined}">
185                     <select class="form-control"
186                         ng-disabled="!defaults.attributes.location" ng-model="working.location"
187                         ng-options="l.id() as i18n.ou_qualified_location_name(l) for l in location_list"
188                     ></select>
189                 </div>
190                 <div class="col-md-6" ng-class="{'bg-success': working.opac_visible !== undefined}">
191                     <div class="row">
192                         <div class="col-xs-3">
193                             <label>
194                                 <input type="radio" ng-disabled="!defaults.attributes.opac_visible" ng-model="working.opac_visible" value="t"/>
195                                 [% l('Yes') %]
196                             </label>
197                         </div>
198                         <div class="col-xs-3">
199                             <label>
200                                 <input type="radio" ng-disabled="!defaults.attributes.opac_visible" ng-model="working.opac_visible" value="f"/>
201                                 [% l('No') %]
202                             </label>
203                         </div>
204                     </div>
205                 </div>
206             </div>
207
208             <div class="row pad-vert"></div>
209
210             <div class="row bg-info">
211                 <div class="col-md-6">
212                     <b>[% l('Circulation Modifer') %]</b>
213                 </div>
214                 <div class="col-md-6">
215                     <b>[% l('Price') %]</b>
216                 </div>
217             </div>
218
219             <div class="row">
220                 <div class="nullable col-md-6" ng-class="{'bg-success': working.circ_modifier !== undefined}">
221                     <select class="form-control"
222                         ng-disabled="!defaults.attributes.circ_modifier" ng-model="working.circ_modifier"
223                         ng-options="m.code() as m.name() for m in circ_modifier_list | orderBy: 'name()'"
224                     >
225                         <option value="">[% l('&lt;NONE&gt;') %]</option>
226                     </select>
227                 </div>
228                 <div class="col-md-6" ng-class="{'bg-success': working.price !== undefined}">
229                     <input class="form-control" ng-disabled="!defaults.attributes.price" str-to-float ng-model="working.price" type="number" step="0.01"/>
230                 </div>
231             </div>
232
233             <div class="row pad-vert"></div>
234
235             <div class="row bg-info">
236                 <div class="col-md-6">
237                     <b>[% l('Loan Duration') %]</b>
238                 </div>
239                 <div class="col-md-6">
240                     <b>[% l('Acquisition Cost') %]</b>
241                 </div>
242             </div>
243
244             <div class="row">
245                 <div class="col-md-6" ng-class="{'bg-success': working.loan_duration !== undefined}">
246                     <select class="form-control" int-to-str ng-disabled="!defaults.attributes.loan_duration" ng-model="working.loan_duration">
247                         <option value="1">[% l('Short') %]</option>
248                         <option value="2" selected>[% l('Normal') %]</option>
249                         <option value="3">[% l('Extended') %]</option>
250                     </select>
251                 </div>
252                 <div class="col-md-6" ng-class="{'bg-success': working.cost !== undefined}">
253                     <input class="form-control" ng-disabled="!defaults.attributes.cost" str-to-float ng-model="working.cost" type="number" step="0.01"/>
254                 </div>
255             </div>
256
257             <div class="row pad-vert"></div>
258
259             <div class="row bg-info">
260                 <div class="col-md-6">
261                     <b>[% l('Circulate as Type') %]</b>
262                 </div>
263                 <div class="col-md-6">
264                     <b>[% l('Deposit?') %]</b>
265                 </div>
266             </div>
267
268             <div class="row">
269                 <div class="nullable col-md-6" ng-class="{'bg-success': working.circ_as_type !== undefined}">
270                     <select class="form-control"
271                         ng-disabled="!defaults.attributes.circ_as_type" ng-model="working.circ_as_type"
272                         ng-options="t.code() as t.value() for t in circ_type_list">
273                       <option value="">[% l('&lt;NONE&gt;') %]</option>
274                     </select>
275                 </div>
276                 <div class="col-md-6" ng-class="{'bg-success': working.deposit !== undefined}">
277                     <div class="row">
278                         <div class="col-xs-3">
279                             <label>
280                                 <input type="radio" ng-disabled="!defaults.attributes.deposit" ng-model="working.deposit" value="t"/>
281                                 [% l('Yes') %]
282                             </label>
283                         </div>
284                         <div class="col-xs-3">
285                             <label>
286                                 <input type="radio" ng-disabled="!defaults.attributes.deposit" ng-model="working.deposit" value="f"/>
287                                 [% l('No') %]
288                             </label>
289                         </div>
290                     </div>
291                 </div>
292             </div>
293
294             <div class="row pad-vert"></div>
295
296             <div class="row bg-info">
297                 <div class="col-md-6">
298                     <b>[% l('Holdable?') %]</b>
299                 </div>
300                 <div class="col-md-6">
301                     <b>[% l('Deposit Amount') %]</b>
302                 </div>
303             </div>
304
305             <div class="row">
306                 <div class="col-md-6" ng-class="{'bg-success': working.holdable !== undefined}">
307                     <div class="row">
308                         <div class="col-xs-3">
309                             <label>
310                                 <input type="radio" ng-disabled="!defaults.attributes.holdable" ng-model="working.holdable" value="t"/>
311                                 [% l('Yes') %]
312                             </label>
313                         </div>
314                         <div class="col-xs-3">
315                             <label>
316                                 <input type="radio" ng-disabled="!defaults.attributes.holdable" ng-model="working.holdable" value="f"/>
317                                 [% l('No') %]
318                             </label>
319                         </div>
320                     </div>
321                 </div>
322                 <div class="col-md-6" ng-class="{'bg-success': working.deposit_amount !== undefined}">
323                     <input class="form-control" ng-disabled="!defaults.attributes.deposit_amount" str-to-float ng-model="working.deposit_amount" type="number" step="0.01"/>
324                 </div>
325             </div>
326
327             <div class="row pad-vert"></div>
328
329             <div class="row bg-info">
330                 <div class="col-md-6">
331                     <b>[% l('Age-based Hold Protection') %]</b>
332                 </div>
333                 <div class="col-md-6">
334                     <b>[% l('Quality') %]</b>
335                 </div>
336             </div>
337
338             <div class="row">
339                 <div class="col-md-6" ng-class="{'bg-success': working.age_protect !== undefined}">
340                     <select class="form-control"
341                         ng-disabled="!defaults.attributes.age_protect" ng-model="working.age_protect"
342                         ng-options="a.id() as a.name() for a in age_protect_list"
343                     ></select>
344                 </div>
345                 <div class="col-md-6" ng-class="{'bg-success': working.mint_condition !== undefined}">
346                     <div class="row">
347                         <div class="col-xs-3">
348                             <label>
349                                 <input type="radio" ng-disabled="!defaults.attributes.mint_condition" ng-model="working.mint_condition" value="t"/>
350                                 [% l('Good') %]
351                             </label>
352                         </div>
353                         <div class="col-xs-3">
354                             <label>
355                                 <input type="radio" ng-disabled="!defaults.attributes.mint_condition" ng-model="working.mint_condition" value="f"/>
356                                 [% l('Damaged') %]
357                             </label>
358                         </div>
359                     </div>
360                 </div>
361             </div>
362
363             <div class="row pad-vert"></div>
364
365             <div class="row bg-info">
366                 <div class="col-md-6">
367                     <b>[% l('Fine Level') %]</b>
368                 </div>
369             </div>
370
371             <div class="row">
372                 <div class="col-md-6" ng-class="{'bg-success': working.fine_level !== undefined}">
373                     <select class="form-control" int-to-str ng-disabled="!defaults.attributes.fine_level" ng-model="working.fine_level">
374                         <option value="1">[% l('Low') %]</option>
375                         <option value="2" selected>[% l('Normal') %]</option>
376                         <option value="3">[% l('High') %]</option>
377                     </select>
378                 </div>
379                 <div class="col-md-6">
380                     <button
381                       class="btn btn-default"
382                       ng-disabled="!defaults.copy_notes"
383                       ng-click="copy_notes_dialog(workingGridControls.selectedItems())"
384                       type="button">
385                         [% l('Copy Notes') %]
386                     </button>
387                 </div>
388             </div>
389
390             <div class="row pad-vert"></div>
391
392             <div class="row bg-info">
393                 <div class="col-md-6">
394                     <b>[% l('Floating') %]</b>
395                 </div>
396             </div>
397
398             <div class="row">
399                 <div class="col-md-6" ng-class="{'bg-success': working.floating !== undefined}">
400                     <select class="form-control"
401                         ng-disabled="!defaults.attributes.floating" ng-model="working.floating"
402                         ng-options="a.id() as a.name() for a in floating_list"
403                     ></select>
404                 </div>
405                 <div class="col-md-6">
406                     <button
407                       class="btn btn-default"
408                       ng-disabled="!defaults.copy_tags"
409                       ng-click="copy_tags_dialog(workingGridControls.selectedItems())"
410                       type="button">
411                         [% l('Copy Tags') %]
412                     </button>
413                 </div>
414             </div>
415         </div>
416
417         <div class="col-md-4">
418             
419             <div class="row" >
420                 <div class="col-xs-12">
421                     <div class="row">
422                         <div class="nullable col-xs-12">
423                             <input class="form-control" type="text" ng-model="working.alert_message"
424                                 ng-disabled="!defaults.attributes.alert_message" placeholder="Alert message" />
425                         </div>
426                     </div>
427                 </div>
428             </div>
429
430             <div class="row pad-vert"></div>
431             <div class="row">
432                 <div class="col-xs-12">
433                     <div class="row bg-info">
434                         <div class="col-xs-12">
435                             <b>Statistical Categories</b>
436                         </div>
437                     </div>
438                     <div class="row">
439                             <select class="form-control" ng-disabled="!defaults.statcats"
440                                 ng-model="working.statcat_filter"
441                                 ng-options="o.id() as o.shortname() for o in statcat_filter_list">
442                               <option value="">[% l('Filter by Library') %]</option>
443                             </select>
444                     </div>
445                 </div>
446             </div>
447
448             <div class="row pad-vert"></div>
449
450             <div class="row" ng-repeat="sc in statcats" ng-show="statcat_visible(sc.owner().id())">
451                 <div class="col-xs-12">
452                     <div class="row bg-info">
453                         <div class="col-xs-12">
454                             <span>{{ sc.owner().name() }} : {{ sc.name() }}</span>
455                         </div>
456                     </div>
457                     <div class="row">
458                         <div class="nullable col-xs-12" ng-class="{'bg-success': working.statcats[sc.id()] !== undefined}">
459                             <select class="form-control" ng-disabled="!defaults.statcats"
460                                 ng-change="statcatUpdate(sc.id())"
461                                 ng-model="working.statcats[sc.id()]"
462                                 ng-options="e.id() as e.value() for e in sc.entries()"
463                                 ng-required="sc.required() == 't'">
464                                 <option value="">[% l('&lt;NONE&gt;') %]</option>
465                             </select>
466                         </div>
467                     </div>
468                 </div>
469             </div>
470
471         </div>
472
473     </div>
474 </div>
475 </form></div>