where i deviate from standard mastodon assets
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.

index.html.haml 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. - content_for :page_title do
  2. = t('admin.tags.title')
  3. .filters
  4. .filter-subset
  5. %strong= t('admin.tags.context')
  6. %ul
  7. %li= filter_link_to t('generic.all'), directory: nil
  8. %li= filter_link_to t('admin.tags.directory'), directory: '1'
  9. .filter-subset
  10. %strong= t('admin.tags.review')
  11. %ul
  12. %li= filter_link_to t('generic.all'), reviewed: nil, unreviewed: nil, pending_review: nil
  13. %li= filter_link_to t('admin.tags.unreviewed'), unreviewed: '1', reviewed: nil, pending_review: nil
  14. %li= filter_link_to t('admin.tags.reviewed'), reviewed: '1', unreviewed: nil, pending_review: nil
  15. %li= filter_link_to safe_join([t('admin.accounts.moderation.pending'), "(#{Tag.pending_review.count})"], ' '), pending_review: '1', reviewed: nil, unreviewed: nil
  16. .filter-subset
  17. %strong= t('generic.order_by')
  18. %ul
  19. %li= filter_link_to t('admin.tags.most_recent'), popular: nil, active: nil
  20. %li= filter_link_to t('admin.tags.most_popular'), popular: '1', active: nil
  21. %li= filter_link_to t('admin.tags.last_active'), active: '1', popular: nil
  22. = form_tag admin_tags_url, method: 'GET', class: 'simple_form' do
  23. .fields-group
  24. - TagFilter::KEYS.each do |key|
  25. = hidden_field_tag key, params[key] if params[key].present?
  26. - %i(name).each do |key|
  27. .input.string.optional
  28. = text_field_tag key, params[key], class: 'string optional', placeholder: I18n.t("admin.tags.#{key}")
  29. .actions
  30. %button= t('admin.accounts.search')
  31. = link_to t('admin.accounts.reset'), admin_tags_path, class: 'button negative'
  32. %hr.spacer/
  33. = form_for(@form, url: batch_admin_tags_path) do |f|
  34. = hidden_field_tag :page, params[:page] || 1
  35. - TagFilter::KEYS.each do |key|
  36. = hidden_field_tag key, params[key] if params[key].present?
  37. .batch-table.optional
  38. .batch-table__toolbar
  39. - if params[:pending_review] == '1' || params[:unreviewed] == '1'
  40. %label.batch-table__toolbar__select.batch-checkbox-all
  41. = check_box_tag :batch_checkbox_all, nil, false
  42. .batch-table__toolbar__actions
  43. = f.button safe_join([fa_icon('check'), t('admin.accounts.approve')]), name: :approve, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
  44. = f.button safe_join([fa_icon('times'), t('admin.accounts.reject')]), name: :reject, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
  45. - else
  46. .batch-table__toolbar__actions
  47. %span.neutral-hint= t('generic.no_batch_actions_available')
  48. .batch-table__body
  49. - if @tags.empty?
  50. = nothing_here 'nothing-here--under-tabs'
  51. - else
  52. = render partial: 'tag', collection: @tags, locals: { f: f, batch_available: params[:pending_review] == '1' || params[:unreviewed] == '1' }
  53. = paginate @tags
  54. - if params[:pending_review] == '1' || params[:unreviewed] == '1'
  55. %hr.spacer/
  56. %div{ style: 'overflow: hidden' }
  57. %div{ style: 'float: right' }
  58. = link_to t('admin.accounts.reject_all'), reject_all_admin_tags_path, method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button button--destructive'
  59. %div
  60. = link_to t('admin.accounts.approve_all'), approve_all_admin_tags_path, method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button'