From c0686edf1dc47ae4957234d17ceb896efffeb8ca Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 6 Mar 2017 20:55:45 +0800 Subject: [PATCH] small fix for member frontend --- app/models/diploma.rb | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/app/models/diploma.rb b/app/models/diploma.rb index 380a0b8..a0b50a5 100644 --- a/app/models/diploma.rb +++ b/app/models/diploma.rb @@ -40,15 +40,19 @@ class Diploma end def self.get_plugin_datas_to_member(datas) - - fields_to_show = [ - "country", - "school_name", - "department", - "degree", - "duration" - ] - + page = Page.where(:module => "personal_honor").first rescue nil + + if !page.nil? && !page.custom_array_field.blank? + fields_to_show = page.custom_array_field + else + fields_to_show = [ + "country", + "school_name", + "department", + "degree", + "duration" + ] + end fields_to_remove = [] pd_title = []