]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/overview/videos/video-list.component.html
Migrate to bootstrap 5
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / overview / videos / video-list.component.html
1 <h1>
2 <my-global-icon iconName="videos" aria-hidden="true"></my-global-icon>
3 <ng-container i18n>Videos</ng-container>
4 </h1>
5
6 <p-table
7 [value]="videos" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
8 [sortField]="sort.field" [sortOrder]="sort.order" dataKey="id" [resizableColumns]="true" [(selection)]="selectedVideos"
9 [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" [selectionPageOnly]="true"
10 [showCurrentPageReport]="true" i18n-currentPageReportTemplate
11 currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} videos"
12 [expandedRowKeys]="expandedRows" [ngClass]="{ loading: loading }"
13 >
14 <ng-template pTemplate="caption">
15 <div class="caption">
16 <div class="left-buttons">
17 <my-action-dropdown
18 *ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange"
19 [actions]="bulkVideoActions" [entry]="selectedVideos"
20 >
21 </my-action-dropdown>
22 </div>
23
24 <div class="ms-auto right-form">
25 <my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter>
26
27 <my-button i18n-label label="Refresh" icon="refresh" (click)="reloadData()"></my-button>
28 </div>
29
30 </div>
31 </ng-template>
32
33 <ng-template pTemplate="header">
34 <tr>
35 <th style="width: 40px">
36 <p-tableHeaderCheckbox ariaLabel="Select all rows" i18n-ariaLabel></p-tableHeaderCheckbox>
37 </th>
38 <th style="width: 40px"></th>
39 <th style="width: 60px;"></th>
40 <th i18n>Video</th>
41 <th i18n>Info</th>
42 <th i18n>Files</th>
43 <th style="width: 150px;" i18n pSortableColumn="publishedAt">Published <p-sortIcon field="publishedAt"></p-sortIcon></th>
44 </tr>
45 </ng-template>
46
47 <ng-template pTemplate="body" let-expanded="expanded" let-video>
48
49 <tr [pSelectableRow]="video">
50 <td class="checkbox-cell">
51 <p-tableCheckbox [value]="video" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox>
52 </td>
53
54 <td class="expand-cell" [pRowToggler]="video">
55 <my-table-expander-icon [expanded]="expanded"></my-table-expander-icon>
56 </td>
57
58 <td class="action-cell">
59 <my-video-actions-dropdown
60 placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" [displayOptions]="videoActionsOptions"
61 (videoRemoved)="reloadData()" (videoFilesRemoved)="reloadData()" (transcodingCreated)="reloadData()"
62 ></my-video-actions-dropdown>
63 </td>
64
65 <td>
66 <my-video-cell [video]="video"></my-video-cell>
67 </td>
68
69 <td>
70 <span class="pt-badge badge-blue" *ngIf="video.isLocal">Local</span>
71 <span class="pt-badge badge-purple" *ngIf="!video.isLocal">Remote</span>
72
73 <span [ngClass]="getPrivacyBadgeClass(video)" class="pt-badge">{{ video.privacy.label }}</span>
74
75 <span *ngIf="video.nsfw" class="pt-badge badge-red" i18n>NSFW</span>
76
77 <span *ngIf="isUnpublished(video)" class="pt-badge badge-yellow" i18n>{{ video.state.label }}</span>
78
79 <span *ngIf="isAccountBlocked(video)" class="pt-badge badge-red" i18n>Account muted</span>
80 <span *ngIf="isServerBlocked(video)" class="pt-badge badge-red" i18n>Server muted</span>
81
82 <span *ngIf="isVideoBlocked(video)" class="pt-badge badge-red" i18n>Blocked</span>
83 </td>
84
85 <td>
86 <span *ngIf="isHLS(video)" class="pt-badge badge-blue">HLS</span>
87 <span *ngIf="isWebTorrent(video)" class="pt-badge badge-blue">WebTorrent ({{ video.files.length }})</span>
88 <span *ngIf="video.isLive" class="pt-badge badge-blue">Live</span>
89
90 <span *ngIf="!isImport(video) && !video.isLive && video.isLocal">{{ getFilesSize(video) | bytes: 1 }}</span>
91 </td>
92
93 <td>
94 {{ video.publishedAt | date: 'short' }}
95 </td>
96
97 </tr>
98 </ng-template>
99
100 <ng-template pTemplate="rowexpansion" let-video>
101 <tr>
102 <td class="video-info expand-cell" colspan="7">
103 <div>
104 <div *ngIf="isWebTorrent(video)">
105 WebTorrent:
106
107 <ul>
108 <li *ngFor="let file of video.files">
109 {{ file.resolution.label }}: {{ file.size | bytes: 1 }}
110 </li>
111 </ul>
112 </div>
113
114 <div *ngIf="isHLS(video)">
115 HLS:
116
117 <ul>
118 <li *ngFor="let file of video.streamingPlaylists[0].files">
119 {{ file.resolution.label }}: {{ file.size | bytes: 1 }}
120 </li>
121 </ul>
122 </div>
123
124 <my-embed class="ms-auto" [video]="video"></my-embed>
125 </div>
126 </td>
127 </tr>
128 </ng-template>
129 </p-table>
130
131 <my-video-block #videoBlockModal (videoBlocked)="reloadData()"></my-video-block>