show.html.haml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. - content_for :page_title do
  2. = t('settings.statuses_cleanup')
  3. - content_for :heading_actions do
  4. = button_tag t('generic.save_changes'), class: 'button', form: 'edit_policy'
  5. = simple_form_for @policy, url: statuses_cleanup_path, method: :put, html: { id: 'edit_policy' } do |f|
  6. .fields-row
  7. .fields-row__column.fields-row__column-6.fields-group
  8. = f.input :enabled,
  9. as: :boolean,
  10. hint: t('statuses_cleanup.enabled_hint'),
  11. label: t('statuses_cleanup.enabled'),
  12. wrapper: :with_label
  13. .fields-row__column.fields-row__column-6.fields-group
  14. = f.input :min_status_age,
  15. collection: AccountStatusesCleanupPolicy::ALLOWED_MIN_STATUS_AGE.map(&:to_i),
  16. hint: false,
  17. include_blank: false,
  18. label_method: ->(i) { t("statuses_cleanup.min_age.#{i}") },
  19. label: t('statuses_cleanup.min_age_label'),
  20. wrapper: :with_label
  21. .flash-message= t('statuses_cleanup.explanation')
  22. %h4= t('statuses_cleanup.exceptions')
  23. .fields-row
  24. .fields-row__column.fields-row__column-6.fields-group
  25. = f.input :keep_pinned,
  26. hint: t('statuses_cleanup.keep_pinned_hint'),
  27. label: t('statuses_cleanup.keep_pinned'),
  28. wrapper: :with_label
  29. .fields-row__column.fields-row__column-6.fields-group
  30. = f.input :keep_direct,
  31. hint: t('statuses_cleanup.keep_direct_hint'),
  32. label: t('statuses_cleanup.keep_direct'),
  33. wrapper: :with_label
  34. .fields-row
  35. .fields-row__column.fields-row__column-6.fields-group
  36. = f.input :keep_self_fav,
  37. hint: t('statuses_cleanup.keep_self_fav_hint'),
  38. label: t('statuses_cleanup.keep_self_fav'),
  39. wrapper: :with_label
  40. .fields-row__column.fields-row__column-6.fields-group
  41. = f.input :keep_self_bookmark,
  42. hint: t('statuses_cleanup.keep_self_bookmark_hint'),
  43. label: t('statuses_cleanup.keep_self_bookmark'),
  44. wrapper: :with_label
  45. .fields-row
  46. .fields-row__column.fields-row__column-6.fields-group
  47. = f.input :keep_polls,
  48. hint: t('statuses_cleanup.keep_polls_hint'),
  49. label: t('statuses_cleanup.keep_polls'),
  50. wrapper: :with_label
  51. .fields-row__column.fields-row__column-6.fields-group
  52. = f.input :keep_media,
  53. hint: t('statuses_cleanup.keep_media_hint'),
  54. label: t('statuses_cleanup.keep_media'),
  55. wrapper: :with_label
  56. %h4= t('statuses_cleanup.interaction_exceptions')
  57. .fields-row
  58. .fields-row__column.fields-row__column-6.fields-group
  59. = f.input :min_favs,
  60. hint: t('statuses_cleanup.min_favs_hint'),
  61. input_html: { min: 1, placeholder: t('statuses_cleanup.ignore_favs') },
  62. label: t('statuses_cleanup.min_favs'),
  63. wrapper: :with_label
  64. .fields-row__column.fields-row__column-6.fields-group
  65. = f.input :min_reblogs,
  66. hint: t('statuses_cleanup.min_reblogs_hint'),
  67. input_html: { min: 1, placeholder: t('statuses_cleanup.ignore_reblogs') },
  68. label: t('statuses_cleanup.min_reblogs'),
  69. wrapper: :with_label
  70. .flash-message= t('statuses_cleanup.interaction_exceptions_explanation')