LP1864371 ngbTabset to ngbNav for marc editor
[Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / share / marc-edit / editor.component.html
1
2 <eg-confirm-dialog #confirmDelete
3   i18n-dialogTitle dialogTitle="Confirm Delete"
4   i18n-dialogBody dialogBody="Delete Record ID {{record ? record.id : ''}}?">
5 </eg-confirm-dialog>
6
7 <eg-confirm-dialog #confirmUndelete
8   i18n-dialogTitle dialogTitle="Confirm Undelete"
9   i18n-dialogBody dialogBody="Undelete Record ID {{record ? record.id : ''}}?">
10 </eg-confirm-dialog>
11
12 <eg-alert-dialog #cannotDelete
13   i18n-dialogBody 
14   dialogBody="Records with holdings attached cannot be deleted.">
15 </eg-alert-dialog>
16
17 <eg-string #successMsg i18n-text text="Record successfully updated"></eg-string>
18 <eg-string #failMsg i18n-text text="Record failed to update"></eg-string>
19
20 <div class="row d-flex p-2 m-2">
21
22   <ng-container *ngIf="recordType === 'biblio'">
23     <div class="form-check">
24       <input class="form-check-input" type="checkbox"
25         [(ngModel)]="showFastAdd" id="fast-add-item"/>
26       <label class="form-check-label" for="fast-add-item">
27         Add Item
28       </label>
29     </div>
30   </ng-container>
31
32   <ng-container *ngIf="showFastAdd">
33     <div class="form-inline">
34       <input type="text" class="form-control ml-2" 
35         [(ngModel)]="fastItemLabel" placeholder="Call Number" i18n-placeholder/>
36       <input type="text" class="form-control ml-2" 
37         [(ngModel)]="fastItemBarcode" placeholder="Barcode" i18n-placeholder/>
38     </div>
39   </ng-container>
40
41   <div class="flex-1"></div>
42
43   <h3 class="mr-2">
44     <span class="badge badge-light p-2" i18n>
45       Record Type {{record ? record.recordType() : ''}}
46     </span>
47   </h3>
48     
49   <ng-container *ngIf="recordType === 'biblio'">
50     <div class="mr-2">
51       <eg-combobox #sourceSelector
52         [entries]="sources"
53         placeholder="Select a Source..."
54         i18n-placeholder>
55       </eg-combobox>
56     </div>
57   </ng-container>
58
59   <div class="pr-3 mr-3 border-right">
60     <button class="btn btn-success" (click)="saveRecord()"
61       [disabled]="record && record.deleted" i18n>Save Changes</button>
62   </div>
63
64   <ng-container *ngIf="record && record.id">
65     <button *ngIf="!record.deleted" class="btn btn-warning" 
66       [disabled]="inPlaceMode" (click)="deleteRecord()" i18n>Delete Record</button>
67     <button *ngIf="record.deleted" class="btn btn-info" 
68       [disabled]="inPlaceMode" (click)="undeleteRecord()" i18n>Undelete Record</button>
69   </ng-container>
70 </div>
71
72 <ng-container *ngIf="dataSaving">
73   <div class="row mt-5">
74     <div class="offset-lg-3 col-lg-6">
75       <eg-progress-inline></eg-progress-inline>
76     </div>
77   </div>
78 </ng-container>
79
80 <div *ngIf="!dataSaving" class="row">
81   <div class="col-lg-12">
82     <ul ngbNav #editorNav="ngbNav" class="nav-tabs"
83       [activeId]="editorTab" (navChange)="tabChange($event)">
84       <li [ngbNavItem]="'rich'">
85         <a ngbNavLink i18n>Enhanced MARC Editor</a>
86         <ng-template ngbNavContent>
87           <ng-container *ngIf="context && context.record">
88             <eg-marc-rich-editor [context]="context"></eg-marc-rich-editor>
89           </ng-container>
90         </ng-template>
91       </li>
92       <li ngbNavItem="flat">
93         <a ngbNavLink i18n>Flat Text Editor</a>
94         <ng-template ngbNavContent>
95           <ng-container *ngIf="context && context.record">
96             <eg-marc-flat-editor [context]="context"></eg-marc-flat-editor>
97           </ng-container>
98         </ng-template>
99       </li>
100     </ul>
101     <div [ngbNavOutlet]="editorNav"></div>
102   </div>
103 </div>
104
105 <div class="row d-flex p-2 m-2 flex-row-reverse">
106   <button class="btn btn-success" (click)="saveRecord()"
107     [disabled]="record && record.deleted" i18n>Save Changes</button>
108 </div>
109
110