2 <div class=
"title-block">
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>
9 <ng-template i18n #noComments
>Comments
</ng-template>
12 <my-feed [syndicationItems]=
"syndicationItems"></my-feed>
14 <div ngbDropdown
class=
"d-inline-block ml-4">
15 <button class=
"btn btn-sm btn-outline-secondary" id=
"dropdownSortComments" ngbDropdownToggle i18n
>
18 <div ngbDropdownMenu
aria-labelledby=
"dropdownSortComments">
19 <button (click)=
"handleSortChange('-createdAt')" ngbDropdownItem i18n
>Most recent first (default)
</button>
20 <button (click)=
"handleSortChange('-totalReplies')" ngbDropdownItem i18n
>Most replies first
</button>
25 <ng-template [ngIf]=
"video.commentsEnabled === true">
29 (commentCreated)=
"onCommentThreadCreated($event)"
30 ></my-video-comment-add>
32 <div *
ngIf=
"componentPagination.totalItems === 0 && comments.length === 0" i18n
>No comments.
</div>
35 class=
"comment-threads"
38 (nearOfBottom)=
"onNearOfBottom()"
39 [dataObservable]=
"onDataSubject.asObservable()"
41 <div #commentHighlightBlock
id=
"highlighted-comment">
43 *
ngIf=
"highlightedThread"
44 [comment]=
"highlightedThread"
46 [inReplyToCommentId]=
"inReplyToCommentId"
47 [commentTree]=
"threadComments[highlightedThread.id]"
48 [highlightedComment]=
"true"
49 [firstInThread]=
"true"
50 (wantedToReply)=
"onWantedToReply($event)"
51 (wantedToDelete)=
"onWantedToDelete($event)"
52 (threadCreated)=
"onThreadCreated($event)"
53 (resetReply)=
"onResetReply()"
54 (timestampClicked)=
"handleTimestampClicked($event)"
58 <div *
ngFor=
"let comment of comments; index as i">
60 *
ngIf=
"!highlightedThread || comment.id !== highlightedThread.id"
63 [inReplyToCommentId]=
"inReplyToCommentId"
64 [commentTree]=
"threadComments[comment.id]"
65 [firstInThread]=
"i + 1 !== comments.length"
66 (wantedToReply)=
"onWantedToReply($event)"
67 (wantedToDelete)=
"onWantedToDelete($event)"
68 (threadCreated)=
"onThreadCreated($event)"
69 (resetReply)=
"onResetReply()"
70 (timestampClicked)=
"handleTimestampClicked($event)"
72 <div *
ngIf=
"comment.totalReplies !== 0 && !threadComments[comment.id]" (click)=
"viewReplies(comment.id)" class=
"view-replies mb-2">
73 <span class=
"glyphicon glyphicon-menu-down"></span>
75 <ng-container *
ngIf=
"comment.totalRepliesFromVideoAuthor > 0; then hasAuthorComments; else noAuthorComments"></ng-container>
76 <ng-template #hasAuthorComments
>
77 <ng-container *
ngIf=
"comment.totalReplies !== comment.totalRepliesFromVideoAuthor; else onlyAuthorComments" i18n
>
78 View {{ comment.totalReplies }} replies from {{ video?.account?.displayName || 'the author' }} and others
80 <ng-template i18n #onlyAuthorComments
>
81 View {{ comment.totalReplies }} replies from {{ video?.account?.displayName || 'the author' }}
84 <ng-template i18n #noAuthorComments
>View {{ comment.totalReplies }} replies
</ng-template>
86 <my-small-loader class=
"comment-thread-loading ml-1" [loading]=
"threadLoading[comment.id]"></my-small-loader>
94 <div *
ngIf=
"video.commentsEnabled === false" i18n
>
95 Comments are disabled.