Sha256: 110c04a251c1e8019e4b0ae44fc743f374c83df6ff736bec6231519106eea1c7

Contents?: true

Size: 1.38 KB

Versions: 10

Compression:

Stored size: 1.38 KB

Contents

<table class="<%= class_name %> table" style="<%= style %>">
  <thead>
    <tr>
      <% fields.each do |field, class_name, label, _mapper, options| %>
        <th class="text-nowrap">
          <%= label %>
          <% if options[:description].present? %>
            <button type="button"
                    style="background: none; border: none; outline: 0; position: absolute; margin-top: 0.3rem"
                    data-bs-toggle="popover"
                    data-bs-content="<%= options[:description] %>">
                    <i class="text-secondary fa-solid fa-circle-info"></i>
            </button>
          <% end %>
        </th>
      <% end %>

      <% if show %>
        <th></th>
      <% end %>

      <% if edit %>
        <th></th>
      <% end %>

      <% if destroy %>
        <th></th>
      <% end %>
    </tr>
  </thead>

  <tbody>
    <% collection.each_with_index do |item, index| %>
      <%= render partial: 'active_element/components/table/collection_row',
                 locals: {
                   component: component,
                   item: item,
                   index: index,
                   fields: fields,
                   class_name: class_name,
                   show: show,
                   edit: edit,
                   destroy: destroy,
                   row_class_mapper: row_class_mapper
                 } %>
    <% end %>
  </tbody>
</table>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
active_element-0.0.11 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.10 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.9 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.8 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.7 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.6 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.5 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.4 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.3 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.2 app/views/active_element/components/table/_ungrouped_collection.html.erb