Browse Source

Add a path for duplicate logs

pull/1752/head
Kat 3 years ago
parent
commit
6cd941d05a
  1. 3
      app/controllers/form_controller.rb
  2. 13
      app/views/duplicate_logs/_banner.html.erb
  3. 13
      app/views/duplicate_logs/show.html.erb

3
app/controllers/form_controller.rb

@ -50,9 +50,6 @@ class FormController < ApplicationController
@interruption_page_id = URI.parse(request.headers["HTTP_REFERER"]).path.split("/").last.underscore @interruption_page_id = URI.parse(request.headers["HTTP_REFERER"]).path.split("/").last.underscore
@interruption_page_referrer_type = referrer_from_query @interruption_page_referrer_type = referrer_from_query
end end
if @log.duplicate_logs?
redirect_to
end
if @log if @log
page_id = request.path.split("/")[-1].underscore page_id = request.path.split("/")[-1].underscore
@page = form.get_page(page_id) @page = form.get_page(page_id)

13
app/views/duplicate_logs/_banner.html.erb

@ -1,13 +0,0 @@
<% if question.page.routed_to?(@log, current_user) %>
<%= govuk_panel(
classes: "app-panel--interruption",
) do %>
<p class="govuk-heading-l"><%= display_title_text(title_text, lettings_log) %></p>
<% if informative_text.present? %>
<p class="govuk-body-l"><%= display_informative_text(informative_text, lettings_log) %></p>
<% end %>
<% if question.hint_text.present? %>
<p class="govuk-body-l"><%= question.hint_text&.html_safe %></p>
<% end %>
<% end %>
<% end %>

13
app/views/duplicate_logs/show.html.erb

@ -1,5 +1,12 @@
<% content_for :title, "Check duplicate logs" %> <% content_for :title, "Check duplicate logs" %>
back button <div class="govuk-grid-row">
Duplicate logs blue box <div class="govuk-grid-column-two-thirds">
List or components <%= govuk_panel(
classes: "app-panel--interruption",
) do %>
<p class="govuk-heading-l">These logs are duplicates</p>
<p class="govuk-body-l">These logs have the same values for the following fields. Choose one to keep or correct the answers.</p>
<% end %>
</div>
</div>
Loading…
Cancel
Save