ffbaebaba79e7f99e4b696a56f18f5fba6cca1d0
[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('Call Number 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('Item 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 i18n.ou_qualified_location_name(l) 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 Modifier') %]</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" str-to-float ng-model="working.price" type="number" step="0.01"/>
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" int-to-str 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" str-to-float ng-model="working.cost" type="number" step="0.01"/>
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" str-to-float ng-model="working.deposit_amount" type="number" step="0.01"/>
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                       <option value="">[% l('&lt;NONE&gt;') %]</option>
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('Item Notes') %]
386                     </button>
387                     <button
388                       class="btn btn-default"
389                       ng-disabled="!defaults.attributes.alerts"
390                       ng-click="copy_alerts_dialog(workingGridControls.selectedItems())"
391                       type="button">
392                         [% l('Item Alerts') %]
393                     </button>
394                 </div>
395             </div>
396
397             <div class="row pad-vert"></div>
398
399             <div class="row bg-info">
400                 <div class="col-md-6">
401                     <b>[% l('Floating') %]</b>
402                 </div>
403             </div>
404
405             <div class="row">
406                 <div class="col-md-6" ng-class="{'bg-success': working.floating !== undefined}">
407                     <select class="form-control"
408                         ng-disabled="!defaults.attributes.floating" ng-model="working.floating"
409                         ng-options="a.id() as a.name() for a in floating_list">
410                       <option value="">[% l('&lt;NONE&gt;') %]</option>
411                     </select>
412                 </div>
413                 <div class="col-md-6">
414                     <button
415                       class="btn btn-default"
416                       ng-disabled="!defaults.copy_tags"
417                       ng-click="copy_tags_dialog(workingGridControls.selectedItems())"
418                       type="button">
419                         [% l('Item Tags') %]
420                     </button>
421                 </div>
422             </div>
423         </div>
424
425         <div class="col-md-4">
426             <div class="row">
427                 <div class="col-xs-12">
428                     <select class="form-control" ng-disabled="!defaults.statcats"
429                         ng-model="working.statcat_filter"
430                         ng-options="o.id() as o.shortname() for o in statcat_filter_list">
431                       <option value="">[% l('Filter by Library') %]</option>
432                     </select>
433                 </div>
434             </div>
435
436             <div class="row pad-vert"></div>
437
438             <div class="row" ng-repeat="sc in statcats" ng-show="statcat_visible(sc.owner().id())">
439                 <div class="col-xs-12">
440                     <div class="row bg-info">
441                         <div class="col-xs-12">
442                             <span>{{ sc.owner().name() }} : {{ sc.name() }}</span>
443                         </div>
444                     </div>
445                     <div class="row">
446                         <div class="nullable col-xs-12" ng-class="{'bg-success': working.statcats[sc.id()] !== undefined}">
447                             <select class="form-control" ng-disabled="!defaults.statcats"
448                                 ng-change="statcatUpdate(sc.id())"
449                                 ng-model="working.statcats[sc.id()]"
450                                 ng-options="e.id() as e.value() for e in sc.entries()"
451                                 ng-required="sc.required() == 't' && !working.statcats_multi[sc.id()]">
452                                 <option value="">
453                                     {{ !working.statcats_multi[sc.id()] ? '[% l('&lt;NONE&gt;') %]' : '[% l('&lt;MULTIPLE&gt;') %]' }}
454                                 </option>
455                             </select>
456                         </div>
457                     </div>
458                 </div>
459             </div>
460         </div>
461
462     </div>
463 </div>
464 </form></div>