LP1739277 Angular org selector style callback
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / catalog / record / holdings.component.html
1
2 <!-- org unit selector -->
3
4 <div class="row mt-3">
5   <div class="col-lg-4">
6     <div class="input-group">
7       <div class="input-group-prepend">
8         <div class="input-group-text" i18n>Holdings Maintenance</div>
9       </div>
10       <eg-org-select [initialOrg]="contextOrg" 
11         persistKey="catalog.holdings" (onChange)="contextOrgChanged($event)">
12       </eg-org-select>
13     </div>
14   </div>
15 </div>
16
17 <!-- Location / Barcode cell template -->
18
19 <ng-template #locationTemplate let-row="row" let-userContext="userContext">
20   <!-- pl-* is doubled for added impact -->
21   <div class="pl-{{row.locationDepth}}">
22     <span class="pl-{{row.locationDepth}}">
23       <a class="label-with-material-icon" (click)="userContext.toggleExpandRow(row)">
24         <!--  leave the icons in place for all node types, but make them
25               invisible when they are not needed. -->
26         <span *ngIf="row.treeNode.expanded"
27           [ngClass]="{invisible: row.copy || row.treeNode.children.length == 0}"
28           class="material-icons p-0 m-0">keyboard_arrow_down</span>
29         <span *ngIf="!row.treeNode.expanded"
30           [ngClass]="{invisible: row.copy || row.treeNode.children.length == 0}"
31           class="material-icons p-0 m-0">keyboard_arrow_right</span>
32         <span>{{row.locationLabel}}</span>
33       </a>
34     </span>
35   </div>
36 </ng-template>
37
38 <!-- Holdable true/false display -->
39
40 <ng-template #holdableTemplate let-row="row" let-userContext="userContext">
41   <ng-container *ngIf="row.copy">
42     <eg-bool [value]="userContext.copyIsHoldable(row.copy)">
43     </eg-bool>
44   </ng-container>
45 </ng-template>
46
47 <eg-mark-damaged-dialog #markDamagedDialog></eg-mark-damaged-dialog>
48 <eg-mark-missing-dialog #markMissingDialog></eg-mark-missing-dialog>
49 <eg-copy-alerts-dialog #copyAlertsDialog></eg-copy-alerts-dialog>
50 <eg-copy-tags-dialog #copyTagsDialog></eg-copy-tags-dialog>
51 <eg-copy-notes-dialog #copyNotesDialog></eg-copy-notes-dialog>
52 <eg-replace-barcode-dialog #replaceBarcode></eg-replace-barcode-dialog>
53 <eg-delete-holding-dialog #deleteHolding></eg-delete-holding-dialog>
54 <eg-bucket-dialog #bucketDialog></eg-bucket-dialog>
55 <eg-conjoined-items-dialog #conjoinedDialog></eg-conjoined-items-dialog>
56 <eg-make-bookable-dialog #makeBookableDialog></eg-make-bookable-dialog>
57 <eg-transfer-items #transferItems></eg-transfer-items>
58 <eg-transfer-holdings #transferHoldings></eg-transfer-holdings>
59 <eg-alert-dialog #transferAlert
60   i18n-dialogTitle i18n-dialogBody
61   dialogTitle="No Target Selected"
62   dialogBody="Please select a suitable transfer target"></eg-alert-dialog>
63
64 <!-- holdings grid -->
65 <div class='eg-copies w-100 mt-3'>
66   <eg-grid #holdingsGrid [dataSource]="gridDataSource"
67     (onRowActivate)="onRowActivate($event)" [disablePaging]="true"
68     [rowClassCallback]="rowClassCallback" [cellTextGenerator]="cellTextGenerator"
69     [sortable]="false" persistKey="cat.holdings">
70
71     <!-- checkboxes / filters -->
72
73     <eg-grid-toolbar-checkbox i18n-label label="Show Call Numbers"
74       #callNumsCheckbox (onChange)="toggleShowCallNums($event)">
75     </eg-grid-toolbar-checkbox> 
76     <eg-grid-toolbar-checkbox i18n-label label="Show Copies" 
77       #copiesCheckbox (onChange)="toggleShowCopies($event)">
78     </eg-grid-toolbar-checkbox> 
79     <eg-grid-toolbar-checkbox i18n-label label="Show Empty Call Numbers"
80       #emptyCallNumsCheckbox (onChange)="toggleShowEmptyCallNums($event)">
81     </eg-grid-toolbar-checkbox> 
82     <eg-grid-toolbar-checkbox i18n-label label="Show Empty Libs"            
83       #emptyLibsCheckbox (onChange)="toggleShowEmptyLibs($event)">
84     </eg-grid-toolbar-checkbox> 
85
86     <!-- row actions -->
87
88     <!-- row actions : Ungrouped -->
89
90     <eg-grid-toolbar-action
91       i18n-label label="Print Labels" (onClick)="openItemPrintLabels($event)">
92     </eg-grid-toolbar-action>
93
94     <eg-grid-toolbar-action
95       i18n-label label="Request Items" (onClick)="requestItems($event)">
96     </eg-grid-toolbar-action>
97
98     <eg-grid-toolbar-action
99       i18n-label label="Link as Conjoined to Marked Bib Record"
100       (onClick)="openConjoinedDialog($event)">
101     </eg-grid-toolbar-action>
102
103     <!-- row actions : Add -->
104
105     <eg-grid-toolbar-action
106       i18n-group group="Add" i18n-label label="Add Call Numbers"
107       (onClick)="openHoldingAdd($event, true, false)">
108     </eg-grid-toolbar-action>
109
110     <eg-grid-toolbar-action
111       i18n-group group="Add" i18n-label label="Add Items"
112       (onClick)="openHoldingAdd($event, false, true)">
113     </eg-grid-toolbar-action>
114
115     <eg-grid-toolbar-action
116       i18n-group group="Add" i18n-label label="Add Call Numbers and Items"
117       (onClick)="openHoldingAdd($event, true, true)">
118     </eg-grid-toolbar-action>
119
120     <eg-grid-toolbar-action
121       i18n-group group="Add" i18n-label label="Add Item Alerts"
122       (onClick)="openItemAlerts($event, 'create')">
123     </eg-grid-toolbar-action>
124
125     <eg-grid-toolbar-action
126       i18n-group group="Add" i18n-label label="Add/Manage Item Tags"
127       (onClick)="openItemTags($event)">
128     </eg-grid-toolbar-action>
129
130     <eg-grid-toolbar-action
131       i18n-group group="Add" i18n-label label="Add/Manage Item Notes"
132       (onClick)="openItemNotes($event)">
133     </eg-grid-toolbar-action>
134
135     <eg-grid-toolbar-action
136       i18n-group group="Add" i18n-label label="Add Items To Bucket"
137       (onClick)="openBucketDialog($event)">
138     </eg-grid-toolbar-action>
139
140     <!-- row actions: Booking -->
141
142     <eg-grid-toolbar-action
143       i18n-group group="Booking" i18n-label label="Book Item Now"
144       (onClick)="bookItems($event)">
145     </eg-grid-toolbar-action>
146
147     <eg-grid-toolbar-action
148       i18n-group group="Booking" i18n-label label="Make Items Bookable"
149       (onClick)="makeBookable($event)">
150     </eg-grid-toolbar-action>
151
152     <eg-grid-toolbar-action
153       i18n-group group="Booking" i18n-label label="Manage Reservations"
154       (onClick)="manageReservations($event)">
155     </eg-grid-toolbar-action>
156     
157     <!-- row actions: Edit -->
158
159     <eg-grid-toolbar-action
160       i18n-group group="Edit" i18n-label label="Edit Call Numbers"
161       (onClick)="openHoldingEdit($event, false, true)">
162     </eg-grid-toolbar-action>
163
164     <eg-grid-toolbar-action
165       i18n-group group="Edit" i18n-label label="Edit Call Numbers And Items"
166       (onClick)="openHoldingEdit($event, false, false)">
167     </eg-grid-toolbar-action>
168
169     <eg-grid-toolbar-action
170       i18n-group group="Edit" i18n-label label="Edit Items"
171       (onClick)="openHoldingEdit($event, true, false)">
172     </eg-grid-toolbar-action>
173     
174     <eg-grid-toolbar-action
175       i18n-group group="Edit" i18n-label label="Edit Item Alerts"
176       (onClick)="openItemAlerts($event, 'manage')">
177     </eg-grid-toolbar-action>
178
179     <eg-grid-toolbar-action
180       i18n-group group="Edit" i18n-label label="Replace Barcodes"
181       (onClick)="openReplaceBarcodeDialog($event)">
182     </eg-grid-toolbar-action>
183
184     <!-- row actions: Delete -->
185
186     <eg-grid-toolbar-action
187       i18n-group group="Delete" i18n-label label="Delete Empty Call Numbers"
188       (onClick)="deleteHoldings($event, 'callNums')">
189     </eg-grid-toolbar-action>
190
191     <eg-grid-toolbar-action
192      i18n-group group="Delete" i18n-label label="Delete Items"
193      (onClick)="deleteHoldings($event, 'copies')">
194     </eg-grid-toolbar-action>
195
196     <eg-grid-toolbar-action
197       i18n-group group="Delete" i18n-label label="Delete Call Numbers and Items"
198       (onClick)="deleteHoldings($event, 'both')">
199     </eg-grid-toolbar-action>
200     
201     <!-- row actions : Show -->
202
203     <eg-grid-toolbar-action
204       i18n-group group="Show" i18n-label label="Show Item Status (list)"
205       (onClick)="openItemStatusList($event)"></eg-grid-toolbar-action>
206
207     <eg-grid-toolbar-action
208       i18n-group group="Show" i18n-label label="Show Item Status (detail)"
209       (onClick)="openItemStatus($event)"></eg-grid-toolbar-action>
210
211     <eg-grid-toolbar-action
212       i18n-group group="Show" i18n-label label="Show Item Holds"
213       (onClick)="openItemHolds($event)"></eg-grid-toolbar-action>
214
215     <eg-grid-toolbar-action
216       i18n-group group="Show" i18n-label label="Show Triggered Events"
217       (onClick)="openItemTriggeredEvents($event)"></eg-grid-toolbar-action>
218
219     <!-- row actions : Mark -->
220
221     <eg-grid-toolbar-action
222       group="Mark" i18n-group i18n-label label="Mark Item Damaged"
223       (onClick)="showMarkDamagedDialog($event)"></eg-grid-toolbar-action>
224
225     <eg-grid-toolbar-action
226       i18n-group group="Mark" i18n-label label="Mark Item Missing"
227       (onClick)="showMarkMissingDialog($event)">
228     </eg-grid-toolbar-action>
229
230     <eg-grid-toolbar-action
231       i18n-group group="Mark" 
232       i18n-label label="Mark Library/Call Number as Transfer Destination"
233       (onClick)="markLibCnForTransfer($event)">
234     </eg-grid-toolbar-action>
235
236     <eg-grid-toolbar-action
237       i18n-group group="Transfer" 
238       i18n-label label="Transfer Items to Marked Destination"
239       (onClick)="transferSelectedItems($event)">
240     </eg-grid-toolbar-action>
241
242     <eg-grid-toolbar-action
243       i18n-group group="Transfer" 
244       i18n-label label="Transfer Holdings to Marked Destination"
245       (onClick)="transferSelectedHoldings($event)">
246     </eg-grid-toolbar-action>
247
248     <!-- fields -->
249     <!-- NOTE column names were added to match the names from the AngJS grid
250         so grid settings would propagate -->
251
252     <eg-grid-column path="index" [hidden]="true" [index]="true">
253     </eg-grid-column>
254     <eg-grid-column name="id" path="copy.id" [hidden]="true" label="Item ID" i18n-label>
255     </eg-grid-column>
256     <eg-grid-column path="callNum.id" [hidden]="true" label="Call Number ID" i18n-label>
257     </eg-grid-column>
258     <eg-grid-column name="owner_label" [flex]="4"
259       [cellTemplate]="locationTemplate" [cellContext]="gridTemplateContext" 
260       label="Location/Barcode" [disableTooltip]="true" i18n-label>
261     </eg-grid-column>
262     <eg-grid-column path="callNumCount" datatype="number" label="Call Numbers" i18n-label>
263     </eg-grid-column>
264     <eg-grid-column path="copyCount" datatype="number" label="Copies" i18n-label>
265     </eg-grid-column>
266     <eg-grid-column path="callNum._label" name="call_number.label" 
267       label="Call Number" i18n-label>
268     </eg-grid-column>
269     <eg-grid-column path="copy.barcode" name="barcode" label="Barcode" i18n-label>
270     </eg-grid-column>
271     <eg-grid-column i18n-label label="Circ Library" path="copy.circ_lib" 
272       name="circ_lib.name" datatype="org_unit"></eg-grid-column>
273     <eg-grid-column i18n-label label="Owning Library" path="callNum.owning_lib" 
274       datatype="org_unit"></eg-grid-column>
275     <eg-grid-column i18n-label label="Due Date" path="circ.due_date" 
276       datatype="timestamp"></eg-grid-column>
277     <eg-grid-column i18n-label label="Shelving Location" 
278       path="copy.location.name" name="location.name">
279     </eg-grid-column>
280     <eg-grid-column i18n-label label="Circulation Modifier" 
281       path="copy.circ_modifier" name="circ_modifier">
282     </eg-grid-column>
283     <eg-grid-column i18n-label label="Item Number" path="copy.copy_number" 
284       name="copy_number" [hidden]="true">
285     </eg-grid-column>
286
287     <eg-grid-column i18n-label label="Status" 
288       path="copy.status.name" name="status_name">
289     </eg-grid-column>
290     <eg-grid-column i18n-label label="Call Number Prefix" 
291       path="callNum.prefix.label" name="call_number.prefix.label" [hidden]="true">
292     </eg-grid-column>
293     <eg-grid-column i18n-label label="Call Number Suffix" 
294       path="callNum.suffix.label" name="call_number.suffix.label" [hidden]="true">
295     </eg-grid-column>
296     <eg-grid-column i18n-label label="Parts" path="copy._monograph_parts"
297       name="monograph_parts" [hidden]="true">
298     </eg-grid-column>
299     <eg-grid-column i18n-label label="Notes" path="copy.notes.length"
300       name="note_count" [hidden]="true">
301     </eg-grid-column>
302     <eg-grid-column i18n-label label="Tags" path="copy.tags.length"
303       name="tag_count" [hidden]="true">
304     </eg-grid-column>
305     <eg-grid-column i18n-label label="Alerts" path="copy.copy_alerts.length"
306       name="alert_count" [hidden]="true">
307     </eg-grid-column>
308     <eg-grid-column i18n-label label="Circulate As MARC Type"
309       path="copy.circ_as_type" [hidden]="true">
310     </eg-grid-column>
311     <eg-grid-column i18n-label label="Active/Create Date" 
312       path="copy.active_date" datatype="timestamp">
313     </eg-grid-column>
314     <eg-grid-column i18n-label label="Total Circ Count"
315       path="copy.total_circ_count.circ_count">
316     </eg-grid-column>
317     <eg-grid-column i18n-label label="Last Circ Date"
318       path="copy.last_circ.last_circ" datatype="timestamp">
319     </eg-grid-column>
320     <eg-grid-column i18n-label label="Age Hold Protection" 
321       path="copy.age_protect.name" name="age_protect.name"></eg-grid-column>
322     <eg-grid-column i18n-label label="Item Price" 
323       path="copy.price" name="price" [hidden]="true"></eg-grid-column>
324
325     <eg-grid-column i18n-label label="Circulate" path="copy.circulate" 
326       name="circulate" datatype="bool" [hidden]="true"></eg-grid-column>
327     <eg-grid-column i18n-label label="Deposit" path="copy.deposit" 
328       name="deposit" datatype="bool" [hidden]="true"></eg-grid-column>
329     <eg-grid-column i18n-label label="Deposit Amount" path="copy.deposit_amount" 
330       name="deposit_amount" datatype="money" [hidden]="true"></eg-grid-column>
331     <eg-grid-column i18n-label label="Holdable?" name="holdable" 
332       [cellTemplate]="holdableTemplate" [cellContext]="gridTemplateContext">
333     </eg-grid-column>
334     <eg-grid-column i18n-label label="Reference?" path="copy.ref" 
335       name="ref" datatype="bool" [hidden]="true"></eg-grid-column>
336     <eg-grid-column i18n-label label="Last Inventory Date" 
337       path="copy.latest_inventory.inventory_date" 
338       name="latest_inventory.inventory_date" datatype="timestamp" [hidden]="true">
339     </eg-grid-column>
340     <eg-grid-column i18n-label label="Last Inventory Workstation" 
341       path="copy.latest_inventory.inventory_workstation.name" 
342       name="latest_inventory.inventory_workstation.name" [hidden]="true">
343     </eg-grid-column>
344     <eg-grid-column i18n-label label="OPAC Visible?" path="copy.opac_visible" 
345       name="opac_visible" datatype="bool" [hidden]="true">
346     </eg-grid-column>
347   </eg-grid>
348 </div>
349