Custom Fields not shown on folder level #1348

This commit is contained in:
Karel Pičman 2022-05-05 14:47:33 +02:00
parent a1d99e1805
commit 63b246063f

View File

@ -22,8 +22,17 @@
<% if @project %> <% if @project %>
<div class="dmsf-header"> <div class="dmsf-header">
<div class="wiki dmsf-description"> <div class="wiki dmsf-description">
<%= textilizable @folder ? @folder.description : @project.dmsf_description %> <%= textilizable @folder ? @folder.description : @project.dmsf_description %>
</div> </div>
<% if @folder && @folder.custom_field_values.any? { |o| o.value.present? } %>
<ul>
<% render_custom_field_values(@folder) do |custom_field, formatted| %>
<li class="<%= custom_field.css_classes %>">
<span class="label"><%= custom_field.name %>:</span> <%= formatted %>
</li>
<% end %>
</ul>
<% end %>
</div> </div>
<% end %> <% end %>