show.html.haml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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('relationships.following'), relationship: nil
  10. %li= filter_link_to t('relationships.followers'), 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.primary'), status: 'primary'
  17. %li= filter_link_to t('relationships.moved'), status: 'moved'
  18. .filter-subset
  19. %strong= t 'relationships.activity'
  20. %ul
  21. %li= filter_link_to t('generic.all'), activity: nil
  22. %li= filter_link_to t('relationships.dormant'), activity: 'dormant'
  23. .filter-subset
  24. %strong= t 'generic.order_by'
  25. %ul
  26. %li= filter_link_to t('relationships.most_recent'), order: nil
  27. %li= filter_link_to t('relationships.last_active'), order: 'active'
  28. = form_for(@form, url: relationships_path, method: :patch) do |f|
  29. = hidden_field_tag :page, params[:page] || 1
  30. - RelationshipFilter::KEYS.each do |key|
  31. = hidden_field_tag key, params[key] if params[key].present?
  32. .batch-table
  33. .batch-table__toolbar
  34. %label.batch-table__toolbar__select.batch-checkbox-all
  35. = check_box_tag :batch_checkbox_all, nil, false
  36. .batch-table__toolbar__actions
  37. = 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?
  38. = 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?
  39. = 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?
  40. .batch-table__body
  41. - if @accounts.empty?
  42. = nothing_here 'nothing-here--under-tabs'
  43. - else
  44. = render partial: 'account', collection: @accounts, locals: { f: f }
  45. = paginate @accounts