Fix project information with empty custom fields

This commit is contained in:
Alexander Meindl 2020-08-23 10:50:46 +02:00
parent 0f35a4efca
commit aaddaf2094
2 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ class DashboardContentProject < DashboardContent
if: (lambda do |project|
project.description.present? ||
project.homepage.present? ||
project.visible_custom_field_values.any?(&:present?)
project.visible_custom_field_values.any? { |o| o.value.present? }
end),
partial: 'dashboards/blocks/project_information' }

View File

@ -3,12 +3,12 @@ h3 = block_definition[:label]
- if @project.description.present?
.wiki.project-description
= textilizable @project.description
- if @project.homepage.present? || @project.visible_custom_field_values.any?(&:present?)
- if @project.homepage.present? || @project.visible_custom_field_values.any? { |o| o.value.present? }
ul.reporting-list
- if @project.homepage.present?
li
span.label
= l(:field_homepage)
= l :field_homepage
' :
= link_to_if uri_with_safe_scheme?(@project.homepage), @project.homepage, @project.homepage
- render_custom_field_values(@project) do |custom_field, formatted|