]>
Commit | Line | Data |
---|---|---|
4635f59d C |
1 | <div> |
2 | <div class="title-page title-page-single"> | |
3 | Comments | |
4 | </div> | |
5 | ||
47564bbe C |
6 | <ng-template [ngIf]="video.commentsEnabled === true"> |
7 | <my-video-comment-add | |
8 | *ngIf="isUserLoggedIn()" | |
9 | [video]="video" | |
10 | (commentCreated)="onCommentThreadCreated($event)" | |
11 | ></my-video-comment-add> | |
4635f59d | 12 | |
47564bbe | 13 | <div *ngIf="componentPagination.totalItems === 0 && comments.length === 0">No comments.</div> |
4635f59d | 14 | |
47564bbe C |
15 | <div |
16 | class="comment-threads" | |
17 | infiniteScroll | |
18 | [infiniteScrollUpDistance]="1.5" | |
19 | [infiniteScrollDistance]="0.5" | |
20 | (scrolled)="onNearOfBottom()" | |
21 | > | |
22 | <div *ngFor="let comment of comments"> | |
23 | <my-video-comment | |
24 | [comment]="comment" | |
25 | [video]="video" | |
26 | [inReplyToCommentId]="inReplyToCommentId" | |
27 | [commentTree]="threadComments[comment.id]" | |
28 | (wantedToReply)="onWantedToReply($event)" | |
29 | (resetReply)="onResetReply()" | |
30 | ></my-video-comment> | |
4635f59d | 31 | |
47564bbe C |
32 | <div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment)" class="view-replies"> |
33 | View all {{ comment.totalReplies }} replies | |
34 | ||
35 | <span *ngIf="!threadLoading[comment.id]" class="glyphicon glyphicon-menu-down"></span> | |
36 | <my-loader class="comment-thread-loading" [loading]="threadLoading[comment.id]"></my-loader> | |
37 | </div> | |
4635f59d C |
38 | </div> |
39 | </div> | |
47564bbe C |
40 | </ng-template> |
41 | ||
42 | <div *ngIf="video.commentsEnabled === false"> | |
43 | Comments are disabled. | |
4635f59d C |
44 | </div> |
45 | </div> |