Sha256: 6ada95b717a51703274331c921f32bdc9888a1424e3b63651303698100239d81

Contents?: true

Size: 1.03 KB

Versions: 59

Compression:

Stored size: 1.03 KB

Contents

<%
  title = component[:attributes][:searchable_title]
  items_per_line = component[:attributes][:items_per_line]
  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

59 entries across 59 versions & 1 rubygems

Version Path
promethee-3.0.2 app/views/promethee/components/collection/_show.html.erb
promethee-3.0.1 app/views/promethee/components/collection/_show.html.erb
promethee-3.0.0 app/views/promethee/components/collection/_show.html.erb
promethee-2.1.3 app/views/promethee/components/collection/_show.html.erb
promethee-2.1.2 app/views/promethee/components/collection/_show.html.erb
promethee-2.1.1 app/views/promethee/components/collection/_show.html.erb
promethee-2.1.0 app/views/promethee/components/collection/_show.html.erb
promethee-2.0.9 app/views/promethee/components/collection/_show.html.erb
promethee-2.0.8 app/views/promethee/components/collection/_show.html.erb
promethee-2.0.7 app/views/promethee/components/collection/_show.html.erb
promethee-2.0.6 app/views/promethee/components/collection/_show.html.erb
promethee-2.0.5 app/views/promethee/components/collection/_show.html.erb
promethee-2.0.4 app/views/promethee/components/collection/_show.html.erb
promethee-2.0.3 app/views/promethee/components/collection/_show.html.erb
promethee-2.0.2 app/views/promethee/components/collection/_show.html.erb
promethee-2.0.1 app/views/promethee/components/collection/_show.html.erb
promethee-2.0.0 app/views/promethee/components/collection/_show.html.erb
promethee-1.11.29 app/views/promethee/components/collection/_show.html.erb
promethee-1.11.28 app/views/promethee/components/collection/_show.html.erb
promethee-1.11.27 app/views/promethee/components/collection/_show.html.erb