2015-08-03 09:54:44 +00:00
|
|
|
<%= render'layouts/filter' %>
|
2015-06-29 16:58:02 +00:00
|
|
|
|
2015-08-03 09:54:44 +00:00
|
|
|
<%= will_paginate class: "center" %>
|
2015-06-29 17:51:55 +00:00
|
|
|
<table class="table table-striped series">
|
|
|
|
<tr>
|
2015-08-13 19:17:56 +00:00
|
|
|
<th><%= t :col_serie_name %></th>
|
|
|
|
<th><%= t :col_serie_authors %></th>
|
|
|
|
<th><%= t :col_serie_books %></th>
|
2015-06-29 17:51:55 +00:00
|
|
|
</tr>
|
2015-06-29 16:58:02 +00:00
|
|
|
<% @series.each do |serie| %>
|
2015-06-29 17:51:55 +00:00
|
|
|
<tr>
|
|
|
|
<td><span class="glyphicon glyphicon-list"></span><%= link_to serie.name, serie %></td>
|
|
|
|
<td>
|
|
|
|
<%
|
|
|
|
authors = Array.new
|
|
|
|
serie.books.each do |book|
|
|
|
|
authors.concat book.authors
|
|
|
|
end
|
|
|
|
unless authors.nil?
|
|
|
|
#authors.uniq!.sort! { |x,y| x.sort <=> y.sort }
|
|
|
|
authors.uniq!
|
|
|
|
authors.sort! { |x,y| x.sort <=> y.sort }
|
|
|
|
authors.each do |author|
|
|
|
|
%>
|
|
|
|
<span class="glyphicon glyphicon-user"></span><%= link_to author.name, author %>
|
|
|
|
<% end
|
|
|
|
end %>
|
|
|
|
</td>
|
|
|
|
<td><%= serie.books.count %></td>
|
|
|
|
</tr>
|
2015-06-29 16:58:02 +00:00
|
|
|
<% end %>
|
2015-06-29 17:51:55 +00:00
|
|
|
</table>
|
|
|
|
<%= will_paginate class: "center" %>
|