added author type and modified book language

This commit is contained in:
Harry Bomrah 2016-04-06 02:00:53 +08:00
parent 083c3bef7c
commit e9681170e8
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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