series of author
This commit is contained in:
parent
d08fb8c456
commit
765c8c31d7
@ -36,7 +36,7 @@ class AuthorsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def series
|
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|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
format.js
|
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:
|
author_coauthor:
|
||||||
one: "Co-Author"
|
one: "Co-Author"
|
||||||
other: "Co-Authors"
|
other: "Co-Authors"
|
||||||
|
author_serie:
|
||||||
|
one: "Serie"
|
||||||
|
other: "Series"
|
||||||
will_paginate:
|
will_paginate:
|
||||||
previous_label: "← Previous"
|
previous_label: "← Previous"
|
||||||
next_label: "Next →"
|
next_label: "Next →"
|
||||||
|
@ -50,6 +50,9 @@ fr:
|
|||||||
author_coauthor:
|
author_coauthor:
|
||||||
one: "Co-Auteur"
|
one: "Co-Auteur"
|
||||||
other: "Co-Auteurs"
|
other: "Co-Auteurs"
|
||||||
|
author_serie:
|
||||||
|
one: "Serie"
|
||||||
|
other: "Series"
|
||||||
will_paginate:
|
will_paginate:
|
||||||
previous_label: "← Précédent"
|
previous_label: "← Précédent"
|
||||||
next_label: "Suivant →"
|
next_label: "Suivant →"
|
||||||
|
Loading…
Reference in New Issue
Block a user