fix member show fields
This commit is contained in:
parent
20a9f60c09
commit
8609263ec6
|
@ -1,26 +1,3 @@
|
||||||
<!-- <%
|
|
||||||
@status = @member.role_statuses.where(:role_id=>show_roles.id)
|
|
||||||
|
|
||||||
if !@status.blank?
|
|
||||||
%>
|
|
||||||
<tr>
|
|
||||||
<td><%= t('status')%></td>
|
|
||||||
<td><%= show_attribute_value(@member.role_statuses.where(:role_id=>show_roles.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<% end -%> -->
|
|
||||||
|
|
||||||
<%
|
|
||||||
@category = @member.role_categorys.where(:role_id=>show_roles.id)
|
|
||||||
|
|
||||||
if !@category.blank?
|
|
||||||
%>
|
|
||||||
<tr>
|
|
||||||
<td><%= t('category')%></td>
|
|
||||||
<td><%= show_attribute_value(@member.role_categorys.where(:role_id=>show_roles.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<% end -%>
|
|
||||||
|
|
||||||
<% show_roles.attribute_fields.where(:disabled=>false).asc(:_id).each do |rf| %>
|
<% show_roles.attribute_fields.where(:disabled=>false).asc(:_id).each do |rf| %>
|
||||||
|
|
||||||
|
@ -34,16 +11,12 @@
|
||||||
@rodata = nil
|
@rodata = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
if !@rodata.blank? and !@member.get_attribute_value(rf).get_value_by_locale(I18n.locale).blank?
|
if !@rodata.blank? and !@member.get_attribute_value(rf).get_value_by_locale(I18n.locale).blank? and rf.key != 'job_title'
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<% if (rf.title == "Academic Position" || rf.title == "職稱")%>
|
|
||||||
<td><%= rf.title %></td>
|
<td><%= rf.title %></td>
|
||||||
<td><%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %></td>
|
<td><%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %></td>
|
||||||
</tr>
|
|
||||||
<%end%>
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
|
@ -3,18 +3,35 @@
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<%= render :partial=> "show_roles",:collection=>@member.roles.asc(:created_at) %>
|
<%
|
||||||
|
@member_role = @member.roles.asc(:created_at).first
|
||||||
|
@category = @member.role_categorys.where(:role_id=>@member_role.id)
|
||||||
|
|
||||||
|
if !@category.blank?
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td><%= t('category')%></td>
|
||||||
|
<td><%= show_attribute_value(@member.role_categorys.where(:role_id=>@member_role.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
|
<% @job_title = show_attribute_value(User.get_member_list_attribute_value(@member.id,"teacher","job_title").get_value_by_locale(I18n.locale))
|
||||||
|
if @job_title != 'NoData' and !@job_title.blank?
|
||||||
|
%>
|
||||||
|
<tr>
|
||||||
|
<td><%= User.get_member_list_attribute_field_name("teacher","job_title") %></td>
|
||||||
|
<td><%= @job_title %></td>
|
||||||
|
</tr>
|
||||||
|
<% end -%>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= t('users.name')%></td>
|
<td><%= t('users.name')%></td>
|
||||||
<td><%= @member.name%></td>
|
<td><%= @member.name%></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% if !@member.email_hidden? %>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= t('users.email')%></td>
|
<td><%= t('users.email')%></td>
|
||||||
<td><a href="mailto:<%= @member.email %>"><%= @member.email %></a></td>
|
<td><a href="mailto:<%= @member.email %>"><%= @member.email %></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
|
||||||
<% if !@member.office_tel.blank? %>
|
<% if !@member.office_tel.blank? %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= t('users.office_tel')%></td>
|
<td><%= t('users.office_tel')%></td>
|
||||||
|
@ -30,9 +47,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<%= render :partial=> "show_office_field",:collection=>@member.roles.asc(:created_at) %>
|
|
||||||
|
|
||||||
<%= render :partial=> "show_research_field",:collection=>@member.roles.asc(:created_at) %>
|
<%= render :partial=> "show_roles",:collection=>@member.roles.asc(:created_at) %>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -55,7 +71,7 @@
|
||||||
<% if !@intro_data.blank? %>
|
<% if !@intro_data.blank? %>
|
||||||
|
|
||||||
<% if !@intro_data.brief_intro.blank? or !@intro_data.complete_list.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 %>
|
<% end %>
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -82,9 +98,7 @@
|
||||||
<% if !@intro_data.blank? %>
|
<% if !@intro_data.blank? %>
|
||||||
|
|
||||||
<% if !@intro_data.brief_intro.blank? or !@intro_data.complete_list.blank? %>
|
<% 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? %>
|
<%= render :partial => @plugin_partial if !@plugin_partial.blank? %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -93,7 +107,6 @@
|
||||||
|
|
||||||
<% if !@data.blank? %>
|
<% 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? %>
|
<%= render :partial => @plugin_partial if !@plugin_partial.blank? %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue