mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 04:16:21 +00:00
feat: mostrar la cantidad de instancias
This commit is contained in:
parent
1ee41f2d5e
commit
43d190ba74
4 changed files with 8 additions and 5 deletions
|
@ -11,6 +11,9 @@ class InstanceModeration < ApplicationRecord
|
|||
# todas las que no estén bloqueadas ya.
|
||||
scope :may_block, -> { where.not(aasm_state: 'blocked') }
|
||||
scope :may_pause, -> { where.not(aasm_state: 'paused') }
|
||||
scope :paused, -> { where(aasm_state: 'paused') }
|
||||
scope :blocked, -> { where(aasm_state: 'blocked') }
|
||||
scope :allowed, -> { where(aasm_state: 'allowed') }
|
||||
|
||||
# Bloquear instancias en masa
|
||||
def self.block_all!
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
= render 'components/instances_checked_submenu'
|
||||
|
||||
= render 'components/dropdown', text: t('.text_show') do
|
||||
= render 'components/instances_show_submenu'
|
||||
= render 'components/instances_show_submenu', site: site
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
= render 'components/dropdown_item', text: t('.submenu_paused'), path: site_moderation_queue_path(state: 'paused')
|
||||
= render 'components/dropdown_item', text: t('.submenu_allowed'), path: site_moderation_queue_path(state: 'allowed')
|
||||
= render 'components/dropdown_item', text: t('.submenu_blocked'), path: site_moderation_queue_path(state: 'blocked')
|
||||
= render 'components/dropdown_item', text: t('.submenu_paused', count: site.instance_moderations.paused.count), path: site_moderation_queue_path(state: 'paused')
|
||||
= render 'components/dropdown_item', text: t('.submenu_allowed', count: site.instance_moderations.allowed.count), path: site_moderation_queue_path(state: 'allowed')
|
||||
= render 'components/dropdown_item', text: t('.submenu_blocked', count: site.instance_moderations.blocked.count), path: site_moderation_queue_path(state: 'blocked')
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
= render 'components/select_all', id: 'instances'
|
||||
.col-11
|
||||
-# Filtros
|
||||
= render 'components/instances_filters'
|
||||
= render 'components/instances_filters', site: site
|
||||
|
||||
.col-12
|
||||
- if instance_moderations.count.zero?
|
||||
|
|
Loading…
Reference in a new issue