Update issues_show_hook_listener.rb

This commit is contained in:
2016-04-27 12:14:59 -04:00
parent 48a2c0cb45
commit b82d5091b7

View File

@@ -39,9 +39,12 @@ class IssuesShowHookListener < Redmine::Hook::ViewListener
end end
v = Vehicle.find_by_id(issue.vehicles_id) v = Vehicle.find_by_id(issue.vehicles_id)
#vehicle = v ? v.to_s : nil if v?
vehicle = link_to v.to_s, v #vehicle = v ? v.to_s : nil
vin = v ? v.vin : nil vehicle = link_to v.to_s, "#{Redmine::Utils::relative_url_root }/vehicles/#{v.id}",
vin = v ? v.vin
notes = n.notes
end
return " return "
<div class=\"attributes\"> <div class=\"attributes\">
@@ -78,6 +81,10 @@ class IssuesShowHookListener < Redmine::Hook::ViewListener
<div class=\"value\">#{vin}</div> <div class=\"value\">#{vin}</div>
</div> </div>
<div class=\"vehicle_notes attribute\">
<div class=\"label\"><span>Notes</span>:</div>
<div class=\"value\">#{notes}</div>
</div>
</div>" </div>"
end end