aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-video-imports/my-account-video-imports.component.html
blob: 74ca33fa326f093fc7ba41334c89d9ab5e661e16 (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
<p-table
  [value]="videoImports" [lazy]="true" [paginator]="true" [totalRecords]="totalRecords" [rows]="rowsPerPage"
  [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)"
>
  <ng-template pTemplate="header">
    <tr>
      <th i18n>URL</th>
      <th i18n>Video</th>
      <th i18n style="width: 150px">State</th>
      <th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
      <th></th>
    </tr>
  </ng-template>

  <ng-template pTemplate="body" let-videoImport>
    <tr>
      <td>
        <a [href]="videoImport.targetUrl" target="_blank" rel="noopener noreferrer">{{ videoImport.targetUrl }}</a>
      </td>

      <td *ngIf="isVideoImportPending(videoImport)">
        {{ videoImport.video.name }}
      </td>
      <td *ngIf="isVideoImportSuccess(videoImport)">
        <a [href]="getVideoUrl(videoImport.video)" target="_blank" rel="noopener noreferrer">{{ videoImport.video.name }}</a>
      </td>
      <td *ngIf="isVideoImportFailed(videoImport)"></td>

      <td>{{ videoImport.state.label }}</td>
      <td>{{ videoImport.createdAt }}</td>

      <td class="action-cell">
        <my-edit-button *ngIf="isVideoImportSuccess(videoImport)" [routerLink]="getEditVideoUrl(videoImport.video)"></my-edit-button>
      </td>
    </tr>
  </ng-template>
</p-table>