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