mirror of https://github.com/Chocobozzz/PeerTube
Display report reason in multiple lines (#957)
* Display report reason in multiple lines * more adjustments: - move report reason into dropdown - allow line wrap in dropdown (also in video blacklist) - fix colspan in blacklist dropdown - merge css rules into moderation.component.scss * use min-width for labelspull/1000/head
parent
bee0abffff
commit
83b5fe9c55
|
@ -1,4 +1,24 @@
|
||||||
|
@import 'variables';
|
||||||
|
@import 'mixins';
|
||||||
|
|
||||||
.form-sub-title {
|
.form-sub-title {
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
margin-right: 30px;
|
margin-right: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.moderation-expanded-label {
|
||||||
|
font-weight: $font-semibold;
|
||||||
|
min-width: 200px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.moderation-expanded-text {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.moderation-expanded {
|
||||||
|
word-wrap: break-word;
|
||||||
|
overflow: visible !important;
|
||||||
|
text-overflow: unset !important;
|
||||||
|
white-space: unset !important;
|
||||||
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 40px"></th>
|
<th style="width: 40px"></th>
|
||||||
<th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th>
|
<th i18n pSortableColumn="state" style="width: 80px;">State <p-sortIcon field="state"></p-sortIcon></th>
|
||||||
<th i18n>Reason</th>
|
|
||||||
<th i18n>Reporter</th>
|
<th i18n>Reporter</th>
|
||||||
<th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
|
<th i18n pSortableColumn="createdAt">Created <p-sortIcon field="createdAt"></p-sortIcon></th>
|
||||||
<th i18n>Video</th>
|
<th i18n>Video</th>
|
||||||
|
@ -17,7 +16,7 @@
|
||||||
<ng-template pTemplate="body" let-expanded="expanded" let-videoAbuse>
|
<ng-template pTemplate="body" let-expanded="expanded" let-videoAbuse>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<span *ngIf="videoAbuse.moderationComment" class="expander" [pRowToggler]="videoAbuse">
|
<span class="expander" [pRowToggler]="videoAbuse">
|
||||||
<i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
|
<i [ngClass]="expanded ? 'glyphicon glyphicon-menu-down' : 'glyphicon glyphicon-menu-right'"></i>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
@ -27,8 +26,6 @@
|
||||||
<span *ngIf="isVideoAbuseRejected(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-remove"></span>
|
<span *ngIf="isVideoAbuseRejected(videoAbuse)" [title]="videoAbuse.state.label" class="glyphicon glyphicon-remove"></span>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>{{ videoAbuse.reason }}</td>
|
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a [href]="videoAbuse.reporterAccount.url" i18n-title title="Go to the account" target="_blank" rel="noopener noreferrer">
|
<a [href]="videoAbuse.reporterAccount.url" i18n-title title="Go to the account" target="_blank" rel="noopener noreferrer">
|
||||||
{{ createByString(videoAbuse.reporterAccount) }}
|
{{ createByString(videoAbuse.reporterAccount) }}
|
||||||
|
@ -50,12 +47,18 @@
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template pTemplate="rowexpansion" let-videoAbuse>
|
<ng-template pTemplate="rowexpansion" let-videoAbuse>
|
||||||
<tr class="moderation-comment">
|
<tr>
|
||||||
<td colspan="7">
|
<td class="moderation-expanded" colspan="6">
|
||||||
<span i18n class="moderation-comment-label">Moderation comment:</span>
|
<div>
|
||||||
{{ videoAbuse.moderationComment }}
|
<span i18n class="moderation-expanded-label">Reason:</span>
|
||||||
</td>
|
<span class="moderation-expanded-text">{{ videoAbuse.reason }}</span>
|
||||||
</tr>
|
</div>
|
||||||
|
<div *ngIf="videoAbuse.moderationComment">
|
||||||
|
<span i18n class="moderation-expanded-label">Moderation comment:</span>
|
||||||
|
<span class="moderation-expanded-text">{{ videoAbuse.moderationComment }}</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</p-table>
|
</p-table>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
@import 'variables';
|
|
||||||
@import 'mixins';
|
|
||||||
|
|
||||||
.moderation-comment-label {
|
|
||||||
font-weight: $font-semibold;
|
|
||||||
}
|
|
|
@ -13,7 +13,7 @@ import { Video } from '../../../shared/video/video.model'
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-video-abuse-list',
|
selector: 'my-video-abuse-list',
|
||||||
templateUrl: './video-abuse-list.component.html',
|
templateUrl: './video-abuse-list.component.html',
|
||||||
styleUrls: [ './video-abuse-list.component.scss']
|
styleUrls: [ '../moderation.component.scss']
|
||||||
})
|
})
|
||||||
export class VideoAbuseListComponent extends RestTable implements OnInit {
|
export class VideoAbuseListComponent extends RestTable implements OnInit {
|
||||||
@ViewChild('moderationCommentModal') moderationCommentModal: ModerationCommentModalComponent
|
@ViewChild('moderationCommentModal') moderationCommentModal: ModerationCommentModalComponent
|
||||||
|
|
|
@ -36,10 +36,10 @@
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template pTemplate="rowexpansion" let-videoBlacklist>
|
<ng-template pTemplate="rowexpansion" let-videoBlacklist>
|
||||||
<tr class="blacklist-reason">
|
<tr>
|
||||||
<td colspan="7">
|
<td class="moderation-expanded" colspan="5">
|
||||||
<span i18n class="blacklist-reason-label">Blacklist reason:</span>
|
<span i18n class="moderation-expanded-label">Blacklist reason:</span>
|
||||||
{{ videoBlacklist.reason }}
|
<span class="moderation-expanded-text">{{ videoBlacklist.reason }}</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
@import 'variables';
|
|
||||||
@import 'mixins';
|
|
||||||
|
|
||||||
.blacklist-reason-label {
|
|
||||||
font-weight: $font-semibold;
|
|
||||||
}
|
|
|
@ -11,7 +11,7 @@ import { Video } from '../../../shared/video/video.model'
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-video-blacklist-list',
|
selector: 'my-video-blacklist-list',
|
||||||
templateUrl: './video-blacklist-list.component.html',
|
templateUrl: './video-blacklist-list.component.html',
|
||||||
styleUrls: [ './video-blacklist-list.component.scss' ]
|
styleUrls: [ '../moderation.component.scss' ]
|
||||||
})
|
})
|
||||||
export class VideoBlacklistListComponent extends RestTable implements OnInit {
|
export class VideoBlacklistListComponent extends RestTable implements OnInit {
|
||||||
blacklist: VideoBlacklist[] = []
|
blacklist: VideoBlacklist[] = []
|
||||||
|
|
Loading…
Reference in New Issue