blob: 14ae497d97c12155001e9e53801a0eb42659a851 (
plain) (
tree)
|
|
<h1 class="sr-only" i18n>Ownership changes</h1>
<p-table
[value]="videoChangeOwnerships"
[lazy]="true"
[paginator]="totalRecords > 0"
[totalRecords]="totalRecords"
[rows]="rowsPerPage"
[sortField]="sort.field"
[sortOrder]="sort.order"
(onLazyLoad)="loadLazy($event)"
>
<ng-template pTemplate="header">
<tr>
<th i18n>Initiator</th>
<th i18n>Video</th>
<th i18n pSortableColumn="createdAt">
Created
<p-sortIcon field="createdAt"></p-sortIcon>
</th>
<th i18n>Status</th>
<th i18n>Action</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-videoChangeOwnership>
<tr>
<td>
<a [href]="videoChangeOwnership.initiatorAccount.url" i18n-title title="Account page"
target="_blank" rel="noopener noreferrer">
{{ createByString(videoChangeOwnership.initiatorAccount) }}
</a>
</td>
<td>
<a [href]="videoChangeOwnership.video.url" i18n-title title="Video page" target="_blank" rel="noopener noreferrer">
{{ videoChangeOwnership.video.name }}
</a>
</td>
<td>{{ videoChangeOwnership.createdAt }}</td>
<td i18n>{{ videoChangeOwnership.status }}</td>
<td class="action-cell">
<ng-container *ngIf="videoChangeOwnership.status === 'WAITING'">
<my-button i18n-label label="Accept" icon="tick" (click)="openAcceptModal(videoChangeOwnership)"></my-button>
<my-button i18n-label label="Refuse" icon="cross" (click)="refuse(videoChangeOwnership)"></my-button>
</ng-container>
</td>
</tr>
</ng-template>
</p-table>
<my-account-accept-ownership #myAccountAcceptOwnershipComponent (accepted)="accepted()"></my-account-accept-ownership>
|