From 843775a2c02801bfcc3114362a8dbe49d3b17113 Mon Sep 17 00:00:00 2001 From: saurabhbhatia Date: Thu, 26 Sep 2013 16:38:24 +0800 Subject: [PATCH] Fixed the order in Personal Plugin member show page --- .../_show_research_field.html.erb | 30 +++++++++++++++++++ .../member_lists/_show_roles.html.erb | 8 +++-- .../front_end/member_lists/show.html.erb | 14 ++++----- 3 files changed, 42 insertions(+), 10 deletions(-) create mode 100644 vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/_show_research_field.html.erb diff --git a/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/_show_research_field.html.erb b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/_show_research_field.html.erb new file mode 100644 index 000000000..364ea1463 --- /dev/null +++ b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/_show_research_field.html.erb @@ -0,0 +1,30 @@ + <% show_research_field.attribute_fields.where(:disabled=>false).asc(:_id).each do |rf| %> + + <% + if !@member.get_attribute_value(rf).blank? + if !@member.get_attribute_value(rf)['val'].blank? + @rodata = @member.get_attribute_value(rf)['val'] + elsif !@member.get_attribute_value(rf)[I18n.locale].blank? + @rodata = @member.get_attribute_value(rf)[I18n.locale] + else + @rodata = nil + end + + if !@rodata.blank? and !@member.get_attribute_value(rf).get_value_by_locale(I18n.locale).blank? + %> + + + <% if rf.title == "Research Field"%> + <%= rf.title %> + <%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %> + + <%end%> + + + + <% end -%> + + <% end -%> + + <% end -%> + diff --git a/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/_show_roles.html.erb b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/_show_roles.html.erb index 7d8219a6b..7d1d74ca5 100644 --- a/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/_show_roles.html.erb +++ b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/_show_roles.html.erb @@ -1,4 +1,4 @@ - <% + <% @category = @member.role_categorys.where(:role_id=>show_roles.id) @@ -38,8 +38,12 @@ %> + <% if rf.title != "Research Field"%> <%= rf.title %> <%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %> + + <%end%> + <% end -%> diff --git a/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/show.html.erb b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/show.html.erb index 0d07bfcfb..3933e11ef 100644 --- a/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/show.html.erb +++ b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/show.html.erb @@ -2,6 +2,9 @@
+ + <%= render :partial=> "show_roles",:collection=>@member.roles.asc(:created_at) %> + @@ -10,12 +13,7 @@ - <% if !@member.sid.blank? %> - - - - - <% end %> + <% if !@member.office_tel.blank? %> @@ -35,8 +33,8 @@ <% end -%> <% end -%> - - <%= render :partial=> "show_roles",:collection=>@member.roles.asc(:created_at) %> + + <%= render :partial=> "show_research_field",:collection=>@member.roles.asc(:created_at) %>
<%= t('users.name')%> <%= @member.name%><%= t('users.email')%> <%= @member.email %>
<%= t('users.sid')%><%= @member.sid%>
<%= t('users.office_tel')%>