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.

44 lines
2.3 KiB

  1. - content_for :page_title do
  2. = t('admin.statuses.title')
  3. .back-link
  4. = link_to admin_account_path(@account.id) do
  5. %i.fa.fa-chevron-left.fa-fw
  6. = t('admin.statuses.back_to_account')
  7. .filters
  8. .filter-subset
  9. %strong= t('admin.statuses.media.title')
  10. %ul
  11. %li= link_to t('admin.statuses.no_media'), admin_account_statuses_path(@account.id, current_params.merge(media: nil)), class: !params[:media] && 'selected'
  12. %li= link_to t('admin.statuses.with_media'), admin_account_statuses_path(@account.id, current_params.merge(media: true)), class: params[:media] && 'selected'
  13. - if @statuses.empty?
  14. .accounts-grid
  15. = render 'accounts/nothing_here'
  16. - else
  17. = form_for(@form, url: admin_account_statuses_path(@account.id)) do |f|
  18. = hidden_field_tag :page, params[:page]
  19. = hidden_field_tag :media, params[:media]
  20. .batch-form-box
  21. .batch-checkbox-all
  22. = check_box_tag :batch_checkbox_all, nil, false
  23. = f.select :action, Form::StatusBatch::ACTION_TYPE.map{|action| [t("admin.statuses.batch.#{action}"), action]}
  24. = f.submit t('admin.statuses.execute'), data: { confirm: t('admin.reports.are_you_sure') }, class: 'button'
  25. .media-spoiler-toggle-buttons
  26. .media-spoiler-show-button.button= t('admin.statuses.media.show')
  27. .media-spoiler-hide-button.button= t('admin.statuses.media.hide')
  28. - @statuses.each do |status|
  29. .account-status{ data: { id: status.id } }
  30. .batch-checkbox
  31. = f.check_box :status_ids, { multiple: true, include_hidden: false }, status.id
  32. .activity-stream.activity-stream-headless
  33. .entry= render 'stream_entries/simple_status', status: status
  34. .account-status__actions
  35. - unless status.media_attachments.empty?
  36. = link_to admin_account_status_path(@account.id, status, current_params.merge(status: { sensitive: !status.sensitive })), method: :patch, class: 'icon-button nsfw-button', title: t("admin.reports.nsfw.#{!status.sensitive}") do
  37. = fa_icon status.sensitive? ? 'eye' : 'eye-slash'
  38. = link_to admin_account_status_path(@account.id, status), method: :delete, class: 'icon-button trash-button', title: t('admin.reports.delete'), data: { confirm: t('admin.reports.are_you_sure') }, remote: true do
  39. = fa_icon 'trash'
  40. = paginate @statuses