]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.html
LP1852782 Fast add item option
[working/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   <div class="form-check">
23     <input class="form-check-input" type="checkbox"
24       [(ngModel)]="showFastAdd" id="fast-add-item"/>
25     <label class="form-check-label" for="fast-add-item">
26       Add Item
27     </label>
28   </div>
29
30   <ng-container *ngIf="showFastAdd">
31     <div class="form-inline">
32       <input type="text" class="form-control ml-2" 
33         [(ngModel)]="fastItemLabel" placeholder="Call Number" i18n-placeholder/>
34       <input type="text" class="form-control ml-2" 
35         [(ngModel)]="fastItemBarcode" placeholder="Barcode" i18n-placeholder/>
36     </div>
37   </ng-container>
38
39   <div class="flex-1"></div>
40
41   <h3 class="mr-2">
42     <span class="badge badge-light p-2" i18n>
43       Record Type {{record ? record.recordType() : ''}}
44     </span>
45   </h3>
46     
47   <ng-container *ngIf="recordType === 'biblio'">
48     <div class="mr-2">
49       <eg-combobox #sourceSelector
50         [entries]="sources"
51         placeholder="Select a Source..."
52         i18n-placeholder>
53       </eg-combobox>
54     </div>
55   </ng-container>
56
57   <ng-container *ngIf="record && record.id">
58     <button *ngIf="!record.deleted" class="btn btn-warning" 
59       [disabled]="inPlaceMode" (click)="deleteRecord()" i18n>Delete Record</button>
60     <button *ngIf="record.deleted" class="btn btn-info" 
61       [disabled]="inPlaceMode" (click)="undeleteRecord()" i18n>Undelete Record</button>
62   </ng-container>
63
64   <button class="btn btn-success ml-2" (click)="saveRecord()" 
65     [disabled]="record && record.deleted" i18n>Save Changes</button>
66 </div>
67
68
69 <ng-container *ngIf="dataSaving">
70   <div class="row mt-5">
71     <div class="offset-lg-3 col-lg-6">
72       <eg-progress-inline></eg-progress-inline>
73     </div>
74   </div>
75 </ng-container>
76
77 <div *ngIf="!dataSaving" class="row">
78   <div class="col-lg-12">
79     <ngb-tabset [activeId]="editorTab" (tabChange)="tabChange($event)">
80       <ngb-tab title="Enhanced MARC Editor" i18n-title id="rich">
81         <ng-template ngbTabContent>
82           <ng-container *ngIf="context && context.record">
83             <eg-marc-rich-editor [context]="context"></eg-marc-rich-editor>
84           </ng-container>
85         </ng-template>
86       </ngb-tab>
87       <ngb-tab title="Flat Text Editor" i18n-title id="flat">
88         <ng-template ngbTabContent>
89           <ng-container *ngIf="context && context.record">
90             <eg-marc-flat-editor [context]="context"></eg-marc-flat-editor>
91           </ng-container>
92         </ng-template>
93       </ngb-tab>
94     </ngb-tabset>
95   </div>
96 </div>
97
98 <div class="row d-flex p-2 m-2 flex-row-reverse">
99   <button class="btn btn-success" (click)="saveRecord()"
100     [disabled]="record && record.deleted" i18n>Save Changes</button>
101 </div>
102
103