index.html.haml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. - content_for :page_title do
  2. = t('admin.trends.statuses.title')
  3. - content_for :header_tags do
  4. = javascript_pack_tag 'admin', async: true, crossorigin: 'anonymous'
  5. %p= t('admin.trends.statuses.description_html')
  6. %hr.spacer/
  7. = form_tag admin_trends_statuses_path, method: 'GET', class: 'simple_form' do
  8. - Trends::StatusFilter::KEYS.each do |key|
  9. = hidden_field_tag key, params[key] if params[key].present?
  10. .filters
  11. .filter-subset.filter-subset--with-select
  12. %strong= t('admin.follow_recommendations.language')
  13. .input.select.optional
  14. = select_tag :locale, options_for_select(@locales.map { |key| [standard_locale_name(key), key] }, params[:locale]), include_blank: true
  15. .filter-subset
  16. %strong= t('admin.trends.trending')
  17. %ul
  18. %li= filter_link_to t('generic.all'), trending: nil
  19. %li= filter_link_to t('admin.trends.only_allowed'), trending: 'allowed'
  20. = form_for(@form, url: batch_admin_trends_statuses_path) do |f|
  21. = hidden_field_tag :page, params[:page] || 1
  22. - Trends::StatusFilter::KEYS.each do |key|
  23. = hidden_field_tag key, params[key] if params[key].present?
  24. .batch-table
  25. .batch-table__toolbar
  26. %label.batch-table__toolbar__select.batch-checkbox-all
  27. = check_box_tag :batch_checkbox_all, nil, false
  28. .batch-table__toolbar__actions
  29. = f.button safe_join([fa_icon('check'), t('admin.trends.statuses.allow')]), name: :approve, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
  30. = f.button safe_join([fa_icon('check'), t('admin.trends.statuses.allow_account')]), name: :approve_accounts, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
  31. = f.button safe_join([fa_icon('times'), t('admin.trends.statuses.disallow')]), name: :reject, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
  32. = f.button safe_join([fa_icon('times'), t('admin.trends.statuses.disallow_account')]), name: :reject_accounts, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
  33. .batch-table__body
  34. - if @statuses.empty?
  35. = nothing_here 'nothing-here--under-tabs'
  36. - else
  37. = render partial: 'status', collection: @statuses, locals: { f: f }
  38. = paginate @statuses