Skip to content

Commit

Permalink
Merge pull request #217 from unboxed/add-help-text-to-maps
Browse files Browse the repository at this point in the history
Add help text to maps
  • Loading branch information
Celia Collins authored Mar 7, 2024
2 parents f57d90a + b9bb938 commit 4f99f6c
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
class OwnershipCertificateValidationRequestsController < ValidationRequestsController
before_action :set_validation_request
before_action :set_planning_application
before_action :set_local_authority

def show
respond_to do |format|
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class RedLineBoundaryChangeValidationRequestsController < ValidationRequestsController
before_action :set_validation_request, :set_planning_application
before_action :set_validation_request, :set_planning_application, :set_local_authority

def show
respond_to do |format|
Expand Down
4 changes: 4 additions & 0 deletions app/controllers/validation_requests_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ def set_planning_application
@planning_application = Bops::PlanningApplication.find(params[:planning_application_id])
end

def set_local_authority
@local_authority = Bops::LocalAuthority.find(Current.local_authority)
end

def set_validation_request
@validation_request = validation_request_model_klass.find(
params[:id], params[:planning_application_id], params[:change_access_id]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l"><%= t(".title") %></h1>

<%= @planning_application["site"]["address_1"] %>,
<%= @planning_application["site"]["address_2"] %>,
<%= @planning_application["site"]["postcode"] %>
<p class="govuk-body">
<%= @planning_application["site"]["address_1"] %>,
<%= @planning_application["site"]["address_2"] %>,
<%= @planning_application["site"]["postcode"] %>
</p>

<p class="govuk-body-s govuk-!-margin-bottom-1">Planning application reference number</p>
<p class="govuk-body"><%= @planning_application["reference"] %></p>
Expand All @@ -25,6 +27,7 @@
></my-map>
</div>
<div class="govuk-grid-column-two-thirds govuk-!-margin-top-5">
<%= render "shared/alternative_map" %>
<p class="govuk-body">
We need to confirm who owns the land for this application
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
<p class="govuk-body">
<%= render(FormattedContentComponent.new(text: @validation_request["reason"])) %>
</p>
<p class="govuk-body">
<strong>How you can make your application valid</strong><br>
</p>
<p class="govuk-body">
<%= @validation_request["suggestion"] %>
</p>
<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
2 changes: 2 additions & 0 deletions app/views/planning_applications/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
<p class="govuk-body">
<%= @planning_application["description"] %>
</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 @@ -6,7 +6,7 @@
<div class="govuk-width-container">
<h1 class="govuk-heading-l"><%= t(".title") %></h1>
<p class="govuk-body"><%= t(".the_following_changes") %></p>
<p class="govuk-heading-s"><%= t(".what_you_need") %></p>
<h2 class="govuk-heading-m"><%= t(".what_you_need") %></h2>
<ul class="govuk-list govuk-list--bullet">
<li><%= t(".select_if_you") %></li>
<li><%= t(".if_you_disagree") %></li>
Expand Down Expand Up @@ -46,6 +46,9 @@
}
) %>
</div>
<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,6 +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>
<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 %>
8 changes: 5 additions & 3 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,19 @@ en:
edit:
accessibility_text_original: An interactive map centred on your address where the original red line boundary lines are drawn to create the site outline.
accessibility_text_proposed: An interactive map centred on your address where the newly proposed red line boundary lines are drawn to create the site outline.
click_submit_to: Click submit to complete this action
if_you_disagree: If you disagree, write in the box provided your reason for disagreeing.
click_submit_to: submit your response
if_you_disagree: if you disagree, enter a reason to explain why you disagree
if_your_response: If your response is not received by %{date} your application will be returned to you and your payment refunded.
page_title: "Red line boundary change validation request #%{id} - Back-Office Planning System"
proposed_red_line: Proposed red line boundary
reason_change_is: Reason change is requested
select_if_you: Select if you agree or disagree with the changes made by your case officer
select_if_you: agree or disagree with the proposed changes
the_following_changes: The following changes have been made to your application's red line boundary.
title: Confirm changes to your application's red line boundary
what_you_need: "What you need to do:"
your_original_red: Your original red line boundary
show:
page_title: Confirm changes to your red line boundary
replacement_document_validation_requests:
edit:
click_save_to: Click save or open to add the file
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_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 4f99f6c

Please sign in to comment.