show.html.haml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. - content_for :page_title do
  2. = t('settings.preferences')
  3. = simple_form_for current_user, url: settings_preferences_other_path, html: { method: :put } do |f|
  4. = render 'shared/error_messages', object: current_user
  5. .fields-group
  6. = f.input :setting_noindex, as: :boolean, wrapper: :with_label
  7. .fields-group
  8. = f.input :setting_hide_network, as: :boolean, wrapper: :with_label
  9. .fields-group
  10. = f.input :setting_aggregate_reblogs, as: :boolean, wrapper: :with_label, recommended: true
  11. %h4= t 'preferences.posting_defaults'
  12. .fields-row
  13. .fields-group.fields-row__column.fields-row__column-6
  14. = f.input :setting_default_privacy, collection: Status.selectable_visibilities, wrapper: :with_label, include_blank: false, label_method: lambda { |visibility| safe_join([I18n.t("statuses.visibilities.#{visibility}"), I18n.t("statuses.visibilities.#{visibility}_long")], ' - ') }, required: false, hint: false
  15. .fields-group.fields-row__column.fields-row__column-6
  16. = f.input :setting_default_language, collection: [nil] + filterable_languages.sort, wrapper: :with_label, label_method: lambda { |locale| locale.nil? ? I18n.t('statuses.language_detection') : human_locale(locale) }, required: false, include_blank: false, hint: false
  17. .fields-group
  18. = f.input :setting_default_sensitive, as: :boolean, wrapper: :with_label
  19. .fields-group
  20. = f.input :setting_show_application, as: :boolean, wrapper: :with_label, recommended: true
  21. %h4= t 'preferences.public_timelines'
  22. .fields-group
  23. = f.input :chosen_languages, collection: filterable_languages.sort, wrapper: :with_block_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) }, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
  24. .actions
  25. = f.button :button, t('generic.save_changes'), type: :submit