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.
		
		
		
		
		
			
		
			
				
					
					
						
							52 lines
						
					
					
						
							2.3 KiB
						
					
					
				
			
		
		
	
	
							52 lines
						
					
					
						
							2.3 KiB
						
					
					
				<% 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_inset_text(text: edit_location_text(@scheme, current_user)) %> | 
						|
 | 
						|
    <%= govuk_summary_list do |summary_list| %> | 
						|
      <% display_location_attributes(@location).each do |attr| %> | 
						|
        <% unless attr[:attribute].eql?("local_authority") && @location.is_la_inferred %> | 
						|
          <%= summary_list.with_row do |row| %> | 
						|
            <% row.with_key { attr[:name] } %> | 
						|
            <% if attr[:attribute].eql?("status") %> | 
						|
              <%= row.with_value do %> | 
						|
                <%= details_html({ name: "Status", value: status_tag_from_resource(@location), id: "status" }) %> | 
						|
                <% if @location.deactivated? && current_user.support? && !LocationPolicy.new(current_user, @location).delete? %> | 
						|
                  <span class="app-!-colour-muted">This location was active in an open or editable collection year, and cannot be deleted.</span> | 
						|
                <% end %> | 
						|
              <% end %> | 
						|
            <% elsif attr[:attribute].eql?("postcode") && @location.is_la_inferred %> | 
						|
              <% row.with_value do %> | 
						|
                <%= details_html(attr, @location) %> | 
						|
                <span class="govuk-!-font-weight-regular app-!-colour-muted"><%= formatted_local_authority_timeline(@location) %></span> | 
						|
              <% end %> | 
						|
            <% else %> | 
						|
              <%= row.with_value { details_html(attr, @location) } %> | 
						|
            <% end %> | 
						|
            <% if LocationPolicy.new(current_user, @location).update? %> | 
						|
              <%= row.with_action(text: "Change", href: location_action_link(attr, @scheme, @location, current_user)) if location_editable_attributes.include?(attr[:attribute]) %> | 
						|
            <% end %> | 
						|
          <% end %> | 
						|
        <% end %> | 
						|
       <% end %> | 
						|
    <% end %> | 
						|
  </div> | 
						|
</div> | 
						|
 | 
						|
<% if @location.scheme.owning_organisation.status == :active && LocationPolicy.new(current_user, @location).deactivate? %> | 
						|
  <%= toggle_location_link(@location) %> | 
						|
<% end %> | 
						|
 | 
						|
<% if LocationPolicy.new(current_user, @location).delete? %> | 
						|
  <%= delete_location_link(@location) %> | 
						|
<% end %>
 | 
						|
 |