<%
  if @member

    @writing_patents = WritingPatent.where(is_hidden: false, :create_user_id => @member.id).desc(:publish_date)

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

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

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

  <% end %> 

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

    <% if !@writing_patents.blank? %> 

      <table class="table">
        <thead>
          <tr>
      			<th class="grid2"><%= t('personal_patent.publication_date') %></th>
      			<th class="grid10"><%= t('personal_patent.patent_title') %></th>
      		</tr>
        </thead>
        <tbody>
      		
      	<% @writing_patents.each do |writing_patent| %>	
      			
          <tr>
      			<td><%= writing_patent.publish_date.strftime("%Y.%m") %></td>
      			<td>
      		<%= link_to writing_patent.patent_title, panel_personal_patent_front_end_writing_patent_path(writing_patent) %>
      			</td>
      		</tr>		
      		
      	<% end %>	

        </tbody>
      </table>

    <% end %> 

  <% end %> 

<% end %> 