show.html.haml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. - content_for :page_title do
  2. = t('admin.settings.branding.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_branding_path, html: { method: :patch } do |f|
  7. = render 'shared/error_messages', object: @admin_settings
  8. %p.lead= t('admin.settings.branding.preamble')
  9. .fields-group
  10. = f.input :site_title, wrapper: :with_label
  11. .fields-row
  12. .fields-row__column.fields-row__column-6.fields-group
  13. = f.input :site_contact_username, wrapper: :with_label
  14. .fields-row__column.fields-row__column-6.fields-group
  15. = f.input :site_contact_email, wrapper: :with_label
  16. .fields-group
  17. = f.input :site_short_description, wrapper: :with_block_label, as: :text, input_html: { rows: 2, maxlength: 200 }
  18. .fields-row
  19. .fields-row__column.fields-row__column-6.fields-group
  20. = f.input :thumbnail, as: :file, wrapper: :with_block_label
  21. .fields-row__column.fields-row__column-6.fields-group
  22. - if @admin_settings.thumbnail.persisted?
  23. = image_tag @admin_settings.thumbnail.file.url(:'@1x'), class: 'fields-group__thumbnail'
  24. = link_to admin_site_upload_path(@admin_settings.thumbnail), data: { method: :delete }, class: 'link-button link-button--destructive' do
  25. = fa_icon 'trash fw'
  26. = t('admin.site_uploads.delete')
  27. .actions
  28. = f.button :button, t('generic.save_changes'), type: :submit