Sha256: bcd1ad03cc631c2aeef73d83a2b32eec7f9fefc7c2a41492a235d2ff49364a1a

Contents?: true

Size: 1017 Bytes

Versions: 19

Compression:

Stored size: 1017 Bytes

Contents

<%
  items_per_line = component[:attributes].dig(:items_per_line, :value)
  case items_per_line
  when 6
    col_classes = "col-md-2 col-sm-4 col-xs-6 col-6"
  when 4
    col_classes = "col-md-3 col-xs-6 col-6"
  when 3
    col_classes = "col-md-4"
  when 2
    col_classes = "col-md-6"
  end
%>

<div class="row <%= promethee_class_for component %>">
  <% component[:children].each.with_index do |child, n| %>
    <div class="<%= col_classes %>">
        <%= render 'promethee/show/component', component: child %>
    </div>
    <% if n%items_per_line === items_per_line - 1 %>
      <div class="clearfix hidden-sm hidden-xs d-none d-md-block"></div>
    <% end %>
    <% if items_per_line >= 4 && n.odd? %>
      <div class="clearfix visible-xs-block d-block <%= items_per_line === 4 ? 'visible-sm-block d-md-none' : 'd-sm-none' %>"></div>
    <% end %>
    <% if items_per_line == 6 && n%3 == 2 %>
      <div class="clearfix visible-sm-block .d-none .d-sm-block .d-md-none"></div>
    <% end %>
  <% end %>
</div>

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
promethee-4.1.9 app/views/promethee/components/collection/_show.html.erb
promethee-4.1.8 app/views/promethee/components/collection/_show.html.erb
promethee-4.1.7 app/views/promethee/components/collection/_show.html.erb
promethee-4.1.6 app/views/promethee/components/collection/_show.html.erb
promethee-4.1.5 app/views/promethee/components/collection/_show.html.erb
promethee-4.1.4 app/views/promethee/components/collection/_show.html.erb
promethee-4.1.3 app/views/promethee/components/collection/_show.html.erb
promethee-4.1.2 app/views/promethee/components/collection/_show.html.erb
promethee-4.1.1 app/views/promethee/components/collection/_show.html.erb
promethee-4.1.0 app/views/promethee/components/collection/_show.html.erb
promethee-4.0.8 app/views/promethee/components/collection/_show.html.erb
promethee-4.0.7 app/views/promethee/components/collection/_show.html.erb
promethee-4.0.6 app/views/promethee/components/collection/_show.html.erb
promethee-4.0.5 app/views/promethee/components/collection/_show.html.erb
promethee-4.0.4 app/views/promethee/components/collection/_show.html.erb
promethee-4.0.3 app/views/promethee/components/collection/_show.html.erb
promethee-4.0.2 app/views/promethee/components/collection/_show.html.erb
promethee-4.0.1 app/views/promethee/components/collection/_show.html.erb
promethee-4.0.0 app/views/promethee/components/collection/_show.html.erb