aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-ownership/my-account-ownership.component.html
blob: c5fd3ccb9e3818c46272bcc345315931ca65cf79 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<p-table
    [value]="videoChangeOwnerships"
    [lazy]="true"
    [paginator]="true"
    [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="Go to the account"
           target="_blank" rel="noopener noreferrer">
          {{ createByString(videoChangeOwnership.initiatorAccount) }}
        </a>
      </td>
      <td>
        <a [href]="videoChangeOwnership.video.url" i18n-title title="Go to the video" 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>