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