|
|
|
<% title = @scheme.service_name %>
|
|
|
|
<% content_for :title, title %>
|
|
|
|
|
|
|
|
<% content_for :before_content do %>
|
|
|
|
<%= govuk_back_link(
|
|
|
|
href: "/schemes",
|
|
|
|
) %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%= render partial: "organisations/headings", locals: { main: @scheme.service_name, sub: nil } %>
|
|
|
|
|
|
|
|
<div class="govuk-grid-row">
|
|
|
|
<div class="govuk-grid-column-two-thirds-from-desktop">
|
|
|
|
<%= render SubNavigationComponent.new(items: scheme_items(request.path, @scheme.id, "Locations")) %>
|
|
|
|
|
|
|
|
<h2 class="govuk-visually-hidden">Scheme</h2>
|
|
|
|
|
|
|
|
<%= govuk_summary_list do |summary_list| %>
|
|
|
|
<% display_scheme_attributes(@scheme).each do |attr| %>
|
|
|
|
<%= summary_list.row do |row| %>
|
|
|
|
<% row.key { attr[:name] } %>
|
|
|
|
<% row.value do %>
|
|
|
|
<%= details_html(attr) %>
|
|
|
|
<% if attr[:name] == "Status" && @scheme.confirmed? && @scheme.locations.confirmed.none? %>
|
|
|
|
<span class="app-!-colour-muted">Add a location to complete this scheme</span>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% if SchemePolicy.new(current_user, @scheme).update? %>
|
|
|
|
<% row.action(text: "Change", href: scheme_edit_name_path(scheme_id: @scheme.id)) if attr[:edit] %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% if SchemePolicy.new(current_user, @scheme).deactivate? %>
|
|
|
|
<%= toggle_scheme_link(@scheme) %>
|
|
|
|
<% end %>
|