]>
Commit | Line | Data |
---|---|---|
ed5bb517 K |
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 | ||
74d63469 GR |
6 | <p-table |
7 | [value]="videoChangeOwnerships" | |
8 | [lazy]="true" | |
b8cf27c0 | 9 | [paginator]="totalRecords > 0" |
74d63469 GR |
10 | [totalRecords]="totalRecords" |
11 | [rows]="rowsPerPage" | |
12 | [sortField]="sort.field" | |
13 | [sortOrder]="sort.order" | |
14 | (onLazyLoad)="loadLazy($event)" | |
15 | > | |
16 | <ng-template pTemplate="header"> | |
17 | <tr> | |
4c9e9d2e RK |
18 | <th style="width: 35%;" i18n>Initiator</th> |
19 | <th style="width: 65%;" i18n>Video</th> | |
20 | <th style="width: 150px;" i18n pSortableColumn="createdAt"> | |
74d63469 GR |
21 | Created |
22 | <p-sortIcon field="createdAt"></p-sortIcon> | |
23 | </th> | |
4c9e9d2e RK |
24 | <th style="width: 100px;" i18n>Status</th> |
25 | <th style="width: 130px;" i18n>Action</th> | |
74d63469 GR |
26 | </tr> |
27 | </ng-template> | |
28 | ||
29 | <ng-template pTemplate="body" let-videoChangeOwnership> | |
30 | <tr> | |
31 | <td> | |
4c9e9d2e RK |
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 | <img | |
35 | class="avatar" | |
36 | [src]="videoChangeOwnership.initiatorAccount.avatar?.path" | |
37 | (error)="switchToDefaultAvatar($event)" | |
38 | alt="Avatar" | |
39 | > | |
40 | <div> | |
41 | {{ videoChangeOwnership.initiatorAccount.displayName }} | |
42 | <span class="text-muted">{{ videoChangeOwnership.initiatorAccount.nameWithHost }}</span> | |
43 | </div> | |
44 | </div> | |
74d63469 GR |
45 | </a> |
46 | </td> | |
4c9e9d2e | 47 | |
74d63469 | 48 | <td> |
4c9e9d2e RK |
49 | <a [href]="videoChangeOwnership.video.url" class="video-table-video-link" [title]="videoChangeOwnership.video.name" target="_blank" rel="noopener noreferrer"> |
50 | <div class="video-table-video"> | |
51 | <div class="video-table-video-image"> | |
52 | <img [src]="videoChangeOwnership.video.thumbnailPath"> | |
53 | </div> | |
54 | <div class="video-table-video-text"> | |
55 | <div> | |
56 | {{ videoChangeOwnership.video.name }} | |
57 | </div> | |
58 | <div class="text-muted">by {{ videoChangeOwnership.video.channel?.displayName }} </div> | |
59 | </div> | |
60 | </div> | |
74d63469 GR |
61 | </a> |
62 | </td> | |
4c9e9d2e RK |
63 | |
64 | <td>{{ videoChangeOwnership.createdAt | date: 'short' }}</td> | |
74d63469 GR |
65 | <td i18n>{{ videoChangeOwnership.status }}</td> |
66 | <td class="action-cell"> | |
67 | <ng-container *ngIf="videoChangeOwnership.status === 'WAITING'"> | |
0dc64777 C |
68 | <my-button i18n-label label="Accept" icon="tick" (click)="openAcceptModal(videoChangeOwnership)"></my-button> |
69 | <my-button i18n-label label="Refuse" icon="cross" (click)="refuse(videoChangeOwnership)"></my-button> | |
74d63469 GR |
70 | </ng-container> |
71 | </td> | |
72 | </tr> | |
73 | </ng-template> | |
4c9e9d2e RK |
74 | |
75 | <ng-template pTemplate="emptymessage"> | |
76 | <tr> | |
77 | <td colspan="6"> | |
78 | <div class="no-results"> | |
79 | <ng-container i18n>No ownership change request found.</ng-container> | |
80 | </div> | |
81 | </td> | |
82 | </tr> | |
83 | </ng-template> | |
74d63469 GR |
84 | </p-table> |
85 | ||
0dc64777 | 86 | <my-account-accept-ownership #myAccountAcceptOwnershipComponent (accepted)="accepted()"></my-account-accept-ownership> |