orbit-personalhonor/app/views/panel/personal_honor/front_end/_profile.html.erb

52 lines
1.2 KiB
Plaintext

<%
if @member
@honors = Honor.where(is_hidden: false, :create_user_id => @member.id).desc(:year)
@honor_intro = !PersonalHonorIntro.where(:user_id => @member.id).blank? ? PersonalHonorIntro.where(:user_id => @member.id).first : PersonalHonorIntro.new
%>
<% if @honor_intro.brief_intro and !@honor_intro.blank? %>
<div class="info">
<%= @honor_intro.text.html_safe rescue '' %>
</div>
<% end %>
<% if ( !@honor_intro.blank? and @honor_intro.complete_list ) or @honor_intro.blank? %>
<% if !@honors.blank? %>
<table class="table">
<thead>
<tr>
<th class="grid1"><%= t('personal_honor.year') %></th>
<th class="grid5"><%= t('personal_honor.award_name') %></th>
<th class="grid3"><%= t('personal_honor.awarding_unit') %></th>
</tr>
</thead>
<tbody>
<% @honors.each do |honor| %>
<tr>
<td><%= honor.year %></td>
<td>
<%= link_to honor.award_name, panel_personal_honor_front_end_honor_path(honor) %>
</td>
<td><%= honor.awarding_unit %></td>
</tr>
<% end %>
</tbody>
</table>
<% end %>
<% end %>
<% end %>