Commits
Tim Donohue authored and GitHub committed 73e70e65463 Merge
1 1 | <div class="row" *ngIf="!!submissionId"> |
2 2 | <div class="col"> |
3 - | <!-- a class="btn btn-outline-primary" role="button" href="#"><i class="fas fa-times"></i> {{'submission.general.cancel' |translate}}</a --> |
4 - | </div> |
5 - | <div *ngIf="(processingSaveStatus | async) || (processingDepositStatus | async)" class="col d-flex justify-content-end align-items-center"> |
6 - | <div class="progress w-75"> |
7 - | <div *ngIf="(processingSaveStatus | async)" class="progress-bar progress-bar-striped progress-bar-animated bg-info" [style.width]="'100%'" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">Saving...</div> |
8 - | <div *ngIf="(processingDepositStatus | async)" class="progress-bar progress-bar-striped progress-bar-animated bg-info" [style.width]="'100%'" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">Depositing...</div> |
9 - | </div> |
10 - | </div> |
11 - | <div *ngIf="!(processingSaveStatus | async) && !(processingDepositStatus | async)" class="col text-right"> |
12 - | <button type="button" |
13 - | class="btn btn-secondary" |
14 - | id="save" |
15 - | [disabled]="(processingSaveStatus | async) || !(hasUnsavedModification | async)" |
16 - | (click)="save($event)"> |
17 - | <span><i class="fas fa-save"></i> {{'submission.general.save' | translate}}</span> |
18 - | </button> |
19 - | <button type="button" |
20 - | [class.btn-primary]="!(showDepositAndDiscard | async)" |
21 - | [class.btn-secondary]="(showDepositAndDiscard | async)" |
22 - | class="btn" |
23 - | id="saveForLater" |
24 - | [disabled]="(processingSaveStatus | async)" |
25 - | (click)="saveLater($event)"> |
26 - | <span><i class="fas fa-save"></i> {{'submission.general.save-later' | translate}}</span> |
27 - | </button> |
28 - | <button *ngIf="(showDepositAndDiscard | async)" |
29 - | type="button" |
30 - | class="btn btn-primary" |
31 - | [disabled]="(submissionIsInvalid | async)" (click)="deposit($event)"> |
32 - | <span><i class="fas fa-plus"></i> {{'submission.general.deposit' | translate}}</span> |
33 - | </button> |
34 3 | <button *ngIf="(showDepositAndDiscard | async)" |
35 4 | type="button" |
36 5 | class="btn btn-danger" |
6 + | [disabled]="(processingSaveStatus | async) || (processingDepositStatus | async)" |
37 7 | (click)="$event.preventDefault();confirmDiscard(content)"> |
38 8 | <i class="fas fa-trash"></i> {{'submission.general.discard.submit' | translate}} |
39 9 | </button> |
40 10 | </div> |
11 + | <div class="col text-right d-flex justify-content-end align-items-center"> |
12 + | <span *ngIf="!(hasUnsavedModification | async) && !(processingSaveStatus | async) && !(processingDepositStatus | async)"> |
13 + | <i class="fas fa-check-circle"></i> {{'submission.general.info.saved' | translate}} |
14 + | </span> |
15 + | <span *ngIf="(hasUnsavedModification | async) && !(processingSaveStatus | async) && !(processingDepositStatus | async)"> |
16 + | <i class="fas fa-exclamation-circle"></i> {{'submission.general.info.pending-changes' | translate}} |
17 + | </span> |
18 + | <div *ngIf="(processingSaveStatus | async) || (processingDepositStatus | async)" class="col d-flex justify-content-end align-items-center"> |
19 + | <div class="progress w-75"> |
20 + | <div *ngIf="(processingSaveStatus | async)" class="progress-bar progress-bar-striped progress-bar-animated bg-info" [style.width]="'100%'" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">Saving...</div> |
21 + | <div *ngIf="(processingDepositStatus | async)" class="progress-bar progress-bar-striped progress-bar-animated bg-info" [style.width]="'100%'" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">Depositing...</div> |
22 + | </div> |
23 + | </div> |
24 + | <div class="ml-2"> |
25 + | <button type="button" |
26 + | class="btn btn-secondary" |
27 + | id="save" |
28 + | [disabled]="(processingSaveStatus | async) || !(hasUnsavedModification | async)" |
29 + | (click)="save($event)"> |
30 + | <span><i class="fas fa-save"></i> {{'submission.general.save' | translate}}</span> |
31 + | </button> |
32 + | <button type="button" |
33 + | [class.btn-primary]="!(showDepositAndDiscard | async)" |
34 + | [class.btn-secondary]="(showDepositAndDiscard | async)" |
35 + | class="btn" |
36 + | id="saveForLater" |
37 + | [disabled]="(processingSaveStatus | async) || (processingDepositStatus | async)" |
38 + | (click)="saveLater($event)"> |
39 + | <span><i class="fas fa-save"></i> {{'submission.general.save-later' | translate}}</span> |
40 + | </button> |
41 + | <button *ngIf="(showDepositAndDiscard | async)" |
42 + | type="button" |
43 + | class="btn btn-success" |
44 + | [disabled]="(submissionIsInvalid | async) || (processingSaveStatus | async) || (processingDepositStatus | async)" |
45 + | (click)="deposit($event)"> |
46 + | <span><i class="fas fa-plus"></i> {{'submission.general.deposit' | translate}}</span> |
47 + | </button> |
48 + | </div> |
49 + | </div> |
41 50 | </div> |
42 51 | |
43 52 | <ng-template #content let-c="close" let-d="dismiss"> |
44 53 | <div class="modal-header"> |
45 54 | <h4 class="modal-title text-danger">{{'submission.general.discard.confirm.title' | translate}}</h4> |
46 55 | <button type="button" class="close" aria-label="Close" (click)="d('cancel')"> |
47 56 | <span aria-hidden="true">×</span> |
48 57 | </button> |
49 58 | </div> |
50 59 | <div class="modal-body"> |