Fix bug.
This commit is contained in:
parent
6def60f8dd
commit
7d3ebbf54b
|
@ -74,7 +74,7 @@ class Research
|
||||||
pd_data = []
|
pd_data = []
|
||||||
fields_to_show.collect do |t|
|
fields_to_show.collect do |t|
|
||||||
if t == "research_title"
|
if t == "research_title"
|
||||||
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_research')}' title='#{p.send(t)}'>#{p.send(t)}" }
|
pd_data << { "data_title" => "<a href=\"#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_research')}\" title=\"#{p.send(t)}\">#{p.send(t)}</a>" }
|
||||||
elsif t == "research_category"
|
elsif t == "research_category"
|
||||||
pd_data << {"data_title" => (p.research_category.title rescue "")}
|
pd_data << {"data_title" => (p.research_category.title rescue "")}
|
||||||
else
|
else
|
||||||
|
@ -107,17 +107,17 @@ class Research
|
||||||
self.research_files.each do |research_file|
|
self.research_files.each do |research_file|
|
||||||
url = research_file.file.url
|
url = research_file.file.url
|
||||||
title = (research_file.title.blank? ? File.basename(research_file.file.path) : research_file.title)
|
title = (research_file.title.blank? ? File.basename(research_file.file.path) : research_file.title)
|
||||||
files << "<li><a href='#{url}' target='_blank'>#{title}</li>"
|
files << "<li><a href=\"#{url}\" target='_blank'>#{title}</a></li>"
|
||||||
end
|
end
|
||||||
value = files.join("")
|
value = files.join("")
|
||||||
when "authors"
|
when "authors"
|
||||||
path = OrbitHelper.url_to_plugin_show(self.member_profile.to_param, 'member') rescue '#'
|
path = OrbitHelper.url_to_plugin_show(self.member_profile.to_param, 'member') rescue '#'
|
||||||
value = "<a href='#{path}'>#{self.member_profile.name}</a>"
|
value = "<a href=\"#{path}\">#{self.member_profile.name}</a>"
|
||||||
else
|
else
|
||||||
value = self.send(field) rescue ""
|
value = self.send(field) rescue ""
|
||||||
end
|
end
|
||||||
|
|
||||||
value = (value =~ /\A#{URI::regexp(['http', 'https'])}\z/) ? "<a href='#{value}' target='blank'>#{value}</a>" : value
|
value = (value =~ /\A#{URI::regexp(['http', 'https'])}\z/) ? "<a href=\"#{value}\" target='blank'>#{value}</a>" : value
|
||||||
|
|
||||||
{
|
{
|
||||||
"key"=>field,
|
"key"=>field,
|
||||||
|
|
Loading…
Reference in New Issue