noesya/osuny

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

Summary

Maintainability
Test Coverage
<div class="<%= block_html_class(block) %>">
  <div class="container">
    <div class="block-content">
      <%= render 'admin/communication/blocks/partials/top', block: block %>

      <ul class="<%= block.template.elements.count.even? ? 'even-items' : 'odd-items' %>">
        <% block.template.elements.each do |element| %>
          <li>
            <dl>
              <dt>
                <% if element.image %>
                  <%= block_component_show block, :image, template: element %>
                <% end %>
                <strong><%= block_component_show block, :number, template: element %></strong><%#
                %><%= block_component_show block, :unit, template: element %>
              </dt>
              <dd><%= block_component_show block, :description, template: element %></dd>
            </dl>
          </li>
        <% end %>
      </ul>
    </div>
  </div>
</div>