forked from saurabh/personal-project
Fix link bug.
This commit is contained in:
parent
ec8197b5da
commit
f66629b9e4
|
@ -86,7 +86,9 @@ class Project
|
||||||
pd_data = []
|
pd_data = []
|
||||||
fields_to_show.collect do |t|
|
fields_to_show.collect do |t|
|
||||||
if t == "project_title"
|
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)}</a>" }
|
link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_project')
|
||||||
|
link = (link == "#" ? p.send(t) : "<a href='#{link}' title=\"#{p.send(t)}\" target='_blank'>#{p.send(t)}</a>")
|
||||||
|
pd_data << { "data_title" => link }
|
||||||
elsif t == "period"
|
elsif t == "period"
|
||||||
date = p.duration
|
date = p.duration
|
||||||
pd_data << { "data_title" => date }
|
pd_data << { "data_title" => date }
|
||||||
|
|
|
@ -43,7 +43,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<td><%= project.year %></td>
|
<td><%= project.year %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to project.project_title, OrbitHelper.url_to_plugin_show(project.to_param,'personal_project').to_s, target: "blank"%>
|
<% link = OrbitHelper.url_to_plugin_show(project.to_param,'personal_project') %>
|
||||||
|
<%= (link == "#" ? project.project_title : link_to(project.project_title, link , target: "blank")) %>
|
||||||
<div class="quick-edit">
|
<div class="quick-edit">
|
||||||
<ul class="nav nav-pills hide">
|
<ul class="nav nav-pills hide">
|
||||||
<% if has_access? %>
|
<% if has_access? %>
|
||||||
|
|
Loading…
Reference in New Issue