Fix a tag bug.

This commit is contained in:
BoHung Chiu 2020-11-27 15:11:01 +08:00
parent b84067e061
commit 3ff8f93aa6
1 changed files with 3 additions and 3 deletions

View File

@ -109,7 +109,7 @@ class Book
if !page.nil? && page.custom_string_field == "table"
case t
when "book_title", "extracted_chapters"
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_book')}' title='#{p.send(t)}' target='_blank'>#{p.send(t)}</a>" }
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_book')}' title=\"#{p.send(t)}\" target='_blank'>#{p.send(t)}</a>" }
when "publish_date", "publication_date"
pd = ""
if !p.publication_date.nil?
@ -126,7 +126,7 @@ class Book
end
else
if t == "book_title"
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_book')}' title='#{p.create_link}' target='_blank'>#{p.create_link}</a>" }
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_book')}' title=\"#{p.create_link}\" target='_blank'>#{p.create_link}</a>" }
else
pd_data << { "data_title" => p.send(t) }
end
@ -174,7 +174,7 @@ class Book
self.book_files.each do |book_file|
url = book_file.member_book_file.url
title = ((book_file.title.blank? ? File.basename(book_file.member_book_file.path) : book_file.title) rescue "")
files << (url.nil? ? "" : "<li><a href='#{url}'' target='_blank'>#{title}</li>")
files << (url.nil? ? "" : "<li><a href='#{url}'' target='_blank'>#{title}</a></li>")
end
value = files.join("")
when "url"