Fixed order of Teacher Show page
This commit is contained in:
parent
471987f800
commit
250a03f074
|
@ -0,0 +1,30 @@
|
|||
<% show_office_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 == "Office"%>
|
||||
<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 -%>
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
%>
|
||||
|
||||
<tr>
|
||||
<% if rf.title != "Research Field"%>
|
||||
<% if (rf.title != "Research Field" && rf.title != "Office")%>
|
||||
<td><%= rf.title %></td>
|
||||
<td><%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %></td>
|
||||
</tr>
|
||||
|
|
|
@ -20,10 +20,6 @@
|
|||
<td><%= @member.office_tel%></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td><%= t('users.sex')%></td>
|
||||
<td><%= t("users.#{@member.sex}") %></td>
|
||||
</tr>
|
||||
|
||||
<% @profile_data.each do |item| %>
|
||||
<% if !item[:value].blank? %>
|
||||
|
@ -33,6 +29,7 @@
|
|||
</tr>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<%= render :partial=> "show_office_field",:collection=>@member.roles.asc(:created_at) %>
|
||||
|
||||
<%= render :partial=> "show_research_field",:collection=>@member.roles.asc(:created_at) %>
|
||||
|
||||
|
@ -57,14 +54,13 @@
|
|||
<% if !@intro_data.blank? %>
|
||||
|
||||
<% if !@intro_data.brief_intro.blank? or !@intro_data.complete_list.blank? %>
|
||||
<li><a href="#<%= plugin.name.gsub(' ', '') %>"><%= plugin.name %></a></li>
|
||||
|
||||
<li><a href="#<%= plugin["name"].gsub(' ', '') %>"><%= plugin["name"] %></a></li>
|
||||
<% end %>
|
||||
|
||||
<% else %>
|
||||
|
||||
<% if !@data.blank? %>
|
||||
<li><a href="#<%= plugin.name.gsub(' ', '') %>"><%= plugin.name %></a></li>
|
||||
<li><a href="#<%= plugin["name"].gsub(' ', '') %>"><%= plugin["name"] %></a></li>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
@ -86,7 +82,7 @@
|
|||
|
||||
<% if !@intro_data.brief_intro.blank? or !@intro_data.complete_list.blank? %>
|
||||
|
||||
<div class="module-pane" id="<%= plugin.name.gsub(' ', '') %>">
|
||||
<div class="module-pane" id="<%= plugin["name"].gsub(' ', '') %>">
|
||||
|
||||
<%= render :partial => @plugin_partial if !@plugin_partial.blank? %>
|
||||
</div>
|
||||
|
@ -95,7 +91,7 @@
|
|||
<% else %>
|
||||
|
||||
<% if !@data.blank? %>
|
||||
<div class="module-pane" id="<%= plugin.name.gsub(' ', '') %>">
|
||||
<div class="module-pane" id="<%= plugin["name"].gsub(' ', '') %>">
|
||||
|
||||
<%= render :partial => @plugin_partial if !@plugin_partial.blank? %>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue