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.
25 lines
1.5 KiB
25 lines
1.5 KiB
2 years ago
|
<% item_label = format_label(@pagy.count, "stock owners") %>
|
||
2 years ago
|
<% if current_user.support? %>
|
||
|
<%= render partial: "organisations/headings", locals: { main: @organisation.name, sub: nil } %>
|
||
|
<%= render SubNavigationComponent.new(items: secondary_items(request.path, @organisation.id)) %>
|
||
2 years ago
|
<h2 class="govuk-visually-hidden">Stock Owners</h2>
|
||
|
<p class="govuk-body">This organisation can submit logs for its stock owners.</p>
|
||
2 years ago
|
<% if @total_count == 0 %>
|
||
2 years ago
|
<p class="govuk-body">This organisation does not currently have any stock owners.</p>
|
||
2 years ago
|
<% end %>
|
||
2 years ago
|
<% else %>
|
||
2 years ago
|
<%= render partial: "organisations/headings", locals: { main: "Your stock owners", sub: current_user.organisation.name } %>
|
||
|
<p class="govuk-body">Your organisation can submit logs for its stock owners.</p>
|
||
2 years ago
|
<% if @total_count == 0 %>
|
||
2 years ago
|
<p class="govuk-body">You do not currently have any stock owners.</p>
|
||
2 years ago
|
<% end %>
|
||
2 years ago
|
<% end %>
|
||
2 years ago
|
<% if current_user.support? || current_user.data_coordinator? %>
|
||
2 years ago
|
<%= govuk_button_link_to "Add a stock owner", stock_owners_add_organisation_path, html: { method: :get } %>
|
||
2 years ago
|
<% end %>
|
||
|
<% if @total_count != 0 %>
|
||
2 years ago
|
<%= render SearchComponent.new(current_user:, search_label: "Search for a stock owner", value: @searched) %>
|
||
|
<%= render partial: "organisation_relationships/stock_owner_list", locals: { index: @stock_owners, title: "Stock owners", pagy: @pagy, searched: @searched, item_label:, total_count: @total_count } %>
|
||
|
<%= render partial: "pagy/nav", locals: { pagy: @pagy, item_name: "stock owners" } %>
|
||
2 years ago
|
<% end %>
|