Browse Source
* Add show location page * Add availability to the locations table * Add active status * Add an empty deactivate page and button * styling * lint * Extract feature toggle * Update route * Move display_attributes * update path * update pathspull/985/head
kosiakkatrina
2 years ago
committed by
GitHub
12 changed files with 131 additions and 15 deletions
@ -0,0 +1,28 @@ |
|||||||
|
<% title = @location.name %> |
||||||
|
<% content_for :title, title %> |
||||||
|
|
||||||
|
<% content_for :before_content do %> |
||||||
|
<%= govuk_back_link( |
||||||
|
text: "Back", |
||||||
|
href: scheme_locations_path(@scheme), |
||||||
|
) %> |
||||||
|
<% end %> |
||||||
|
|
||||||
|
<%= render partial: "organisations/headings", locals: { main: @location.postcode, sub: @location.name } %> |
||||||
|
|
||||||
|
<div class="govuk-grid-row"> |
||||||
|
<div class="govuk-grid-column-two-thirds-from-desktop"> |
||||||
|
<%= govuk_summary_list do |summary_list| %> |
||||||
|
<% display_attributes(@location).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: scheme_location_edit_name_path(scheme_id: @scheme.id, location_id: @location.id)) if attr[:edit] %> |
||||||
|
<% end %> |
||||||
|
<% end %> |
||||||
|
<% end %> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<% if FeatureToggle.location_toggle_enabled? %> |
||||||
|
<%= govuk_button_link_to "Deactivate this location", scheme_location_deactivate_path(scheme_id: @scheme.id, location_id: @location.id), warning: true %> |
||||||
|
<% end %> |
Loading…
Reference in new issue