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.
		
		
		
		
		
			
		
			
				
					
					
						
							63 lines
						
					
					
						
							3.0 KiB
						
					
					
				
			
		
		
	
	
							63 lines
						
					
					
						
							3.0 KiB
						
					
					
				| <% title = current_user.support? ? "#{@organisation.name} (Organisation details)" : "Organisation details" %> | |
| <% title = format_title(nil, current_user.support? ? "About this organisation" : "Your organisation", current_user, nil, nil, @organisation.name) %> | |
| <% content_for :title, title %> | |
|  | |
| <%= render partial: "organisations/headings", locals: current_user.support? ? { main: @organisation.name, sub: nil } : { main: "Your organisation", sub: current_user.organisation.name } %> | |
|  | |
| <% if current_user.support? %> | |
|   <%= render SubNavigationComponent.new( | |
|     items: secondary_items(request.path, @organisation.id), | |
|   ) %> | |
|   <h2 class="govuk-visually-hidden">About this organisation</h2> | |
| <% end %> | |
|  | |
| <div class="govuk-grid-row"> | |
|   <div class="govuk-grid-column-two-thirds-from-desktop"> | |
|     <%= govuk_summary_list do |summary_list| %> | |
|       <%= organisation_name_row(user: current_user, organisation: @organisation, summary_list:) %> | |
|       <% display_organisation_attributes(@organisation).each do |attr| %> | |
|         <% if attr[:name] == "Data Sharing Agreement" %> | |
|           <%= data_sharing_agreement_row(organisation: @organisation, user: current_user, summary_list:) %> | |
|         <% else %> | |
|           <% if can_edit_org?(current_user) && attr[:editable] %> | |
|             <%= summary_list.with_row do |row| %> | |
|               <% row.with_key { attr[:name] } %> | |
|               <% row.with_value { details_html(attr, @organisation) } %> | |
|               <% if attr[:value] %> | |
|                 <% row.with_action( | |
|                      text: organisation_action_text(attr, @organisation), | |
|                      visually_hidden_text: attr[:name].to_s.humanize.downcase, | |
|                      href: edit_organisation_path(@organisation), | |
|                      html_attributes: { "data-qa": "change-#{attr[:name].downcase}" }, | |
|                    ) %> | |
|               <% else %> | |
|                 <% row.with_action %> | |
|               <% end %> | |
|             <% end %> | |
|           <% else %> | |
|             <%= summary_list.with_row do |row| %> | |
|               <% row.with_key { attr[:name] } %> | |
|               <% row.with_value { details_html(attr, @organisation) } %> | |
|               <% row.with_action %> | |
|             <% end %> | |
|           <% end %> | |
|         <% end %> | |
|       <% end %> | |
|     <% end %> | |
|     <p>To report a merge or update your organisation details, <%= govuk_link_to "contact the helpdesk", GlobalConstants::HELPDESK_URL %>.</p> | |
|     <%= render partial: "organisations/merged_organisation_details" %> | |
|   </div> | |
| </div> | |
|  | |
| <% if OrganisationPolicy.new(current_user, @organisation).deactivate? %> | |
|   <%= govuk_button_link_to "Deactivate this organisation", deactivate_organisation_path(@organisation), warning: true %> | |
| <% end %> | |
| <% if OrganisationPolicy.new(current_user, @organisation).reactivate? %> | |
|   <span class="app-!-colour-muted govuk-!-margin-right-2"> | |
|       <%= govuk_button_link_to "Reactivate this organisation", reactivate_organisation_path(@organisation) %> | |
|     </span> | |
| <% end %> | |
|  | |
| <% if OrganisationPolicy.new(current_user, @organisation).delete? %> | |
|   <%= delete_organisation_link(@organisation) %> | |
| <% end %>
 | |
| 
 |