Sha256: 85e059a2ba117f9dd567bb184d22c4d114b3a77c2775c0227774ec6ba9c62b5d

Contents?: true

Size: 1.42 KB

Versions: 18

Compression:

Stored size: 1.42 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-trigger="focus"
                    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

18 entries across 18 versions & 1 rubygems

Version Path
active_element-0.0.31 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.30 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.29 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.28 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.27 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.26 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.24 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.23 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.22 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.21 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.19 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.18 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.17 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.16 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.15 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.14 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.13 app/views/active_element/components/table/_ungrouped_collection.html.erb
active_element-0.0.12 app/views/active_element/components/table/_ungrouped_collection.html.erb