95baa0765e2072830de0bed2bccef1c83dd987f0
[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     <ngb-tabset [activeId]="editorTab" (tabChange)="tabChange($event)">
83       <ngb-tab title="Enhanced MARC Editor" i18n-title id="rich">
84         <ng-template ngbTabContent>
85           <ng-container *ngIf="context && context.record">
86             <eg-marc-rich-editor [context]="context"></eg-marc-rich-editor>
87           </ng-container>
88         </ng-template>
89       </ngb-tab>
90       <ngb-tab title="Flat Text Editor" i18n-title id="flat">
91         <ng-template ngbTabContent>
92           <ng-container *ngIf="context && context.record">
93             <eg-marc-flat-editor [context]="context"></eg-marc-flat-editor>
94           </ng-container>
95         </ng-template>
96       </ngb-tab>
97     </ngb-tabset>
98   </div>
99 </div>
100
101 <div class="row d-flex p-2 m-2 flex-row-reverse">
102   <button class="btn btn-success" (click)="saveRecord()"
103     [disabled]="record && record.deleted" i18n>Save Changes</button>
104 </div>
105
106