bouquins-ror/app/views/books/show.html.erb

69 lines
1.8 KiB
Plaintext
Raw Normal View History

2015-06-28 18:04:18 +00:00
<div class="page-header">
<div class="row">
<div class="col-xs-12 col-md-9">
<h1>
<span class="glyphicon glyphicon-book"></span>
<%= @book.title %>
</h1>
</div>
<div class="col-xs-12 col-md-3 text-right"> <%= render "layouts/book_dl" %> </div>
</div>
2015-06-28 18:04:18 +00:00
</div>
<div class="row">
2015-07-05 08:22:19 +00:00
<% if @book.has_cover? %>
<div class="col-xs-12 col-md-6">
<% end %>
<h2>
<span class="glyphicon glyphicon-user"></span>
2015-08-08 21:12:16 +00:00
<%= t(:book_authors, count: @book.authors.count) %>
2015-07-05 08:22:19 +00:00
</h2>
<ul>
<% @book.authors.each do |author| %>
<li><%= link_to author.name, author %></li>
2015-07-05 08:22:19 +00:00
<% end %>
</ul>
<% if @book.serie %>
<h2>
<span class="glyphicon glyphicon-list"></span>
2015-08-08 21:12:16 +00:00
<%= t :book_serie %>
2015-07-05 08:22:19 +00:00
</h2>
<div>
<%= link_to @book.serie.name, @book.serie %>
<span class="badge"><%= @book.series_index.to_i %></span>
</div>
2015-06-28 18:04:18 +00:00
<% end %>
2015-07-05 08:22:19 +00:00
<h2>
<span class="glyphicon glyphicon-globe"></span>
2015-08-08 21:12:16 +00:00
<%= t(:book_lang, count: @book.languages.count) %>
2015-07-05 08:22:19 +00:00
</h2>
<div>
<% @book.languages.each do |language| %>
<%= language.lang_code %>
<% end %>
</div>
<h2>
<span class="glyphicon glyphicon-tags"></span>
2015-08-08 21:12:16 +00:00
<%= t(:book_tag, count: @book.tags.count) %>
2015-07-05 08:22:19 +00:00
</h2>
<div>
<% @book.tags.each do |tag| %>
<span class="label label-info"><%= tag.name %></span>
<% end %>
</div>
2015-08-08 21:12:16 +00:00
<h2><%= t :book_detail %></h2>
2015-07-05 08:22:19 +00:00
<ul>
<% if @book.pubdate %>
2015-08-08 21:12:16 +00:00
<li><strong><%= t :book_pubdate %></strong> <%= @book.pubdate.to_formatted_s(:date) %></li>
2015-07-05 08:22:19 +00:00
<% end %>
<% if @book.publisher %>
2015-08-08 21:12:16 +00:00
<li><strong><%= t :book_publisher %></strong> <%= @book.publisher.name %></li>
2015-07-05 08:22:19 +00:00
<% end %>
</ul>
2015-06-28 18:04:18 +00:00
</div>
2015-07-05 08:22:19 +00:00
<% if @book.has_cover? %>
<div class="col-xs-12 col-md-6">
2015-08-08 21:12:16 +00:00
<%= image_tag(cover_book_path(@book), alt: t(:no_cover), class: "img-responsive img-rounded") %>
2015-06-28 18:04:18 +00:00
</div>
2015-07-05 08:22:19 +00:00
<% end %>
2015-06-28 18:04:18 +00:00
</div>