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.

43 lines
2.1 KiB

  1. - content_for :page_title do
  2. = t('settings.relationships')
  3. - content_for :header_tags do
  4. = javascript_pack_tag 'admin', integrity: true, async: true, crossorigin: 'anonymous'
  5. .filters
  6. .filter-subset
  7. %strong= t 'relationships.relationship'
  8. %ul
  9. %li= filter_link_to t('accounts.following', count: current_account.following_count), relationship: nil
  10. %li= filter_link_to t('accounts.followers', count: current_account.followers_count), relationship: 'followed_by'
  11. %li= filter_link_to t('relationships.mutual'), relationship: 'mutual'
  12. .filter-subset
  13. %strong= t 'relationships.status'
  14. %ul
  15. %li= filter_link_to t('generic.all'), status: nil
  16. %li= filter_link_to t('relationships.active'), status: 'active'
  17. %li= filter_link_to t('relationships.abandoned'), status: 'abandoned'
  18. = form_for(@form, url: relationships_path, method: :patch) do |f|
  19. = hidden_field_tag :page, params[:page] || 1
  20. = hidden_field_tag :relationship, params[:relationship]
  21. = hidden_field_tag :status, params[:status]
  22. .batch-table
  23. .batch-table__toolbar
  24. %label.batch-table__toolbar__select.batch-checkbox-all
  25. = check_box_tag :batch_checkbox_all, nil, false
  26. .batch-table__toolbar__actions
  27. = f.button safe_join([fa_icon('user-times'), t('relationships.remove_selected_follows')]), name: :unfollow, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') } unless followed_by_relationship?
  28. = f.button safe_join([fa_icon('trash'), t('relationships.remove_selected_followers')]), name: :remove_from_followers, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') } unless following_relationship?
  29. = f.button safe_join([fa_icon('trash'), t('relationships.remove_selected_domains')]), name: :block_domains, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') } if followed_by_relationship?
  30. .batch-table__body
  31. - if @accounts.empty?
  32. = nothing_here 'nothing-here--under-tabs'
  33. - else
  34. = render partial: 'account', collection: @accounts, locals: { f: f }
  35. = paginate @accounts