Put admin actions on the left

This commit is contained in:
Chocobozzz 2020-11-16 14:26:50 +01:00
parent 9be63f123e
commit 7706b3703a
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
6 changed files with 28 additions and 28 deletions

View File

@ -39,11 +39,11 @@
<ng-template pTemplate="header">
<tr>
<th style="width: 40px"></th>
<th style="width: 150px;"></th>
<th i18n pSortableColumn="name">Video <p-sortIcon field="name"></p-sortIcon></th>
<th style="width: 100px;" i18n>Sensitive</th>
<th style="width: 120px;" i18n>Unfederated</th>
<th style="width: 150px;" i18n pSortableColumn="createdAt">Date <p-sortIcon field="createdAt"></p-sortIcon></th>
<th style="width: 150px;"></th>
</tr>
</ng-template>
@ -56,6 +56,13 @@
</span>
</td>
<td class="action-cell">
<my-action-dropdown
[ngClass]="{ 'show': expanded }" placement="bottom-right" container="body"
i18n-label label="Actions" [actions]="videoBlocklistActions" [entry]="videoBlock"
></my-action-dropdown>
</td>
<td>
<a [href]="getVideoUrl(videoBlock)" class="table-video-link" [title]="videoBlock.video.name" target="_blank" rel="noopener noreferrer">
<div class="table-video">
@ -83,13 +90,6 @@
<td>{{ booleanToText(videoBlock.unfederated) }}</td>
<td>{{ videoBlock.createdAt | date: 'short' }}</td>
</ng-container>
<td class="action-cell">
<my-action-dropdown
[ngClass]="{ 'show': expanded }" placement="bottom-right" container="body"
i18n-label label="Actions" [actions]="videoBlocklistActions" [entry]="videoBlock"
></my-action-dropdown>
</td>
</tr>
</ng-template>

View File

@ -43,11 +43,11 @@
<ng-template pTemplate="header">
<tr>
<th style="width: 40px"></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>
<th style="width: 150px;"></th>
</tr>
</ng-template>
@ -59,6 +59,13 @@
</span>
</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>
<td>
<a [href]="videoComment.account.localUrl" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer">
<div class="chip two-lines">
@ -86,13 +93,6 @@
</td>
<td>{{ videoComment.createdAt | date: 'short' }}</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>
</tr>
</ng-template>

View File

@ -86,7 +86,7 @@
<ng-template pTemplate="body" let-expanded="expanded" let-user>
<tr [pSelectableRow]="user" [ngClass]="{ banned: highlightBannedUsers && user.blocked }">
<td>
<td class="checkbox-cell">
<p-tableCheckbox [value]="user"></p-tableCheckbox>
</td>

View File

@ -37,24 +37,31 @@
<ng-template pTemplate="header">
<tr> <!-- header -->
<th style="width: 40px;"></th>
<th style="width: 150px;"></th>
<th *ngIf="isAdminView()" style="width: 20%;" pResizableColumn i18n>Reporter</th>
<th i18n>Video/Comment/Account</th>
<th style="width: 150px;" i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
<th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th>
<th i18n style="width: 80px;">Messages</th>
<th i18n *ngIf="isAdminView()" style="width: 100px;">Internal note</th>
<th style="width: 150px;"></th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-expanded="expanded" let-abuse>
<tr>
<td class="c-hand" [pRowToggler]="abuse" i18n-ngbTooltip ngbTooltip="More information" placement="top-left" container="body">
<td class="expand-cell c-hand" [pRowToggler]="abuse" 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 class="action-cell">
<my-action-dropdown
[ngClass]="{ 'show': expanded }" placement="bottom-right top-right left auto" container="body"
i18n-label label="Actions" [actions]="abuseActions" [entry]="abuse"
></my-action-dropdown>
</td>
<td *ngIf="isAdminView()">
<a *ngIf="abuse.reporterAccount" [href]="abuse.reporterAccount.url" i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer">
<div class="chip two-lines">
@ -163,13 +170,6 @@
<td *ngIf="isAdminView()" class="internal-note" container="body" placement="left auto" [ngbTooltip]="abuse.moderationComment">
{{ abuse.moderationComment }}
</td>
<td class="action-cell">
<my-action-dropdown
[ngClass]="{ 'show': expanded }" placement="bottom-right top-right left auto" container="body"
i18n-label label="Actions" [actions]="abuseActions" [entry]="abuse"
></my-action-dropdown>
</td>
</tr>
</ng-template>

View File

@ -127,6 +127,7 @@ $variables: (
$zindex: (
miniature : 10,
privacymsg : 20,
dropdown : 12000,
sub-menu : 12500,
menu : 12600,
search-typeahead: 12650,
@ -135,7 +136,6 @@ $zindex: (
tooltip : 14000,
loadbar : 15000,
modal : 16000,
dropdown : 17000,
help-popover : 17000,
notification : 18000,
hotkeys : 19000

View File

@ -54,7 +54,7 @@ p-table {
td {
padding-left: 15px !important;
&:not(.action-cell):not(.expand-cell) {
&:not(.action-cell):not(.expand-cell):not(.checkbox-cell) {
overflow: hidden !important;
text-overflow: ellipsis !important;
white-space: nowrap !important;