forked from saurabh/personal-project
Fix a tag bug.
This commit is contained in:
parent
a816dcd88b
commit
a03c42b592
|
@ -86,7 +86,7 @@ class Project
|
|||
pd_data = []
|
||||
fields_to_show.collect do |t|
|
||||
if t == "project_title"
|
||||
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_project')}' target='_blank'>#{p.send(t)}" }
|
||||
pd_data << { "data_title" => "<a href=\"#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_project')}\" target='_blank'>#{p.send(t)}</a>" }
|
||||
elsif t == "period"
|
||||
date = p.duration
|
||||
pd_data << { "data_title" => date }
|
||||
|
@ -134,18 +134,18 @@ class Project
|
|||
self.project_files.each do |project_file|
|
||||
url = project_file.file.url
|
||||
title = ((project_file.title.blank? ? File.basename(project_file.file.path) : project_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"
|
||||
value = self.url.to_s.blank? ? "" : "<a href='#{self.url}'>#{self.url}</a>"
|
||||
value = self.url.to_s.blank? ? "" : "<a href=\"#{self.url}\">#{self.url}</a>"
|
||||
when "participator"
|
||||
value = get_authors_show(self)
|
||||
else
|
||||
value = self.send(field) rescue ""
|
||||
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,
|
||||
|
|
Loading…
Reference in New Issue