title change to extracted chapters

This commit is contained in:
Harry Bomrah 2016-04-06 02:06:34 +08:00
parent e9681170e8
commit 71faece96d
2 changed files with 4 additions and 4 deletions

View File

@ -26,9 +26,9 @@ class PersonalBooksController < ApplicationController
t = []
fields_to_show.each do |fs|
case fs
when "book_title"
when "book_title", "extracted_chapters"
if page.custom_string_field == "table"
t << {"value" => "<a href='#{OrbitHelper.url_to_show(book.to_param)}'>#{book.book_title}</a>"}
t << {"value" => "<a href='#{OrbitHelper.url_to_show(book.to_param)}'>#{book.send(fs)}</a>"}
else
t << {"value" => "<a href='#{OrbitHelper.url_to_show(book.to_param)}'>#{book.create_link}</a>"}
end

View File

@ -106,8 +106,8 @@ class Book
fields_to_show.collect do |t|
if !page.nil? && page.custom_string_field == "table"
case t
when "book_title"
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_book')}' target='_blank'>#{p.book_title}</a>" }
when "book_title", "extracted_chapters"
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_book')}' target='_blank'>#{p.send(t)}</a>" }
when "publish_date"
pd = ""
if !p.publish_date.nil?