Fix a tag bug.

This commit is contained in:
BoHung Chiu 2020-11-27 15:06:42 +08:00
parent f6a76b6c30
commit 8586a54444
1 changed files with 4 additions and 4 deletions

View File

@ -125,7 +125,7 @@ class WritingConference
if !page.nil? && page.custom_string_field == "table"
case t
when "paper_title"
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_conference')}' title='#{p.paper_title}' target='_blank'>#{p.paper_title}</a>" }
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_conference')}' title=\"#{p.paper_title}\" target='_blank'>#{p.paper_title}</a>" }
when "paper_types"
pd_data << {"data_title" => ( !p.conference_paper_types.blank? ? p.conference_paper_types.collect{|x| x.title}.join(', ') : "")}
when "paper_levels"
@ -135,13 +135,13 @@ class WritingConference
when "period"
pd_data << {"data_title" => p.duration}
when "url"
pd_data << { "data_title" => "<a href='#{p.url}' title='#{p.url}' target='_blank'>#{p.url}</a>" }
pd_data << { "data_title" => "<a href='#{p.url}' title=\"#{p.url}\" target='_blank'>#{p.url}</a>" }
else
pd_data << { "data_title" => p.send(t) }
end
else
if t == "paper_title"
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_conference')}' 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_conference')}' title=\"#{p.create_link}\" target='_blank'>#{p.create_link}</a>" }
else
pd_data << { "data_title" => p.send(t) }
end
@ -193,7 +193,7 @@ class WritingConference
self.writing_conference_files.each do |conference_files|
url = conference_files.file.url
title = ((conference_files.title.blank? ? File.basename(conference_files.file.path) : conference_files.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"