app/views/promethee/components/faq_item/_show.html.erb in promethee-1.6.48 vs app/views/promethee/components/faq_item/_show.html.erb in promethee-1.6.49
- old
+ new
@@ -6,14 +6,28 @@
if image && image[:id]
image_blob = ActiveStorage::Blob.find image[:id]
end
%>
+<h4 data-toggle="collapse"
+ data-target="#collapse-faq-<%= component[:id] %>"
+ aria-expanded="false"
+ aria-controls="collapse-faq-<%= component[:id] %>">
+ <%= title %>
+</h4>
+
<div class="row <%= promethee_class_for component %>">
- <div class="col-xs-3">
- <%= render 'promethee/show/image.srcset', blob: image_blob, alt: '', caption: '' if image_blob %>
- </div>
- <div class="col-xs-9">
- <h4><%= title %></h4>
- <%= body.html_safe %>
+ <div class="collapse" id="collapse-faq-<%= component[:id] %>">
+ <% if image_blob %>
+ <div class="col-xs-9">
+ <%= body.html_safe %>
+ </div>
+ <div class="col-xs-3">
+ <%= render 'promethee/show/image.srcset', blob: image_blob, alt: '', caption: '' %>
+ </div>
+ <% else %>
+ <div class="col-md-12">
+ <%= body.html_safe %>
+ </div>
+ <% end %>
</div>
</div>
\ No newline at end of file