2 changed files with 23 additions and 22 deletions
@ -0,0 +1,22 @@
|
||||
<%= govuk_details(summary_text: "View name history") do %> |
||||
<%= govuk_table do |table| %> |
||||
<%= table.with_head do |head| %> |
||||
<% head.with_row do |row| %> |
||||
<% row.with_cell(header: true, text: "Name") %> |
||||
<% row.with_cell(header: true, text: "Start Date") %> |
||||
<% row.with_cell(header: true, text: "End Date") %> |
||||
<% row.with_cell(header: true, text: "Status") %> |
||||
<% end %> |
||||
<% end %> |
||||
<% @previous_name_changes.each do |change| %> |
||||
<%= table.with_body do |body| %> |
||||
<% body.with_row do |row| %> |
||||
<% row.with_cell(text: change[:name]) %> |
||||
<% row.with_cell(text: change[:start_date]&.to_formatted_s(:govuk_date)) %> |
||||
<% row.with_cell(text: change[:end_date]&.to_formatted_s(:govuk_date) || "None") %> |
||||
<% row.with_cell text: status_tag(change[:status].to_sym) %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
Loading…
Reference in new issue