Skip to content

Commit

Permalink
Use a partial
Browse files Browse the repository at this point in the history
  • Loading branch information
cdccollins committed Mar 7, 2024
1 parent 24d28fc commit b9bb938
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
></my-map>
</div>
<div class="govuk-grid-column-two-thirds govuk-!-margin-top-5">
<p class="govuk-body">
If you need this information in an alternative format, contact your case officer on <%= @local_authority["feedback_email"] %> or by telephone at <%= @local_authority["telephone_number"] %>.
</p>
<%= render "shared/alternative_map" %>
<p class="govuk-body">
We need to confirm who owns the land for this application
</p>
Expand Down
4 changes: 1 addition & 3 deletions app/views/planning_applications/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
<%= @planning_application["description"] %>
</p>

<p class="govuk-body">
If you need this information in an alternative format, contact your case officer on <%= @local_authority["feedback_email"] %> or by telephone at <%= @local_authority["telephone_number"] %>.
</p>
<%= render "shared/alternative_map" %>
<hr>

<%= render(ConsultationStatusComponent.new(planning_application: @planning_application)) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
}
) %>
</div>
<p class="govuk-body govuk-!-margin-top-4 govuk-!-margin-bottom-0">
If you need this information in an alternative format, contact your case officer on <%= @local_authority["feedback_email"] %> or by telephone at [telephone].
</p>
<div class="govuk-!-margin-top-4 govuk-!-margin-bottom-0">
<%= render "shared/alternative_map" %>
</div>
<hr class="govuk-section-break govuk-section-break--xl govuk-section-break--visible">
<%= render "form" %>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
accessibility_text: "An interactive map centred on your address where the newly proposed red line boundary lines are drawn to create the site outline."
} %>
</div>
<p class="govuk-body govuk-!-margin-top-4 govuk-!-margin-bottom-0">
If you need this information in an alternative format, contact your case officer on <%= @local_authority["feedback_email"] %> or by telephone at <%= @local_authority["telephone_number"] %>.
</p>
<div class="govuk-!-margin-top-4 govuk-!-margin-bottom-0">
<%= render "shared/alternative_map" %>
</div>
<hr class="govuk-section-break govuk-section-break--xl govuk-section-break--visible">
<% if @validation_request["approved"] == false %>
<strong class="govuk-tag govuk-tag--red">
Expand Down
11 changes: 11 additions & 0 deletions app/views/shared/_alternative_map.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<% if @local_authority["feedback_email"].present? || @local_authority["telephone_number"].present? %>
<p class="govuk-body">
<% if @local_authority["feedback_email"].present? && @local_authority["phone_number"].present? %>
If you need this information in an alternative format, contact your case officer on <%= @local_authority["feedback_email"] %> or by telephone at <%= @local_authority["telephone_number"] %>.
<% elsif @local_authority["feedback_email"].present? %>
If you need this information in an alternative format, contact your case officer on <%= @local_authority["feedback_email"] %>.
<% else %>
If you need this information in an alternative format, contact your case officer by telephone at <%= @local_authority["telephone_number"] %>.
<% end %>
</p>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
Rails.configuration.api_protocol = "https"

stub_successful_get_planning_application
stub_successful_get_local_authority
stub_get_ownership_certificate_validation_request(
id: 19,
planning_id: 28,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
Rails.configuration.api_protocol = "https"

stub_successful_get_planning_application
stub_successful_get_local_authority
stub_get_red_line_boundary_change_validation_request(
id: 10,
planning_id: 28,
Expand Down

0 comments on commit b9bb938

Please sign in to comment.