app/views/admin/roles/_role.html.haml in the_role-1.7.0 vs app/views/admin/roles/_role.html.haml in the_role-2.0.0
- old
+ new
@@ -1,53 +1,54 @@
-.well
- %h3
- %b= t '.role_name'
- = role.name
+- content_for :role_main do
+ .well
+ %h3
+ %b= t '.role_name'
+ = role.name
- %h5
- %b= t '.title'
- = role.title
+ %h5
+ %b= t '.title'
+ = role.title
- %p.description
- %b= t '.role_description'
- = role.description
+ %p.description
+ %b= t '.role_description'
+ = role.description
-- role.to_hash.each_pair do |section, rules|
- .section
- %h3= section
- .delete
- .btn-group
- = button_to t('.delete_section'), admin_role_section_path(role, section), :method => :delete, :class => 'btn btn-danger', :confirm => t('.section_delete_confirm')
+ - role.to_hash.each_pair do |section, rules|
+ .section
+ %h3= section
+ .delete
+ .btn-group
+ = button_to t('.delete_section'), admin_role_section_path(role, section), :method => :delete, :class => 'btn btn-danger', :confirm => t('.section_delete_confirm')
- - rules.each_pair do |rule, value|
- .rule
- %h4
- →
- = rule
- .controls
- .btn-group
- - klass = value ? :success : :info
- - state = value ? t('.enable') : t('.disable')
- %button{ :class => "btn btn-#{klass}" }= state
- %button{ :class => "btn btn-#{klass} dropdown-toggle", 'data-toggle' => :dropdown }
- %span.caret
- %ul.dropdown-menu
- %li.success= link_to t('.enable'), rule_on_admin_role_section_path(role, section, :name => rule), :method => :put
- %li.info= link_to t('.disable'), rule_off_admin_role_section_path(role, section, :name => rule), :method => :put
- %li.divider
- %li.error= link_to t('.delete_rule'), destroy_rule_admin_role_section_path(role, section, :name => rule), :method => :delete, :confirm => t('.rule_delete_confirm')
+ - rules.each_pair do |rule, value|
+ .rule
+ %h4
+ →
+ = rule
+ .controls
+ .btn-group
+ - klass = value ? :success : :info
+ - state = value ? t('.enable') : t('.disable')
+ %button{ :class => "btn btn-#{klass}" }= state
+ %button{ :class => "btn btn-#{klass} dropdown-toggle", 'data-toggle' => :dropdown }
+ %span.caret
+ %ul.dropdown-menu
+ %li.success= link_to t('.enable'), rule_on_admin_role_section_path(role, section, :name => rule), :method => :put
+ %li.info= link_to t('.disable'), rule_off_admin_role_section_path(role, section, :name => rule), :method => :put
+ %li.divider
+ %li.error= link_to t('.delete_rule'), destroy_rule_admin_role_section_path(role, section, :name => rule), :method => :delete, :confirm => t('.rule_delete_confirm')
-%h4= t '.create_section'
+ %h4= t '.create_section'
-= form_tag admin_role_sections_path(role), :class => 'well form-inline' do |f|
- = text_field_tag :section_name, '', :class => 'input-xlarge', :placeholder => t('.new_section_placeholder')
- = submit_tag t('.create_section'), :class => :btn
+ = form_tag admin_role_sections_path(role), :class => 'well form-inline' do |f|
+ = text_field_tag :section_name, '', :class => 'input-xlarge', :placeholder => t('.new_section_placeholder')
+ = submit_tag t('.create_section'), :class => :btn
-%h4= t '.create_rule'
+ %h4= t '.create_rule'
-= form_tag create_rule_admin_role_sections_path(role), :class => 'well form-inline' do |f|
- %select.span3{ :name => :section_name }
- - role.to_hash.each_pair do |section, rules|
- %option{ :value => section }= section
+ = form_tag create_rule_admin_role_sections_path(role), :class => 'well form-inline' do |f|
+ %select.span3{ :name => :section_name }
+ - role.to_hash.each_pair do |section, rules|
+ %option{ :value => section }= section
- = text_field_tag :rule_name, '', :class => 'input-large', :placeholder => t('.new_rule_placeholder')
- = submit_tag t('.create_rule'), :class => :btn
+ = text_field_tag :rule_name, '', :class => 'input-large', :placeholder => t('.new_rule_placeholder')
+ = submit_tag t('.create_rule'), :class => :btn
\ No newline at end of file