b3fc10a83806a4a6f8ab1152a305980f5a76064d
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / catalog / record / copies.component.html
1 <ng-template #cnTemplate let-copy="row">
2   {{copy.call_number_prefix_label}}
3   {{copy.call_number_label}}
4   {{copy.call_number_suffix_label}}
5 </ng-template>
6
7 <ng-template #barcodeTemplate let-copy="row">
8   <div>{{copy.barcode}}</div>
9   <div>
10   <a class="pl-1" target="_blank" 
11     href="/eg/staff/cat/item/{{copy.id}}" i18n>View</a>
12   | 
13   <a class="pl-1" href="javascript:;"
14     (click)="openHoldingsEditor(copy.id)" i18n>Edit</a>
15   </div>
16 </ng-template>
17
18 <ng-template #holdableTemplate let-copy="row" let-context="userContext">
19   <span *ngIf="context.holdable(copy)">
20     <div class="border-bottom">
21       <a routerLink="/staff/catalog/hold/C"
22         [queryParams]="{target: copy.id}"
23         queryParamsHandling="merge" i18n>
24         Item Hold
25       </a>
26     </div>
27     <div>
28       <a routerLink="/staff/catalog/hold/V"
29         [queryParams]="{target: copy.call_number}"
30         queryParamsHandling="merge" i18n>
31         Call Number Hold
32       </a>
33     </div>
34   </span>
35   <span *ngIf="!context.holdable(copy)" i18n>No</span>
36 </ng-template>
37
38 <ng-template #courseTemplate let-copy="row">
39   <div *ngFor="let course of copy._courses">
40     <a routerLink="/staff/admin/local/asset/course_list/{{course.id()}}">
41       {{course.course_number()}}
42     </a>
43   </div>
44 </ng-template>
45
46 <div class='eg-copies w-100 mt-3'>
47   <eg-grid #copyGrid [dataSource]="gridDataSource" 
48     [disableSelect]="true" [cellTextGenerator]="cellTextGenerator"
49     [sortable]="false" persistKey="catalog.record.copies">
50     <eg-grid-column i18n-label label="Item ID" path="id" 
51       [hidden]="true" [index]="true">
52     </eg-grid-column>
53     <eg-grid-column i18n-label label="Location" path="circ_lib" datatype="org_unit">
54     </eg-grid-column>
55     <eg-grid-column i18n-label label="Call Number / Item Notes" name="callnumber" 
56       [cellTemplate]="cnTemplate">
57     </eg-grid-column>
58     <eg-grid-column i18n-label label="Barcode" name="barcode"
59       [cellTemplate]="barcodeTemplate">
60     </eg-grid-column>
61     <eg-grid-column i18n-label label="Shelving Location" path="copy_location">
62     </eg-grid-column>
63     <eg-grid-column i18n-label label="Circulation Modifier" path="circ_modifier">
64     </eg-grid-column>
65     <eg-grid-column i18n-label label="Age Hold Protection" path="age_protect">
66     </eg-grid-column>
67     <eg-grid-column i18n-label label="Active/Create Date" 
68       path="active_date" datatype="timestamp">
69     </eg-grid-column>
70     <eg-grid-column i18n-label label="Holdable?" name="holdable" 
71       [cellTemplate]="holdableTemplate" [cellContext]="copyContext">
72     </eg-grid-column>
73     <eg-grid-column i18n-label label="Course" name="course"
74       [cellTemplate]="courseTemplate" *ngIf="usingCourseModule">
75     </eg-grid-column>
76     <eg-grid-column i18n-label label="Status" path="copy_status">
77     </eg-grid-column>
78     <eg-grid-column i18n-label label="Due Date" path="due_date" datatype="timestamp">
79     </eg-grid-column>
80   </eg-grid>
81 </div>
82