improve design book, serie
This commit is contained in:
parent
9ceaf42025
commit
912e347294
@ -34,15 +34,11 @@ h1 {
|
|||||||
font-size: 3em;
|
font-size: 3em;
|
||||||
letter-spacing: -2px;
|
letter-spacing: -2px;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-size: 1.2em;
|
|
||||||
letter-spacing: -1px;
|
letter-spacing: -1px;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
text-align: center;
|
|
||||||
font-weight: normal;
|
|
||||||
color: #777;
|
color: #777;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,19 +1,54 @@
|
|||||||
<h1><%= @book.title %></h1>
|
<div class="page-header">
|
||||||
<ul>
|
<h1>
|
||||||
<% @book.authors.each do |author| %>
|
<span class="glyphicon glyphicon-book"></span>
|
||||||
|
<%= @book.title %>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<h2>
|
||||||
|
<span class="glyphicon glyphicon-user"></span>
|
||||||
|
<%= "Author".pluralize(@book.authors.count) %>
|
||||||
|
</h2>
|
||||||
|
<ul>
|
||||||
|
<% @book.authors.each do |author| %>
|
||||||
<li><%= author.name %></li>
|
<li><%= author.name %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
<% if @book.serie %>
|
||||||
|
<h2>
|
||||||
|
<span class="glyphicon glyphicon-list"></span>
|
||||||
|
Serie
|
||||||
|
</h2>
|
||||||
|
<div>
|
||||||
|
<%= link_to @book.serie.name, @book.serie %>
|
||||||
|
<span class="badge"><%= @book.series_index.to_i %></span>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
<h2>
|
||||||
<ul>
|
<span class="glyphicon glyphicon-globe"></span>
|
||||||
<% @book.languages.each do |language| %>
|
<%= "Language".pluralize(@book.languages.count) %>
|
||||||
<li><%= language.lang_code %></li>
|
</h2>
|
||||||
<% end %>
|
<div>
|
||||||
</ul>
|
<% @book.languages.each do |language| %>
|
||||||
<ul>
|
<%= language.lang_code %>
|
||||||
<% @book.tags.each do |tag| %>
|
<% end %>
|
||||||
<li><%= tag.name %></li>
|
</div>
|
||||||
<% end %>
|
<h2>
|
||||||
</ul>
|
<span class="glyphicon glyphicon-tags"></span>
|
||||||
<p>Serie: <%= @book.serie.name %></p>
|
<%= "Tag".pluralize(@book.tags.count) %>
|
||||||
<p>Publisher: <%= @book.publisher.name %></p>
|
</h2>
|
||||||
<p>Publishing date: <%= @book.pubdate.to_formatted_s(:date) %></p>
|
<div>
|
||||||
|
<% @book.tags.each do |tag| %>
|
||||||
|
<span class="label label-info"><%= tag.name %></span>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<h2>Details</h2>
|
||||||
|
<ul>
|
||||||
|
<% if @book.pubdate %>
|
||||||
|
<li><strong>Publishing date</strong> <%= @book.pubdate.to_formatted_s(:date) %></li>
|
||||||
|
<% end %>
|
||||||
|
<% if @book.publisher %>
|
||||||
|
<li><strong>Publisher</strong> <%= @book.publisher.name %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
@ -1,6 +1,32 @@
|
|||||||
<h1><%= @serie.name %></h1>
|
<div class="page-header">
|
||||||
|
<h1>
|
||||||
|
<span class="glyphicon glyphicon-list"></span>
|
||||||
|
<%= @serie.name %>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<h2>
|
||||||
|
<span class="glyphicon glyphicon-book"></span>
|
||||||
|
<%= "Book".pluralize(@serie.books.count) %>
|
||||||
|
</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<% @serie.books.each do |book| %>
|
<% @serie.books.each do |book| %>
|
||||||
<li><%= link_to book.title, book %></li>
|
<li><%= book.series_index.to_i %>. <%= link_to book.title, book %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
<%
|
||||||
|
authors = Array.new
|
||||||
|
@serie.books.each do |book|
|
||||||
|
authors.concat book.authors
|
||||||
|
end
|
||||||
|
authors.uniq!.sort! { |x,y| x.sort <=> y.sort }
|
||||||
|
if authors %>
|
||||||
|
<h2>
|
||||||
|
<span class="glyphicon glyphicon-user"></span>
|
||||||
|
<%= "Author".pluralize(authors.count) %>
|
||||||
|
</h2>
|
||||||
|
<ul>
|
||||||
|
<% authors.each do |author| %>
|
||||||
|
<li><%= link_to author.name, author %></li>
|
||||||
|
<% end%>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
Loading…
Reference in New Issue
Block a user