Adjust route and alias naming

This commit is contained in:
Andreas Nedbal 2022-08-20 21:18:04 +02:00 committed by Andreas Nedbal
parent 883d669d13
commit 922799f123
3 changed files with 7 additions and 7 deletions

View File

@ -33,7 +33,7 @@
%a.dropdown-item{ href: mod_anon_block_index_path }
%i.fa.fa-fw.fa-volume-off
= t(".site_wide_blocks")
%a.dropdown-item{ href: moderation_path }
%a.dropdown-item{ href: moderation_reports_path }
%i.fa.fa-fw.fa-gavel
= t(".moderation")
.dropdown-divider

View File

@ -1,9 +1,9 @@
.card
.list-group
= list_group_item t(".all"), moderation_path
= list_group_item t(".answers"), moderation_path("answer")
= list_group_item t(".comments"), moderation_path("comment")
= list_group_item t(".users"), moderation_path("user")
= list_group_item t(".questions"), moderation_path("question")
= list_group_item t(".all"), moderation_reports_path
= list_group_item t(".answers"), moderation_reports_path("answer")
= list_group_item t(".comments"), moderation_reports_path("comment")
= list_group_item t(".users"), moderation_reports_path("user")
= list_group_item t(".questions"), moderation_reports_path("question")
.d-none.d-sm-block= render "shared/links"

View File

@ -24,7 +24,7 @@ Rails.application.routes.draw do
authenticate :user, ->(user) { user.mod? } do
post "/moderation/unmask", to: "moderation#toggle_unmask", as: :moderation_toggle_unmask
get "/moderation/blocks", to: "moderation/anonymous_block#index", as: :mod_anon_block_index
get "/moderation(/:type)", to: "moderation#index", as: :moderation, defaults: { type: "all" }
get "/moderation/reports(/:type)", to: "moderation/reports#index", as: :moderation_reports, defaults: { type: "all" }
get "/moderation/inbox/:user", to: "moderation/inbox#index", as: :mod_inbox_index
namespace :ajax do
post "/mod/destroy_report", to: "moderation#destroy_report", as: :mod_destroy_report