Sha256: 11545d7a04af08c3df8188b55dae7a996f685ac65f83bc8eed7a0576a8a779d5

Contents?: true

Size: 921 Bytes

Versions: 16

Compression:

Stored size: 921 Bytes

Contents

<%
  cells = component[:children]
  rows = component.dig(:attributes, :structure, :value).map { |row|
    row.map { |cellUid|
      {
        uid: cellUid,
        text: cells.find { |cell| cell[:id] == cellUid }.dig(:attributes, :text, :value)
      }
    }
  }

  headerRow = rows.shift
%>

<div id="component-<%= component[:id] %>" class="<%= promethee_class_for(component) %>">
  <% unless headerRow.nil? %>
    <div class="table-responsive">
      <table class="table">
        <thead>
          <tr>
            <% headerRow.each do |cell| %>
              <th><%= cell[:text] %></th>
            <% end %>
          </tr>
        </thead>
        <tbody>
          <% rows.each do |row| %>
            <tr>
              <% row.each do |cell| %>
                <td><%= cell[:text] %></td>
              <% end %>
            </tr>
          <% end %>
        </tbody>
      </table>
    </div>
  <% end %>
</div>

Version data entries

16 entries across 16 versions & 1 rubygems

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