video-comment-list.component.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <h1>
  2. <my-global-icon iconName="message-circle" aria-hidden="true"></my-global-icon>
  3. <ng-container i18n>Video comments</ng-container>
  4. <my-feed [syndicationItems]="syndicationItems"></my-feed>
  5. </h1>
  6. <em i18n>This view also shows comments from muted accounts.</em>
  7. <p-table
  8. [value]="comments" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [first]="pagination.start"
  9. [rowsPerPageOptions]="rowsPerPageOptions" [sortField]="sort.field" [sortOrder]="sort.order" dataKey="id"
  10. [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" [selectionPageOnly]="true"
  11. [showCurrentPageReport]="true" i18n-currentPageReportTemplate
  12. currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} comments"
  13. [expandedRowKeys]="expandedRows" [(selection)]="selectedRows"
  14. >
  15. <ng-template pTemplate="caption">
  16. <div class="caption">
  17. <div>
  18. <my-action-dropdown
  19. *ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange"
  20. [actions]="bulkActions" [entry]="selectedRows"
  21. >
  22. </my-action-dropdown>
  23. </div>
  24. <div class="ms-auto right-form">
  25. <my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter>
  26. <my-button i18n-label label="Refresh" icon="refresh" (click)="reloadData()"></my-button>
  27. </div>
  28. </div>
  29. </ng-template>
  30. <ng-template pTemplate="header">
  31. <tr>
  32. <th style="width: 40px;">
  33. <p-tableHeaderCheckbox ariaLabel="Select all rows" i18n-ariaLabel></p-tableHeaderCheckbox>
  34. </th>
  35. <th style="width: 40px;"></th>
  36. <th style="width: 150px;"></th>
  37. <th style="width: 300px;" i18n>Account</th>
  38. <th style="width: 300px;" i18n>Video</th>
  39. <th i18n>Comment</th>
  40. <th style="width: 150px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th>
  41. </tr>
  42. </ng-template>
  43. <ng-template pTemplate="body" let-videoComment let-expanded="expanded">
  44. <tr [pSelectableRow]="videoComment">
  45. <td class="checkbox-cell">
  46. <p-tableCheckbox [value]="videoComment" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox>
  47. </td>
  48. <td class="expand-cell" [pRowToggler]="videoComment">
  49. <my-table-expander-icon i18n-ngbTooltip ngbTooltip="See full comment" [expanded]="expanded"></my-table-expander-icon>
  50. </td>
  51. <td class="action-cell">
  52. <my-action-dropdown
  53. [ngClass]="{ 'show': expanded }" placement="bottom-right" container="body"
  54. i18n-label label="Actions" [actions]="videoCommentActions" [entry]="videoComment"
  55. ></my-action-dropdown>
  56. </td>
  57. <td>
  58. <a [href]="videoComment.account.localUrl" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer">
  59. <div class="chip two-lines">
  60. <my-actor-avatar [actor]="videoComment.account" actorType="account" size="32"></my-actor-avatar>
  61. <div>
  62. {{ videoComment.account.displayName }}
  63. <span>{{ videoComment.by }}</span>
  64. </div>
  65. </div>
  66. </a>
  67. </td>
  68. <td class="video">
  69. <em i18n>Commented video</em>
  70. <a [href]="videoComment.localUrl" target="_blank" rel="noopener noreferrer">{{ videoComment.video.name }}</a>
  71. </td>
  72. <td class="comment-html c-hand" [pRowToggler]="videoComment">
  73. <div [innerHTML]="videoComment.textHtml"></div>
  74. </td>
  75. <td class="c-hand" [pRowToggler]="videoComment">{{ videoComment.createdAt | date: 'short' }}</td>
  76. </tr>
  77. </ng-template>
  78. <ng-template pTemplate="rowexpansion" let-videoComment>
  79. <tr>
  80. <td class="expand-cell" colspan="5">
  81. <div [innerHTML]="videoComment.textHtml"></div>
  82. </td>
  83. </tr>
  84. </ng-template>
  85. <ng-template pTemplate="emptymessage">
  86. <tr>
  87. <td colspan="7">
  88. <div class="no-results">
  89. <ng-container *ngIf="search" i18n>No comments found matching current filters.</ng-container>
  90. <ng-container *ngIf="!search" i18n>No comments found.</ng-container>
  91. </div>
  92. </td>
  93. </tr>
  94. </ng-template>
  95. </p-table>