Sha256: 8e3917a246c9b5d2af980c01be56caf26c93678bf3dc1f95aff8670afbb80b45
Contents?: true
Size: 1.14 KB
Versions: 325
Compression:
Stored size: 1.14 KB
Contents
<% caption ||= nil head ||= [] rows ||= [] first_cell_is_header ||=false caption_classes ||= nil sortable ||=false %> <%= GovukPublishingComponents::AppHelpers::TableHelper.helper(self, caption, { sortable: sortable, caption_classes: caption_classes }) do |t| %> <% if head.any? %> <%= t.head do %> <% head.each_with_index do |item, cellindex| %> <%= t.header item[:text], { format: item[:format], href: item[:href], data_attributes: item[:data_attributes], sort_direction: item[:sort_direction] } %> <% end %> <% end %> <% end %> <%= t.body do %> <% rows.each_with_index do |row, rowindex| %> <%= t.row do %> <% row.each_with_index do |cell, cellindex| %> <% if cellindex == 0 && first_cell_is_header %> <%= t.header cell[:text], { scope: "row", format: cell[:format] } %> <% else %> <%= t.cell cell[:text], { format: cell[:format] } %> <% end %> <% end %> <% end %> <% end %> <% end %> <% end %>
Version data entries
325 entries across 325 versions & 1 rubygems