|
|
|
<% title = @location.name %>
|
|
|
|
<% content_for :title, title %>
|
|
|
|
|
|
|
|
<% content_for :before_content do %>
|
|
|
|
<%= govuk_back_link(
|
|
|
|
href: scheme_locations_path(@scheme),
|
|
|
|
) %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%= render partial: "organisations/headings", locals: { main: @location.postcode, sub: @location.name } %>
|
|
|
|
|
|
|
|
<div class="govuk-grid-row">
|
|
|
|
<div class="govuk-grid-column-two-thirds-from-desktop">
|
|
|
|
<%= govuk_summary_list do |summary_list| %>
|
|
|
|
<% display_location_attributes(@location).each do |attr| %>
|
|
|
|
<%= summary_list.row do |row| %>
|
|
|
|
<% row.key { attr[:name] } %>
|
|
|
|
<% row.value { attr[:attribute].eql?("status") ? status_tag(attr[:value]) : details_html(attr) } %>
|
|
|
|
<% row.action(text: "Change", href: scheme_location_name_path(@scheme, @location, referrer: "details")) if attr[:attribute] == "name" && user_can_edit_scheme?(current_user, @scheme) %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% if FeatureToggle.location_toggle_enabled? && user_can_edit_scheme?(current_user, @scheme) %>
|
|
|
|
<%= toggle_location_link(@location) %>
|
|
|
|
<% end %>
|