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]}}
10 <!-- MARC edit-ception! -->
11 <eg-marc-editor-dialog #marcEditDialog recordType="authority">
12 </eg-marc-editor-dialog>
14 <!-- display a single heading as MARC or as the human friendlier string -->
15 <ng-template #headingField
16 let-field="field" let-from="from" let-also="also" let-authId="authId">
17 <button class="btn btn-sm p-1 mr-1"
18 [ngClass]="{'btn-outline-primary': !(from || also), 'btn-outline-info': (from || also)}"
19 (click)="applyHeading(field, authId)" i18n>Apply</button>
20 <ng-container *ngIf="showAs == 'heading'">
21 <span *ngIf="from" i18n>See From: {{field.heading}}</span>
22 <span *ngIf="also" i18n>See Also: {{field.heading}}</span>
23 <span *ngIf="!from && !also" i18n>{{field.heading}}</span>
25 <ng-container *ngIf="showAs == 'marc'">
27 *ngTemplateOutlet="fieldAsMarc;context:{field:field}">
32 <ng-template #dialogContent>
33 <div class="modal-header bg-info">
34 <h4 class="modal-title" i18n>Manage Authority Links</h4>
35 <button type="button" class="close"
36 i18n-aria-label aria-label="Close" (click)="close()">
37 <span aria-hidden="true">×</span>
40 <div class="modal-body">
41 <div class="row border-bottom border-secondary p-2 d-flex">
42 <div class="flex-1 font-weight-bold p-1 pl-2 pt-2 ml-2">
43 <div>{{bibField.tag}} {{bibField.ind1}} {{bibField.ind2}}</div>
45 <div *ngFor="let sf of bibField.subfields">
46 <div class="form-check form-check-inline">
47 <input class="form-check-input" id="search-subfield-{{sf[0]}}"
48 type="checkbox" [disabled]="!isControlledBibSf(sf[0])"
49 [(ngModel)]="selectedSubfields[sf[0]]"
50 (change)="getPage(pager.offset)"/>
52 <span class="text-danger" i18n>‡</span>
54 <label class="form-check-label" for="search-subfield-{{sf[0]}}" i18n>
60 <div class="ml-2 p-1">
61 <div class="mb-1" i18n>Create new authority from this field</div>
63 <button class="btn btn-outline-info"
64 (click)="createNewAuthority()">Immediately</button>
65 <button class="btn btn-outline-info ml-2"
66 (click)="createNewAuthority(true)">Create and Edit</button>
70 <div class="row border-bottom border-secondary p-2 d-flex">
72 <button class="btn btn-outline-dark" [disabled]="pager.offset == 0"
73 (click)="getPage(0)" i18n>Start</button>
74 <button class="btn btn-outline-dark ml-2"
75 (click)="getPage(-1)" i18n>Previous</button>
76 <button class="btn btn-outline-dark ml-2"
77 (click)="getPage(1)" i18n>Next</button>
79 <div class="pt-2 mb-2">
80 <div class="form-check form-check-inline">
81 <input class="form-check-input" type="radio" value="heading"
82 [(ngModel)]="showAs" name='show-as-heading' id="show-as-heading">
83 <label class="form-check-label" for="show-as-heading" i18n>Show As Heading</label>
85 <div class="form-check form-check-inline">
86 <input class="form-check-input" type="radio" value="marc"
87 [(ngModel)]="showAs" name='show-as-heading' id="show-as-marc">
88 <label class="form-check-label" for="show-as-marc" i18n>Show As MARC</label>
92 <ul *ngFor="let entry of browseData">
93 <li class="d-flex mt-1">
96 *ngTemplateOutlet="headingField;context:{field:entry.main_heading, authId: entry.authority_id}">
99 <div class="font-italic">
101 i18n-title title="Authority Record ID {{entry.authority_id}}"
102 routerLink="/staff/cat/authority/edit/{{entry.authority_id}}">
103 #{{entry.authority_id}}
107 <ul *ngFor="let from of entry.see_froms">
110 *ngTemplateOutlet="headingField;context:{field:from, from:true}">
114 <ul *ngFor="let also of entry.see_alsos">
117 *ngTemplateOutlet="headingField;context:{field:also, also:true}">