1 <eg-confirm-dialog #confirmDelVol
2 i18n-dialogTitle i18n-dialogBody
3 dialogTitle="Delete Call Number?"
4 dialogBody="Delete {{deleteVolCount}} Call Number(s) and All Associated Item(s)?">
7 <eg-confirm-dialog #confirmDelCopy
8 i18n-dialogTitle i18n-dialogBody
9 dialogTitle="Delete Item?"
10 dialogBody="Delete {{deleteCopyCount}} Item(s)?">
13 <div *ngIf="!volcopy.defaults.visible.batch_actions"
14 class="bg-faint mb-2 p-1 border border-dark rounded">
15 <button class="btn btn-sm btn-outline-dark label-with-material-icon"
16 (click)="toggleBatchVisibility()">
17 <span i18n>Batch Actions</span>
18 <span class="material-icons">unfold_more</span>
22 <div *ngIf="volcopy.defaults.visible.batch_actions"
23 class="row d-flex bg-faint mb-2 pb-1 pt-1 border border-dark rounded">
24 <div class="p-1" [ngStyle]="{flex: flexAt(1)}">
25 <div><label class="font-weight-bold" i18n> </label></div>
26 <button class="btn btn-sm btn-outline-dark label-with-material-icon"
27 (click)="toggleBatchVisibility()">
28 <span i18n>Batch Actions</span>
29 <span class="material-icons">unfold_less</span>
32 <div class="p-1" [ngStyle]="{flex: flexAt(3)}">
33 <ng-container *ngIf="displayColumn('classification')">
34 <div><label class="font-weight-bold" i18n>Classification</label></div>
36 <eg-combobox [smallFormControl]="true" [(ngModel)]="batchVolClass">
37 <eg-combobox-entry *ngFor="let cls of volcopy.commonData.acn_class"
38 [entryId]="cls.id()" [entryLabel]="cls.name()">
44 <div class="p-1" [ngStyle]="{flex: flexAt(4)}">
45 <ng-container *ngIf="displayColumn('prefix')">
46 <div><label class="font-weight-bold" i18n>Prefix</label></div>
48 <eg-combobox [smallFormControl]="true" [(ngModel)]="batchVolPrefix">
49 <eg-combobox-entry *ngFor="let pfx of volcopy.commonData.acn_prefix"
50 [entryId]="pfx.id()" [entryLabel]="pfx.label()">
56 <div class="p-1" [ngStyle]="{flex: flexAt(5)}">
58 <label class="font-weight-bold" i18n>
63 <eg-combobox [smallFormControl]="true"
64 [allowFreeText]="true" [(ngModel)]="batchVolLabel">
65 <eg-combobox-entry *ngFor="let label of recordVolLabels"
66 [entryId]="label" [entryLabel]="label">
71 <div class="p-1" [ngStyle]="{flex: flexAt(6)}">
72 <ng-container *ngIf="displayColumn('suffix')">
73 <div><label class="font-weight-bold" i18n>Suffix</label></div>
75 <eg-combobox [smallFormControl]="true" [(ngModel)]="batchVolSuffix">
76 <eg-combobox-entry *ngFor="let sfx of volcopy.commonData.acn_suffix"
77 [entryId]="sfx.id()" [entryLabel]="sfx.label()">
83 <div class="p-1" [ngStyle]="{flex: flexAt(7)}">
84 <div><label class="font-weight-bold" i18n>Batch</label></div>
86 <button class="btn btn-sm btn-outline-dark label-with-material-icon"
87 (click)="batchVolApply()">
88 <span i18n>Apply</span>
89 <span class="material-icons">arrow_downward</span>
93 <!-- needed for consistent column widths -->
94 <div class="p-1" [ngStyle]="{flex: flexAt(8)}"></div>
95 <div class="p-1" [ngStyle]="{flex: flexAt(9)}"></div>
96 <div class="p-1" [ngStyle]="{flex: flexAt(10)}"></div>
97 <div class="p-1" [ngStyle]="{flex: flexAt(11)}"></div>
100 <div class="row d-flex mt-2 mb-2">
101 <div class="p-1" [ngStyle]="{flex: flexAt(1)}">
102 <span class="font-weight-bold" i18n>Owning Library
103 <ng-container *ngIf="expand !== 1">
104 <button title="Expand Column" i18n-title
105 class="material-icon-button" (click)="expand = 1">
109 <ng-container *ngIf="expand === 1">
110 <button title="Shrink Column" i18n-title
111 class="material-icon-button" (click)="expand = null">
117 <div class="p-1" [ngStyle]="{flex: flexAt(3)}">
118 <ng-container *ngIf="displayColumn('classification')">
119 <span class="font-weight-bold" i18n>Classification
120 <ng-container *ngIf="expand !== 3">
121 <button title="Expand Column" i18n-title
122 class="material-icon-button" (click)="expand = 3">
126 <ng-container *ngIf="expand === 3">
127 <button title="Shrink Column" i18n-title
128 class="material-icon-button" (click)="expand = null">
135 <div class="p-1" [ngStyle]="{flex: flexAt(4)}">
136 <ng-container *ngIf="displayColumn('prefix')">
137 <span class="font-weight-bold" i18n>Prefix
138 <ng-container *ngIf="expand !== 4">
139 <button title="Expand Column" i18n-title
140 class="material-icon-button" (click)="expand = 4">
144 <ng-container *ngIf="expand === 4">
145 <button title="Shrink Column" i18n-title
146 class="material-icon-button" (click)="expand = null">
153 <div class="p-1" [ngStyle]="{flex: flexAt(5)}">
154 <span class="font-weight-bold" i18n>Call Number Label
155 <ng-container *ngIf="expand !== 5">
156 <button title="Expand Column" i18n-title
157 class="material-icon-button" (click)="expand = 5">
161 <ng-container *ngIf="expand === 5">
162 <button title="Shrink Column" i18n-title
163 class="material-icon-button" (click)="expand = null">
169 <div class="p-1" [ngStyle]="{flex: flexAt(6)}">
170 <ng-container *ngIf="displayColumn('suffix')">
171 <span class="font-weight-bold" i18n>Suffix
172 <ng-container *ngIf="expand !== 6">
173 <button title="Expand Column" i18n-title
174 class="material-icon-button" (click)="expand = 6">
178 <ng-container *ngIf="expand === 6">
179 <button title="Shrink Column" i18n-title
180 class="material-icon-button" (click)="expand = null">
187 <div class="p-1" [ngStyle]="{flex: flexAt(7)}">
188 <label class="font-weight-bold" i18n></label>
191 When hiding the copy_number column, absorb its colum width to
192 take advantage of the space and to ensure the main columns still
193 line up with the batch updater row sitting above
195 <div class="p-1" [ngStyle]="{flex: flexAt(8)}">
196 <span class="font-weight-bold" i18n>Barcode
197 <ng-container *ngIf="expand !== 8">
198 <button title="Expand Column" i18n-title
199 class="material-icon-button" (click)="expand = 8">
203 <ng-container *ngIf="expand === 8">
204 <button title="Shrink Column" i18n-title
205 class="material-icon-button" (click)="expand = null">
211 <div class="p-1" [ngStyle]="{flex: flexAt(9)}">
212 <ng-container *ngIf="displayColumn('copy_number_vc')">
213 <label class="font-weight-bold" i18n>Item #</label>
216 <div class="p-1" [ngStyle]="{flex: flexAt(10)}">
217 <ng-container *ngIf="displayColumn('copy_part')">
218 <span class="font-weight-bold" i18n>Part
219 <ng-container *ngIf="expand !== 10">
220 <button title="Expand Column" i18n-title
221 class="material-icon-button" (click)="expand = 10">
225 <ng-container *ngIf="expand === 10">
226 <button title="Shrink Column" i18n-title
227 class="material-icon-button" (click)="expand = null">
234 <div class="p-1" [ngStyle]="{flex: flexAt(11)}"></div>
237 <ng-container *ngFor="let orgNode of context.orgNodes(); let orgIdx = index">
238 <ng-container *ngFor="let volNode of orgNode.children; let volIdx = index">
239 <ng-container *ngFor="let copyNode of volNode.children; let copyIdx = index">
240 <div class="row d-flex mt-1" [ngClass]="{'vol-row': copyIdx === 0}">
241 <div class="p-1" [ngStyle]="{flex: flexAt(1)}">
243 <div class="flex-1 pl-1">
244 <ng-container *ngIf="copyIdx === 0 && volIdx === 0">
245 <span>{{orgNode.target.shortname()}}</span>
248 <ng-container *ngIf="copyIdx === 0 && volIdx === 0 && (
249 context.sessionType === 'record' || context.sessionType === 'mixed')">
251 <ng-template #addOrgTmpl>
252 <eg-org-select [limitPerms]="['CREATE_VOLUME']"
253 placeholder="Select Location..." i18n-placeholder
254 [hideOrgs]="volcopy.hideVolOrgs"
255 (onChange)="addVol($event); addOrgPopover.close()">
259 <button class="btn btn-sm material-icon-button p-1"
260 placement="bottom" [ngbPopover]="addOrgTmpl"
261 autoClose="outside" #addOrgPopover="ngbPopover"
262 i18n-popoverTitle="Add Call Number For Location"
263 i18n-title title="Add Call Number For Location">
264 <span class="material-icons">add_circle_outline</span>
268 <ng-container *ngIf="copyIdx === 0">
270 <ng-template #editOrgTmpl>
271 <eg-org-select [limitPerms]="['CREATE_VOLUME']"
272 placeholder="Select Location..." i18n-placeholder
273 [hideOrgs]="volcopy.hideVolOrgs"
274 (onChange)="editVolOwner(volNode, $event); editOrgPopover.close()">
278 <button class="btn btn-sm material-icon-button p-1"
279 placement="bottom" [ngbPopover]="editOrgTmpl"
280 autoClose="outside" #editOrgPopover="ngbPopover"
281 i18n-popoverTitle="Edit Call Number Owning Location"
282 i18n-title title="Edit Call Number Owning Location">
283 <span class="material-icons">edit</span>
289 <div class="p-1" [ngStyle]="{flex: flexAt(3)}">
290 <ng-container *ngIf="displayColumn('classification')">
291 <ng-container *ngIf="copyIdx === 0">
293 [selectedId]="volNode.target.label_class()"
294 [smallFormControl]="true"
296 (onChange)="applyVolValue(volNode.target, 'label_class', $event ? $event.id : null)">
297 <eg-combobox-entry *ngFor="let cls of volcopy.commonData.acn_class"
298 [entryId]="cls.id()" [entryLabel]="cls.name()">
304 <div class="p-1" [ngStyle]="{flex: flexAt(4)}">
305 <ng-container *ngIf="displayColumn('prefix')">
306 <ng-container *ngIf="copyIdx === 0">
308 [selectedId]="volNode.target.prefix()"
310 [smallFormControl]="true"
311 (onChange)="applyVolValue(volNode.target, 'prefix', $event ? $event.id : null)">
313 [entryId]="-1" entryLabel="<None>" i18n-entryLabel>
315 <eg-combobox-entry *ngFor="let pfx of volcopy.commonData.acn_prefix"
316 [entryId]="pfx.id()" [entryLabel]="pfx.label()">
322 <div class="p-1" [ngStyle]="{flex: flexAt(5)}">
323 <ng-container *ngIf="copyIdx === 0">
324 <input class="form-control form-control-sm" type="text"
327 [ngClass]="{invalid: !volNode.target.label()}"
328 [ngModel]="volNode.target.label()"
329 (change)="applyVolValue(volNode.target, 'label', $event.target.value)">
332 <div class="p-1" [ngStyle]="{flex: flexAt(6)}">
333 <ng-container *ngIf="displayColumn('suffix')">
334 <ng-container *ngIf="copyIdx === 0">
336 [selectedId]="volNode.target.suffix()"
338 [smallFormControl]="true"
339 (onChange)="applyVolValue(volNode.target, 'suffix', $event ? $event.id : null)">
341 [entryId]="-1" entryLabel="<None>" i18n-entryLabel>
343 <eg-combobox-entry *ngFor="let sfx of volcopy.commonData.acn_suffix"
344 [entryId]="sfx.id()" [entryLabel]="sfx.label()">
350 <div class="p-1" [ngStyle]="{flex: flexAt(7)}">
351 <ng-container *ngIf="copyIdx === 0">
353 *ngIf="context.sessionType === 'record' || context.sessionType === 'mixed'">
354 <button class="btn btn-sm material-icon-button p-1"
355 (click)="createVols(orgNode, 1)"
356 i18n-title title="Add Call Number">
357 <span class="material-icons">add_circle_outline</span>
360 <ng-template #addVolCountTmpl>
361 <div i18n>Add How Many Call Numbers</div>
362 <div class="form-inline mt-1">
363 <input type="number" class="form-control form-control-sm"
365 (keyup.enter)="createVolsFromPopover(orgNode, addVolsPopover)"
366 [(ngModel)]="addVolCount" [required]="true" min="1"/>
367 <button class="btn btn-sm btn-success ml-1"
368 (click)="createVolsFromPopover(orgNode, addVolsPopover)"
373 <button class="btn btn-sm material-icon-button p-1"
374 [disabled]="context.sessionType === 'copy' || context.sessionType === 'vol'"
375 (shown)="focusElement('add-vol-popover')"
376 placement="bottom" [ngbPopover]="addVolCountTmpl"
377 autoClose="outside" #addVolsPopover="ngbPopover"
378 i18n-popoverTitle="Add Call Numbers"
379 i18n-title title="Add Call Numbers">
380 <span class="material-icons">playlist_add</span>
383 <button class="btn btn-sm material-icon-button p-1"
384 (click)="deleteVol(volNode)"
385 i18n-title title="Remove Call Number">
386 <span class="material-icons">remove_circle_outline</span>
392 <div class="p-1" [ngStyle]="{flex: flexAt(8)}">
395 Barcode value is not required for new copies, since those
396 without a barcode will be ignored.
398 <input type="text" class="form-control form-control-sm"
399 title="{{copyStatLabel(copyNode.target)}}"
400 id="barcode-input-{{copyNode.target.id()}}"
401 spellcheck="false" [required]="true"
402 placeholder="New Barcode..." i18n-placeholder
403 [disabled]="volcopy.copyStatIsMagic(copyNode.target.status())"
405 'text-danger': copyNode.target._dupe_barcode,
406 'invalid': !copyNode.target.barcode() && !copyNode.target.isnew()
408 (change)="barcodeChanged(copyNode.target, $event.target.value)"
409 (ngModelChange)="copyNode.target.barcode($event)"
410 (keyup.enter)="selectNextBarcode(copyNode.target.id())"
411 (keyup.shift.enter)="selectNextBarcode(copyNode.target.id(), true)"
412 (focus)="$event.target.select()"
413 [ngModel]="copyNode.target.barcode()"
414 (ngModelChange)="applyCopyValue(copyNode.target, 'barcode', $event)"/>
416 <div *ngIf="copyNode.target._dupe_barcode"
417 class="alert alert-danger font-italic p-1" i18n>
421 <div class="p-1" [ngStyle]="{flex: flexAt(9)}">
422 <ng-container *ngIf="displayColumn('copy_number_vc')">
423 <input type="number" min="1" class="form-control form-control-sm"
424 [ngModel]="copyNode.target.copy_number()"
425 (ngModelChange)="applyCopyValue(copyNode.target, 'copy_number', $event)"/>
428 <div class="p-1" [ngStyle]="{flex: flexAt(10)}">
429 <ng-container *ngIf="displayColumn('copy_part')">
431 [selectedId]="copyNode.target.parts()[0] ? copyNode.target.parts()[0].id() : null"
432 [smallFormControl]="true" [allowFreeText]="true"
433 (onChange)="copyPartChanged(copyNode, $event)">
435 *ngFor="let part of volcopy.bibParts[volNode.target.record()]"
436 [entryId]="part.id()" [entryLabel]="part.label()">
441 <div class="p-1" [ngStyle]="{flex: flexAt(11)}">
442 <ng-container *ngIf="context.sessionType !== 'copy'">
444 <button class="btn btn-sm material-icon-button p-1"
445 (click)="createCopies(volNode, 1)" i18n-title title="Add Item">
446 <span class="material-icons">add_circle_outline</span>
449 <ng-template #addCopyCountTmpl>
450 <div i18n>Add How Many Items</div>
451 <div class="form-inline mt-1">
452 <input type="number" class="form-control form-control-sm"
453 id="add-copy-popover"
454 (keyup.enter)="createCopiesFromPopover(volNode, addCopiesPopover)"
455 [(ngModel)]="addCopyCount" [required]="true" min="1"/>
456 <button class="btn btn-sm btn-success ml-1"
457 (click)="createCopiesFromPopover(volNode, addCopiesPopover)"
462 <button class="btn btn-sm material-icon-button p-1"
463 placement="left" [ngbPopover]="addCopyCountTmpl"
464 autoClose="outside" #addCopiesPopover="ngbPopover"
465 i18n-popoverTitle="Add Items" i18n-title title="Add Items"
466 (shown)="focusElement('add-copy-popover')">
467 <span class="material-icons">playlist_add</span>
470 <button class="btn btn-sm material-icon-button p-1"
471 (click)="deleteCopy(copyNode)" i18n-title title="Remove Item">
472 <span class="material-icons">remove_circle_outline</span>