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.
128 lines
5.7 KiB
128 lines
5.7 KiB
<sqx-title [message]="schemasState.schemaName"></sqx-title>
|
|
|
|
<sqx-layout layout="main"[innerWidth]="50" *ngIf="schemaTab | async; let tab">
|
|
<ng-container title>
|
|
<ul class="nav nav-tabs2">
|
|
<li class="nav-item">
|
|
<a class="nav-link" [routerLink]="[]" [queryParams]="{ tab: 'fields' }" [class.active]="tab === 'fields'">
|
|
{{ 'schemas.tabFields' | sqxTranslate }}
|
|
</a>
|
|
</li>
|
|
<li *ngIf="schema.type !== 'Component'">
|
|
<a class="nav-link" [routerLink]="[]" [queryParams]="{ tab: 'ui' }" [class.active]="tab === 'ui'">
|
|
{{ 'schemas.tabUI' | sqxTranslate }}
|
|
</a>
|
|
</li>
|
|
<li *ngIf="schema.type !== 'Component'">
|
|
<a class="nav-link" [routerLink]="[]" [queryParams]="{ tab: 'scripts' }" [class.active]="tab === 'scripts'">
|
|
{{ 'schemas.tabScripts' | sqxTranslate }}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a class="nav-link" [routerLink]="[]" [queryParams]="{ tab: 'json' }" [class.active]="tab === 'json'">
|
|
{{ 'schemas.tabJson' | sqxTranslate }}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a class="nav-link" [routerLink]="[]" [queryParams]="{ tab: 'more' }" [class.active]="tab === 'more'">
|
|
{{ 'schemas.tabMore' | sqxTranslate }}
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</ng-container>
|
|
|
|
<ng-container menu>
|
|
<div class="btn-group me-2" #buttonPublish>
|
|
<button type="button" class="btn btn-publishing btn-toggle" [class.btn-success]="schema.isPublished" [disabled]="!schema.canPublish" (click)="publish()">
|
|
{{ 'schemas.published' | sqxTranslate }}
|
|
</button>
|
|
<button type="button" class="btn btn-publishing btn-toggle" [class.btn-danger]="!schema.isPublished" [disabled]="!schema.canUnpublish" (click)="unpublish()">
|
|
{{ 'schemas.unpublished' | sqxTranslate }}
|
|
</button>
|
|
</div>
|
|
|
|
<button type="button" class="btn btn-text-secondary me-2" (click)="editOptionsDropdown.toggle()" #buttonOptions>
|
|
<i class="icon-dots"></i>
|
|
</button>
|
|
|
|
<ng-container *sqxModal="editOptionsDropdown;closeAlways:true">
|
|
<div class="dropdown-menu" [sqxAnchoredTo]="buttonOptions" [scrollY]="true" @fade>
|
|
<ng-container *ngIf="schemasState.canCreate">
|
|
<div class="dropdown-divider"></div>
|
|
|
|
<a class="dropdown-item" (click)="cloneSchema()">
|
|
{{ 'common.clone' | sqxTranslate }}
|
|
</a>
|
|
</ng-container>
|
|
|
|
<ng-container>
|
|
<div class="dropdown-divider"></div>
|
|
|
|
<a class="dropdown-item dropdown-item-delete" [class.disabled]="!schema.canDelete"
|
|
(sqxConfirmClick)="deleteSchema()"
|
|
confirmTitle="i18n:schemas.deleteConfirmTitle"
|
|
confirmText="i18n:schemas.deleteConfirmText"
|
|
confirmRememberKey="deleteSchema">
|
|
{{ 'common.delete' | sqxTranslate }}
|
|
</a>
|
|
</ng-container>
|
|
</div>
|
|
</ng-container>
|
|
|
|
<sqx-onboarding-tooltip helpId="history" [for]="buttonOptions" position="bottom-right" [after]="60000">
|
|
{{ 'schemas.contextMenuTour' | sqxTranslate }}
|
|
</sqx-onboarding-tooltip>
|
|
|
|
<sqx-onboarding-tooltip helpId="history" [for]="buttonPublish" position="bottom-right" [after]="240000">
|
|
{{ 'schemas.publishedTour' | sqxTranslate }}
|
|
</sqx-onboarding-tooltip>
|
|
</ng-container>
|
|
|
|
<ng-container content>
|
|
<ng-container [ngSwitch]="tab">
|
|
<ng-container *ngSwitchCase="'ui'">
|
|
<sqx-schema-ui-form [schema]="schema"></sqx-schema-ui-form>
|
|
</ng-container>
|
|
<ng-container *ngSwitchCase="'scripts'">
|
|
<sqx-schema-scripts-form [schema]="schema"></sqx-schema-scripts-form>
|
|
</ng-container>
|
|
<ng-container *ngSwitchCase="'json'">
|
|
<sqx-schema-export-form [schema]="schema"></sqx-schema-export-form>
|
|
</ng-container>
|
|
<ng-container *ngSwitchCase="'more'">
|
|
<sqx-list-view innerWidth="50rem">
|
|
<div>
|
|
<sqx-schema-preview-urls-form *ngIf="schema.type !== 'Component'"
|
|
[schema]="schema">
|
|
</sqx-schema-preview-urls-form>
|
|
|
|
<sqx-schema-field-rules-form
|
|
[schema]="schema">
|
|
</sqx-schema-field-rules-form>
|
|
|
|
<sqx-schema-edit-form
|
|
[schema]="schema">
|
|
</sqx-schema-edit-form>
|
|
</div>
|
|
</sqx-list-view>
|
|
</ng-container>
|
|
<ng-container *ngSwitchDefault>
|
|
<sqx-list-view innerWidth="50rem" [table]="true">
|
|
<div>
|
|
<sqx-schema-fields [schema]="schema"></sqx-schema-fields>
|
|
</div>
|
|
</sqx-list-view>
|
|
</ng-container>
|
|
</ng-container>
|
|
</ng-container>
|
|
|
|
<ng-container sidebarMenu>
|
|
<div class="panel-nav">
|
|
<a class="panel-link" routerLink="help" routerLinkActive="active" queryParamsHandling="preserve" title="i18n:common.help" titlePosition="left-center">
|
|
<i class="icon-help"></i>
|
|
</a>
|
|
</div>
|
|
</ng-container>
|
|
</sqx-layout>
|
|
|
|
<router-outlet></router-outlet>
|
|
|