<% # encoding: utf-8 %>

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

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

		<% if !@writing_journal.paper_title.blank? %>
		<tr><th><%= t("personal_journal.paper_title")%></th><td><%= @writing_journal.paper_title %></td></tr>
		<% end %>

		<% if !@writing_journal.journal_title.blank? %>
		<tr><th><%= t("personal_journal.journal_title")%></th><td><%= @writing_journal.journal_title %></td></tr>
		<% end %>

		<% if !@writing_journal.journal_paper_type.blank? %>
		<tr><th><%= t("personal_journal.paper_type")%></th><td><%= @writing_journal.journal_paper_type.title if @writing_journal.journal_paper_type %></td></tr>
		<% end %>

		<% if !@journal_level_types.blank? %>
		<tr><th><%= t("personal_journal.level_type")%></th><td><%= @journal_level_types %></td></tr>
		<% end %>

		<% if !@journal_author_types.blank? %>
		<tr><th><%= t("personal_journal.author_type")%></th><td><%= @journal_author_types %></td></tr>
		<% end %>

		<% if !@writing_journal.isbn.blank? %>
		<tr><th><%= t("personal_journal.isbn")%></th><td><%= @writing_journal.isbn %></td></tr>
		<% end %>

		<% if !@writing_journal.vol_no.blank? %>
		<tr><th><%= t("personal_journal.vol_no")%></th><td><%= @writing_journal.vol_no %></td></tr>
		<% end %>

		<% if !@writing_journal.issue_no.blank? %>
		<tr><th><%= t("personal_journal.issue_no")%></th><td><%= @writing_journal.issue_no %></td></tr>
		<% end %>

		<% if !@writing_journal.form_to_start.blank? %>
		<tr><th><%= t("personal_journal.form_to")%></th><td><%= "#{@writing_journal.form_to_start} ~ #{@writing_journal.form_to_end}" %></td></tr>
		<% end %>

		<% if !@writing_journal.total_pages.blank? %>
		<tr><th><%= t("personal_journal.total_pages")%></th><td><%= @writing_journal.total_pages %></td></tr>
		<% end %>

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

		<% if !@writing_journal.publication_date.blank? %>
		<tr><th><%= t("personal_journal.publication_date")%></th><td><%= @writing_journal.publication_date %></td></tr>
		<% end %>

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

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

		<% if @writing_journal.writing_journal_files.size > 0 %>
		<tr><th><%= t("personal_journal.file")%></th>
		<td>
			<div>
				<div class="showFile">
					<i class="icons-paperclip"></i>
					<% @writing_journal.writing_journal_files.each do | wjfile | %>
					<%= link_to !wjfile.title.blank? ? wjfile.title : 'file', wjfile.file.url, {:target => '_blank', :title => wjfile.title} if wjfile.file.file %>
					<% end %>
				</div>
			</div>
		</td>
		</tr>
		<% end %>

	</tbody>
</table>
