index.html.haml 684 B

123456789101112131415161718192021222324
  1. - content_for :page_title do
  2. = t('admin.warning_presets.title')
  3. - if can? :create, :account_warning_preset
  4. = simple_form_for @warning_preset, url: admin_warning_presets_path do |f|
  5. = render 'shared/error_messages', object: @warning_preset
  6. .fields-group
  7. = f.input :title, wrapper: :with_block_label
  8. .fields-group
  9. = f.input :text, wrapper: :with_block_label
  10. .actions
  11. = f.button :button, t('admin.warning_presets.add_new'), type: :submit
  12. %hr.spacer/
  13. - if @warning_presets.empty?
  14. .muted-hint.center-text
  15. = t 'admin.warning_presets.empty'
  16. - else
  17. .announcements-list
  18. = render partial: 'warning_preset', collection: @warning_presets