show.html.haml 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. - content_for :page_title do
  2. = t('admin.settings.appearance.title')
  3. - content_for :heading do
  4. %h2= t('admin.settings.title')
  5. = render partial: 'admin/settings/shared/links'
  6. = simple_form_for @admin_settings, url: admin_settings_appearance_path, html: { method: :patch } do |f|
  7. = render 'shared/error_messages', object: @admin_settings
  8. %p.lead= t('admin.settings.appearance.preamble')
  9. .fields-group
  10. = f.input :theme, collection: Themes.instance.names, label_method: ->(theme) { I18n.t("themes.#{theme}", default: theme) }, wrapper: :with_label, include_blank: false
  11. .fields-group
  12. = f.input :custom_css, wrapper: :with_block_label, as: :text, input_html: { rows: 8 }
  13. .fields-row
  14. .fields-row__column.fields-row__column-6.fields-group
  15. = f.input :mascot, as: :file, wrapper: :with_block_label
  16. .fields-row__column.fields-row__column-6.fields-group
  17. - if @admin_settings.mascot.persisted?
  18. = image_tag @admin_settings.mascot.file.url, class: 'fields-group__thumbnail'
  19. = link_to admin_site_upload_path(@admin_settings.mascot), data: { method: :delete }, class: 'link-button link-button--destructive' do
  20. = fa_icon 'trash fw'
  21. = t('admin.site_uploads.delete')
  22. .actions
  23. = f.button :button, t('generic.save_changes'), type: :submit