]>
Commit | Line | Data |
---|---|---|
4635f59d | 1 | <div> |
169310b2 | 2 | <div class="title-block"> |
44efbeba RK |
3 | <div class="title-page title-page-single"> |
4 | <ng-container *ngIf="comments.length > 0; then hasComments; else noComments"></ng-container> | |
5 | <ng-template #hasComments> | |
6 | <ng-container i18n *ngIf="comments.length === 1; else manyComments">1 Comment</ng-container> | |
7 | <ng-template i18n #manyComments>{{ comments.length }} Comments</ng-template> | |
8 | </ng-template> | |
9 | <ng-template i18n #noComments>Comments</ng-template> | |
169310b2 | 10 | </div> |
53877968 | 11 | |
c199c427 | 12 | <my-feed [syndicationItems]="syndicationItems"></my-feed> |
4635f59d C |
13 | </div> |
14 | ||
47564bbe C |
15 | <ng-template [ngIf]="video.commentsEnabled === true"> |
16 | <my-video-comment-add | |
47564bbe | 17 | [video]="video" |
cf117aaa | 18 | [user]="user" |
47564bbe C |
19 | (commentCreated)="onCommentThreadCreated($event)" |
20 | ></my-video-comment-add> | |
4635f59d | 21 | |
b1d40cff | 22 | <div *ngIf="componentPagination.totalItems === 0 && comments.length === 0" i18n>No comments.</div> |
4635f59d | 23 | |
47564bbe C |
24 | <div |
25 | class="comment-threads" | |
0cd4344f | 26 | myInfiniteScroller |
aa55a4da | 27 | [autoInit]="true" |
0cd4344f | 28 | (nearOfBottom)="onNearOfBottom()" |
ad453580 | 29 | [dataObservable]="onDataSubject.asObservable()" |
47564bbe | 30 | > |
bf079b7b | 31 | <div #commentHighlightBlock id="highlighted-comment"> |
1263fc4e | 32 | <my-video-comment |
bf079b7b | 33 | *ngIf="highlightedThread" |
b1d40cff C |
34 | [comment]="highlightedThread" |
35 | [video]="video" | |
36 | [inReplyToCommentId]="inReplyToCommentId" | |
37 | [commentTree]="threadComments[highlightedThread.id]" | |
38 | [highlightedComment]="true" | |
39 | (wantedToReply)="onWantedToReply($event)" | |
40 | (wantedToDelete)="onWantedToDelete($event)" | |
41 | (threadCreated)="onThreadCreated($event)" | |
42 | (resetReply)="onResetReply()" | |
1263fc4e C |
43 | ></my-video-comment> |
44 | </div> | |
45 | ||
47564bbe C |
46 | <div *ngFor="let comment of comments"> |
47 | <my-video-comment | |
5b8072ee | 48 | *ngIf="!highlightedThread || comment.id !== highlightedThread.id" |
47564bbe C |
49 | [comment]="comment" |
50 | [video]="video" | |
51 | [inReplyToCommentId]="inReplyToCommentId" | |
52 | [commentTree]="threadComments[comment.id]" | |
53 | (wantedToReply)="onWantedToReply($event)" | |
4cb6d457 C |
54 | (wantedToDelete)="onWantedToDelete($event)" |
55 | (threadCreated)="onThreadCreated($event)" | |
47564bbe C |
56 | (resetReply)="onResetReply()" |
57 | ></my-video-comment> | |
4635f59d | 58 | |
1263fc4e | 59 | <div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment.id)" class="view-replies"> |
b1d40cff | 60 | <ng-container i18n>View all {{ comment.totalReplies }} replies</ng-container> |
47564bbe C |
61 | |
62 | <span *ngIf="!threadLoading[comment.id]" class="glyphicon glyphicon-menu-down"></span> | |
b28e4e5e | 63 | <my-small-loader class="comment-thread-loading" [loading]="threadLoading[comment.id]"></my-small-loader> |
47564bbe | 64 | </div> |
4635f59d C |
65 | </div> |
66 | </div> | |
47564bbe C |
67 | </ng-template> |
68 | ||
b1d40cff | 69 | <div *ngIf="video.commentsEnabled === false" i18n> |
47564bbe | 70 | Comments are disabled. |
4635f59d C |
71 | </div> |
72 | </div> |