forked from saurabh/personal-project
removed blank columns
This commit is contained in:
parent
0754f781e6
commit
db31f5e160
|
@ -52,12 +52,19 @@ class Project
|
||||||
"unit"
|
"unit"
|
||||||
]
|
]
|
||||||
|
|
||||||
pd_title = fields_to_show.collect do |t|
|
fields_to_remove = []
|
||||||
{
|
|
||||||
"plugin_data_title" => I18n.t("personal_project.#{t}")
|
pd_title = []
|
||||||
}
|
|
||||||
|
fields_to_show.each do |t|
|
||||||
|
fields_to_remove << t if (datas.where(t.to_sym.ne => nil, t.to_sym.ne => "").count == 0 rescue false)
|
||||||
|
pd_title << {
|
||||||
|
"plugin_data_title" => I18n.t("personal_project.#{t}")
|
||||||
|
} if !fields_to_remove.include?(t)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
fields_to_show = fields_to_show - fields_to_remove
|
||||||
|
|
||||||
plugin_datas = datas.sort_for_frontend.collect.with_index do |p,index|
|
plugin_datas = datas.sort_for_frontend.collect.with_index do |p,index|
|
||||||
|
|
||||||
pd_data = []
|
pd_data = []
|
||||||
|
|
Loading…
Reference in New Issue