闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
524 B

  1. # frozen_string_literal: true
  2. module Admin::AccountsHelper
  3. def filter_params(more_params)
  4. params.permit(:local, :remote, :by_domain, :silenced, :suspended, :recent).merge(more_params)
  5. end
  6. def filter_link_to(text, more_params)
  7. link_to text, filter_params(more_params), class: params.merge(more_params).compact == params.compact ? 'selected' : ''
  8. end
  9. def table_link_to(icon, text, path, options = {})
  10. link_to safe_join([fa_icon(icon), text]), path, options.merge(class: 'table-action-link')
  11. end
  12. end