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.

49 lines
1.8 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= filter_link_to t('admin.accounts.moderation.active'), silenced: nil, suspended: nil
  13. %li= filter_link_to t('admin.accounts.moderation.silenced'), silenced: '1', suspended: nil
  14. %li= filter_link_to t('admin.accounts.moderation.suspended'), suspended: '1', silenced: nil
  15. .filter-subset
  16. %strong= t('admin.accounts.role')
  17. %ul
  18. %li= filter_link_to t('admin.accounts.moderation.all'), staff: nil
  19. %li= filter_link_to t('admin.accounts.roles.staff'), staff: '1'
  20. = form_tag admin_accounts_url, method: 'GET', class: 'simple_form' do
  21. .fields-group
  22. - Admin::FilterHelper::ACCOUNT_FILTERS.each do |key|
  23. - if params[key].present?
  24. = hidden_field_tag key, params[key]
  25. - %i(username by_domain display_name email ip).each do |key|
  26. - unless key == :by_domain && params[:remote].blank?
  27. .input.string.optional
  28. = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.accounts.#{key}")
  29. .actions
  30. %button= t('admin.accounts.search')
  31. = link_to t('admin.accounts.reset'), admin_accounts_path, class: 'button negative'
  32. .table-wrapper
  33. %table.table
  34. %thead
  35. %tr
  36. %th= t('admin.accounts.username')
  37. %th= t('admin.accounts.role')
  38. %th= t('admin.accounts.most_recent_ip')
  39. %th= t('admin.accounts.most_recent_activity')
  40. %th
  41. %tbody
  42. = render @accounts
  43. = paginate @accounts