<%= render(Ariadne::BaseComponent.new(tag: @tag, classes: @classes, attributes: @attributes)) do |table| %> <% if has_header_row? %> <%= render(Ariadne::BaseComponent.new(tag: :tr, classes: header_row.classes, attributes: header_row.attributes)) do %> <%= header_row.selection_cell %> <%= header_row.main_cell %> <% header_row.action_cells.each_with_index do |action_cell, idx| %> <% if idx.zero? %> <%= action_cell %> <% elsif idx == header_row.action_cells.size - 1 %> <%= action_cell %> <% else %> <%= action_cell %> <% end %> <% end %> <% end %> <% end %> <% rows.each do |row| %> <%= render(Ariadne::BaseComponent.new(tag: :tr, classes: row.classes, attributes: row.attributes)) do %> <%= row.selection_cell %> <%= row.main_cell %> <% row.metadata_cells.each_with_index do |metadata_cell, idx| %> <% if idx.zero? %> <%= metadata_cell %> <% elsif idx == row.metadata_cells.size - 1 %> <%= metadata_cell %> <% else %> <%= metadata_cell %> <% end %> <% end %> <% end %> <% end %> <% end %>
<% if has_footer? %> <%= render(Ariadne::BaseComponent.new(tag: :div, classes: footer.classes, attributes: footer.attributes)) do %> <%= footer.records_info %> <%= render(Ariadne::BaseComponent.new(tag: :nav, classes: footer.pagination_bar.classes, attributes: footer.pagination_bar.attributes)) do %> <%= footer.pagination_bar.prev_page %> <% footer.pagination_bar.items.each do |item| %> <%= item %> <% end %> <%= footer.pagination_bar.next_page %> <% end %> <% end %> <% end %>