|
|
|
<% title = "#{@organisation.name} (Organisation details)" %>
|
|
|
|
<% content_for :title, title %>
|
|
|
|
|
|
|
|
<h1 class="govuk-heading-l">
|
|
|
|
<% if !current_user.support? %>
|
|
|
|
<span class="govuk-caption-l"><%= current_user.organisation.name %></span>
|
|
|
|
About your organisation
|
|
|
|
<% else %>
|
|
|
|
<h1 class="govuk-heading-l"><%= @organisation.name %></h1>
|
|
|
|
<% end %>
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
<h2 class="govuk-visually-hidden">About this organisation</h2>
|
|
|
|
|
|
|
|
<% if current_user.support? %>
|
|
|
|
<%= render SubNavigationComponent.new(
|
|
|
|
items: secondary_items(request.path, @organisation.id),
|
|
|
|
) %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="govuk-grid-row">
|
|
|
|
<div class="govuk-grid-column-two-thirds-from-desktop">
|
|
|
|
<%= govuk_summary_list do |summary_list| %>
|
|
|
|
<% @organisation.display_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,
|
|
|
|
html_attributes: { "data-qa": "change-#{attr[:name]}" },
|
|
|
|
) %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<%= summary_list.row do |row| %>
|
|
|
|
<% row.key { attr[:name].to_s.humanize } %>
|
|
|
|
<% row.value { details_html(attr) } %>
|
|
|
|
<% row.action %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="govuk-grid-column-one-third-from-desktop">
|
|
|
|
<%= render partial: "layouts/collection_resources" %>
|
|
|
|
</div>
|
|
|
|
</div>
|