Sha256: a77bf605edf116ec13760236d419c1b07e1a4ab153e87581ecfd7e0c5d0aefe3

Contents?: true

Size: 839 Bytes

Versions: 3

Compression:

Stored size: 839 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) %>">
  <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>
</div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
promethee-4.0.2 app/views/promethee/components/table/_show.html.erb
promethee-4.0.1 app/views/promethee/components/table/_show.html.erb
promethee-4.0.0 app/views/promethee/components/table/_show.html.erb