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.

56 lines
2.2 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.local'), remote: nil
  8. %li= filter_link_to t('admin.accounts.location.remote'), remote: '1'
  9. .filter-subset
  10. %strong= t('admin.accounts.moderation.title')
  11. %ul
  12. %li= link_to safe_join([t('admin.accounts.moderation.pending'), "(#{number_with_delimiter(User.pending.count)})"], ' '), admin_pending_accounts_path
  13. %li= filter_link_to t('admin.accounts.moderation.active'), silenced: nil, suspended: nil, pending: nil
  14. %li= filter_link_to t('admin.accounts.moderation.silenced'), silenced: '1', suspended: nil, pending: nil
  15. %li= filter_link_to t('admin.accounts.moderation.suspended'), suspended: '1', silenced: nil, pending: nil
  16. .filter-subset
  17. %strong= t('admin.accounts.role')
  18. %ul
  19. %li= filter_link_to t('admin.accounts.moderation.all'), staff: nil
  20. %li= filter_link_to t('admin.accounts.roles.staff'), staff: '1'
  21. .filter-subset
  22. %strong= t 'generic.order_by'
  23. %ul
  24. %li= filter_link_to t('relationships.most_recent'), order: nil
  25. %li= filter_link_to t('admin.accounts.username'), order: 'alphabetic'
  26. %li= filter_link_to t('relationships.last_active'), order: 'active'
  27. = form_tag admin_accounts_url, method: 'GET', class: 'simple_form' do
  28. .fields-group
  29. - AccountFilter::KEYS.each do |key|
  30. - if params[key].present?
  31. = hidden_field_tag key, params[key]
  32. - %i(username by_domain display_name email ip).each do |key|
  33. - unless key == :by_domain && params[:remote].blank?
  34. .input.string.optional
  35. = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.accounts.#{key}")
  36. .actions
  37. %button.button= t('admin.accounts.search')
  38. = link_to t('admin.accounts.reset'), admin_accounts_path, class: 'button negative'
  39. .table-wrapper
  40. %table.table
  41. %thead
  42. %tr
  43. %th= t('admin.accounts.username')
  44. %th= t('admin.accounts.role')
  45. %th= t('admin.accounts.most_recent_ip')
  46. %th= t('admin.accounts.most_recent_activity')
  47. %th
  48. %tbody
  49. = render @accounts
  50. = paginate @accounts