]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/share/marc-edit/authority-linking-dialog.component.html
c0e9558433e9ee52024e8b86926b05472328b9a8
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / share / marc-edit / authority-linking-dialog.component.html
1
2 <!-- display a single heading as MARC -->
3 <ng-template #fieldAsMarc let-field="field">
4   <span>{{field.tag}} {{field.ind1}} {{field.ind2}}</span>
5   <span *ngFor="let sf of field.subfields">
6     <span class="text-danger" i18n>‡</span>{{sf[0]}} {{sf[1]}}
7   </span>
8 </ng-template>
9
10 <!-- display a single heading as MARC or as the human friendlier string -->
11 <ng-template #headingField let-field="field" let-from="from" let-also="also">
12   <button class="btn btn-sm btn-outline-info p-1 mr-1" 
13     (click)="applyHeading(field)" i18n>Apply</button>
14   <ng-container *ngIf="showAs == 'heading'">
15     <span *ngIf="from" i18n>See From: {{field.heading}}</span>
16     <span *ngIf="also" i18n>See Also: {{field.heading}}</span>
17     <span *ngIf="!from && !also" i18n>{{field.heading}}</span>
18   </ng-container>
19   <ng-container *ngIf="showAs == 'marc'">
20     <ng-container
21       *ngTemplateOutlet="fieldAsMarc;context:{field:field}">
22     </ng-container>
23   </ng-container>
24 </ng-template>
25
26 <ng-template #dialogContent>
27   <div class="modal-header bg-info">
28     <h4 class="modal-title" i18n>Manage Authority Links</h4>
29     <button type="button" class="close"
30       i18n-aria-label aria-label="Close" (click)="close()">
31       <span aria-hidden="true">&times;</span>
32     </button>
33   </div>
34   <div class="modal-body">
35     <div class="row border-bottom border-secondary p-2 d-flex">
36       <div class="flex-1 font-weight-bold p-1 pl-2 pt-2 ml-2">
37         <div>{{bibField.tag}} {{bibField.ind1}} {{bibField.ind2}}</div>
38
39         <div *ngFor="let sf of bibField.subfields">
40           <div class="form-check form-check-inline">
41             <input class="form-check-input" id="search-subfield-{{sf[0]}}" 
42               type="checkbox" [disabled]="!isControlledBibSf(sf[0])"
43               [(ngModel)]="selectedSubfields[sf[0]]" 
44               (change)="getPage(pager.offset)"/>
45
46             <span class="text-danger" i18n>‡</span>
47
48             <label class="form-check-label" for="search-subfield-{{sf[0]}}" i18n>
49               {{sf[0]}} {{sf[1]}}
50             </label>
51           </div>
52         </div>
53       </div>
54       <div class="ml-2 p-1">
55         <div class="mb-1" i18n>Create new authority from this field</div>
56         <div>
57           <button class="btn btn-outline-info" [disabled]="true">
58             Immediately
59           </button>
60           <button class="btn btn-outline-info ml-2" [disabled]="true">
61             Create and Edit
62           </button>
63         </div>
64       </div>
65     </div>
66     <div class="row border-bottom border-secondary p-2 d-flex">
67       <div class="flex-1">
68         <button class="btn btn-outline-dark" [disabled]="pager.offset == 0"
69           (click)="getPage(0)" i18n>Start</button>
70         <button class="btn btn-outline-dark ml-2"
71           (click)="getPage(-1)" i18n>Previous</button>
72         <button class="btn btn-outline-dark ml-2"
73           (click)="getPage(1)" i18n>Next</button>
74       </div>
75       <div class="pt-2 mb-2">
76         <div class="form-check form-check-inline">
77           <input class="form-check-input" type="radio" value="heading"
78             [(ngModel)]="showAs" name='show-as-heading' id="show-as-heading">
79           <label class="form-check-label" for="show-as-heading" i18n>Show As Heading</label>
80         </div>
81         <div class="form-check form-check-inline">
82           <input class="form-check-input" type="radio" value="marc"
83             [(ngModel)]="showAs" name='show-as-heading' id="show-as-marc">
84           <label class="form-check-label" for="show-as-marc" i18n>Show As MARC</label>
85         </div>
86       </div>
87     </div>
88     <ul *ngFor="let entry of browseData">
89       <li class="d-flex">
90         <div class="flex-1">
91           <ng-container
92             *ngTemplateOutlet="headingField;context:{field:entry.main_heading}">
93           </ng-container>
94         </div>
95         <div class="font-italic" i18n-title i18n
96           title="Authority Record ID {{entry.authority_id}}">
97           #{{entry.authority_id}}
98         </div>
99       </li>
100       <ul *ngFor="let from of entry.see_froms">
101         <li i18n>
102          <ng-container
103           *ngTemplateOutlet="headingField;context:{field:from, from:true}">
104          </ng-container>
105         </li>
106       </ul>
107       <ul *ngFor="let also of entry.see_alsos">
108         <li i18n>
109          <ng-container
110           *ngTemplateOutlet="headingField;context:{field:also, also:true}">
111          </ng-container>
112         </li>
113       </ul>
114     </ul>
115   </div>
116 </ng-template>