Browse Source

Remove redundant grid column definition

pull/782/head
Stéphane Meny 3 years ago
parent
commit
69b11e832a
No known key found for this signature in database
GPG Key ID: 9D0AFEA988527923
  1. 2
      app/views/schemes/check_answers.html.erb
  2. 18
      app/views/schemes/show.html.erb

2
app/views/schemes/check_answers.html.erb

@ -3,7 +3,6 @@
<%= form_for(@scheme, as: :scheme, method: :patch) do |f| %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<%= f.govuk_error_summary %>
<%= govuk_tabs(title: "Check your answers before creating this scheme") do |component| %>
<% component.tab(label: "Scheme") do %>
@ -72,7 +71,6 @@
<%= govuk_button_link_to "Add a location", new_location_path(id: @scheme.id), secondary: true %>
<% end %>
<% end %>
</div>
</div>
<%= f.hidden_field :page, value: "check-answers" %>
<%= f.hidden_field :confirmed, value: "true" %>

18
app/views/schemes/show.html.erb

@ -13,16 +13,14 @@
<%= render SubNavigationComponent.new(items: scheme_items(request.path, @scheme.id, "Locations")) %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<%= govuk_summary_list do |summary_list| %>
<% @scheme.display_attributes.each do |attr| %>
<% next if current_user.data_coordinator? && attr[:name] == ("Housing stock owned by") %>
<%= summary_list.row do |row| %>
<% row.key { attr[:name].eql?("Registered under Care Standards Act 2000") ? "Registered under Care Standards Act 2000" : attr[:name].to_s.humanize } %>
<% row.value { details_html(attr) } %>
<% row.action(text: "Change", href: scheme_edit_name_path(scheme_id: @scheme.id)) if attr[:edit] %>
<% end %>
<%= govuk_summary_list do |summary_list| %>
<% @scheme.display_attributes.each do |attr| %>
<% next if current_user.data_coordinator? && attr[:name] == ("Housing stock owned by") %>
<%= summary_list.row do |row| %>
<% row.key { attr[:name].eql?("Registered under Care Standards Act 2000") ? "Registered under Care Standards Act 2000" : attr[:name].to_s.humanize } %>
<% row.value { details_html(attr) } %>
<% row.action(text: "Change", href: scheme_edit_name_path(scheme_id: @scheme.id)) if attr[:edit] %>
<% end %>
<% end %>
</div>
<% end %>
</div>

Loading…
Cancel
Save