Browse Source

styling

pull/976/head
Kat 3 years ago
parent
commit
5616cf0d5e
  1. 2
      app/controllers/locations_controller.rb
  2. 11
      app/views/locations/show.html.erb

2
app/controllers/locations_controller.rb

@ -20,7 +20,7 @@ class LocationsController < ApplicationController
def show; end def show; end
def deactivate; def deactivate
render "toggle_active", locals: { action: "deactivate" } render "toggle_active", locals: { action: "deactivate" }
end end

11
app/views/locations/show.html.erb

@ -10,10 +10,9 @@
<%= render partial: "organisations/headings", locals: { main: @location.postcode, sub: @location.name } %> <%= render partial: "organisations/headings", locals: { main: @location.postcode, sub: @location.name } %>
<h2 class="govuk-visually-hidden">Location</h2> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds-from-desktop" %>
<%= govuk_summary_list do |summary_list| %> <%= govuk_summary_list do |summary_list| %>
<% @location.display_attributes.each do |attr| %> <% @location.display_attributes.each do |attr| %>
<%= summary_list.row do |row| %> <%= summary_list.row do |row| %>
<% row.key { attr[:name] } %> <% row.key { attr[:name] } %>
@ -21,8 +20,10 @@
<% row.action(text: "Change", href: location_edit_name_path(location_id: @location.id, id: @scheme.id)) if attr[:edit] %> <% row.action(text: "Change", href: location_edit_name_path(location_id: @location.id, id: @scheme.id)) if attr[:edit] %>
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
</div>
</div>
<% if !Rails.env.production? %> <% if !Rails.env.production? %>
<%= govuk_button_link_to "Deactivate this location", location_deactivate_path(location_id: @location.id, id: @scheme.id), warning: true %> <%= govuk_button_link_to "Deactivate this location", location_deactivate_path(location_id: @location.id, id: @scheme.id), warning: true %>
<% end %> <% end %>

Loading…
Cancel
Save