Submit social housing lettings and sales data (CORE)
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.
 
 
 
 

26 lines
1.5 KiB

<% item_label = format_label(@pagy.count, "managing agents") %>
<% title = "Managing agents" %>
<% content_for :title, title %>
<% if current_user.support? %>
<%= render partial: "organisations/headings", locals: { main: @organisation.name, sub: nil } %>
<%= render SubNavigationComponent.new(
items: secondary_items(request.path, @organisation.id),
) %>
<h2 class="govuk-visually-hidden">managing agents</h2>
<p class="govuk-body">A managing agent can submit logs for your organisation.</p>
<% else %>
<%= render partial: "organisations/headings", locals: { main: "Your managing agents", sub: nil } %>
<p class="govuk-body">A managing agent can submit logs for your organisation.</p>
<% end %>
<% if @total_count == 0 %>
<p class="govuk-body">You do not currently have any managing agents.</p>
<% end %>
<% if current_user.data_coordinator? || current_user.support? %>
<%= govuk_button_link_to "Add a managing agent", managing_agents_organisation_path(organisation_id: @organisation.id), html: { method: :get } %>
<% end %>
<% if @total_count != 0 %>
<%= render SearchComponent.new(current_user:, search_label: "Search for a managing agent", value: @searched) %>
<%= render partial: "organisation_relationships/managing_agent_list", locals: { index: @managing_agents, title: "Managing agents", pagy: @pagy, searched: @searched, item_label:, total_count: @total_count } %>
<%= render partial: "pagy/nav", locals: { pagy: @pagy, item_name: "Managing agents" } %>
<% end %>