Display video redundancy entries as table link objects
authorRigel Kent <sendmemail@rigelk.eu>
Fri, 8 May 2020 16:41:32 +0000 (18:41 +0200)
committerRigel Kent <sendmemail@rigelk.eu>
Fri, 8 May 2020 16:41:32 +0000 (18:41 +0200)
client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.html
client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.scss
client/src/app/+admin/follows/video-redundancies-list/video-redundancy-information.component.html

index 152f6f29d666c2e05c1cb7d09ee8ef885a2c9609..28d57f83c224e707ef5df534f5deb30ac4f15428 100644 (file)
 
 <p-table
   [value]="videoRedundancies" [lazy]="true" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [rowsPerPageOptions]="rowsPerPageOptions"
-  [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id" (onPage)="onPage($event)"
+  [sortField]="sort.field" [sortOrder]="sort.order" (onLazyLoad)="loadLazy($event)" dataKey="id"
   (onPage)="onPage($event)" [expandedRowKeys]="expandedRows"
 >
   <ng-template pTemplate="header">
     <tr>
       <th style="width: 40px;"></th>
       <th style="width: 160px;" i18n *ngIf="isDisplayingRemoteVideos()">Strategy</th>
-      <th i18n pSortableColumn="name">Video name <p-sortIcon field="name"></p-sortIcon></th >
-      <th i18n>Video URL</th>
+      <th i18n pSortableColumn="name">Video <p-sortIcon field="name"></p-sortIcon></th >
       <th style="width: 100px;" i18n *ngIf="isDisplayingRemoteVideos()">Total size</th>
       <th style="width: 80px;"></th>
     </tr>
 
       <td *ngIf="isDisplayingRemoteVideos()">{{ getRedundancyStrategy(redundancy) }}</td>
 
-      <td>{{ redundancy.name }}</td>
-
       <td>
-        <a target="_blank" rel="noopener noreferrer" [href]="redundancy.url">{{ redundancy.url }}</a>
+        <a [href]="redundancy.url" i18n-title title="Open video in a new tab" target="_blank" rel="noopener noreferrer">
+          {{ redundancy.name }}
+          <span class="glyphicon glyphicon-new-window"></span>
+        </a>
       </td>
 
       <td *ngIf="isDisplayingRemoteVideos()">{{ getTotalSize(redundancy) | bytes: 1 }}</td>
index e1085cd1ba798c8f57cb95f2d6619d037c7d16ec..dc43e40077a5d577be52e8bb1672ececd1140223 100644 (file)
@@ -1,6 +1,20 @@
 @import '_variables';
 @import '_mixins';
 
+a {
+  @include disable-default-a-behaviour;
+  display: inline-block;
+
+  &, &:hover {
+    color: var(--mainForegroundColor);
+  }
+
+  span {
+    font-size: 80%;
+    color: var(--inputPlaceholderColor);
+  }
+}
+
 .expansion-block {
   margin-bottom: 20px;
 }
index a379520e3270515bf4d00a9881a2122b8aaf844c..9de6e4661bba93fc7aeb8eb4deff81495a16a412 100644 (file)
@@ -17,8 +17,3 @@
   <span class="label">Size</span>
   <span>{{ redundancyElement.size | bytes: 1 }}</span>
 </div>
-
-<div *ngIf="redundancyElement.strategy">
-  <span class="label">Strategy</span>
-  <span>{{ redundancyElement.strategy }}</span>
-</div>