<% # encoding: utf-8 %>

<table>
<caption> <%= t("writing_book") %> </caption>
<tbody>
<tr><th><%= t("writing_book.year")%></th><td><%= @writing_book.year %></td></tr>
<tr><th><%= t("writing_book.language")%></th><td><%= @writing_book.language %></td></tr>
<tr><th><%= t("writing_book.paper_title")%></th><td><%= @writing_book.paper_title %></td></tr>
<tr><th><%= t("writing_book.book_title")%></th><td><%= @writing_book.book_title %></td></tr>
<tr><th><%= t("writing_book.book_paper_type")%></th><td><%= @writing_book.book_paper_type.title if !@writing_book.book_paper_type.blank? %></td></tr>
<tr><th><%= t("writing_book.book_author_types")%></th><td><%= @book_author_types %></td></tr>
<tr><th><%= t("writing_book.extracted_chapters")%></th><td><%= @writing_book.extracted_chapters %></td></tr>
<tr><th><%= t("writing_book.publisher")%></th><td><%= @writing_book.publisher %></td></tr>
<tr><th><%= t("writing_book.editor")%></th><td><%= @writing_book.editor %></td></tr>
<tr><th><%= t("writing_book.publish_date")%></th><td><%= @writing_book.publish_date %></td></tr>
<tr><th><%= t("writing_book.pages")%></th><td><%= @writing_book.pages %></td></tr>
<tr><th><%= t("writing_book.isbn")%></th><td><%= @writing_book.isbn %></td></tr>
<tr><th><%= t("writing_book.publication_date")%></th><td><%= @writing_book.publication_date %></td></tr>
<tr><th><%= t("writing_book.url")%></th><td><%= link_to t(:url), @writing_book.url, {:target => '_blank', :title => @writing_book.book_title} if !@writing_book.url.blank? %></td></tr>
<tr><th><%= t("writing_book.note")%></th><td><%= @writing_book.note %></td></tr>
<tr><th><%= t("writing_book.authors")%></th><td><%= "#{User.from_id(@writing_book.create_user_id).name rescue ''},#{@writing_book.authors rescue ''}"%></td></tr>
<tr><th><%= t("writing_book.files")%></th>
<td>
<% if @writing_book.writing_book_files.size > 0 %>
		<div>
			<i class="icons-paperclip"></i>
			<div class="showFile">
					<% @writing_book.writing_book_files.each do | wjfile | %>
					<%= link_to wjfile.title, wjfile.file.url, {:target => '_blank', :title => wjfile.title} if wjfile.file.file %>
					<% end %>
			</div>
		</div>
	<% end %>
</td>
</tr>
</tbody>
</table>
