Browse Source

checking if var defined

pull/608/head
JG 3 years ago
parent
commit
6fbdbe44e2
  1. 2
      app/views/case_logs/_log_list.html.erb

2
app/views/case_logs/_log_list.html.erb

@ -2,7 +2,7 @@
<%= govuk_table do |table| %>
<%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular], id: title.dasherize) do |caption| %>
<span class="govuk-!-margin-right-4">
<% if searched.present? %>
<% if defined?(searched) && searched.present? %>
<strong><%= pagy.count %></strong> <%= item_label %> found matching ‘<%= searched %>’ of <strong><%= total_count %></strong> total <%= title.downcase %>. <%= govuk_link_to("Clear search", request.path) %>
<% else %>
<strong><%= pagy.count %></strong> total <%= title.downcase %>

Loading…
Cancel
Save