index.html.haml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. - content_for :page_title do
  2. = t('admin.trends.statuses.title')
  3. %p= t('admin.trends.statuses.description_html')
  4. %hr.spacer/
  5. = form_tag admin_trends_statuses_path, method: 'GET', class: 'simple_form' do
  6. - Trends::StatusFilter::KEYS.each do |key|
  7. = hidden_field_tag key, params[key] if params[key].present?
  8. .filters
  9. .filter-subset.filter-subset--with-select
  10. %strong= t('admin.follow_recommendations.language')
  11. .input.select.optional
  12. = select_tag :locale, options_for_select(@locales.map { |key| [standard_locale_name(key), key] }, params[:locale]), include_blank: true
  13. .filter-subset
  14. %strong= t('admin.trends.trending')
  15. %ul
  16. %li= filter_link_to t('generic.all'), trending: nil
  17. %li= filter_link_to t('admin.trends.only_allowed'), trending: 'allowed'
  18. = form_for(@form, url: batch_admin_trends_statuses_path) do |f|
  19. = hidden_field_tag :page, params[:page] || 1
  20. - Trends::StatusFilter::KEYS.each do |key|
  21. = hidden_field_tag key, params[key] if params[key].present?
  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('check'), t('admin.trends.statuses.allow')]), name: :approve, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
  28. = 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') }
  29. = 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') }
  30. = 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') }
  31. .batch-table__body
  32. - if @statuses.empty?
  33. = nothing_here 'nothing-here--under-tabs'
  34. - else
  35. = render partial: 'status', collection: @statuses, locals: { f: f }
  36. = paginate @statuses