]>
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> | |
30814423 | 18 | <th style="width: 150px;" i18n>Actions</th> |
4c9e9d2e RK |
19 | <th style="width: 35%;" i18n>Initiator</th> |
20 | <th style="width: 65%;" i18n>Video</th> | |
21 | <th style="width: 150px;" i18n pSortableColumn="createdAt"> | |
74d63469 GR |
22 | Created |
23 | <p-sortIcon field="createdAt"></p-sortIcon> | |
24 | </th> | |
4c9e9d2e | 25 | <th style="width: 100px;" i18n>Status</th> |
74d63469 GR |
26 | </tr> |
27 | </ng-template> | |
28 | ||
29 | <ng-template pTemplate="body" let-videoChangeOwnership> | |
30 | <tr> | |
30814423 K |
31 | <td class="action-cell"> |
32 | <ng-container *ngIf="videoChangeOwnership.status === 'WAITING'"> | |
33 | <my-button i18n-title title="Accept" icon="tick" (click)="openAcceptModal(videoChangeOwnership)"></my-button> | |
34 | <my-button i18n-title title="Refuse" icon="cross" (click)="refuse(videoChangeOwnership)"></my-button> | |
35 | </ng-container> | |
36 | </td> | |
74d63469 | 37 | <td> |
4c9e9d2e RK |
38 | <a [href]="videoChangeOwnership.initiatorAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer"> |
39 | <div class="chip two-lines"> | |
40 | <img | |
41 | class="avatar" | |
42 | [src]="videoChangeOwnership.initiatorAccount.avatar?.path" | |
43 | (error)="switchToDefaultAvatar($event)" | |
44 | alt="Avatar" | |
45 | > | |
46 | <div> | |
47 | {{ videoChangeOwnership.initiatorAccount.displayName }} | |
48 | <span class="text-muted">{{ videoChangeOwnership.initiatorAccount.nameWithHost }}</span> | |
49 | </div> | |
50 | </div> | |
74d63469 GR |
51 | </a> |
52 | </td> | |
4c9e9d2e | 53 | |
74d63469 | 54 | <td> |
4c9e9d2e RK |
55 | <a [href]="videoChangeOwnership.video.url" class="video-table-video-link" [title]="videoChangeOwnership.video.name" target="_blank" rel="noopener noreferrer"> |
56 | <div class="video-table-video"> | |
57 | <div class="video-table-video-image"> | |
58 | <img [src]="videoChangeOwnership.video.thumbnailPath"> | |
59 | </div> | |
60 | <div class="video-table-video-text"> | |
61 | <div> | |
62 | {{ videoChangeOwnership.video.name }} | |
63 | </div> | |
64 | <div class="text-muted">by {{ videoChangeOwnership.video.channel?.displayName }} </div> | |
65 | </div> | |
66 | </div> | |
74d63469 GR |
67 | </a> |
68 | </td> | |
4c9e9d2e RK |
69 | |
70 | <td>{{ videoChangeOwnership.createdAt | date: 'short' }}</td> | |
4f5d0459 RK |
71 | |
72 | <td> | |
30814423 K |
73 | <span class="badge" |
74 | [ngClass]="getStatusClass(videoChangeOwnership.status)">{{ videoChangeOwnership.status }}</span> | |
74d63469 GR |
75 | </td> |
76 | </tr> | |
77 | </ng-template> | |
4c9e9d2e RK |
78 | |
79 | <ng-template pTemplate="emptymessage"> | |
80 | <tr> | |
81 | <td colspan="6"> | |
82 | <div class="no-results"> | |
83 | <ng-container i18n>No ownership change request found.</ng-container> | |
84 | </div> | |
85 | </td> | |
86 | </tr> | |
87 | </ng-template> | |
74d63469 GR |
88 | </p-table> |
89 | ||
17119e4a | 90 | <my-accept-ownership #myAcceptOwnershipComponent (accepted)="accepted()"></my-accept-ownership> |