fix for showing subroles

This commit is contained in:
Matthew K. Fu JuYuan 2012-11-26 10:08:06 +08:00
parent cc7907f37a
commit 046dbc9524
5 changed files with 12 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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>
</div>
</div>
<% @attribute_fields_upper_object.each do |attribute|%>
<div class="map-block back attributes">
<h4><span><%= t("admin.attributes")%></span></h4>
<%= render :partial=>"shared/attribute_field/attribute_field",:collection=>@attribute.attribute_fields%>
<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%>

View File

@ -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">

View File

@ -1,5 +1,5 @@
<% content_for :secondary do %>
<%= render 'admin/users/side_bar' %>
<%= render 'admin/users_new_interface/side_bar' %>
<% end %>
<div id="profile">