|
|
|
<% title = current_user.support? ? "#{@organisation.name} (Organisation details)" : "Organisation details" %>
|
|
|
|
<% title = format_title(nil, current_user.support? ? "About this organisation" : "About your organisation", current_user, nil, nil, @organisation.name) %>
|
|
|
|
<% content_for :title, title %>
|
|
|
|
|
|
|
|
<%= render partial: "organisations/headings", locals: current_user.support? ? { main: @organisation.name, sub: nil } : { main: "About your organisation", sub: current_user.organisation.name } %>
|
|
|
|
|
|
|
|
<% if current_user.support? %>
|
|
|
|
<%= render SubNavigationComponent.new(
|
|
|
|
items: secondary_items(request.path, @organisation.id),
|
|
|
|
) %>
|
|
|
|
<h2 class="govuk-visually-hidden">About this organisation</h2>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="govuk-grid-row">
|
|
|
|
<div class="govuk-grid-column-two-thirds-from-desktop">
|
|
|
|
<%= govuk_summary_list do |summary_list| %>
|
|
|
|
<% @organisation.display_organisation_attributes.each do |attr| %>
|
|
|
|
<% if can_edit_org?(current_user) && attr[:editable] %>
|
|
|
|
<%= summary_list.row do |row| %>
|
|
|
|
<% row.key { attr[:name].to_s.humanize } %>
|
|
|
|
<% row.value { details_html(attr) } %>
|
|
|
|
<% row.action(
|
|
|
|
visually_hidden_text: attr[:name].to_s.humanize.downcase,
|
|
|
|
href: edit_organisation_path(@organisation),
|
|
|
|
html_attributes: { "data-qa": "change-#{attr[:name].downcase}" },
|
|
|
|
) %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<%= summary_list.row do |row| %>
|
|
|
|
<% row.key { attr[:name].to_s.humanize } %>
|
|
|
|
<% row.value { details_html(attr) } %>
|
|
|
|
<% row.action %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% if FeatureToggle.new_data_sharing_agreement? %>
|
|
|
|
<%= data_sharing_agreement_row(organisation: @organisation, user: current_user, summary_list:) %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% if FeatureToggle.merge_organisations_enabled? %>
|
|
|
|
<p>Is your organisation merging with another? <%= govuk_link_to "Let us know using this form", merge_request_organisation_path(@organisation) %></p>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="govuk-grid-column-one-third-from-desktop">
|
|
|
|
<%= render partial: "layouts/collection_resources" %>
|
|
|
|
</div>
|
|
|
|
</div>
|