4 changed files with 26 additions and 44 deletions
@ -1,36 +0,0 @@
|
||||
<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| %> |
||||
<%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "agents", filters_count: 0)) %> |
||||
<% end %> |
||||
<%= table.with_head do |head| %> |
||||
<%= head.with_row do |row| %> |
||||
<% row.with_cell(header: true, text: "Organisation name", html_attributes: { scope: "col", class: "govuk-!-width-one-half" }) %> |
||||
<% row.with_cell(header: true, text: "Organisation ID", html_attributes: { scope: "col", class: "govuk-!-width-one-half" }) %> |
||||
<% if current_user.data_coordinator? || current_user.support? %> |
||||
<% row.with_cell %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
||||
<%= table.with_body do |body| %> |
||||
<% @managing_agents.each do |managing_agent| %> |
||||
<%= body.with_row do |row| %> |
||||
<% if current_user.support? %> |
||||
<% row.with_cell(text: simple_format(govuk_link_to(managing_agent.name, organisation_path(managing_agent)), { class: "govuk-!-font-weight-bold" }, wrapper_tag: "div")) %> |
||||
<% else %> |
||||
<% row.with_cell(text: managing_agent.name) %> |
||||
<% end %> |
||||
<% row.with_cell(text: "ORG#{managing_agent.id}") %> |
||||
<% if current_user.data_coordinator? || current_user.support? %> |
||||
<% row.with_cell(html_attributes: { |
||||
scope: "row", |
||||
class: "govuk-!-text-align-right", |
||||
}) do %> |
||||
<%= govuk_link_to("Remove", managing_agents_remove_organisation_path(target_organisation_id: managing_agent.id)) %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
||||
</section> |
||||
Loading…
Reference in new issue