noesya/osuny

View on GitHub
app/views/admin/communication/blocks/templates/chapter/_show.html.erb

Summary

Maintainability
Test Coverage
<%
block_class = block_html_class(block)
#TODO comment vérifier proprement la présence de l'image?
block_class += " block-chapter--with-image" if block.template.image[:id]
%>
<div class="<%= block_class %>">
  <div class="container">
    <div class="block-content">
      <div class="chapter">
        <div class="text">
          <%= render 'admin/communication/blocks/partials/top', block: block, without_description: true %>
          <% if block.template.text.present? %>
            <div class="rich-text">
              <%= block_component_show block, :text %>
            </div>
          <% end %>
          <% if block.template.notes.present? %>
            <div class="notes">
              <%= block_component_show block, :notes %>
            </div>
          <% end %>
        </div>
        <%= block_component_show block, :image, without_text: true %>
      </div>
    </div>
  </div>
</div>