]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/moderation/video-comment-list/video-comment-list.component.html
Fix some accessibility issues
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / moderation / video-comment-list / video-comment-list.component.html
index b4f66a75f4fde9a17ac145ebde815b78ebcee28d..fa4a8edfdb19cc41ed0f0c556a1b228cb20d9fd2 100644 (file)
@@ -1,9 +1,11 @@
 <h1>
-  <my-global-icon iconName="cross" aria-hidden="true"></my-global-icon>
+  <my-global-icon iconName="message-circle" aria-hidden="true"></my-global-icon>
   <ng-container i18n>Video comments</ng-container>
+
+  <my-feed [syndicationItems]="syndicationItems"></my-feed>
 </h1>
 
-this view does show comments from muted accounts so you can delete them
+<em>This view also shows comments from muted accounts.</em>
 
 <p-table
   [value]="comments" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
@@ -11,9 +13,18 @@ this view does show comments from muted accounts so you can delete them
   [showCurrentPageReport]="true" i18n-currentPageReportTemplate
   currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} comments"
   (onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
+  [(selection)]="selectedComments"
 >
   <ng-template pTemplate="caption">
     <div class="caption">
+      <div>
+        <my-action-dropdown
+          *ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange"
+          [actions]="bulkCommentActions" [entry]="selectedComments"
+        >
+        </my-action-dropdown>
+      </div>
+
       <div class="ml-auto">
         <div class="input-group has-feedback has-clear">
           <div class="input-group-prepend c-hand" ngbDropdown placement="bottom-left auto" container="body">
@@ -40,43 +51,65 @@ this view does show comments from muted accounts so you can delete them
 
   <ng-template pTemplate="header">
     <tr>
+      <th style="width: 40px">
+        <p-tableHeaderCheckbox ariaLabel="Select all rows" i18n-ariaLabel></p-tableHeaderCheckbox>
+      </th>
       <th style="width: 40px"></th>
-      <th style="width: 100px;" i18n>Account</th>
-      <th style="width: 100px;" i18n>Video</th>
-      <th style="width: 100px;" i18n>Comment</th>
-      <th style="width: 150px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th>
       <th style="width: 150px;"></th>
+      <th style="width: 300px" i18n>Account</th>
+      <th style="width: 300px" i18n>Video</th>
+      <th i18n>Comment</th>
+      <th style="width: 150px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th>
     </tr>
   </ng-template>
 
   <ng-template pTemplate="body" let-videoComment let-expanded="expanded">
-    <tr>
+    <tr [pSelectableRow]="videoComment">
+
+      <td class="checkbox-cell">
+        <p-tableCheckbox [value]="videoComment" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox>
+      </td>
+
       <td class="expand-cell c-hand" [pRowToggler]="videoComment" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body">
         <span class="expander">
           <i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
         </span>
       </td>
 
-      <td>
-        {{ videoComment.by }}
+      <td class="action-cell">
+        <my-action-dropdown
+          [ngClass]="{ 'show': expanded }" placement="bottom-right" container="body"
+          i18n-label label="Actions" [actions]="videoCommentActions" [entry]="videoComment"
+        ></my-action-dropdown>
       </td>
 
       <td>
-        {{ videoComment.video.name }}
+        <a [href]="videoComment.account.localUrl" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer">
+          <div class="chip two-lines">
+            <img
+              class="avatar"
+              [src]="videoComment.accountAvatarUrl"
+              alt=""
+            >
+            <div>
+              {{ videoComment.account.displayName }}
+              <span>{{ videoComment.by }}</span>
+            </div>
+          </div>
+        </a>
       </td>
 
-      <td>
-        <div [innerHTML]="videoComment.textHtml"></div>
-      </td>
+      <td class="video">
+        <em i18n>Commented video</em>
 
-      <td>{{ videoComment.createdAt | date: 'short' }}</td>
+        <a [href]="videoComment.localUrl" target="_blank" rel="noopener noreferrer">{{ videoComment.video.name }}</a>
+      </td>
 
-      <td class="action-cell">
-        <my-action-dropdown
-          [ngClass]="{ 'show': expanded }" placement="bottom-right" container="body"
-          i18n-label label="Actions" [actions]="videoCommentActions" [entry]="videoComment"
-        ></my-action-dropdown>
+      <td class="comment-html c-hand" [pRowToggler]="videoComment">
+        <div [innerHTML]="videoComment.textHtml"></div>
       </td>
+
+      <td class="c-hand" [pRowToggler]="videoComment">{{ videoComment.createdAt | date: 'short' }}</td>
     </tr>
   </ng-template>
 
@@ -90,7 +123,7 @@ this view does show comments from muted accounts so you can delete them
 
   <ng-template pTemplate="emptymessage">
     <tr>
-      <td colspan="5">
+      <td colspan="7">
         <div class="no-results">
           <ng-container *ngIf="search" i18n>No comments found matching current filters.</ng-container>
           <ng-container *ngIf="!search" i18n>No comments found.</ng-container>