fix for showing subroles
This commit is contained in:
parent
1e89c30150
commit
9a684f54b4
|
@ -22,6 +22,7 @@ class Admin::InfosController < ApplicationController
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@attribute = Info.find(params[:id])
|
@attribute = Info.find(params[:id])
|
||||||
|
@attribute_fields_upper_object = [@attribute]
|
||||||
render :template => 'admin/attributes/edit'
|
render :template => 'admin/attributes/edit'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ class Admin::RolesController < ApplicationController
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@attribute = Role.find(params[:id])
|
@attribute = Role.find(params[:id])
|
||||||
|
@attribute_fields_upper_object = @attribute.sub_roles
|
||||||
render :template => 'admin/attributes/edit'
|
render :template => 'admin/attributes/edit'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -15,14 +15,16 @@
|
||||||
</div>
|
</div>
|
||||||
</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]"}%>
|
<%= 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>
|
<% @attribute_fields_upper_object.each do |attribute|%>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="map-block back attributes">
|
<div class="map-block back attributes">
|
||||||
<h4><span><%= t("admin.attributes")%></span></h4>
|
<h4><span><%= attribute.title+ t("admin.attributes")%></span></h4>
|
||||||
<%= render :partial=>"shared/attribute_field/attribute_field",:collection=>@attribute.attribute_fields%>
|
<%= render :partial=>"shared/attribute_field/attribute_field",:collection=>attribute.attribute_fields%>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-actions form-fixed pagination-right">
|
<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%>
|
<%= 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 %>
|
<% content_for :secondary do %>
|
||||||
<%= render 'admin/users/side_bar' %>
|
<%= render 'admin/users_new_interface/side_bar' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="main_list">
|
<div class="main_list">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<% content_for :secondary do %>
|
<% content_for :secondary do %>
|
||||||
<%= render 'admin/users/side_bar' %>
|
<%= render 'admin/users_new_interface/side_bar' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div id="profile">
|
<div id="profile">
|
||||||
|
|
Loading…
Reference in New Issue