diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-04 10:44:18 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-05 10:53:08 +0200 |
commit | 693263e936763a851e3c8c020e3739def8bd4eca (patch) | |
tree | 7fd333fcf76edbc24f3daf4a78e47ff55f048b04 /client/src/app/+my-account/my-account-videos/my-account-videos.component.html | |
parent | 9ba1d64b1ac77304d9ffb1b3432a90ea00ff3281 (diff) | |
download | PeerTube-693263e936763a851e3c8c020e3739def8bd4eca.tar.gz PeerTube-693263e936763a851e3c8c020e3739def8bd4eca.tar.zst PeerTube-693263e936763a851e3c8c020e3739def8bd4eca.zip |
Refactor videos selection components
Diffstat (limited to 'client/src/app/+my-account/my-account-videos/my-account-videos.component.html')
-rw-r--r-- | client/src/app/+my-account/my-account-videos/my-account-videos.component.html | 63 |
1 files changed, 27 insertions, 36 deletions
diff --git a/client/src/app/+my-account/my-account-videos/my-account-videos.component.html b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html index 3a4054de8..d7993fdc2 100644 --- a/client/src/app/+my-account/my-account-videos/my-account-videos.component.html +++ b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html | |||
@@ -1,39 +1,30 @@ | |||
1 | <div i18n *ngIf="pagination.totalItems === 0">No results.</div> | 1 | <my-videos-selection |
2 | [(selection)]="selection" | ||
3 | [(videosModel)]="videos" | ||
4 | [miniatureDisplayOptions]="miniatureDisplayOptions" | ||
5 | [titlePage]="titlePage" | ||
6 | [getVideosObservableFunction]="getVideosObservableFunction" | ||
7 | #videosSelection | ||
8 | > | ||
9 | <ng-template ptTemplate="globalButtons"> | ||
10 | <span class="action-button action-button-delete-selection" (click)="deleteSelectedVideos()"> | ||
11 | <my-global-icon iconName="delete"></my-global-icon> | ||
12 | <ng-container i18n>Delete</ng-container> | ||
13 | </span> | ||
14 | </ng-template> | ||
15 | |||
16 | <ng-template ptTemplate="rowButtons" let-video> | ||
17 | <my-delete-button (click)="deleteVideo(video)"></my-delete-button> | ||
18 | |||
19 | <my-edit-button [routerLink]="[ '/videos', 'update', video.uuid ]"></my-edit-button> | ||
20 | |||
21 | <my-button i18n-label label="Change ownership" | ||
22 | className="action-button-change-ownership" | ||
23 | icon="im-with-her" | ||
24 | (click)="changeOwnership($event, video)" | ||
25 | ></my-button> | ||
26 | </ng-template> | ||
27 | </my-videos-selection> | ||
2 | 28 | ||
3 | <div myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [autoInit]="true" class="videos"> | ||
4 | <div class="video" *ngFor="let video of videos; let i = index"> | ||
5 | <div class="checkbox-container"> | ||
6 | <my-peertube-checkbox [inputName]="'video-check-' + video.id" [(ngModel)]="checkedVideos[video.id]"></my-peertube-checkbox> | ||
7 | </div> | ||
8 | |||
9 | <my-video-miniature [video]="video" [displayOptions]="miniatureDisplayOptions" [displayAsRow]="true"></my-video-miniature> | ||
10 | |||
11 | <!-- Display only once --> | ||
12 | <div class="action-selection-mode" *ngIf="isInSelectionMode() === true && i === 0"> | ||
13 | <div class="action-selection-mode-child"> | ||
14 | <span i18n class="action-button action-button-cancel-selection" (click)="abortSelectionMode()"> | ||
15 | Cancel | ||
16 | </span> | ||
17 | |||
18 | <span class="action-button action-button-delete-selection" (click)="deleteSelectedVideos()"> | ||
19 | <my-global-icon iconName="delete"></my-global-icon> | ||
20 | <ng-container i18n>Delete</ng-container> | ||
21 | </span> | ||
22 | </div> | ||
23 | </div> | ||
24 | |||
25 | <div class="video-buttons" *ngIf="isInSelectionMode() === false"> | ||
26 | <my-delete-button (click)="deleteVideo(video)"></my-delete-button> | ||
27 | |||
28 | <my-edit-button [routerLink]="[ '/videos', 'update', video.uuid ]"></my-edit-button> | ||
29 | |||
30 | <my-button i18n-label label="Change ownership" | ||
31 | className="action-button-change-ownership" | ||
32 | icon="im-with-her" | ||
33 | (click)="changeOwnership($event, video)" | ||
34 | ></my-button> | ||
35 | </div> | ||
36 | </div> | ||
37 | </div> | ||
38 | 29 | ||
39 | <my-video-change-ownership #videoChangeOwnershipModal></my-video-change-ownership> | 30 | <my-video-change-ownership #videoChangeOwnershipModal></my-video-change-ownership> |