]>
Commit | Line | Data |
---|---|---|
1 | <h1> | |
2 | <my-global-icon iconName="download" aria-hidden="true"></my-global-icon> | |
3 | <ng-container i18n>My ownership changes</ng-container> | |
4 | </h1> | |
5 | ||
6 | <p-table | |
7 | [value]="videoChangeOwnerships" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" | |
8 | [first]="pagination.start" [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" | |
9 | > | |
10 | <ng-template pTemplate="header"> | |
11 | <tr> | |
12 | <th style="width: 150px;" i18n>Actions</th> | |
13 | <th style="width: 35%;" i18n>Initiator</th> | |
14 | <th style="width: 65%;" i18n>Video</th> | |
15 | <th style="width: 150px;" i18n pSortableColumn="createdAt"> | |
16 | Created | |
17 | <p-sortIcon field="createdAt"></p-sortIcon> | |
18 | </th> | |
19 | <th style="width: 100px;" i18n>Status</th> | |
20 | </tr> | |
21 | </ng-template> | |
22 | ||
23 | <ng-template pTemplate="body" let-videoChangeOwnership> | |
24 | <tr> | |
25 | <td class="action-cell"> | |
26 | <ng-container *ngIf="videoChangeOwnership.status === 'WAITING'"> | |
27 | <my-button i18n-title title="Accept" icon="tick" (click)="openAcceptModal(videoChangeOwnership)"></my-button> | |
28 | <my-button i18n-title title="Refuse" icon="cross" (click)="refuse(videoChangeOwnership)"></my-button> | |
29 | </ng-container> | |
30 | </td> | |
31 | <td> | |
32 | <a [href]="videoChangeOwnership.initiatorAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> | |
33 | <div class="chip two-lines"> | |
34 | <my-actor-avatar [actor]="videoChangeOwnership.initiatorAccount" actorType="account" size="32"></my-actor-avatar> | |
35 | <div> | |
36 | {{ videoChangeOwnership.initiatorAccount.displayName }} | |
37 | <span class="muted">{{ videoChangeOwnership.initiatorAccount.nameWithHost }}</span> | |
38 | </div> | |
39 | </div> | |
40 | </a> | |
41 | </td> | |
42 | ||
43 | <td> | |
44 | <a [href]="videoChangeOwnership.video.url" class="video-table-video-link" [title]="videoChangeOwnership.video.name" target="_blank" rel="noopener noreferrer"> | |
45 | <div class="video-table-video"> | |
46 | <div class="video-table-video-image"> | |
47 | <img [src]="videoChangeOwnership.video.thumbnailPath" alt=""> | |
48 | </div> | |
49 | <div class="video-table-video-text"> | |
50 | <div> | |
51 | {{ videoChangeOwnership.video.name }} | |
52 | </div> | |
53 | <div class="muted">by {{ videoChangeOwnership.video.channel?.displayName }} </div> | |
54 | </div> | |
55 | </div> | |
56 | </a> | |
57 | </td> | |
58 | ||
59 | <td>{{ videoChangeOwnership.createdAt | date: 'short' }}</td> | |
60 | ||
61 | <td> | |
62 | <span class="pt-badge" | |
63 | [ngClass]="getStatusClass(videoChangeOwnership.status)">{{ videoChangeOwnership.status }}</span> | |
64 | </td> | |
65 | </tr> | |
66 | </ng-template> | |
67 | ||
68 | <ng-template pTemplate="emptymessage"> | |
69 | <tr> | |
70 | <td myAutoColspan> | |
71 | <div class="no-results"> | |
72 | <ng-container i18n>No ownership change request found.</ng-container> | |
73 | </div> | |
74 | </td> | |
75 | </tr> | |
76 | </ng-template> | |
77 | </p-table> | |
78 | ||
79 | <my-accept-ownership #myAcceptOwnershipComponent (accepted)="accepted()"></my-accept-ownership> |