<% # encoding: utf-8 %>

<table>
	<caption> <%= t("module_name.personal_project") %> </caption>
	<tbody>
		<% if !@project.year.blank? %>
		<tr><th><%= t("personal_project.year")%></th><td><%= @project.year %></td></tr>
		<% end %>

		<% if !@project.language.blank? %>
		<tr><th><%= t("personal_project.language")%></th><td><%= @project.language %></td></tr>
		<% end %>

		<% if !@project.project_title.blank? %>
		<tr><th><%= t("personal_project.project_title")%></th><td><%= @project.project_title %></td></tr>
		<% end %>

		<% if !@project.job_title.blank? %>
		<tr><th><%= t("personal_project.job_title")%></th><td><%= @project.job_title %></td></tr>
		<% end %>

		<% if !@project.project_category.blank? %>
		<tr><th><%= t("personal_project.project_category")%></th><td><%= @project.project_category.title if @project.project_category %></td></tr>
		<% end %>

		<% if !@project.participator.blank? %>
		<tr><th><%= t("personal_project.participator")%></th><td><%= @project.participator %></td></tr>
		<% end %>

		<% if !@project.unit.blank? %>
		<tr><th><%= t("personal_project.unit")%></th><td><%= @project.unit %></td></tr>
		<% end %>

		<% if !@project.abstract.blank? %>
		<tr><th><%= t("personal_project.abstract")%></th><td><%= @project.abstract %></td></tr>
		<% end %>

		<% if !@project.period_start_date.blank? %>
		<tr><th><%= t("personal_project.start_date")%></th><td><%= @project.period_start_date %></td></tr>
		<% end %>

		<% if !@project.period_end_date.blank? %>
		<tr><th><%= t("personal_project.end_date")%></th><td><%= @project.period_end_date %></td></tr>
		<% end %>

		<% if !@project.url.blank? %>
		<tr><th><%= t("personal_project.url")%></th><td><%= link_to t(:url), @project.url, {:target => '_blank', :title => @project.url} if !@project.url.blank? %></td></tr>
		<% end %>

		<tr><th><%= t("personal_project.authors")%></th><td><%= "#{User.from_id(@project.create_user_id).name rescue ''},#{@project.authors rescue ''}"%></td></tr>

		<% if @project.project_files.size > 0 %>
		<tr><th><%= t("personal_project.file")%></th>
		<td>
			<div>				
				<div class="showFile">
					<i class="icons-paperclip"></i>
					<% @project.project_files.each do | wjfile | %>
					<%= link_to wjfile.title, wjfile.file.url, {:target => '_blank', :title => wjfile.title} if wjfile.file.file %>
					<% end %>
				</div>
			</div>
		</td>
		</tr>
		<% end %>
	</tbody>
</table>
