aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/follows
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-08 14:05:55 +0200
committerChocobozzz <me@florianbigard.com>2020-04-08 14:05:55 +0200
commitb1f3b635edf48949d268ce3d72fc33f126932a21 (patch)
tree1e5f9806358131355e93489e1d89d87a8f19415e /client/src/app/+admin/follows
parenta911462d02bb9134f539ba904d440693608a27c2 (diff)
downloadPeerTube-b1f3b635edf48949d268ce3d72fc33f126932a21.tar.gz
PeerTube-b1f3b635edf48949d268ce3d72fc33f126932a21.tar.zst
PeerTube-b1f3b635edf48949d268ce3d72fc33f126932a21.zip
Improve admin tables row expand
Diffstat (limited to 'client/src/app/+admin/follows')
-rw-r--r--client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html22
-rw-r--r--client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.scss2
-rw-r--r--client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts6
3 files changed, 21 insertions, 9 deletions
diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html
index 80c66ec60..18d88c20c 100644
--- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html
+++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html
@@ -1,6 +1,4 @@
1<div class="admin-sub-header"> 1<div class="admin-sub-header">
2 <div i18n class="form-sub-title">Video redundancies list</div>
3
4 <div class="select-filter-block"> 2 <div class="select-filter-block">
5 <label for="displayType" i18n>Display</label> 3 <label for="displayType" i18n>Display</label>
6 4
@@ -19,6 +17,7 @@
19> 17>
20 <ng-template pTemplate="header"> 18 <ng-template pTemplate="header">
21 <tr> 19 <tr>
20 <th style="width: 40px"></th>
22 <th i18n *ngIf="isDisplayingRemoteVideos()">Strategy</th> 21 <th i18n *ngIf="isDisplayingRemoteVideos()">Strategy</th>
23 <th i18n pSortableColumn="name">Video name <p-sortIcon field="name"></p-sortIcon></th> 22 <th i18n pSortableColumn="name">Video name <p-sortIcon field="name"></p-sortIcon></th>
24 <th i18n>Video URL</th> 23 <th i18n>Video URL</th>
@@ -27,8 +26,15 @@
27 </tr> 26 </tr>
28 </ng-template> 27 </ng-template>
29 28
30 <ng-template pTemplate="body" let-redundancy> 29 <ng-template pTemplate="body" let-expanded="expanded" let-redundancy>
31 <tr class="expander" [pRowToggler]="redundancy"> 30 <tr>
31
32 <td class="expand-cell">
33 <span class="expander" i18n-ngbTooltip ngbTooltip="List redundancies" [pRowToggler]="redundancy">
34 <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
35 </span>
36 </td>
37
32 <td *ngIf="isDisplayingRemoteVideos()">{{ getRedundancyStrategy(redundancy) }}</td> 38 <td *ngIf="isDisplayingRemoteVideos()">{{ getRedundancyStrategy(redundancy) }}</td>
33 39
34 <td>{{ redundancy.name }}</td> 40 <td>{{ redundancy.name }}</td>
@@ -46,16 +52,16 @@
46 </ng-template> 52 </ng-template>
47 53
48 <ng-template pTemplate="rowexpansion" let-redundancy> 54 <ng-template pTemplate="rowexpansion" let-redundancy>
49 <tr> 55 <tr *ngIf="redundancy.redundancies.files.length !== 0">
50 <td colspan="2"> 56 <td [attr.colspan]="getColspan()">
51 <div *ngFor="let file of redundancy.redundancies.files" class="expansion-block"> 57 <div *ngFor="let file of redundancy.redundancies.files" class="expansion-block">
52 <my-video-redundancy-information [redundancyElement]="file"></my-video-redundancy-information> 58 <my-video-redundancy-information [redundancyElement]="file"></my-video-redundancy-information>
53 </div> 59 </div>
54 </td> 60 </td>
55 </tr> 61 </tr>
56 62
57 <tr> 63 <tr *ngIf="redundancy.redundancies.streamingPlaylists.length !== 0">
58 <td colspan="2"> 64 <td [attr.colspan]="getColspan()">
59 <div *ngFor="let playlist of redundancy.redundancies.streamingPlaylists"> 65 <div *ngFor="let playlist of redundancy.redundancies.streamingPlaylists">
60 <my-video-redundancy-information [redundancyElement]="playlist"></my-video-redundancy-information> 66 <my-video-redundancy-information [redundancyElement]="playlist"></my-video-redundancy-information>
61 </div> 67 </div>
diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.scss b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.scss
index 05018c281..e1085cd1b 100644
--- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.scss
+++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.scss
@@ -6,7 +6,7 @@
6} 6}
7 7
8.admin-sub-header { 8.admin-sub-header {
9 align-items: flex-end; 9 justify-content: flex-end;
10 10
11 .select-filter-block { 11 .select-filter-block {
12 &:not(:last-child) { 12 &:not(:last-child) {
diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
index 2edee99a3..d563b4e95 100644
--- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
+++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
@@ -65,6 +65,12 @@ export class VideoRedundanciesListComponent extends RestTable implements OnInit
65 }) 65 })
66 } 66 }
67 67
68 getColspan () {
69 if (this.isDisplayingRemoteVideos()) return 3
70
71 return 2
72 }
73
68 isDisplayingRemoteVideos () { 74 isDisplayingRemoteVideos () {
69 return this.displayType === 'remote-videos' 75 return this.displayType === 'remote-videos'
70 } 76 }