LP1793196 Volume batch editor offers MARC call numbers
[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 Holdings Details') %]</span>
8             <span ng-hide="show_vols" style="padding-right: 5px;">[% l('Show Holdings 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 Item Attributes') %]</span>
12             <span ng-hide="show_copies" style="padding-right: 5px;">[% l('Show Item Attributes') %]</span>
13         </label>
14     </div>
15
16     <div class="container-fluid pad-vert" ng-show="show_vols">
17         <div 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                         <eg-basic-combo-box list="batch.marcCallNumbers" selected="batch.label"></eg-basic-combo-box>
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('Call Numbers') %]</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 Label') %]</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('Items') %]</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('Item #') %]</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 class="row">
78             <div class="col-xs-2">
79                 <eg-org-selector alldisabled="{{record_id == 0}}" selected="new_lib_to_add" onchange="changeNewLib" disable-test="cant_have_vols"></eg-org-selector>
80             </div>
81             <div class="col-xs-2">
82                 <button class="btn btn-default" ng-disabled="record_id == 0" ng-click="addLibToStruct()" type="button">[% l('Add call number') %]</button>
83             </div>
84         </div>
85     </div>
86
87 </div>
88 <div class="pad-vert">
89
90     <div class="pad-vert" ng-show="show_copies">
91
92         <ul ng-model="copytab" class="nav nav-tabs">
93           <li ng-class="{active : copytab == 'working'}">
94             <a ng-click="copytab='working'" >[% l('Working Items') %]</a>
95           </li>
96           <li ng-class="{active : copytab == 'complete'}">
97             <a ng-click="copytab='complete'" >[% l('Completed Items') %]</a>
98           </li>
99         </ul>
100
101         <div class="tab-content">
102           <div class="tab-pane active">
103             <div ng-show="copytab == 'working'">
104
105             <div class="container-fluid"> <!-- working copy editor -->
106                 <div class="row give-cell-border" style="margin:0px;padding:0px">
107                     <div class="col-lg-12" style="margin:0px;padding:0px"
108                         <div ng-include="'[% ctx.base_path %]/staff/cat/volcopy/t_attr_edit'"></div>
109                     </div>
110                 </div>
111                 <div class="row">
112                     <div class="col-lg-12">
113
114                         <eg-grid
115                           id-field="id"
116                           idl-class="acp"
117                           features="startSelected,-pagination,-actions,-index"
118                           items-provider="workingGridDataProvider"
119                           grid-controls="workingGridControls"
120                           on-select="handleItemSelect"
121                           after-select="afterItemSelect"
122                           persist-key="cat.volcopy.copies"
123                           dateformat="{{$root.egDateAndTimeFormat}}">
124
125                           <eg-grid-menu-item disabled="disableSave" handler="workingToComplete"
126                            label="[% l('Store Selected') %]"></eg-grid-menu-item>
127                           <eg-grid-menu-item disabled="disableSave" handler="workingSaveAndExit"
128                            label="[% l('Save & Exit') %]"></eg-grid-menu-item>
129
130
131                           <eg-grid-field label="[% l('Barcode') %]"     path='barcode' visible></eg-grid-field>
132                           <eg-grid-field label="[% l('Created') %]"     path="create_date" datatype="timestamp" visible></eg-grid-field>
133                           <eg-grid-field label="[% l('Activated') %]"   path="active_date" visible></eg-grid-field>
134                           <eg-grid-field label="[% l('CN Prefix') %]" path="call_number.prefix.label" visible></eg-grid-field>
135                           <eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
136                           <eg-grid-field label="[% l('CN Suffix') %]" path="call_number.suffix.label" visible></eg-grid-field>
137                           <eg-grid-field label="[% l('Item ID') %]"     path="id" hidden></eg-grid-field>
138
139                         </eg-grid>
140
141                     </div>
142                 </div>
143             </div>
144
145             <div ng-show="copytab == 'complete'">
146                <eg-grid
147                  id-field="id"
148                  idl-class="acp"
149                  menu-label="[% l('Save... ') %]"
150                  features="-pagination,-actions,-index"
151                  items-provider="completedGridDataProvider"
152                  grid-controls="completedGridControls"
153                  persist-key="cat.volcopy.copies.complete"
154                  dateformat="{{$root.egDateAndTimeFormat}}">
155
156                  <eg-grid-menu-item standalone="true" handler="completeToWorking"
157                   label="[% l('Edit Selected') %]"></eg-grid-menu-item>
158
159                  <eg-grid-menu-item disabled="disableSave" handler="saveAndContinue"
160                   label="[% l('Save Completed') %]"></eg-grid-menu-item>
161                  <eg-grid-menu-item disabled="disableSave" handler="saveAndExit"
162                   label="[% l('Save & Exit') %]"></eg-grid-menu-item>
163
164                  <eg-grid-field label="[% l('Barcode') %]"     path='barcode' visible></eg-grid-field>
165                  <eg-grid-field label="[% l('Created') %]"     path="create_date" datatype="timestamp" visible></eg-grid-field>
166                  <eg-grid-field label="[% l('Activated') %]"   path="active_date" datatype="timestamp" visible></eg-grid-field>
167                  <eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
168                  <eg-grid-field label="[% l('Circ Library') %]" flesher="orgById" path="circ_lib.name" visible></eg-grid-field>
169                  <eg-grid-field label="[% l('Shelving Location') %]" flesher="locationById" path="location.name" visible></eg-grid-field>
170                  <eg-grid-field label="[% l('Circ Modifier') %]" path="circ_modifier" visible></eg-grid-field>
171                  <eg-grid-field label="[% l('Circulate?') %]"  path="circulate" visible></eg-grid-field>
172                  <eg-grid-field label="[% l('Holdable?') %]"   path="circulate" visible></eg-grid-field>
173                  <eg-grid-field label="[% l('Reference?') %]"  path="ref" visible></eg-grid-field>
174                  <eg-grid-field label="[% l('Status') %]"      flesher="statusById" path="status.name" visible></eg-grid-field>
175                  <eg-grid-field label="[% l('OPAC Visible') %]" path="opac_visible" visible></eg-grid-field>
176                  <eg-grid-field label="[% l('Item ID') %]"      path="id" hidden></eg-grid-field>
177
178                </eg-grid>
179             </div>
180           </div>
181         </div>
182
183     </div>
184 </div>