Skip to content
Snippets Groups Projects
Commit 75b9c57e authored by Arnaud Levy's avatar Arnaud Levy
Browse files

fix

parent 49024565
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,10 @@ class Admin::Administration::Qualiopi::IndicatorsController < Admin::Administrat
end
def show
dir = "admin/administration/qualiopi/evaluations/"
file = "#{dir}_criterion_#{@indicator.number}"
file_exists = lookup_context.find_all(file).any?
@partial = "#{dir}criterion_#{@indicator.number}" if file_exists
breadcrumb
end
......
......@@ -23,7 +23,8 @@ module WithInheritance
def best(property)
value = send(property)
text = Static.html_to_text value.to_html
text = value.nil? ? '' : value.to_html
text = Static.html_to_text text
text.blank? ? parent&.send("best_#{property}") : value
end
......
......@@ -16,12 +16,4 @@
<% end %>
</div>
</div>
<%
partial = "admin/administration/qualiopi/evaluations/criterion_#{@indicator.number}"
# TODO render only if file exists, so we can have errors
%>
<% begin %>
<%= render "admin/administration/qualiopi/evaluations/criterion_#{@indicator.number}" %>
<% rescue %>
<% end %>
<%= render @partial unless @partial.nil? %>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment