|
|
|
@ -4,116 +4,114 @@ |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<ng-container content> |
|
|
|
<ng-container *ngIf="!schema.isSingleton"> |
|
|
|
<div class="section mb-4" *ngIf="content.canDraftCreate || content.canDraftDelete"> |
|
|
|
<ng-container *ngIf="!content.newStatus; else newVersion"> |
|
|
|
<button class="btn btn-success btn-block" (click)="createDraft() "> |
|
|
|
New Draft |
|
|
|
</button> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<ng-template #newVersion> |
|
|
|
<label>New Version</label> |
|
|
|
|
|
|
|
<button type="button" class="btn btn-outline-secondary btn-block btn-status" (click)="dropdownNew.toggle()" [class.active]="dropdownNew.isOpen | async" #buttonOptions> |
|
|
|
<sqx-content-status |
|
|
|
layout="multiline" |
|
|
|
[status]="content.newStatus" |
|
|
|
[statusColor]="content.newStatusColor" |
|
|
|
[scheduled]="content.scheduleJob"> |
|
|
|
</sqx-content-status> |
|
|
|
</button> |
|
|
|
|
|
|
|
<ng-container *sqxModal="dropdownNew;closeAlways:true"> |
|
|
|
<div class="dropdown-menu" [sqxAnchoredTo]="buttonOptions" @fade> |
|
|
|
<ng-container *ngIf="content.statusUpdates.length > 0"> |
|
|
|
<a class="dropdown-item" *ngFor="let info of content.statusUpdates" (click)="changeStatus(info.status)"> |
|
|
|
Change to <i class="icon-circle icon-sm" [style.color]="info.color"></i> {{info.status}} |
|
|
|
</a> |
|
|
|
|
|
|
|
<div class="dropdown-divider"></div> |
|
|
|
</ng-container> |
|
|
|
<div class="section mb-4" *ngIf="content.canDraftCreate || content.canDraftDelete"> |
|
|
|
<ng-container *ngIf="!content.newStatus; else newVersion"> |
|
|
|
<button class="btn btn-success btn-block" (click)="createDraft() "> |
|
|
|
New Draft |
|
|
|
</button> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<a class="dropdown-item dropdown-item-delete" |
|
|
|
[class.disabled]="!content.canDraftDelete" |
|
|
|
(sqxConfirmClick)="deleteDraft()" |
|
|
|
confirmTitle="Delete content" |
|
|
|
confirmText="Do you really want to delete this version?"> |
|
|
|
Delete this Version |
|
|
|
<ng-template #newVersion> |
|
|
|
<label>New Version</label> |
|
|
|
|
|
|
|
<button type="button" class="btn btn-outline-secondary btn-block btn-status" (click)="dropdownNew.toggle()" [class.active]="dropdownNew.isOpen | async" #buttonOptions> |
|
|
|
<sqx-content-status |
|
|
|
layout="multiline" |
|
|
|
[status]="content.newStatus" |
|
|
|
[statusColor]="content.newStatusColor" |
|
|
|
[scheduled]="content.scheduleJob"> |
|
|
|
</sqx-content-status> |
|
|
|
</button> |
|
|
|
|
|
|
|
<ng-container *sqxModal="dropdownNew;closeAlways:true"> |
|
|
|
<div class="dropdown-menu" [sqxAnchoredTo]="buttonOptions" @fade> |
|
|
|
<ng-container *ngIf="content.statusUpdates.length > 0"> |
|
|
|
<a class="dropdown-item" *ngFor="let info of content.statusUpdates" (click)="changeStatus(info.status)"> |
|
|
|
Change to <i class="icon-circle icon-sm" [style.color]="info.color"></i> {{info.status}} |
|
|
|
</a> |
|
|
|
|
|
|
|
<div class="dropdown-divider"></div> |
|
|
|
|
|
|
|
<a class="dropdown-item dropdown-item-delete" |
|
|
|
[class.disabled]="!content.canDelete" |
|
|
|
(sqxConfirmClick)="delete()" |
|
|
|
confirmTitle="Delete content" |
|
|
|
confirmText="Do you really want to delete the content?"> |
|
|
|
Delete |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</ng-container> |
|
|
|
</ng-template> |
|
|
|
</div> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<div class="section"> |
|
|
|
<label>Current Version</label> |
|
|
|
<a class="dropdown-item dropdown-item-delete" |
|
|
|
[class.disabled]="!content.canDraftDelete" |
|
|
|
(sqxConfirmClick)="deleteDraft()" |
|
|
|
confirmTitle="Delete content" |
|
|
|
confirmText="Do you really want to delete this version?"> |
|
|
|
Delete this Version |
|
|
|
</a> |
|
|
|
|
|
|
|
<div *ngIf="!content.newStatus; else newStatusOld"> |
|
|
|
<button type="button" class="btn btn-outline-secondary btn-block btn-status" (click)="dropdown.toggle()" [class.active]="dropdown.isOpen | async" #buttonOptions> |
|
|
|
<sqx-content-status small="true" |
|
|
|
layout="multiline" |
|
|
|
[status]="content.status" |
|
|
|
[statusColor]="content.statusColor" |
|
|
|
[scheduled]="content.scheduleJob"> |
|
|
|
</sqx-content-status> |
|
|
|
</button> |
|
|
|
|
|
|
|
<ng-container *sqxModal="dropdown;closeAlways:true"> |
|
|
|
<div class="dropdown-menu" [sqxAnchoredTo]="buttonOptions" @fade> |
|
|
|
<ng-container *ngIf="content.statusUpdates.length > 0"> |
|
|
|
<a class="dropdown-item" *ngFor="let info of content.statusUpdates" (click)="changeStatus(info.status)"> |
|
|
|
Change to |
|
|
|
|
|
|
|
<sqx-content-status small="true" |
|
|
|
layout="text" |
|
|
|
[status]="info.status" |
|
|
|
[statusColor]="info.color"> |
|
|
|
</sqx-content-status> |
|
|
|
</a> |
|
|
|
|
|
|
|
<div class="dropdown-divider"></div> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<a class="dropdown-item dropdown-item-delete" |
|
|
|
[class.disabled]="!content.canDelete" |
|
|
|
(sqxConfirmClick)="delete()" |
|
|
|
confirmTitle="Delete content" |
|
|
|
confirmText="Do you really want to delete the content?"> |
|
|
|
Delete |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</ng-container> |
|
|
|
</div> |
|
|
|
<div class="dropdown-divider"></div> |
|
|
|
|
|
|
|
<a class="dropdown-item dropdown-item-delete" |
|
|
|
[class.disabled]="!content.canDelete" |
|
|
|
(sqxConfirmClick)="delete()" |
|
|
|
confirmTitle="Delete content" |
|
|
|
confirmText="Do you really want to delete the content?"> |
|
|
|
Delete |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</ng-container> |
|
|
|
</ng-template> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="section"> |
|
|
|
<label>Current Version</label> |
|
|
|
|
|
|
|
<div *ngIf="!content.newStatus; else newStatusOld"> |
|
|
|
<button type="button" class="btn btn-outline-secondary btn-block btn-status" (click)="dropdown.toggle()" [class.active]="dropdown.isOpen | async" #buttonOptions> |
|
|
|
<sqx-content-status small="true" |
|
|
|
layout="multiline" |
|
|
|
[status]="content.status" |
|
|
|
[statusColor]="content.statusColor" |
|
|
|
[scheduled]="content.scheduleJob"> |
|
|
|
</sqx-content-status> |
|
|
|
</button> |
|
|
|
|
|
|
|
<ng-template #newStatusOld> |
|
|
|
<button type="button" class="btn btn-outline-secondary btn-block btn-status"> |
|
|
|
<sqx-content-status |
|
|
|
[status]="content.status" |
|
|
|
[statusColor]="content.statusColor" |
|
|
|
layout="multiline"> |
|
|
|
</sqx-content-status> |
|
|
|
</button> |
|
|
|
</ng-template> |
|
|
|
<ng-container *sqxModal="dropdown;closeAlways:true"> |
|
|
|
<div class="dropdown-menu" [sqxAnchoredTo]="buttonOptions" @fade> |
|
|
|
<ng-container *ngIf="content.statusUpdates.length > 0"> |
|
|
|
<a class="dropdown-item" *ngFor="let info of content.statusUpdates" (click)="changeStatus(info.status)"> |
|
|
|
Change to |
|
|
|
|
|
|
|
<sqx-content-status small="true" |
|
|
|
layout="text" |
|
|
|
[status]="info.status" |
|
|
|
[statusColor]="info.color"> |
|
|
|
</sqx-content-status> |
|
|
|
</a> |
|
|
|
|
|
|
|
<div class="dropdown-divider"></div> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<sqx-form-hint marginTop="1"> |
|
|
|
Last Updated: {{content.lastModified | sqxFromNow}} |
|
|
|
</sqx-form-hint> |
|
|
|
<a class="dropdown-item dropdown-item-delete" |
|
|
|
[class.disabled]="!content.canDelete" |
|
|
|
(sqxConfirmClick)="delete()" |
|
|
|
confirmTitle="Delete content" |
|
|
|
confirmText="Do you really want to delete the content?"> |
|
|
|
Delete |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</ng-container> |
|
|
|
</div> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<ng-template #newStatusOld> |
|
|
|
<button type="button" class="btn btn-outline-secondary btn-block btn-status"> |
|
|
|
<sqx-content-status |
|
|
|
[status]="content.status" |
|
|
|
[statusColor]="content.statusColor" |
|
|
|
layout="multiline"> |
|
|
|
</sqx-content-status> |
|
|
|
</button> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<sqx-form-hint marginTop="1"> |
|
|
|
Last Updated: {{content.lastModified | sqxFromNow}} |
|
|
|
</sqx-form-hint> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="section"> |
|
|
|
<h3 class="bordered" *ngIf="!schema.isSingleton">History</h3> |
|
|
|
<h3 class="bordered">History</h3> |
|
|
|
|
|
|
|
<sqx-content-event *ngFor="let event of contentEvents | async; trackBy: trackByEvent" |
|
|
|
[content]="content" |
|
|
|
|