added author type and modified book language
This commit is contained in:
parent
083c3bef7c
commit
e9681170e8
|
@ -39,6 +39,10 @@ class PersonalBooksController < ApplicationController
|
||||||
pd = pd[0]+"/"+pd[1]
|
pd = pd[0]+"/"+pd[1]
|
||||||
end
|
end
|
||||||
t << {"value" => pd}
|
t << {"value" => pd}
|
||||||
|
when "author_type"
|
||||||
|
t << {"value" => (book.book_author_types.collect{|bat| bat.title}.join(", ") rescue "")}
|
||||||
|
when "language"
|
||||||
|
t << {"value" => (I18n.t(book.language) if !book.language.nil? rescue "")}
|
||||||
else
|
else
|
||||||
t << {"value" => book.send(fs)}
|
t << {"value" => book.send(fs)}
|
||||||
end
|
end
|
||||||
|
|
|
@ -115,6 +115,10 @@ class Book
|
||||||
pd = pd[0]+"/"+pd[1]
|
pd = pd[0]+"/"+pd[1]
|
||||||
end
|
end
|
||||||
pd_data << {"data_title" => pd}
|
pd_data << {"data_title" => pd}
|
||||||
|
when "author_type"
|
||||||
|
pd_data << {"data_title" => (p.book_author_types.collect{|bat| bat.title}.join(", ") rescue "")}
|
||||||
|
when "language"
|
||||||
|
pd_data << {"data_title" => (I18n.t(p.language) if !p.language.nil? rescue "")}
|
||||||
else
|
else
|
||||||
pd_data << { "data_title" => p.send(t) }
|
pd_data << { "data_title" => p.send(t) }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue