mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
115 lines
5.0 KiB
115 lines
5.0 KiB
<sqx-title [message]="schema.displayName"></sqx-title>
|
|
|
|
<form [formGroup]="contentForm.form" (ngSubmit)="saveAndPublish()">
|
|
<sqx-panel desiredWidth="*" minWidth="60rem" [showSidebar]="!!content" grid="true" (close)="back()">
|
|
<ng-container title>
|
|
<a class="btn btn-text" (click)="back()" *ngIf="!schema.isSingleton">
|
|
<i class="icon-angle-left"></i>
|
|
</a>
|
|
|
|
<ng-container *ngIf="content else noContentTitle">
|
|
<sqx-title message="Edit Content"></sqx-title>
|
|
|
|
Edit Content
|
|
</ng-container>
|
|
<ng-template #noContentTitle>
|
|
<sqx-title message="New Content"></sqx-title>
|
|
|
|
New Content
|
|
</ng-template>
|
|
</ng-container>
|
|
|
|
<ng-container menu>
|
|
<ng-container *ngIf="content; else noContent">
|
|
<ng-container>
|
|
<sqx-preview-button [schema]="schema" [content]="content"></sqx-preview-button>
|
|
|
|
<div class="dropdown dropdown-options ml-1" *ngIf="content?.canDelete">
|
|
<button type="button" class="btn btn-outline-secondary" (click)="dropdown.toggle()" [class.active]="dropdown.isOpen | async" #buttonOptions>
|
|
<i class="icon-more"></i>
|
|
</button>
|
|
|
|
<ng-container *sqxModal="dropdown;closeAlways:true">
|
|
<div class="dropdown-menu" [sqxAnchoredTo]="buttonOptions" @fade>
|
|
<a class="dropdown-item dropdown-item-delete"
|
|
(sqxConfirmClick)="delete()"
|
|
confirmTitle="Delete content"
|
|
confirmText="Do you really want to delete the content?">
|
|
Delete
|
|
</a>
|
|
</div>
|
|
</ng-container>
|
|
</div>
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="content?.canUpdate">
|
|
<button type="submit" class="btn btn-primary ml-1" title="CTRL + S">
|
|
Save
|
|
</button>
|
|
|
|
<sqx-shortcut keys="ctrl+s" (trigger)="saveAndPublish()"></sqx-shortcut>
|
|
</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>
|
|
|
|
<sqx-form-error bubble="true" closeable="true" [error]="contentForm.error | async"></sqx-form-error>
|
|
</ng-container>
|
|
|
|
<ng-container content>
|
|
<sqx-list-view>
|
|
<ng-container topHeader>
|
|
<div class="panel-alert panel-alert-danger" *ngIf="contentVersion">
|
|
<div class="float-right">
|
|
<a class="force" (click)="loadLatest()">View latest</a>
|
|
</div>
|
|
|
|
Viewing <strong>version {{contentVersion}}</strong>.
|
|
</div>
|
|
</ng-container>
|
|
|
|
<div content>
|
|
<sqx-content-field *ngFor="let field of schema.fields; trackBy: trackByField"
|
|
[(language)]="language"
|
|
[field]="field"
|
|
[fieldForm]="contentForm.form.get(field.name)"
|
|
[fieldFormCompare]="contentFormCompare?.form.get(field.name)"
|
|
[form]="contentForm"
|
|
[formContext]="formContext"
|
|
[languages]="languages"
|
|
[schema]="schema">
|
|
</sqx-content-field>
|
|
</div>
|
|
</sqx-list-view>
|
|
|
|
</ng-container>
|
|
|
|
<ng-container sidebar>
|
|
<div class="panel-nav">
|
|
<a class="panel-link" routerLink="history" routerLinkActive="active" title="Workflow" titlePosition="left" #linkHistory>
|
|
<i class="icon-time"></i>
|
|
</a>
|
|
|
|
<a class="panel-link" routerLink="comments" routerLinkActive="active" title="Comments" titlePosition="left">
|
|
<i class="icon-comments"></i>
|
|
</a>
|
|
|
|
<sqx-onboarding-tooltip helpId="history" [for]="linkHistory" position="left-top" after="120000">
|
|
The sidebar navigation contains useful context specific links. Here you can view the history how this schema has changed over time.
|
|
</sqx-onboarding-tooltip>
|
|
</div>
|
|
</ng-container>
|
|
</sqx-panel>
|
|
</form>
|
|
|
|
<router-outlet></router-outlet>
|