]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Display total of number of video comments via pagination
authorRigel Kent <sendmemail@rigelk.eu>
Wed, 8 Jan 2020 22:28:03 +0000 (23:28 +0100)
committerRigel Kent <sendmemail@rigelk.eu>
Wed, 8 Jan 2020 22:28:08 +0000 (23:28 +0100)
fixes #2391

client/src/app/videos/+video-watch/comment/video-comments.component.html

index e25efc3ee0cf399e918048234c711c6537b3088f..2bf52ab86aea3886d9b39d42677581079ee86af1 100644 (file)
@@ -1,10 +1,10 @@
 <div>
   <div class="title-block">
     <div class="title-page title-page-single">
-      <ng-container *ngIf="comments.length > 0; then hasComments; else noComments"></ng-container>
+      <ng-container *ngIf="componentPagination.totalItems > 0; then hasComments; else noComments"></ng-container>
       <ng-template #hasComments>
-        <ng-container i18n *ngIf="comments.length === 1; else manyComments">1 Comment</ng-container>
-        <ng-template i18n #manyComments>{{ comments.length }} Comments</ng-template>
+        <ng-container i18n *ngIf="componentPagination.totalItems === 1; else manyComments">1 Comment</ng-container>
+        <ng-template i18n #manyComments>{{ componentPagination.totalItems }} Comments</ng-template>
       </ng-template>
       <ng-template i18n #noComments>Comments</ng-template>
     </div>