Move server rule creation form to its own page (#34637)
This commit is contained in:
parent
c45ce549af
commit
aa04efb92a
5 changed files with 27 additions and 16 deletions
|
@ -1,21 +1,12 @@
|
|||
- content_for :page_title do
|
||||
= t('admin.rules.title')
|
||||
|
||||
%p= t('admin.rules.description_html')
|
||||
- content_for :heading_actions do
|
||||
- if can? :create, :rule
|
||||
= link_to t('admin.rules.add_new'), new_admin_rule_path, class: 'button'
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
- if can? :create, :rule
|
||||
= simple_form_for @rule, url: admin_rules_path do |form|
|
||||
= render 'shared/error_messages', object: @rule
|
||||
|
||||
= render form
|
||||
|
||||
.actions
|
||||
= form.button :button, t('admin.rules.add_new'), type: :submit
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
- if @rules.empty?
|
||||
.muted-hint.center-text
|
||||
= t 'admin.rules.empty'
|
||||
|
|
14
app/views/admin/rules/new.html.haml
Normal file
14
app/views/admin/rules/new.html.haml
Normal file
|
@ -0,0 +1,14 @@
|
|||
- content_for :page_title do
|
||||
= t('admin.rules.add_new')
|
||||
|
||||
%p= t('admin.rules.description_html')
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
= simple_form_for @rule, url: admin_rules_path do |form|
|
||||
= render 'shared/error_messages', object: @rule
|
||||
|
||||
= render form
|
||||
|
||||
.actions
|
||||
= form.button :button, t('admin.rules.add_new'), type: :submit
|
Loading…
Add table
Add a link
Reference in a new issue