series of author
This commit is contained in:
parent
d08fb8c456
commit
765c8c31d7
@ -36,7 +36,7 @@ class AuthorsController < ApplicationController
|
||||
end
|
||||
|
||||
def series
|
||||
@author = Author.find(params[:id])
|
||||
@series = Serie.find_by_sql(["select distinct s.* from series s left outer join books_series_link bsl on bsl.series = s.id left outer join books_authors_link bal on bal.book = bsl.book where bal.author = ?", params[:id]])
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js
|
||||
|
@ -1 +1,6 @@
|
||||
TODO
|
||||
<h2><%= t(:author_serie, count: @series.count) %></h2>
|
||||
<ul>
|
||||
<% @series.each do |s| %>
|
||||
<li><%= link_to s.name, s %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
@ -50,6 +50,9 @@ en:
|
||||
author_coauthor:
|
||||
one: "Co-Author"
|
||||
other: "Co-Authors"
|
||||
author_serie:
|
||||
one: "Serie"
|
||||
other: "Series"
|
||||
will_paginate:
|
||||
previous_label: "← Previous"
|
||||
next_label: "Next →"
|
||||
|
@ -50,6 +50,9 @@ fr:
|
||||
author_coauthor:
|
||||
one: "Co-Auteur"
|
||||
other: "Co-Auteurs"
|
||||
author_serie:
|
||||
one: "Serie"
|
||||
other: "Series"
|
||||
will_paginate:
|
||||
previous_label: "← Précédent"
|
||||
next_label: "Suivant →"
|
||||
|
Loading…
Reference in New Issue
Block a user