aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/account/account-videos/account-videos.component.html
blob: 66ce3a77bb46299688baa1bfe910869105bcfb02 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<div *ngIf="pagination.totalItems === 0">No results.</div>

<div
  myInfiniteScroller
  [pageHeight]="pageHeight"
  (nearOfTop)="onNearOfTop()" (nearOfBottom)="onNearOfBottom()" (pageChanged)="onPageChanged($event)"
  class="videos" #videosElement
>
  <div *ngFor="let videos of videoPages; let i = index" class="videos-page">
    <div class="video" *ngFor="let video of videos; let j = index">
      <div class="checkbox-container">
        <input [id]="'video-check-' + video.id" type="checkbox" [(ngModel)]="checkedVideos[video.id]" />
        <label [for]="'video-check-' + video.id"></label>
      </div>

      <my-video-thumbnail [video]="video"></my-video-thumbnail>

      <div class="video-info">
        <a class="video-info-name" [routerLink]="['/videos/watch', video.uuid]" [attr.title]="video.name">{{ video.name }}</a>
        <span class="video-info-date-views">{{ video.createdAt | myFromNow }} - {{ video.views | myNumberFormatter }} views</span>
        <div class="video-info-private">{{ video.privacy.label }}</div>
      </div>

      <!-- Display only once -->
      <div class="action-selection-mode" *ngIf="isInSelectionMode() === true && i === 0 && j === 0">
        <div class="action-selection-mode-child">
          <span class="action-button action-button-cancel-selection" (click)="abortSelectionMode()">
            Cancel
          </span>

          <span class="action-button action-button-delete-selection" (click)="deleteSelectedVideos()">
            <span class="icon icon-delete-white"></span>
            Delete
          </span>
        </div>
      </div>

      <div class="video-buttons" *ngIf="isInSelectionMode() === false">
        <my-delete-button (click)="deleteVideo(video)"></my-delete-button>

        <my-edit-button [routerLink]="[ '/videos', 'edit', video.uuid ]"></my-edit-button>
      </div>
    </div>
  </div>
</div>