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.
101 lines
4.0 KiB
101 lines
4.0 KiB
<td class="cell-select" sqxStopClick>
|
|
<ng-container *ngIf="!isReference; else referenceTemplate">
|
|
<input type="checkbox" class="form-check"
|
|
[disabled]="!selectable"
|
|
[ngModel]="selected || !selectable"
|
|
(ngModelChange)="selectedChange.emit($event)" />
|
|
</ng-container>
|
|
|
|
<ng-template #referenceTemplate>
|
|
<i class="icon-drag2 drag-handle"></i>
|
|
</ng-template>
|
|
</td>
|
|
|
|
<td class="cell-auto" *ngFor="let field of schema.listFields; let i = index; trackBy: trackByField.bind(this)" [sqxStopClick]="isDirty(field)">
|
|
<ng-container *ngIf="field.isInlineEditable && !isReadOnly; else displayTemplate">
|
|
<sqx-content-item-editor [form]="patchForm.form" [field]="field"></sqx-content-item-editor>
|
|
</ng-container>
|
|
|
|
<ng-template #displayTemplate>
|
|
<span class="truncate">{{values[i]}}</span>
|
|
</ng-template>
|
|
</td>
|
|
|
|
<td class="cell-time" *ngIf="!isCompact" [sqxStopClick]="isDirty()">
|
|
<sqx-content-status
|
|
[status]="content.status"
|
|
[scheduledTo]="content.scheduleJob?.status"
|
|
[scheduledAt]="content.scheduleJob?.dueTime"
|
|
[isPending]="content.isPending">
|
|
</sqx-content-status>
|
|
|
|
<small class="item-modified">{{content.lastModified | sqxFromNow}}</small>
|
|
</td>
|
|
|
|
<td class="cell-user" *ngIf="!isCompact && patchForm.form.pristine" [sqxStopClick]="isDirty()">
|
|
<img class="user-picture" title="{{content.lastModifiedBy | sqxUserNameRef}}" [attr.src]="content.lastModifiedBy | sqxUserPictureRef" />
|
|
</td>
|
|
|
|
<ng-container *ngIf="patchForm.form.dirty">
|
|
<td class="cell-user" >
|
|
<button type="button" class="btn btn-success" (click)="save()" sqxStopClick>
|
|
<i class="icon-checkmark"></i>
|
|
</button>
|
|
</td>
|
|
<td class="cell-actions" >
|
|
<button type="button" class="btn btn-text-secondary btn-cancel" (click)="cancel()" sqxStopClick>
|
|
<i class="icon-close"></i>
|
|
</button>
|
|
</td>
|
|
</ng-container>
|
|
|
|
<td class="cell-actions" *ngIf="!isReadOnly && patchForm.form.pristine" sqxStopClick>
|
|
<div class="dropdown dropdown-options" *ngIf="content">
|
|
<button type="button" class="btn btn-text-secondary" (click)="dropdown.toggle()" [class.active]="dropdown.isOpen | async" #optionsButton>
|
|
<i class="icon-dots"></i>
|
|
</button>
|
|
<div class="dropdown-menu" *sqxModalView="dropdown;closeAlways:true" [sqxModalTarget]="optionsButton" @fade>
|
|
<a class="dropdown-item" (click)="emitPublish()" *ngIf="content.status === 'Draft'">
|
|
Publish
|
|
</a>
|
|
<a class="dropdown-item" (click)="emitUnpublish()" *ngIf="content.status === 'Published'">
|
|
Unpublish
|
|
</a>
|
|
<a class="dropdown-item" (click)="emitArchive()" *ngIf="content.status !== 'Archived'">
|
|
Archive
|
|
</a>
|
|
<a class="dropdown-item" (click)="emitRestore()" *ngIf="content.status === 'Archived'">
|
|
Restore
|
|
</a>
|
|
<a class="dropdown-item" (click)="emitClone(); dropdown.hide()" *ngIf="content.status !== 'Archived'">
|
|
Clone
|
|
</a>
|
|
|
|
<div class="dropdown-divider"></div>
|
|
|
|
<a class="dropdown-item dropdown-item-delete"
|
|
(sqxConfirmClick)="emitDelete()"
|
|
confirmTitle="Delete content"
|
|
confirmText="Do you really want to delete the content?">
|
|
Delete
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td class="cell-actions" *ngIf="isReference" [sqxStopClick]="isDirty()">
|
|
<div class="reference-edit">
|
|
<button type="button" class="btn btn-text-secondary">
|
|
<i class="icon-dots"></i>
|
|
</button>
|
|
|
|
<div class="reference-menu">
|
|
<a class="btn btn-text-secondary" [routerLink]="['../..', schema.name, content.id]">
|
|
<i class="icon-pencil"></i>
|
|
</a>
|
|
|
|
<button type="button" class="btn btn-text-secondary" (click)="emitDelete()">
|
|
<i class="icon-close"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</td>
|