Browse Source

Include log id in breadcrumb

pull/229/head
Paul Robert Lloyd 3 years ago
parent
commit
d8a4731761
  1. 6
      app/views/case_logs/edit.html.erb
  2. 7
      app/views/form/check_answers.html.erb

6
app/views/case_logs/edit.html.erb

@ -1,6 +1,8 @@
<% content_for :title, "Log #{@case_log.id}" %> <% content_for :title, "Log #{@case_log.id}" %>
<% breadcrumbs = { "Logs" => "/logs", content_for(:title) => "" } %> <% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: {
<% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: breadcrumbs) %> "Logs" => "/logs",
content_for(:title) => ""
}) %>
<%= turbo_frame_tag "case_log_form", target: "_top" do %> <%= turbo_frame_tag "case_log_form", target: "_top" do %>
<div class="govuk-grid-row"> <div class="govuk-grid-row">

7
app/views/form/check_answers.html.erb

@ -1,6 +1,9 @@
<% content_for :title, "#{subsection.id.humanize} - Check your answers" %> <% content_for :title, "#{subsection.id.humanize} - Check your answers" %>
<% breadcrumbs = { "Logs" => "/logs", "Log" => "/logs/" + @case_log.id.to_s, subsection.label => "" } %> <% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: {
<% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: breadcrumbs) %> "Logs" => "/logs",
"Log #{@case_log.id.to_s}" => "/logs/" + @case_log.id.to_s,
subsection.label => ""
}) %>
<%= turbo_frame_tag "case_log_form", target: "_top" do %> <%= turbo_frame_tag "case_log_form", target: "_top" do %>
<div class="govuk-grid-row"> <div class="govuk-grid-row">

Loading…
Cancel
Save