LP#1732761: Batch item edit and multiple values per field
[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 class="container" ng-show="working.MultiMap.circulate.length > 1 && working.circulate === undefined">
124                         <eg-list-counts label="[% l('Multiple values') %]" list="working.MultiMap.circulate" render="labelYesNo" on-select="select_by_circulate"></eg-list-counts>
125                     </div>
126                 </div>
127                 <div class="col-md-6" ng-class="{'bg-success': working.status !== undefined}">
128                     <select class="form-control"
129                         ng-disabled="!defaults.attributes.status" ng-model="working.status"
130                         ng-options="s.id() as s.name() disable when magic_status_list.indexOf(s.id(),0) > -1 for s in status_list">
131                     </select>
132                     <div class="container" ng-show="working.MultiMap.status.length > 1 && working.status === undefined">
133                         <eg-list-counts label="[% l('Multiple statuses') %]" list="working.MultiMap.status" render="statusName" on-select="select_by_status"></eg-list-counts>
134                     </div>
135                 </div>
136             </div>
137
138             <div class="row pad-vert"></div>
139
140             <div class="row bg-info">
141                 <div class="col-md-6">
142                     <b>[% l('Circulation Library') %]</b>
143                 </div>
144                 <div class="col-md-6">
145                     <b>[% l('Reference?') %]</b>
146                 </div>
147             </div>
148
149             <div class="row">
150                 <div class="col-md-6" ng-class="{'bg-success': working.circ_lib !== undefined}">
151                     <eg-org-selector
152                         alldisabled="{{!defaults.attributes.circ_lib}}"
153                         selected="working.circ_lib"
154                         noDefault
155                         label="[% l('(Unset)') %]"
156                         disable-test="cant_have_vols"
157                     ></eg-org-selector>
158                     <div class="container" ng-show="working.MultiMap.circ_lib.length > 1 && working.circ_lib === undefined">
159                         <eg-list-counts label="[% l('Multiple values') %]" list="working.MultiMap.circ_lib" render="orgShortname" on-select="select_by_circ_lib"></eg-list-counts>
160                     </div>
161                 </div>
162                 <div class="col-md-6" ng-class="{'bg-success': working.ref !== undefined}">
163                     <div class="row">
164                         <div class="col-xs-3">
165                             <label>
166                                 <input type="radio" ng-disabled="!defaults.attributes.ref" ng-model="working.ref" value="t"/>
167                                 [% l('Yes') %]
168                             </label>
169                         </div>
170                         <div class="col-xs-3">
171                             <label>
172                                 <input type="radio" ng-disabled="!defaults.attributes.ref" ng-model="working.ref" value="f"/>
173                                 [% l('No') %]
174                             </label>
175                         </div>
176                     </div>
177                     <div class="container" ng-show="working.MultiMap.ref.length > 1 && working.ref === undefined">
178                         <eg-list-counts label="[% l('Multiple values') %]" list="working.MultiMap.ref" render="labelYesNo" on-select="select_by_ref"></eg-list-counts>
179                     </div>
180                 </div>
181             </div>
182
183             <div class="row pad-vert"></div>
184
185             <div class="row bg-info">
186                 <div class="col-md-6">
187                     <b>[% l('Shelving Location') %]</b>
188                 </div>
189                 <div class="col-md-6">
190                     <b>[% l('OPAC Visible?') %]</b>
191                 </div>
192             </div>
193
194             <div class="row">
195                 <div class="col-md-6" ng-class="{'bg-success': working.location !== undefined}">
196                     <select class="form-control"
197                         ng-disabled="!defaults.attributes.location" ng-model="working.location"
198                         ng-options="l.id() as i18n.ou_qualified_location_name(l) for l in location_list"
199                     ></select>
200                     <div class="container" ng-show="working.MultiMap.location.length > 1 && working.location === undefined">
201                         <eg-list-counts label="[% l('Multiple locations') %]" list="working.MultiMap.location" render="locationName" on-select="select_by_location"></eg-list-counts>
202                     </div>
203                 </div>
204                 <div class="col-md-6" ng-class="{'bg-success': working.opac_visible !== undefined}">
205                     <div class="row">
206                         <div class="col-xs-3">
207                             <label>
208                                 <input type="radio" ng-disabled="!defaults.attributes.opac_visible" ng-model="working.opac_visible" value="t"/>
209                                 [% l('Yes') %]
210                             </label>
211                         </div>
212                         <div class="col-xs-3">
213                             <label>
214                                 <input type="radio" ng-disabled="!defaults.attributes.opac_visible" ng-model="working.opac_visible" value="f"/>
215                                 [% l('No') %]
216                             </label>
217                         </div>
218                     </div>
219                     <div class="container" ng-show="working.MultiMap.opac_visible.length > 1 && working.opac_visible === undefined">
220                         <eg-list-counts label="[% l('Multiple values') %]" list="working.MultiMap.opac_visible" render="labelYesNo" on-select="select_by_opac_visible"></eg-list-counts>
221                     </div>
222                 </div>
223             </div>
224
225             <div class="row pad-vert"></div>
226
227             <div class="row bg-info">
228                 <div class="col-md-6">
229                     <b>[% l('Circulation Modifier') %]</b>
230                 </div>
231                 <div class="col-md-6">
232                     <b>[% l('Price') %]</b>
233                 </div>
234             </div>
235
236             <div class="row">
237                 <div class="nullable col-md-6" ng-class="{'bg-success': working.circ_modifier !== undefined}">
238                     <select class="form-control"
239                         ng-disabled="!defaults.attributes.circ_modifier" ng-model="working.circ_modifier"
240                         ng-options="m.code() as m.name() for m in circ_modifier_list | orderBy: 'name()'"
241                     >
242                         <option value="">[% l('&lt;NONE&gt;') %]</option>
243                     </select>
244                     <div class="container" ng-show="working.MultiMap.circ_modifier.length > 1 && working.circ_modifier === undefined">
245                         <eg-list-counts label="[% l('Multiple modifiers') %]" list="working.MultiMap.circ_modifier" render="circmodName" on-select="select_by_circ_modifier"></eg-list-counts>
246                     </div>
247                 </div>
248                 <div class="col-md-6" ng-class="{'bg-success': working.price !== undefined}">
249                     <input class="form-control" ng-disabled="!defaults.attributes.price" str-to-float ng-model="working.price" type="number" step="0.01"/>
250                     <div class="container" ng-show="working.MultiMap.price.length > 1 && working.price === undefined">
251                         <eg-list-counts label="[% l('Multiple prices') %]" list="working.MultiMap.price" on-select="select_by_price"></eg-list-counts>
252                     </div>
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('Loan Duration') %]</b>
261                 </div>
262                 <div class="col-md-6">
263                     <b>[% l('Acquisition Cost') %]</b>
264                 </div>
265             </div>
266
267             <div class="row">
268                 <div class="col-md-6" ng-class="{'bg-success': working.loan_duration !== undefined}">
269                     <select class="form-control" int-to-str ng-disabled="!defaults.attributes.loan_duration" ng-model="working.loan_duration">
270                         <option value="1">[% l('Short') %]</option>
271                         <option value="2" selected>[% l('Normal') %]</option>
272                         <option value="3">[% l('Extended') %]</option>
273                     </select>
274                     <div class="container" ng-show="working.MultiMap.loan_duration.length > 1 && working.loan_duration === undefined">
275                         <eg-list-counts label="[% l('Multiple durations') %]" list="working.MultiMap.loan_duration" render="durationLabel" on-select="select_by_loan_duration"></eg-list-counts>
276                     </div>
277                 </div>
278                 <div class="col-md-6" ng-class="{'bg-success': working.cost !== undefined}">
279                     <input class="form-control" ng-disabled="!defaults.attributes.cost" str-to-float ng-model="working.cost" type="number" step="0.01"/>
280                     <div class="container" ng-show="working.MultiMap.cost.length > 1 && working.cost === undefined">
281                         <eg-list-counts label="[% l('Multiple costs') %]" list="working.MultiMap.cost" on-select="select_by_cost"></eg-list-counts>
282                     </div>
283                 </div>
284             </div>
285
286             <div class="row pad-vert"></div>
287
288             <div class="row bg-info">
289                 <div class="col-md-6">
290                     <b>[% l('Circulate as Type') %]</b>
291                 </div>
292                 <div class="col-md-6">
293                     <b>[% l('Deposit?') %]</b>
294                 </div>
295             </div>
296
297             <div class="row">
298                 <div class="nullable col-md-6" ng-class="{'bg-success': working.circ_as_type !== undefined}">
299                     <select class="form-control"
300                         ng-disabled="!defaults.attributes.circ_as_type" ng-model="working.circ_as_type"
301                         ng-options="t.code() as t.value() for t in circ_type_list">
302                       <option value="">[% l('&lt;NONE&gt;') %]</option>
303                     </select>
304                     <div class="container" ng-show="working.MultiMap.circ_as_type.length > 1 && working.circ_as_type === undefined">
305                         <eg-list-counts label="[% l('Multiple types') %]" list="working.MultiMap.circ_as_type" render="circTypeValue" on-select="select_by_circ_as_type"></eg-list-counts>
306                     </div>
307                 </div>
308                 <div class="col-md-6" ng-class="{'bg-success': working.deposit !== undefined}">
309                     <div class="row">
310                         <div class="col-xs-3">
311                             <label>
312                                 <input type="radio" ng-disabled="!defaults.attributes.deposit" ng-model="working.deposit" value="t"/>
313                                 [% l('Yes') %]
314                             </label>
315                         </div>
316                         <div class="col-xs-3">
317                             <label>
318                                 <input type="radio" ng-disabled="!defaults.attributes.deposit" ng-model="working.deposit" value="f"/>
319                                 [% l('No') %]
320                             </label>
321                         </div>
322                     </div>
323                     <div class="container" ng-show="working.MultiMap.deposit.length > 1 && working.deposit === undefined">
324                         <eg-list-counts label="[% l('Multiple values') %]" list="working.MultiMap.deposit" render="labelYesNo" on-select="select_by_deposit"></eg-list-counts>
325                     </div>
326                 </div>
327             </div>
328
329             <div class="row pad-vert"></div>
330
331             <div class="row bg-info">
332                 <div class="col-md-6">
333                     <b>[% l('Holdable?') %]</b>
334                 </div>
335                 <div class="col-md-6">
336                     <b>[% l('Deposit Amount') %]</b>
337                 </div>
338             </div>
339
340             <div class="row">
341                 <div class="col-md-6" ng-class="{'bg-success': working.holdable !== undefined}">
342                     <div class="row">
343                         <div class="col-xs-3">
344                             <label>
345                                 <input type="radio" ng-disabled="!defaults.attributes.holdable" ng-model="working.holdable" value="t"/>
346                                 [% l('Yes') %]
347                             </label>
348                         </div>
349                         <div class="col-xs-3">
350                             <label>
351                                 <input type="radio" ng-disabled="!defaults.attributes.holdable" ng-model="working.holdable" value="f"/>
352                                 [% l('No') %]
353                             </label>
354                         </div>
355                     </div>
356                     <div class="container" ng-show="working.MultiMap.holdable.length > 1 && working.holdable === undefined">
357                         <eg-list-counts label="[% l('Multiple values') %]" list="working.MultiMap.holdable" render="labelYesNo" on-select="select_by_holdable"></eg-list-counts>
358                     </div>
359                 </div>
360                 <div class="col-md-6" ng-class="{'bg-success': working.deposit_amount !== undefined}">
361                     <input class="form-control" ng-disabled="!defaults.attributes.deposit_amount" str-to-float ng-model="working.deposit_amount" type="number" step="0.01"/>
362                     <div class="container" ng-show="working.MultiMap.deposit_amount.length > 1 && working.deposit_amount === undefined">
363                         <eg-list-counts label="[% l('Multiple amounts') %]" list="working.MultiMap.deposit_amount" on-select="select_by_deposit_amount"></eg-list-counts>
364                     </div>
365                 </div>
366             </div>
367
368             <div class="row pad-vert"></div>
369
370             <div class="row bg-info">
371                 <div class="col-md-6">
372                     <b>[% l('Age-based Hold Protection') %]</b>
373                 </div>
374                 <div class="col-md-6">
375                     <b>[% l('Quality') %]</b>
376                 </div>
377             </div>
378
379             <div class="row">
380                 <div class="col-md-6" ng-class="{'bg-success': working.age_protect !== undefined}">
381                     <select class="form-control"
382                         ng-disabled="!defaults.attributes.age_protect" ng-model="working.age_protect"
383                         ng-options="a.id() as a.name() for a in age_protect_list">
384                       <option value="">[% l('&lt;NONE&gt;') %]</option>
385                     </select>
386                     <div class="container" ng-show="working.MultiMap.age_protect.length > 1 && working.age_protect === undefined">
387                         <eg-list-counts label="[% l('Multiple values') %]" list="working.MultiMap.age_protect" render="ageprotectName" on-select="select_by_age_protect"></eg-list-counts>
388                     </div>
389                 </div>
390                 <div class="col-md-6" ng-class="{'bg-success': working.mint_condition !== undefined}">
391                     <div class="row">
392                         <div class="col-xs-3">
393                             <label>
394                                 <input type="radio" ng-disabled="!defaults.attributes.mint_condition" ng-model="working.mint_condition" value="t"/>
395                                 [% l('Good') %]
396                             </label>
397                         </div>
398                         <div class="col-xs-3">
399                             <label>
400                                 <input type="radio" ng-disabled="!defaults.attributes.mint_condition" ng-model="working.mint_condition" value="f"/>
401                                 [% l('Damaged') %]
402                             </label>
403                         </div>
404                     </div>
405                     <div class="container" ng-show="working.MultiMap.mint_condition.length > 1 && working.mint_condition === undefined">
406                         <eg-list-counts label="[% l('Multiple values') %]" list="working.MultiMap.mint_condition" render="labelYesNo" on-select="select_by_mint_condition"></eg-list-counts>
407                     </div>
408                 </div>
409             </div>
410
411             <div class="row pad-vert"></div>
412
413             <div class="row bg-info">
414                 <div class="col-md-6">
415                     <b>[% l('Fine Level') %]</b>
416                 </div>
417             </div>
418
419             <div class="row">
420                 <div class="col-md-6" ng-class="{'bg-success': working.fine_level !== undefined}">
421                     <select class="form-control" int-to-str ng-disabled="!defaults.attributes.fine_level" ng-model="working.fine_level">
422                         <option value="1">[% l('Low') %]</option>
423                         <option value="2" selected>[% l('Normal') %]</option>
424                         <option value="3">[% l('High') %]</option>
425                     </select>
426                     <div class="container" ng-show="working.MultiMap.fine_level.length > 1 && working.fine_level === undefined">
427                         <eg-list-counts label="[% l('Multiple levels') %]" list="working.MultiMap.fine_level" render="fineLabel" on-select="select_by_fine_level"></eg-list-counts>
428                     </div>
429                 </div>
430                 <div class="col-md-6">
431                     <button
432                       class="btn btn-default"
433                       ng-disabled="!defaults.copy_notes"
434                       ng-click="copy_notes_dialog(workingGridControls.selectedItems())"
435                       type="button">
436                         [% l('Item Notes') %]
437                     </button>
438                     <button
439                       class="btn btn-default"
440                       ng-disabled="!defaults.attributes.alerts"
441                       ng-click="copy_alerts_dialog(workingGridControls.selectedItems())"
442                       type="button">
443                         [% l('Item Alerts') %]
444                     </button>
445                 </div>
446             </div>
447
448             <div class="row pad-vert"></div>
449
450             <div class="row bg-info">
451                 <div class="col-md-6">
452                     <b>[% l('Floating') %]</b>
453                 </div>
454             </div>
455
456             <div class="row">
457                 <div class="col-md-6" ng-class="{'bg-success': working.floating !== undefined}">
458                     <select class="form-control"
459                         ng-disabled="!defaults.attributes.floating" ng-model="working.floating"
460                         ng-options="a.id() as a.name() for a in floating_list">
461                       <option value="">[% l('&lt;NONE&gt;') %]</option>
462                     </select>
463                     <div class="container" ng-show="working.MultiMap.floating.length > 1 && working.floating === undefined">
464                         <eg-list-counts label="[% l('Multiple values') %]" list="working.MultiMap.floating" render="floatingName" on-select="select_by_floating"></eg-list-counts>
465                     </div>
466                 </div>
467                 <div class="col-md-6">
468                     <button
469                       class="btn btn-default"
470                       ng-disabled="!defaults.copy_tags"
471                       ng-click="copy_tags_dialog(workingGridControls.selectedItems())"
472                       type="button">
473                         [% l('Item Tags') %]
474                     </button>
475                 </div>
476             </div>
477         </div>
478
479         <div class="col-md-4">
480             <div class="row">
481                 <div class="col-xs-12">
482                     <select class="form-control" ng-disabled="!defaults.statcats"
483                         ng-model="working.statcat_filter"
484                         ng-options="o.id() as o.shortname() for o in statcat_filter_list">
485                       <option value="">[% l('Filter by Library') %]</option>
486                     </select>
487                 </div>
488             </div>
489
490             <div class="row pad-vert"></div>
491
492             <div class="row" ng-repeat="sc in statcats" ng-show="statcat_visible(sc.owner().id())">
493                 <div class="col-xs-12">
494                     <div class="row bg-info">
495                         <div class="col-xs-12">
496                             <span>{{ sc.owner().name() }} : {{ sc.name() }}</span>
497                         </div>
498                     </div>
499                     <div class="row">
500                         <div class="nullable col-xs-12" ng-class="{'bg-success': working.statcats[sc.id()] !== undefined}">
501                             <select class="form-control" ng-disabled="!defaults.statcats"
502                                 ng-change="statcatUpdate(sc.id())"
503                                 ng-model="working.statcats[sc.id()]"
504                                 ng-options="e.id() as e.value() for e in sc.entries()"
505                                 ng-required="sc.required() == 't' && !working.statcats_multi[sc.id()]">
506                                 <option value="">
507                                     {{ !working.statcats_multi[sc.id()] ? '[% l('&lt;NONE&gt;') %]' : '[% l('&lt;MULTIPLE&gt;') %]' }}
508                                 </option>
509                             </select>
510                         </div>
511                     </div>
512                 </div>
513             </div>
514         </div>
515
516     </div>
517 </div>
518 </form></div>