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.

66 lines
2.5 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.order.title')
  34. %ul
  35. %li= filter_link_to t('admin.accounts.order.alphabetic'), recent: nil
  36. %li= filter_link_to t('admin.accounts.order.most_recent'), recent: '1'
  37. = form_tag admin_accounts_url, method: 'GET', class: 'simple_form' do
  38. .fields-group
  39. - Admin::FilterHelper::ACCOUNT_FILTERS.each do |key|
  40. - if params[key].present?
  41. = hidden_field_tag key, params[key]
  42. - %i(username by_domain display_name email ip).each do |key|
  43. .input.string.optional
  44. = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.accounts.#{key}")
  45. .actions
  46. %button= t('admin.accounts.search')
  47. = link_to t('admin.accounts.reset'), admin_accounts_path, class: 'button negative'
  48. .table-wrapper
  49. %table.table
  50. %thead
  51. %tr
  52. %th= t('admin.accounts.username')
  53. %th= t('admin.accounts.domain')
  54. %th= t('admin.accounts.protocol')
  55. %th= t('admin.accounts.confirmed')
  56. %th= fa_icon 'paper-plane-o'
  57. %th
  58. %tbody
  59. = render @accounts
  60. = paginate @accounts