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.
120 lines
5.7 KiB
120 lines
5.7 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="i18n:contents.editPageTitle"></sqx-title>
|
|
|
|
{{ 'contents.editTitle' | sqxTranslate }}
|
|
</ng-container>
|
|
<ng-template #noContentTitle>
|
|
<sqx-title message="i18n:contents.createPageTitle"></sqx-title>
|
|
|
|
{{ 'contents.createTitle' | sqxTranslate }}
|
|
</ng-template>
|
|
</ng-container>
|
|
|
|
<ng-container menu>
|
|
<ng-container *ngIf="content; else noContent">
|
|
<ng-container>
|
|
<sqx-notifo topic="apps/{{contentsState.appId}}/schemas/{{contentsState.schemaId}}/contents/{{content.id}}"></sqx-notifo>
|
|
|
|
<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="i18n:contents.deleteConfirmTitle"
|
|
confirmText="i18n:contents.deleteConfirmText">
|
|
{{ 'common.delete' | sqxTranslate }}
|
|
</a>
|
|
</div>
|
|
</ng-container>
|
|
</div>
|
|
</ng-container>
|
|
|
|
<ng-container *ngIf="content?.canUpdate">
|
|
<button type="submit" class="btn btn-primary ml-1" title="i18n:common.saveShortcut">
|
|
{{ 'common.save' | sqxTranslate }}
|
|
</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">
|
|
{{ 'common.save' | sqxTranslate }}
|
|
</button>
|
|
|
|
<button type="submit" class="btn btn-primary ml-1" title="i18n:common.saveShortcut" *ngIf="contentsState.canCreateAndPublish | async">
|
|
{{ 'contents.saveAndPublish' | sqxTranslate }}
|
|
</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()">{{ 'contents.viewLatest' | sqxTranslate }}</a>
|
|
</div>
|
|
|
|
<div [innerHTML]="'contents.versionViewing' | sqxTranslate: { version: contentVersion } | sqxMarkdownInline"></div>
|
|
</div>
|
|
</ng-container>
|
|
|
|
<div content>
|
|
<sqx-content-section *ngFor="let section of contentForm.sections; trackBy: trackBySection"
|
|
[(language)]="language"
|
|
[form]="contentForm"
|
|
[formCompare]="contentFormCompare"
|
|
[formContext]="formContext"
|
|
[formSection]="section"
|
|
[languages]="languages"
|
|
[schema]="schema">
|
|
</sqx-content-section>
|
|
</div>
|
|
</sqx-list-view>
|
|
|
|
</ng-container>
|
|
|
|
<ng-container sidebar>
|
|
<div class="panel-nav">
|
|
<a class="panel-link" routerLink="history" routerLinkActive="active" queryParamsHandling="preserve" title="i18n:common.workflow" titlePosition="left" #linkHistory>
|
|
<i class="icon-time"></i>
|
|
</a>
|
|
|
|
<a class="panel-link" routerLink="comments" routerLinkActive="active" queryParamsHandling="preserve" title="i18n:common.comments" titlePosition="left">
|
|
<i class="icon-comments"></i>
|
|
</a>
|
|
|
|
<a class="panel-link" routerLink="sidebar" routerLinkActive="active" queryParamsHandling="preserve" title="i18n:common.sidebar" titlePosition="left" *ngIf="schema.properties.contentSidebarUrl">
|
|
<i class="icon-plugin"></i>
|
|
</a>
|
|
|
|
<sqx-onboarding-tooltip helpId="history" [for]="linkHistory" position="left-top" after="120000">
|
|
{{ 'common.sidebarTour' | sqxTranslate }}
|
|
</sqx-onboarding-tooltip>
|
|
</div>
|
|
</ng-container>
|
|
</sqx-panel>
|
|
</form>
|
|
|
|
<router-outlet></router-outlet>
|