diff --git a/app/controllers/personal_books_controller.rb b/app/controllers/personal_books_controller.rb index 8eadc90..f1e1bed 100644 --- a/app/controllers/personal_books_controller.rb +++ b/app/controllers/personal_books_controller.rb @@ -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 diff --git a/app/models/book.rb b/app/models/book.rb index 19da010..d0a1c35 100644 --- a/app/models/book.rb +++ b/app/models/book.rb @@ -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