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.
		
		
		
		
		
			
		
			
				
					
					
						
							61 lines
						
					
					
						
							2.9 KiB
						
					
					
				
			
		
		
	
	
							61 lines
						
					
					
						
							2.9 KiB
						
					
					
				<% title = @scheme.service_name %> | 
						|
<% content_for :title, title %> | 
						|
 | 
						|
<% if current_user.support? %> | 
						|
  <% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: { | 
						|
    "Home" => root_path, | 
						|
    "Schemes (#{@scheme.owning_organisation.name})" => schemes_organisation_path(@scheme.owning_organisation), | 
						|
  }) %> | 
						|
<% else %> | 
						|
  <% content_for :before_content do %> | 
						|
    <%= govuk_back_link(href: schemes_path) %> | 
						|
  <% end %> | 
						|
<% 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)) %> | 
						|
 | 
						|
    <h2 class="govuk-visually-hidden">Scheme</h2> | 
						|
    <dl class="govuk-summary-list"> | 
						|
      <% @scheme.check_details_attributes.each do |attr| %> | 
						|
        <% if attr[:name] == "Status" %> | 
						|
          <div class="govuk-summary-list__row govuk-summary-list__row--no-actions"> | 
						|
            <dt class="govuk-summary-list__key">Status</dt> | 
						|
            <dd class="govuk-summary-list__value"> | 
						|
              <%= details_html({ name: "Status", value: status_tag_from_resource(@scheme), id: "status" }) %> | 
						|
              <% if @scheme.confirmed? && @scheme.active? && !@scheme.has_active_locations? %> | 
						|
                <span class="app-!-colour-muted">No currently active locations</span> | 
						|
              <% end %> | 
						|
              <% if @scheme.confirmed? && @scheme.locations.confirmed.none? && LocationPolicy.new(current_user, @scheme.locations.new).create? %> | 
						|
                <span class="app-!-colour-muted">Complete this scheme by adding a location using the <%= govuk_link_to("‘locations’ tab", scheme_locations_path(@scheme)) %>.</span> | 
						|
              <% end %> | 
						|
              <% if @scheme.deactivated? && current_user.support? && !SchemePolicy.new(current_user, @scheme).delete? %> | 
						|
                  <span class="app-!-colour-muted">This scheme was active in an open or editable collection year, and cannot be deleted.</span> | 
						|
              <% end %> | 
						|
            </dd> | 
						|
          </div> | 
						|
        <% elsif attr[:id] != "secondary_client_group" || @scheme.has_other_client_group == "Yes" %> | 
						|
          <%= render partial: "scheme_summary_list_row", locals: { scheme: @scheme, attribute: attr, change_link: scheme_edit_path(@scheme, attr[:id], current_user) } %> | 
						|
        <% end %> | 
						|
      <% end %> | 
						|
 | 
						|
      <div class="govuk-summary-list__row govuk-summary-list__row--no-actions"> | 
						|
        <dt class="govuk-summary-list__key">Availability</dt> | 
						|
        <dd class="govuk-summary-list__value"> | 
						|
          <%= details_html({ name: "Availability", value: scheme_availability(@scheme), id: "availability" }) %> | 
						|
        </dd> | 
						|
      </div> | 
						|
    </dl> | 
						|
  </div> | 
						|
</div> | 
						|
 | 
						|
<% if @scheme.owning_organisation.status == :active && SchemePolicy.new(current_user, @scheme).deactivate? %> | 
						|
  <%= toggle_scheme_link(@scheme) %> | 
						|
<% end %> | 
						|
 | 
						|
<% if SchemePolicy.new(current_user, @scheme).delete? %> | 
						|
  <%= delete_scheme_link(@scheme) %> | 
						|
<% end %>
 | 
						|
 |