From 5616cf0d5ea65567fddf03a88ec6d92dd6a7ef63 Mon Sep 17 00:00:00 2001 From: Kat Date: Tue, 8 Nov 2022 16:05:30 +0000 Subject: [PATCH] styling --- app/controllers/locations_controller.rb | 2 +- app/views/locations/show.html.erb | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/app/controllers/locations_controller.rb b/app/controllers/locations_controller.rb index 3b4308385..797e79544 100644 --- a/app/controllers/locations_controller.rb +++ b/app/controllers/locations_controller.rb @@ -20,7 +20,7 @@ class LocationsController < ApplicationController def show; end - def deactivate; + def deactivate render "toggle_active", locals: { action: "deactivate" } end diff --git a/app/views/locations/show.html.erb b/app/views/locations/show.html.erb index 65e86014e..64f87d917 100644 --- a/app/views/locations/show.html.erb +++ b/app/views/locations/show.html.erb @@ -10,19 +10,20 @@ <%= render partial: "organisations/headings", locals: { main: @location.postcode, sub: @location.name } %> -

Location

- -<%= govuk_summary_list do |summary_list| %> - - <% @location.display_attributes.each do |attr| %> - <%= summary_list.row do |row| %> - <% row.key { attr[:name] } %> - <% row.value { attr[:name].eql?("Status") ? status_tag(attr[:value]) : details_html(attr) } %> - <% row.action(text: "Change", href: location_edit_name_path(location_id: @location.id, id: @scheme.id)) if attr[:edit] %> +
+
+ <%= govuk_summary_list do |summary_list| %> + <% @location.display_attributes.each do |attr| %> + <%= summary_list.row do |row| %> + <% row.key { attr[:name] } %> + <% row.value { attr[:name].eql?("Status") ? status_tag(attr[:value]) : details_html(attr) } %> + <% row.action(text: "Change", href: location_edit_name_path(location_id: @location.id, id: @scheme.id)) if attr[:edit] %> + <% end %> + <% end %> <% end %> - <% end %> -<% end %> +
+
<% if !Rails.env.production? %> <%= govuk_button_link_to "Deactivate this location", location_deactivate_path(location_id: @location.id, id: @scheme.id), warning: true %> <% end %>