]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+my-library/my-ownership/my-ownership.component.html
Refactor actor avatar display
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-library / my-ownership / my-ownership.component.html
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"
8 [lazy]="true"
9 [paginator]="totalRecords > 0"
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>
18 <th style="width: 150px;" i18n>Actions</th>
19 <th style="width: 35%;" i18n>Initiator</th>
20 <th style="width: 65%;" i18n>Video</th>
21 <th style="width: 150px;" i18n pSortableColumn="createdAt">
22 Created
23 <p-sortIcon field="createdAt"></p-sortIcon>
24 </th>
25 <th style="width: 100px;" i18n>Status</th>
26 </tr>
27 </ng-template>
28
29 <ng-template pTemplate="body" let-videoChangeOwnership>
30 <tr>
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>
37 <td>
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 <my-actor-avatar [account]="videoChangeOwnership.initiatorAccount"></my-actor-avatar>
41 <div>
42 {{ videoChangeOwnership.initiatorAccount.displayName }}
43 <span class="text-muted">{{ videoChangeOwnership.initiatorAccount.nameWithHost }}</span>
44 </div>
45 </div>
46 </a>
47 </td>
48
49 <td>
50 <a [href]="videoChangeOwnership.video.url" class="video-table-video-link" [title]="videoChangeOwnership.video.name" target="_blank" rel="noopener noreferrer">
51 <div class="video-table-video">
52 <div class="video-table-video-image">
53 <img [src]="videoChangeOwnership.video.thumbnailPath">
54 </div>
55 <div class="video-table-video-text">
56 <div>
57 {{ videoChangeOwnership.video.name }}
58 </div>
59 <div class="text-muted">by {{ videoChangeOwnership.video.channel?.displayName }} </div>
60 </div>
61 </div>
62 </a>
63 </td>
64
65 <td>{{ videoChangeOwnership.createdAt | date: 'short' }}</td>
66
67 <td>
68 <span class="badge"
69 [ngClass]="getStatusClass(videoChangeOwnership.status)">{{ videoChangeOwnership.status }}</span>
70 </td>
71 </tr>
72 </ng-template>
73
74 <ng-template pTemplate="emptymessage">
75 <tr>
76 <td colspan="6">
77 <div class="no-results">
78 <ng-container i18n>No ownership change request found.</ng-container>
79 </div>
80 </td>
81 </tr>
82 </ng-template>
83 </p-table>
84
85 <my-accept-ownership #myAcceptOwnershipComponent (accepted)="accepted()"></my-accept-ownership>