<%
  if @member

    @labs = Lab.where(is_hidden: false, :create_user_id => @member.id).desc(:year)

    @lab_intro = !PersonalLabIntro.where(:user_id => @member.id).blank? ? PersonalLabIntro.where(:user_id => @member.id).first : PersonalLabIntro.new
%>

  <% if @lab_intro.brief_intro and !@lab_intro.blank? %> 

    <div class="info">
        <%= @lab_intro.text.html_safe rescue '' %>
      </div>

  <% end %> 

  <% if ( !@lab_intro.blank? and @lab_intro.complete_list ) or @lab_intro.blank? %> 

    <% if !@labs.blank? %> 

      <table class="table">
        <thead>
          <tr>
      			<th class="grid1"><%= t('personal_lab.year') %></th>
      			<th class="grid7"><%= t('personal_lab.lab_title') %></th>
      			<th class="grid4"><%= t('personal_lab.location') %></th>
      		</tr>
        </thead>
        <tbody>
      		
      	<% @labs.each do |lab| %>	
      			
          <tr>
      			<td><%= lab.year %></td>
      			<td>
      			<%= link_to lab.lab_title, panel_personal_lab_front_end_lab_path(lab) %>
      			</td>
      			<td><%= lab.location %></td>
      		</tr>		
      		
      	<% end %>	

        </tbody>
      </table>

    <% end %> 

  <% end %> 

<% end %> 
