Sha256: fc0d8cad9361210565c84868cbc494b985d7c1071894eafda63d07015b8f455a

Contents?: true

Size: 1.97 KB

Versions: 56

Compression:

Stored size: 1.97 KB

Contents

<table <%= attributes_html %>>
  <thead class="<%= table_head_classname %>">
    <tr>
      <th scope="col" class="p-4">
        <div class="flex items-center">
          <input id="checkbox-all-search" type="checkbox" class="w-4 h-4 text-primary-600 bg-gray-100 border-gray-300 rounded focus:ring-primary-500 dark:focus:ring-primary-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600">
          <label for="checkbox-all-search" class="sr-only">checkbox</label>
        </div>
      </th>
      <% @columns.each do |column| %>
        <th scope="col" class="<%= table_head_cell_classname %>">
          <%= table_head_cell column  %>
        </th>
      <% end %>
      <% if actions_block.present? %>
        <th scope="col" class="<%= table_actions_head_classname %>">&nbsp;</th>
      <% end %>
    </tr>
  </thead>
  <tbody>
    <% @rows.each do |row| %>
      <tr class="<%= table_row_classname %>">
        <th scope="row" class="w-4 p-4">
          <div class="flex items-center">
            <input id="checkbox-table-search-1" type="checkbox" class="w-4 h-4 text-primary-600 bg-gray-100 border-gray-300 rounded focus:ring-primary-500 dark:focus:ring-primary-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600">
            <label for="checkbox-table-search-1" class="sr-only">checkbox</label>
          </div>
        </th>
        <% @columns.each do |column| %>
          <td class="<%= table_row_cell_classname %>">
            <%# the capture ensures, that we do not only return the return of the block, but all the html from the block %>
            <%= view_context.capture(row, &column.td_block) %>
          </td>
        <% end %>
        <% if actions_block.present? %>
          <td class="<%= table_actions_row_classname %>">
            <%= view_context.capture(row, &actions_block) %>
          </td>
        <% end %>
      </tr>
    <% end %>
  </tbody>
</table>

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
plutonium-0.16.5 app/views/components/table/table_component.html.erb
plutonium-0.16.4 app/views/components/table/table_component.html.erb
plutonium-0.16.3 app/views/components/table/table_component.html.erb
plutonium-0.16.1 app/views/components/table/table_component.html.erb
plutonium-0.16.0 app/views/components/table/table_component.html.erb
plutonium-0.15.24 app/views/components/table/table_component.html.erb
plutonium-0.15.23 app/views/components/table/table_component.html.erb
plutonium-0.15.22 app/views/components/table/table_component.html.erb
plutonium-0.15.21 app/views/components/table/table_component.html.erb
plutonium-0.15.20 app/views/components/table/table_component.html.erb
plutonium-0.15.19 app/views/components/table/table_component.html.erb
plutonium-0.15.18 app/views/components/table/table_component.html.erb
plutonium-0.15.17 app/views/components/table/table_component.html.erb
plutonium-0.15.16 app/views/components/table/table_component.html.erb
plutonium-0.15.15 app/views/components/table/table_component.html.erb
plutonium-0.15.14 app/views/components/table/table_component.html.erb
plutonium-0.15.13 app/views/components/table/table_component.html.erb
plutonium-0.15.12 app/views/components/table/table_component.html.erb
plutonium-0.15.11 app/views/components/table/table_component.html.erb
plutonium-0.15.10 app/views/components/table/table_component.html.erb