Add new routes for the proposal notifications edition and abilities to let moderators edit it (mark as ignored, hide, etc.). The notifications are not flaggable because they doesn't work like that, but in a similar way. The moderator/administrator is in charge of hidding them through the UI, so the normal users don't flag it as inappropriate. New controller Moderation::ProposalNotification to manage the moderators work.
31 lines
622 B
Ruby
31 lines
622 B
Ruby
namespace :moderation do
|
|
root to: "dashboard#index"
|
|
|
|
resources :users, only: :index do
|
|
member do
|
|
put :hide
|
|
put :hide_in_moderation_screen
|
|
end
|
|
end
|
|
|
|
resources :debates, only: :index do
|
|
put :hide, on: :member
|
|
put :moderate, on: :collection
|
|
end
|
|
|
|
resources :proposals, only: :index do
|
|
put :hide, on: :member
|
|
put :moderate, on: :collection
|
|
end
|
|
|
|
resources :comments, only: :index do
|
|
put :hide, on: :member
|
|
put :moderate, on: :collection
|
|
end
|
|
|
|
resources :proposal_notifications, only: :index do
|
|
put :hide, on: :member
|
|
put :moderate, on: :collection
|
|
end
|
|
end
|