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.

69 lines
2.6 KiB

  1. - content_for :page_title do
  2. = t('admin.accounts.title')
  3. .filters
  4. .filter-subset
  5. %strong= t('admin.accounts.location.title')
  6. %ul
  7. %li= filter_link_to t('admin.accounts.location.all'), local: nil, remote: nil
  8. %li
  9. - if selected? local: '1', remote: nil
  10. = filter_link_to t('admin.accounts.location.local'), {local: nil, remote: nil}, {local: '1', remote: nil}
  11. - else
  12. = filter_link_to t('admin.accounts.location.local'), local: '1', remote: nil
  13. %li
  14. - if selected? remote: '1', local: nil
  15. = filter_link_to t('admin.accounts.location.remote'), {remote: nil, local: nil}, {remote: '1', local: nil}
  16. - else
  17. = filter_link_to t('admin.accounts.location.remote'), remote: '1', local: nil
  18. .filter-subset
  19. %strong= t('admin.accounts.moderation.title')
  20. %ul
  21. %li= filter_link_to t('admin.accounts.moderation.all'), silenced: nil, suspended: nil
  22. %li
  23. - if selected? silenced: '1'
  24. = filter_link_to t('admin.accounts.moderation.silenced'), {silenced: nil}, {silenced: '1'}
  25. - else
  26. = filter_link_to t('admin.accounts.moderation.silenced'), silenced: '1'
  27. %li
  28. - if selected? suspended: '1'
  29. = filter_link_to t('admin.accounts.moderation.suspended'), {suspended: nil}, {suspended: '1'}
  30. - else
  31. = filter_link_to t('admin.accounts.moderation.suspended'), suspended: '1'
  32. .filter-subset
  33. %strong= t('admin.accounts.role')
  34. %ul
  35. %li= filter_link_to t('admin.accounts.moderation.all'), staff: nil
  36. %li= filter_link_to t('admin.accounts.roles.staff'), staff: '1'
  37. .filter-subset
  38. %strong= t('admin.accounts.order.title')
  39. %ul
  40. %li= filter_link_to t('admin.accounts.order.alphabetic'), recent: nil
  41. %li= filter_link_to t('admin.accounts.order.most_recent'), recent: '1'
  42. = form_tag admin_accounts_url, method: 'GET', class: 'simple_form' do
  43. .fields-group
  44. - Admin::FilterHelper::ACCOUNT_FILTERS.each do |key|
  45. - if params[key].present?
  46. = hidden_field_tag key, params[key]
  47. - %i(username by_domain display_name email ip).each do |key|
  48. .input.string.optional
  49. = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.accounts.#{key}")
  50. .actions
  51. %button= t('admin.accounts.search')
  52. = link_to t('admin.accounts.reset'), admin_accounts_path, class: 'button negative'
  53. .table-wrapper
  54. %table.table
  55. %thead
  56. %tr
  57. %th= t('admin.accounts.username')
  58. %th= t('admin.accounts.domain')
  59. %th
  60. %th
  61. %tbody
  62. = render @accounts
  63. = paginate @accounts