show.html.haml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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, as: :boolean, wrapper: :with_label, label: t('statuses_cleanup.enabled'), hint: t('statuses_cleanup.enabled_hint')
  9. .fields-row__column.fields-row__column-6.fields-group
  10. = f.input :min_status_age, wrapper: :with_label, label: t('statuses_cleanup.min_age_label'), collection: AccountStatusesCleanupPolicy::ALLOWED_MIN_STATUS_AGE.map(&:to_i), label_method: ->(i) { t("statuses_cleanup.min_age.#{i}") }, include_blank: false, hint: false
  11. .flash-message= t('statuses_cleanup.explanation')
  12. %h4= t('statuses_cleanup.exceptions')
  13. .fields-row
  14. .fields-row__column.fields-row__column-6.fields-group
  15. = f.input :keep_pinned, wrapper: :with_label, label: t('statuses_cleanup.keep_pinned'), hint: t('statuses_cleanup.keep_pinned_hint')
  16. .fields-row__column.fields-row__column-6.fields-group
  17. = f.input :keep_direct, wrapper: :with_label, label: t('statuses_cleanup.keep_direct'), hint: t('statuses_cleanup.keep_direct_hint')
  18. .fields-row
  19. .fields-row__column.fields-row__column-6.fields-group
  20. = f.input :keep_self_fav, wrapper: :with_label, label: t('statuses_cleanup.keep_self_fav'), hint: t('statuses_cleanup.keep_self_fav_hint')
  21. .fields-row__column.fields-row__column-6.fields-group
  22. = f.input :keep_self_bookmark, wrapper: :with_label, label: t('statuses_cleanup.keep_self_bookmark'), hint: t('statuses_cleanup.keep_self_bookmark_hint')
  23. .fields-row
  24. .fields-row__column.fields-row__column-6.fields-group
  25. = f.input :keep_polls, wrapper: :with_label, label: t('statuses_cleanup.keep_polls'), hint: t('statuses_cleanup.keep_polls_hint')
  26. .fields-row__column.fields-row__column-6.fields-group
  27. = f.input :keep_media, wrapper: :with_label, label: t('statuses_cleanup.keep_media'), hint: t('statuses_cleanup.keep_media_hint')
  28. %h4= t('statuses_cleanup.interaction_exceptions')
  29. .fields-row
  30. .fields-row__column.fields-row__column-6.fields-group
  31. = f.input :min_favs, wrapper: :with_label, label: t('statuses_cleanup.min_favs'), hint: t('statuses_cleanup.min_favs_hint'), input_html: { min: 1, placeholder: t('statuses_cleanup.ignore_favs') }
  32. .fields-row__column.fields-row__column-6.fields-group
  33. = f.input :min_reblogs, wrapper: :with_label, label: t('statuses_cleanup.min_reblogs'), hint: t('statuses_cleanup.min_reblogs_hint'), input_html: { min: 1, placeholder: t('statuses_cleanup.ignore_reblogs') }
  34. .flash-message= t('statuses_cleanup.interaction_exceptions_explanation')