]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.html
LP1821382 Angular staff catalog Holdings Maintenance
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / catalog / record / holdings.component.html
1
2 <ng-template #locationTemplate let-row="row" let-userContext="userContext">
3   <!-- pl-* is doubled for added impact -->
4   <div class="pl-{{row.locationDepth}}">
5     <span class="pl-{{row.locationDepth}}">
6       <a class="label-with-material-icon" (click)="userContext.toggleExpandRow(row)">
7         <!--  leave the icons in place for all node types, but make them
8               invisible when they are not needed. -->
9         <span *ngIf="row.treeNode.expanded"
10           [ngClass]="{invisible: row.copy || row.treeNode.children.length == 0}"
11           class="material-icons p-0 m-0">arrow_drop_down</span>
12         <span *ngIf="!row.treeNode.expanded"
13           [ngClass]="{invisible: row.copy || row.treeNode.children.length == 0}"
14           class="material-icons p-0 m-0">arrow_right</span>
15         <span>{{row.locationLabel}}</span>
16       </a>
17     </span>
18   </div>
19 </ng-template>
20
21 <ng-template #holdableTemplate let-row="row" let-userContext="userContext">
22   <ng-container *ngIf="row.copy">
23     <ng-container *ngIf="userContext.copyIsHoldable(row.copy); else notHoldable">
24       <span i18n>Yes</span>
25     </ng-container>
26     <ng-template #notHoldable><span i18n>No</span></ng-template>
27   </ng-container>
28 </ng-template>
29
30
31 <div class='eg-copies w-100 mt-3'>
32   <eg-grid #holdingsGrid [dataSource]="gridDataSource"
33     (onRowActivate)="onRowActivate($event)"
34     [pageSize]="50" [rowClassCallback]="rowClassCallback"
35     [sortable]="false" persistKey="cat.holdings">
36
37     <!-- checkboxes -->
38
39     <eg-grid-toolbar-checkbox i18n-label label="Show Volumes" 
40       #volsCheckbox (onChange)="toggleShowVolumes($event)">
41     </eg-grid-toolbar-checkbox> 
42     <eg-grid-toolbar-checkbox i18n-label label="Show Copies" 
43       #copiesCheckbox (onChange)="toggleShowCopies($event)">
44     </eg-grid-toolbar-checkbox> 
45     <eg-grid-toolbar-checkbox i18n-label label="Show Empty Volumes"            
46       #emptyVolsCheckbox (onChange)="toggleShowEmptyVolumes($event)">
47     </eg-grid-toolbar-checkbox> 
48     <eg-grid-toolbar-checkbox i18n-label label="Show Empty Libs"            
49       #emptyLibsCheckbox (onChange)="toggleShowEmptyLibs($event)">
50     </eg-grid-toolbar-checkbox> 
51
52     <!-- fields -->
53     <eg-grid-column path="index" [hidden]="true" [index]="true">
54     </eg-grid-column>
55     <eg-grid-column path="copy.id" [hidden]="true" label="Copy ID" i18n-label>
56     </eg-grid-column>
57     <eg-grid-column path="volume.id" [hidden]="true" label="Volume ID" i18n-label>
58     </eg-grid-column>
59     <eg-grid-column name="location_barcode" [flex]="4"
60       [cellTemplate]="locationTemplate" [cellContext]="gridTemplateContext" 
61       label="Location/Barcode" [disableTooltip]="true" i18n-label>
62     </eg-grid-column>
63     <eg-grid-column path="volumeCount" datatype="number" label="Volumes" i18n-label>
64     </eg-grid-column>
65     <eg-grid-column path="copyCount" datatype="number" label="Copies" i18n-label>
66     </eg-grid-column>
67     <eg-grid-column path="callNumberLabel" label="Call Number" i18n-label>
68     </eg-grid-column>
69     <eg-grid-column i18n-label label="Circ Library" path="copy.circ_lib" 
70       datatype="org_unit"></eg-grid-column>
71     <eg-grid-column i18n-label label="Owning Library" path="volume.owning_lib" 
72       datatype="org_unit"></eg-grid-column>
73     <eg-grid-column i18n-label label="Due Date" path="circ.due_date" 
74       datatype="timestamp"></eg-grid-column>
75     <eg-grid-column i18n-label label="Shelving Location" path="copy.location.name">
76     </eg-grid-column>
77     <eg-grid-column i18n-label label="Circulation Modifier" path="copy.circ_modifier">
78     </eg-grid-column>
79
80     <eg-grid-column i18n-label label="Status" path="copy.status.name">
81     </eg-grid-column>
82     <eg-grid-column i18n-label label="Active/Create Date" 
83       path="copy.active_date" datatype="timestamp">
84     </eg-grid-column>
85     <eg-grid-column i18n-label label="Age Hold Protection" 
86       path="copy.age_protect.name"></eg-grid-column>
87
88     <eg-grid-column i18n-label label="Holdable?" name="holdable" 
89       [cellTemplate]="holdableTemplate" [cellContext]="gridTemplateContext">
90     </eg-grid-column>
91
92   </eg-grid>
93 </div>
94