30ac2d35a74226dabd03986f73c47c7a552fac01
[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">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     </div>
77
78 </div>
79 <div class="pad-vert">
80
81     <div class="pad-vert" ng-show="show_copies">
82
83         <ul ng-model="copytab" class="nav nav-tabs">
84           <li ng-class="{active : copytab == 'working'}">
85             <a ng-click="copytab='working'" >[% l('Working Copies') %]</a>
86           </li>
87           <li ng-class="{active : copytab == 'complete'}">
88             <a ng-click="copytab='complete'" >[% l('Completed Copies') %]</a>
89           </li>
90         </ul>
91
92         <div class="tab-content">
93           <div class="tab-pane active">
94             <div ng-show="copytab == 'working'">
95         
96             <div class="container-fluid"> <!-- working copy editor -->
97                 <div class="row">
98                     <div class="col-lg-4">
99         
100                         <eg-grid
101                           id-field="id"
102                           idl-class="acp"
103                           features="startSelected,-pagination,-actions,-index"
104                           items-provider="workingGridDataProvider"
105                           grid-controls="workingGridControls"
106                           on-select="handleItemSelect"
107                           after-select="afterItemSelect"
108                           persist-key="cat.volcopy.copies">
109         
110                           <eg-grid-menu-item handler="workingToComplete"
111                            label="[% l('Store Selected') %]"></eg-grid-menu-item>
112                           <eg-grid-menu-item disabled="disableSave" handler="workingSaveAndExit"
113                            label="[% l('Save & Exit') %]"></eg-grid-menu-item>
114         
115                         
116                           <eg-grid-field label="[% l('Barcode') %]"     path='barcode' visible></eg-grid-field>
117                           <eg-grid-field label="[% l('Created') %]"     path="create_date" visible></eg-grid-field>
118                           <eg-grid-field label="[% l('Activated') %]"   path="active_date" visible></eg-grid-field>
119                           <eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
120                           <eg-grid-field label="[% l('Copy ID') %]"     path="id" hidden></eg-grid-field>
121                         
122                         </eg-grid>
123         
124                     </div>
125         
126                     <div class="col-lg-8 give-cell-border">
127                         <div ng-include="'[% ctx.base_path %]/staff/cat/volcopy/t_attr_edit'"></div>
128                     </div>
129                 </div>
130             </div>
131         
132             </div>
133             <div ng-show="copytab == 'complete'">
134                <eg-grid
135                  id-field="id"
136                  idl-class="acp"
137                  menu-label="[% l('Save... ') %]"
138                  features="-pagination,-actions,-index"
139                  items-provider="completedGridDataProvider"
140                  grid-controls="completedGridControls"
141                  persist-key="cat.volcopy.copies.complete">
142                
143                  <eg-grid-menu-item standalone="true" handler="completeToWorking"
144                   label="[% l('Edit Selected') %]"></eg-grid-menu-item>
145         
146                  <eg-grid-menu-item disabled="disableSave" handler="saveAndContinue"
147                   label="[% l('Save Completed') %]"></eg-grid-menu-item>
148                  <eg-grid-menu-item disabled="disableSave" handler="saveAndExit"
149                   label="[% l('Save & Exit') %]"></eg-grid-menu-item>
150         
151                  <eg-grid-field label="[% l('Barcode') %]"     path='barcode' visible></eg-grid-field>
152                  <eg-grid-field label="[% l('Created') %]"     path="create_date" visible></eg-grid-field>
153                  <eg-grid-field label="[% l('Activated') %]"   path="active_date" visible></eg-grid-field>
154                  <eg-grid-field label="[% l('Call Number') %]" path="call_number.label" visible></eg-grid-field>
155                  <eg-grid-field label="[% l('Circ Library') %]" flesher="orgById" path="circ_lib.name" visible></eg-grid-field>
156                  <eg-grid-field label="[% l('Shelving Location') %]" flesher="locationById" path="location.name" visible></eg-grid-field>
157                  <eg-grid-field label="[% l('Circ Modifier') %]" path="circ_modifier" visible></eg-grid-field>
158                  <eg-grid-field label="[% l('Circulate?') %]"  path="circulate" visible></eg-grid-field>
159                  <eg-grid-field label="[% l('Holdable?') %]"   path="circulate" visible></eg-grid-field>
160                  <eg-grid-field label="[% l('Reference?') %]"  path="ref" visible></eg-grid-field>
161                  <eg-grid-field label="[% l('Status') %]"      flesher="statusById" path="status.name" visible></eg-grid-field>
162                  <eg-grid-field label="[% l('OPAC Visible') %]" path="opac_visible" visible></eg-grid-field>
163                  <eg-grid-field label="[% l('Copy ID') %]"      path="id" hidden></eg-grid-field>
164
165                </eg-grid>
166             </div>
167           </div>
168         </div>
169
170     </div>
171 </div>