Orbit/vendor/built_in_modules/personal_book/app/views/panel/personal_book/front_end/writing_books/show.html.erb

80 lines
2.9 KiB
Plaintext

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