fix for showing subroles
This commit is contained in:
parent
1e89c30150
commit
9a684f54b4
|
@ -22,6 +22,7 @@ class Admin::InfosController < ApplicationController
|
|||
|
||||
def edit
|
||||
@attribute = Info.find(params[:id])
|
||||
@attribute_fields_upper_object = [@attribute]
|
||||
render :template => 'admin/attributes/edit'
|
||||
end
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ class Admin::RolesController < ApplicationController
|
|||
|
||||
def edit
|
||||
@attribute = Role.find(params[:id])
|
||||
@attribute_fields_upper_object = @attribute.sub_roles
|
||||
render :template => 'admin/attributes/edit'
|
||||
end
|
||||
|
||||
|
|
|
@ -15,14 +15,16 @@
|
|||
</div>
|
||||
</div>
|
||||
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>@attribute.title_translations,:class_ext=>"pull-left",:label_ext=>t("admin.infos.item_name"),:field_name=>"info[title_translations]"}%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="map-block back attributes">
|
||||
<h4><span><%= t("admin.attributes")%></span></h4>
|
||||
<%= render :partial=>"shared/attribute_field/attribute_field",:collection=>@attribute.attribute_fields%>
|
||||
</div>
|
||||
|
||||
<% @attribute_fields_upper_object.each do |attribute|%>
|
||||
<div class="map-block back attributes">
|
||||
<h4><span><%= attribute.title+ t("admin.attributes")%></span></h4>
|
||||
<%= render :partial=>"shared/attribute_field/attribute_field",:collection=>attribute.attribute_fields%>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= link_to content_tag(:i,t("admin.infos.add_attribute_field"),:class=>"icon-plus icon-white"),admin_info_add_attribute_field_path(@attribute),:class=>"btn btn-primary",:remote => true%>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% content_for :secondary do %>
|
||||
<%= render 'admin/users/side_bar' %>
|
||||
<%= render 'admin/users_new_interface/side_bar' %>
|
||||
<% end %>
|
||||
|
||||
<div class="main_list">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% content_for :secondary do %>
|
||||
<%= render 'admin/users/side_bar' %>
|
||||
<%= render 'admin/users_new_interface/side_bar' %>
|
||||
<% end %>
|
||||
|
||||
<div id="profile">
|
||||
|
|
Loading…
Reference in New Issue