Browse Source

lint

pull/976/head
Kat 3 years ago
parent
commit
09f7bd2c28
  1. 21
      app/views/locations/show.html.erb

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

@ -8,20 +8,19 @@
) %> ) %>
<% end %> <% end %>
<%= render partial: "organisations/headings", locals: { main: @location.postcode, sub: @location.name } %> <%= render partial: "organisations/headings", locals: { main: @location.postcode, sub: @location.name } %>
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds-from-desktop" %> <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] } %>
<% row.value { attr[:name].eql?("Status") ? status_tag(attr[:value]) : details_html(attr) } %> <% 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] %> <% 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>
</div> </div>
<% if !Rails.env.production? %> <% if !Rails.env.production? %>

Loading…
Cancel
Save