From d7347aa546480c503cad2853d6335ab24342a919 Mon Sep 17 00:00:00 2001 From: bohung Date: Thu, 15 Dec 2022 17:34:27 +0800 Subject: [PATCH] Fix link. --- app/models/diploma.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/diploma.rb b/app/models/diploma.rb index ce28891..8f2cd2f 100644 --- a/app/models/diploma.rb +++ b/app/models/diploma.rb @@ -79,7 +79,10 @@ class Diploma pd_data = [] fields_to_show.collect do |t| if t == "school_name" - pd_data << { "data_title" => "#{p.send(t)}" } + link = OrbitHelper.url_to_plugin_show(p.to_param,'personal_diploma') + url_to_plugin_show_blank = OrbitHelper.instance_variable_get(:@url_to_plugin_show_blank) + tmp_title = p.school_name + pd_data << { "data_title" => (url_to_plugin_show_blank ? tmp_title : "#{tmp_title}") } elsif t == "duration" if !p.send('start_date').nil? or !p.send('end_date').nil? date = (p.send('start_date').strftime('%Y.%m') rescue "")+' ~ '+(p.send('end_date').strftime('%Y.%m') rescue I18n.t('personal_diploma.up_to_today'))