6 changed files with 100 additions and 10 deletions
@ -0,0 +1,55 @@
|
||||
<section class="app-table-group" tabindex="0" aria-labelledby="<%= title.dasherize %>"> |
||||
<%= govuk_table do |table| %> |
||||
<%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> |
||||
<strong><%= @merge_requests.where.not(status: 4).count %></strong> unresolved merge requests |
||||
<% end %> |
||||
<%= table.with_head do |head| %> |
||||
<%= head.with_row do |row| %> |
||||
<% row.with_cell(header: true, text: "Absorbing organisation", html_attributes: { |
||||
scope: "col", |
||||
}) %> |
||||
<% row.with_cell(header: true, text: "Merge date", html_attributes: { |
||||
scope: "col", |
||||
}) %> |
||||
<% row.with_cell(header: true, text: "Status", html_attributes: { |
||||
scope: "col", |
||||
}) %> |
||||
<% row.with_cell(header: true, text: "", html_attributes: { |
||||
scope: "col", |
||||
}) %> |
||||
<% end %> |
||||
<% end %> |
||||
<% @merge_requests.each do |merge_request| %> |
||||
<%= table.with_body do |body| %> |
||||
<%= body.with_row do |row| %> |
||||
<% absorbing_organisation_name = merge_request.new_organisation_name %> |
||||
<% if absorbing_organisation_name.blank? %> |
||||
<% row.with_cell(text: "You didn't answer this question", |
||||
html_attributes: { |
||||
scope: "row", |
||||
class: "app-!-colour-muted", |
||||
}) %> |
||||
<% else %> |
||||
<% row.with_cell(text: merge_request.new_organisation_name) %> |
||||
<% end %> |
||||
<% merge_date = merge_request.merge_date %> |
||||
<% if merge_date.nil? %> |
||||
<% row.with_cell(text: "You didn't answer this question", |
||||
html_attributes: { |
||||
scope: "row", |
||||
class: "app-!-colour-muted", |
||||
}) %> |
||||
<% else %> |
||||
<% row.with_cell(text: merge_date.strftime("%d %B %Y")) %> |
||||
<% end %> |
||||
<% row.with_cell(text: status_tag(merge_request.status)) %> |
||||
<% row.with_cell(html_attributes: { |
||||
scope: "row", |
||||
}) do %> |
||||
<%= govuk_link_to("View details", "/merge-request/#{merge_request.id}/organisations") %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
||||
</section> |
||||
Loading…
Reference in new issue