forked from saurabh/personal-book
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]
|
||||
end
|
||||
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
|
||||
t << {"value" => book.send(fs)}
|
||||
end
|
||||
|
|
|
@ -115,6 +115,10 @@ class Book
|
|||
pd = pd[0]+"/"+pd[1]
|
||||
end
|
||||
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
|
||||
pd_data << { "data_title" => p.send(t) }
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue