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