diff --git a/client/src/app/+admin/admin-routing.module.ts b/client/src/app/+admin/admin-routing.module.ts
index 0301d7601..ca31ba585 100644
--- a/client/src/app/+admin/admin-routing.module.ts
+++ b/client/src/app/+admin/admin-routing.module.ts
@@ -8,8 +8,7 @@ import { AdminComponent } from './admin.component'
import { FollowsRoutes } from './follows'
import { JobsRoutes } from './jobs/job.routes'
import { UsersRoutes } from './users'
-import { VideoAbusesRoutes } from './video-abuses'
-import { VideoBlacklistRoutes } from './video-blacklist'
+import { ModerationRoutes } from '@app/+admin/moderation/moderation.routes'
const adminRoutes: Routes = [
{
@@ -25,8 +24,7 @@ const adminRoutes: Routes = [
},
...FollowsRoutes,
...UsersRoutes,
- ...VideoAbusesRoutes,
- ...VideoBlacklistRoutes,
+ ...ModerationRoutes,
...JobsRoutes,
...ConfigRoutes
]
diff --git a/client/src/app/+admin/admin.component.html b/client/src/app/+admin/admin.component.html
index 1b2b89c3a..345fb9f5a 100644
--- a/client/src/app/+admin/admin.component.html
+++ b/client/src/app/+admin/admin.component.html
@@ -8,12 +8,8 @@
Manage follows
-
- Video abuses
-
-
-
- Video blacklist
+
+ Moderation
diff --git a/client/src/app/+admin/admin.module.ts b/client/src/app/+admin/admin.module.ts
index 23ca5a6b3..e94aac1eb 100644
--- a/client/src/app/+admin/admin.module.ts
+++ b/client/src/app/+admin/admin.module.ts
@@ -11,9 +11,9 @@ import { JobsComponent } from './jobs/job.component'
import { JobsListComponent } from './jobs/jobs-list/jobs-list.component'
import { JobService } from './jobs/shared/job.service'
import { UserCreateComponent, UserListComponent, UsersComponent, UserService, UserUpdateComponent } from './users'
-import { ModerationCommentModalComponent, VideoAbuseListComponent, VideoAbusesComponent } from './video-abuses'
-import { VideoBlacklistComponent, VideoBlacklistListComponent } from './video-blacklist'
+import { ModerationCommentModalComponent, VideoAbuseListComponent, VideoBlacklistListComponent } from './moderation'
import { UserBanModalComponent } from '@app/+admin/users/user-list/user-ban-modal.component'
+import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
@NgModule({
imports: [
@@ -36,10 +36,8 @@ import { UserBanModalComponent } from '@app/+admin/users/user-list/user-ban-moda
UserListComponent,
UserBanModalComponent,
- VideoBlacklistComponent,
+ ModerationComponent,
VideoBlacklistListComponent,
-
- VideoAbusesComponent,
VideoAbuseListComponent,
ModerationCommentModalComponent,
diff --git a/client/src/app/+admin/moderation/index.ts b/client/src/app/+admin/moderation/index.ts
new file mode 100644
index 000000000..66e2c6a39
--- /dev/null
+++ b/client/src/app/+admin/moderation/index.ts
@@ -0,0 +1,4 @@
+export * from './video-abuse-list'
+export * from './video-blacklist-list'
+export * from './moderation.component'
+export * from './moderation.routes'
diff --git a/client/src/app/+admin/moderation/moderation.component.html b/client/src/app/+admin/moderation/moderation.component.html
new file mode 100644
index 000000000..91e87fcd4
--- /dev/null
+++ b/client/src/app/+admin/moderation/moderation.component.html
@@ -0,0 +1,11 @@
+
+
+
\ No newline at end of file
diff --git a/client/src/app/+admin/moderation/moderation.component.scss b/client/src/app/+admin/moderation/moderation.component.scss
new file mode 100644
index 000000000..766d7853b
--- /dev/null
+++ b/client/src/app/+admin/moderation/moderation.component.scss
@@ -0,0 +1,4 @@
+.form-sub-title {
+ flex-grow: 0;
+ margin-right: 30px;
+}
diff --git a/client/src/app/+admin/moderation/moderation.component.ts b/client/src/app/+admin/moderation/moderation.component.ts
new file mode 100644
index 000000000..0f4efb970
--- /dev/null
+++ b/client/src/app/+admin/moderation/moderation.component.ts
@@ -0,0 +1,19 @@
+import { Component } from '@angular/core'
+import { UserRight } from '../../../../../shared'
+import { AuthService } from '@app/core/auth/auth.service'
+
+@Component({
+ templateUrl: './moderation.component.html',
+ styleUrls: [ './moderation.component.scss' ]
+})
+export class ModerationComponent {
+ constructor (private auth: AuthService) {}
+
+ hasVideoAbusesRight () {
+ return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_ABUSES)
+ }
+
+ hasVideoBlacklistRight () {
+ return this.auth.getUser().hasRight(UserRight.MANAGE_VIDEO_BLACKLIST)
+ }
+}
diff --git a/client/src/app/+admin/moderation/moderation.routes.ts b/client/src/app/+admin/moderation/moderation.routes.ts
new file mode 100644
index 000000000..b133152d9
--- /dev/null
+++ b/client/src/app/+admin/moderation/moderation.routes.ts
@@ -0,0 +1,42 @@
+import { Routes } from '@angular/router'
+import { UserRight } from '../../../../../shared'
+import { UserRightGuard } from '@app/core'
+import { VideoAbuseListComponent } from '@app/+admin/moderation/video-abuse-list'
+import { VideoBlacklistListComponent } from '@app/+admin/moderation/video-blacklist-list'
+import { ModerationComponent } from '@app/+admin/moderation/moderation.component'
+
+export const ModerationRoutes: Routes = [
+ {
+ path: 'moderation',
+ component: ModerationComponent,
+ children: [
+ {
+ path: '',
+ redirectTo: 'video-abuses/list',
+ pathMatch: 'full'
+ },
+ {
+ path: 'video-abuses/list',
+ component: VideoAbuseListComponent,
+ canActivate: [ UserRightGuard ],
+ data: {
+ userRight: UserRight.MANAGE_VIDEO_ABUSES,
+ meta: {
+ title: 'Video abuses list'
+ }
+ }
+ },
+ {
+ path: 'video-blacklist/list',
+ component: VideoBlacklistListComponent,
+ canActivate: [ UserRightGuard ],
+ data: {
+ userRight: UserRight.MANAGE_VIDEO_BLACKLIST,
+ meta: {
+ title: 'Blacklisted videos'
+ }
+ }
+ }
+ ]
+ }
+]
diff --git a/client/src/app/+admin/video-abuses/video-abuse-list/index.ts b/client/src/app/+admin/moderation/video-abuse-list/index.ts
similarity index 100%
rename from client/src/app/+admin/video-abuses/video-abuse-list/index.ts
rename to client/src/app/+admin/moderation/video-abuse-list/index.ts
diff --git a/client/src/app/+admin/video-abuses/video-abuse-list/moderation-comment-modal.component.html b/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.html
similarity index 100%
rename from client/src/app/+admin/video-abuses/video-abuse-list/moderation-comment-modal.component.html
rename to client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.html
diff --git a/client/src/app/+admin/video-abuses/video-abuse-list/moderation-comment-modal.component.scss b/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.scss
similarity index 100%
rename from client/src/app/+admin/video-abuses/video-abuse-list/moderation-comment-modal.component.scss
rename to client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.scss
diff --git a/client/src/app/+admin/video-abuses/video-abuse-list/moderation-comment-modal.component.ts b/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.ts
similarity index 95%
rename from client/src/app/+admin/video-abuses/video-abuse-list/moderation-comment-modal.component.ts
rename to client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.ts
index 7e8af6e5a..34ab384d1 100644
--- a/client/src/app/+admin/video-abuses/video-abuse-list/moderation-comment-modal.component.ts
+++ b/client/src/app/+admin/moderation/video-abuse-list/moderation-comment-modal.component.ts
@@ -4,7 +4,7 @@ import { FormReactive, VideoAbuseService, VideoAbuseValidatorsService } from '..
import { I18n } from '@ngx-translate/i18n-polyfill'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
-import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
+import { FormValidatorService } from '../../../shared/forms/form-validators/form-validator.service'
import { VideoAbuse } from '../../../../../../shared/models/videos'
@Component({
diff --git a/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.html b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html
similarity index 95%
rename from client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.html
rename to client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html
index f213ab4b0..722ff7906 100644
--- a/client/src/app/+admin/video-abuses/video-abuse-list/video-abuse-list.component.html
+++ b/client/src/app/+admin/moderation/video-abuse-list/video-abuse-list.component.html
@@ -1,7 +1,3 @@
-
-