2015-08-03 09:54:44 +00:00
|
|
|
<% content_for :latest_filter do
|
|
|
|
isLatest = session[:sort] == "latest" %>
|
|
|
|
<%= link_to "Latest", url_for(sort: (isLatest ? "alpha" : "latest")), class: "btn btn-default btn-sm " + (isLatest ? " active" : ""), remote: true %>
|
|
|
|
<% end %>
|
|
|
|
<%= 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 authors">
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Authors</th>
|
|
|
|
<th>Serie</th>
|
|
|
|
</tr>
|
|
|
|
<% @books.each do |book| %>
|
|
|
|
<tr>
|
|
|
|
<td><span class="glyphicon glyphicon-book"></span><%= link_to book.title, book %></td>
|
|
|
|
<td>
|
|
|
|
<% book.authors.each do |author| %>
|
|
|
|
<span class="glyphicon glyphicon-user"></span><%= link_to author.name, author %>
|
2015-06-29 16:58:02 +00:00
|
|
|
<% end %>
|
2015-06-29 17:51:55 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<% if book.serie %>
|
|
|
|
<span class="glyphicon glyphicon-list"></span><%= link_to book.serie.name, book.serie %>
|
|
|
|
<span class="badge"><%= book.series_index.to_i %></span>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
<%= will_paginate class: "center" %>
|