Browse Source

Strange compiler fix.

pull/462/head
Sebastian 6 years ago
parent
commit
bb4edd99e1
  1. 38
      frontend/app/features/content/pages/content/content-page.component.html

38
frontend/app/features/content/pages/content/content-page.component.html

@ -20,20 +20,8 @@
</ng-container> </ng-container>
<ng-container menu> <ng-container menu>
<ng-container *ngIf="!content; else notNew"> <ng-container *ngIf="content; else noContent">
<button type="button" class="btn btn-secondary" (click)="save()" *ngIf="contentsState.canCreate | async"> <div class="dropdown dropdown-options ml-1">
Save
</button>
<button type="submit" class="btn btn-primary ml-1" title="CTRL + S" *ngIf="contentsState.canCreateAndPublish | async">
Save and Publish
</button>
<sqx-shortcut keys="ctrl+s" (trigger)="saveAndPublish()"></sqx-shortcut>
</ng-container>
<ng-template #notNew>
<div class="dropdown dropdown-options ml-1" *ngIf="content">
<sqx-preview-button [schema]="schema" [content]="content"></sqx-preview-button> <sqx-preview-button [schema]="schema" [content]="content"></sqx-preview-button>
<button type="button" class="btn btn-outline-secondary btn-status" (click)="dropdown.toggle()" [disabled]="schema.isSingleton && !content.isPending" <button type="button" class="btn btn-outline-secondary btn-status" (click)="dropdown.toggle()" [disabled]="schema.isSingleton && !content.isPending"
@ -69,10 +57,10 @@
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
<a class="dropdown-item dropdown-item-delete" <a class="dropdown-item dropdown-item-delete"
[class.disabled]="!content.canDelete" [class.disabled]="!content.canDelete"
(sqxConfirmClick)="delete()" (sqxConfirmClick)="delete()"
confirmTitle="Delete content" confirmTitle="Delete content"
confirmText="Do you really want to delete the content?"> confirmText="Do you really want to delete the content?">
Delete Delete
</a> </a>
</ng-container> </ng-container>
@ -85,13 +73,25 @@
Save as Draft Save as Draft
</button> </button>
<ng-container *ngIf="content.canUpdate"> <ng-container *ngIf="content?.canUpdate">
<button type="submit" class="btn btn-primary ml-1" title="CTRL + S"> <button type="submit" class="btn btn-primary ml-1" title="CTRL + S">
Save Save
</button> </button>
<sqx-shortcut keys="ctrl+s" (trigger)="saveAndPublish()"></sqx-shortcut> <sqx-shortcut keys="ctrl+s" (trigger)="saveAndPublish()"></sqx-shortcut>
</ng-container> </ng-container>
</ng-container>
<ng-template #noContent>
<button type="button" class="btn btn-secondary" (click)="save()" *ngIf="contentsState.canCreate | async">
Save
</button>
<button type="submit" class="btn btn-primary ml-1" title="CTRL + S" *ngIf="contentsState.canCreateAndPublish | async">
Save and Publish
</button>
<sqx-shortcut keys="ctrl+s" (trigger)="saveAndPublish()"></sqx-shortcut>
</ng-template> </ng-template>
<sqx-form-error bubble="true" closeable="true" [error]="contentForm.error | async"></sqx-form-error> <sqx-form-error bubble="true" closeable="true" [error]="contentForm.error | async"></sqx-form-error>

Loading…
Cancel
Save