webstaff: Allow adding new volumes to libaries that were not selected in the holdings...
[Evergreen.git] / Open-ILS / src / templates / staff / cat / volcopy / t_edit.tt2
1 <div>
2     <script>window.duplicate_barcode_string = "[% l('Duplicate Barcode') %]";</script>
3     <script>window.empty_barcode_string = "[% l('Missing Barcode') %]";</script>
4     <script>window.empty_label_string = "[% l('Missing Call Number') %]";</script>
5     <div ng-show="!only_vols" class="btn-group">
6         <label class="btn btn-default" ng-click="show_vols = !show_vols">
7             <span ng-show="show_vols" style="padding-right: 5px;">[% l('Hide Volume/Copy Details') %]</span>
8             <span ng-hide="show_vols" style="padding-right: 5px;">[% l('Show Volume/Copy Details') %]</span>
9         </label>
10         <label class="btn btn-default" ng-click="show_copies = !show_copies">
11             <span ng-show="show_copies" style="padding-right: 5px;">[% l('Hide Copy Attributes') %]</span>
12             <span ng-hide="show_copies" style="padding-right: 5px;">[% l('Show Copy Attributes') %]</span>
13         </label>
14     </div>
15
16     <div class="container-fluid pad-vert" ng-show="show_vols">
17         <div ng-show="record_id" class="row bg-info">
18             <div class="col-xs-2"><h4 class="center-block">[% l('Batch Apply') %]</h4></div>
19             <div class="col-xs-10">
20                 <div class="row">
21                     <div class="col-xs-2">
22                         <select class="form-control" ng-model="batch.classification" ng-options="cl.id() as cl.name() for cl in classification_list"></select>
23                     </div>
24                     <div class="col-xs-1">
25                         <select class="form-control" ng-model="batch.prefix" ng-options="p.id() as p.label() for p in prefix_list"></select>
26                     </div>
27                     <div class="col-xs-2">
28                         <input class="form-control" type="text" ng-model="batch.label"/>
29                     </div>
30                     <div class="col-xs-1">
31                         <select class="form-control" ng-model="batch.suffix" ng-options="s.id() as s.label() for s in suffix_list"></select>
32                     </div>
33                     <div class="col-xs-1"></div>
34                     <div class="col-xs-5">
35                         <button class="btn btn-default center-block" ng-click="applyBatchCNValues()" type="button">[% l('Apply') %]</button>
36                     </div>
37                 </div>
38             </div>
39         </div>
40         <div class="row pad-vert">
41             <div class="col-xs-1"><b>[% l('Owning Library') %]</b></div>
42             <div class="col-xs-1"><b>[% l('Volumes') %]</b></div>
43             <div class="col-xs-10">
44                 <div class="row">
45                     <div class="col-xs-2"><b>[% l('Classification') %]</b></div>
46                     <div class="col-xs-1"><b>[% l('Prefix') %]</b></div>
47                     <div class="col-xs-2"><b>[% l('Call Number') %]</b></div>
48                     <div class="col-xs-1"><b>[% l('Suffix') %]</b></div>
49                     <div class="col-xs-1" ng-hide="only_vols"><b>[% l('Copies') %]</b></div>
50                     <div class="col-xs-5" ng-hide="only_vols">
51                         <div class="row">
52                             <div class="col-xs-5"><b>[% l('Barcode') %]</b></div>
53                             <div class="col-xs-3"><b>[% l('Copy #') %]</b></div>
54                             <div class="col-xs-4"><b>[% l('Part') %]</b></div>
55                         </div>
56                     </div>
57                     <div class="col-xs-2" ng-show="only_vols">
58                         <button class="btn btn-default center-block" ng-disabled="disableSave()" ng-click="workingToComplete() && saveAndExit()" type="button">
59                             <span ng-if="embedded">[% l('Save changes') %]</span>
60                             <span ng-if="!embedded">[% l('Save & Exit') %]</span>
61                         </button>
62                     </div>
63                 </div>
64             </div>
65         </div> <!-- row -->
66         <eg-vol-edit
67             focus-next="focusNextFirst"
68             ng-repeat="(lib,callnumbers) in data.tree"
69             ng-init="ind = $index"
70             record="{{record_id}}"
71             only-vols="only_vols"
72             lib="{{lib}}"
73             allcopies="data.copies"
74             struct="data.tree[lib]">
75         </eg-vol-edit>
76         <hr/>
77         <div>
78             <eg-org-selector alldisabled="{{record_id == 0}}" selected="new_lib_to_add" onchange="changeNewLib" disable-test="cant_have_vols"></eg-org-selector>
79             <button class="btn btn-default" ng-click="addLibToStruct()" type="button">[% l('Add volume') %]</button>
80         </div>
81     </div>
82
83 </div>
84 <div class="pad-vert">
85
86     <div class="pad-vert" ng-show="show_copies">
87
88         <ul ng-model="copytab" class="nav nav-tabs">
89           <li ng-class="{active : copytab == 'working'}">
90             <a ng-click="copytab='working'" >[% l('Working Copies') %]</a>
91           </li>
92           <li ng-class="{active : copytab == 'complete'}">
93             <a ng-click="copytab='complete'" >[% l('Completed Copies') %]</a>
94           </li>
95         </ul>
96
97         <div class="tab-content">
98           <div class="tab-pane active">
99             <div ng-show="copytab == 'working'">
100         
101             <div class="container-fluid"> <!-- working copy editor -->
102                 <div class="row">
103                     <div class="col-lg-4">
104         
105                         <eg-grid
106                           id-field="id"
107                           idl-class="acp"
108                           features="startSelected,-pagination,-actions,-index"
109                           items-provider="workingGridDataProvider"
110                           grid-controls="workingGridControls"
111                           on-select="handleItemSelect"
112                           after-select="afterItemSelect"
113                           persist-key="cat.volcopy.copies">
114         
115                           <eg-grid-menu-item handler="workingToComplete"
116                            label="[% l('Store Selected') %]"></eg-grid-menu-item>
117                           <eg-grid-menu-item disabled="disableSave" handler="workingSaveAndExit"
118                            label="[% l('Save & Exit') %]"></eg-grid-menu-item>
119         
120                         
121                           <eg-grid-field label="[% l('Barcode') %]"     path='barcode' visible></eg-grid-field>
122                           <eg-grid-field label="[% l('Created') %]"     path="create_date" visible></eg-grid-field>
123                           <eg-grid-field label="[% l('Activated') %]"   path="active_date" visible></eg-grid-field>
124                           <eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
125                           <eg-grid-field label="[% l('Copy ID') %]"     path="id" hidden></eg-grid-field>
126                         
127                         </eg-grid>
128         
129                     </div>
130         
131                     <div class="col-lg-8 give-cell-border">
132                         <div ng-include="'[% ctx.base_path %]/staff/cat/volcopy/t_attr_edit'"></div>
133                     </div>
134                 </div>
135             </div>
136         
137             </div>
138             <div ng-show="copytab == 'complete'">
139                <eg-grid
140                  id-field="id"
141                  idl-class="acp"
142                  menu-label="[% l('Save... ') %]"
143                  features="-pagination,-actions,-index"
144                  items-provider="completedGridDataProvider"
145                  grid-controls="completedGridControls"
146                  persist-key="cat.volcopy.copies.complete">
147                
148                  <eg-grid-menu-item standalone="true" handler="completeToWorking"
149                   label="[% l('Edit Selected') %]"></eg-grid-menu-item>
150         
151                  <eg-grid-menu-item disabled="disableSave" handler="saveAndContinue"
152                   label="[% l('Save Completed') %]"></eg-grid-menu-item>
153                  <eg-grid-menu-item disabled="disableSave" handler="saveAndExit"
154                   label="[% l('Save & Exit') %]"></eg-grid-menu-item>
155         
156                  <eg-grid-field label="[% l('Barcode') %]"     path='barcode' visible></eg-grid-field>
157                  <eg-grid-field label="[% l('Created') %]"     path="create_date" visible></eg-grid-field>
158                  <eg-grid-field label="[% l('Activated') %]"   path="active_date" visible></eg-grid-field>
159                  <eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
160                  <eg-grid-field label="[% l('Circ Library') %]" flesher="orgById" path="circ_lib.name" visible></eg-grid-field>
161                  <eg-grid-field label="[% l('Shelving Location') %]" flesher="locationById" path="location.name" visible></eg-grid-field>
162                  <eg-grid-field label="[% l('Circ Modifier') %]" path="circ_modifier" visible></eg-grid-field>
163                  <eg-grid-field label="[% l('Circulate?') %]"  path="circulate" visible></eg-grid-field>
164                  <eg-grid-field label="[% l('Holdable?') %]"   path="circulate" visible></eg-grid-field>
165                  <eg-grid-field label="[% l('Reference?') %]"  path="ref" visible></eg-grid-field>
166                  <eg-grid-field label="[% l('Status') %]"      flesher="statusById" path="status.name" visible></eg-grid-field>
167                  <eg-grid-field label="[% l('OPAC Visible') %]" path="opac_visible" visible></eg-grid-field>
168                  <eg-grid-field label="[% l('Copy ID') %]"      path="id" hidden></eg-grid-field>
169
170                </eg-grid>
171             </div>
172           </div>
173         </div>
174
175     </div>
176 </div>