index.html.haml 558 B

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