Fixed the order in Personal Plugin member show page

This commit is contained in:
saurabhbhatia 2013-09-26 16:38:24 +08:00
parent 1021ac2e9b
commit 843775a2c0
3 changed files with 42 additions and 10 deletions

View File

@ -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?
%>
<tr>
<% if rf.title == "Research Field"%>
<td><%= rf.title %></td>
<td><%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %></td>
</tr>
<%end%>
</tr>
<% end -%>
<% end -%>
<% end -%>

View File

@ -1,4 +1,4 @@
<%
<!-- <%
@status = @member.role_statuses.where(:role_id=>show_roles.id)
if !@status.blank?
@ -8,7 +8,7 @@
<td><%= show_attribute_value(@member.role_statuses.where(:role_id=>show_roles.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
</tr>
<% end -%>
<% end -%> -->
<%
@category = @member.role_categorys.where(:role_id=>show_roles.id)
@ -38,8 +38,12 @@
%>
<tr>
<% if rf.title != "Research Field"%>
<td><%= rf.title %></td>
<td><%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %></td>
</tr>
<%end%>
</tr>
<% end -%>

View File

@ -2,6 +2,9 @@
<div class="member-data">
<table>
<tbody>
<%= render :partial=> "show_roles",:collection=>@member.roles.asc(:created_at) %>
<tr>
<td><%= t('users.name')%></td>
<td><%= @member.name%></td>
@ -10,12 +13,7 @@
<td><%= t('users.email')%></td>
<td><a href="mailto:<%= @member.email %>"><%= @member.email %></a></td>
</tr>
<% if !@member.sid.blank? %>
<tr>
<td><%= t('users.sid')%></td>
<td><%= @member.sid%></td>
</tr>
<% end %>
<% if !@member.office_tel.blank? %>
<tr>
<td><%= t('users.office_tel')%></td>
@ -35,8 +33,8 @@
</tr>
<% end -%>
<% end -%>
<%= render :partial=> "show_roles",:collection=>@member.roles.asc(:created_at) %>
<%= render :partial=> "show_research_field",:collection=>@member.roles.asc(:created_at) %>
</tbody>
</table>