You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.2 KiB
30 lines
1.2 KiB
<%= govuk_table do |table| %> |
|
<%= table.with_head do |head| %> |
|
<% head.with_row do |row| %> |
|
<% row.with_cell header: true, text: "Log ID" %> |
|
<% row.with_cell header: true, text: "Purchaser code" %> |
|
<% row.with_cell header: true, text: "Sale completion date" %> |
|
<% row.with_cell header: true, text: "Status" %> |
|
<% row.with_cell header: true, text: "Delete?" %> |
|
<% end %> |
|
<% end %> |
|
<%= table.with_body do |body| %> |
|
<% f.govuk_check_boxes_fieldset :selected_ids, small: true do %> |
|
<% delete_logs_form.logs.each do |log| %> |
|
<% body.with_row do |row| %> |
|
<% row.with_cell do %> |
|
<%= govuk_link_to log.id, url_for(log) %> |
|
<% end %> |
|
<% row.with_cell text: log.purchid %> |
|
<% row.with_cell text: log.saledate&.to_formatted_s(:govuk_date) %> |
|
<% row.with_cell text: status_tag(log.status) %> |
|
<% row.with_cell html_attributes: { class: "checkbox-cell" } do %> |
|
<% f.govuk_check_box :selected_ids, log.id, |
|
label: { text: log.id, hidden: true }, |
|
checked: delete_logs_form.selected_ids.include?(log.id) %> |
|
<% end %> |
|
<% end %> |
|
<% end %> |
|
<% end %> |
|
<% end %> |
|
<% end %>
|
|
|