<% item_label = format_label(@pagy.count, "stock owners") %> <% if current_user.support? %> <%= render partial: "organisations/headings", locals: { main: @organisation.name, sub: nil } %> <%= render SubNavigationComponent.new(items: secondary_items(request.path, @organisation.id)) %>

Stock Owners

This organisation can submit logs for its stock owners.

<% if @total_count == 0 %>

This organisation does not currently have any stock owners.

<% end %> <% else %> <%= render partial: "organisations/headings", locals: { main: "Your stock owners", sub: current_user.organisation.name } %>

Your organisation can submit logs for its stock owners.

<% if @total_count == 0 %>

You do not currently have any stock owners.

<% end %> <% end %> <% if current_user.support? || current_user.data_coordinator? %> <%= govuk_button_link_to "Add a stock owner", stock_owners_add_organisation_path, html: { method: :get } %> <% end %> <% if @total_count != 0 %> <%= render SearchComponent.new(current_user:, search_label: "Search for a stock owner", value: @searched) %> <%= render partial: "organisation_relationships/related_org_list", locals: { related_orgs: @stock_owners, title: "Stock owners", pagy: @pagy, searched: @searched, item_label:, search_item: "stock owners", total_count: @total_count, remove_path: ->(org_id) { stock_owners_remove_organisation_path(target_organisation_id: org_id) }, } %> <%= render partial: "pagy/nav", locals: { pagy: @pagy, item_name: "stock owners" } %> <% end %>