added target to patent link
This commit is contained in:
parent
10fcff24b7
commit
83934a76f6
|
@ -18,7 +18,7 @@ class PersonalPatentsController < ApplicationController
|
|||
fields_to_show.each do |fs|
|
||||
case fs
|
||||
when "patent_title"
|
||||
t << {"value" => "<a href='#{OrbitHelper.url_to_show(patent.to_param)}'>" + (patent.send(fs) rescue "") + "</a>"}
|
||||
t << {"value" => "<a href='#{OrbitHelper.url_to_show(patent.to_param)}' target='_blank'>" + (patent.send(fs) rescue "") + "</a>"}
|
||||
when "publish_date"
|
||||
t << {"value" => (patent.publish_date.strftime("%Y/%m/%d") rescue "")}
|
||||
when "application_date"
|
||||
|
|
|
@ -140,7 +140,7 @@ class Patent
|
|||
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