diff --git a/app/components/search_result_caption_component.html.erb b/app/components/search_result_caption_component.html.erb index 9bb2fcaac..b8a9382b7 100644 --- a/app/components/search_result_caption_component.html.erb +++ b/app/components/search_result_caption_component.html.erb @@ -7,7 +7,7 @@ <%= count %> <%= item_label.pluralize(count) %> matching filters
<% else %> - <%= count %> matching <%= item %> + <%= count %> total <%= item %> <% end %> diff --git a/app/frontend/styles/_search.scss b/app/frontend/styles/_search.scss index 91399479a..8230e6a9a 100644 --- a/app/frontend/styles/_search.scss +++ b/app/frontend/styles/_search.scss @@ -22,3 +22,7 @@ margin-bottom: 2px; width: auto; } + +.app-search__caption { + line-height: govuk-spacing(6) +} diff --git a/app/views/logs/_log_list.html.erb b/app/views/logs/_log_list.html.erb index 63ca54d04..b5290c117 100644 --- a/app/views/logs/_log_list.html.erb +++ b/app/views/logs/_log_list.html.erb @@ -1,5 +1,5 @@

-
+
<%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "logs", filters_count: applied_filters_count(@filter_type))) %> <% if logs&.any? %> diff --git a/app/views/schemes/_scheme_list.html.erb b/app/views/schemes/_scheme_list.html.erb index 2ade6fd1e..8686f3f12 100644 --- a/app/views/schemes/_scheme_list.html.erb +++ b/app/views/schemes/_scheme_list.html.erb @@ -1,12 +1,14 @@
<%= govuk_table do |table| %> <%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %> + <%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "schemes", filters_count: applied_filters_count(@filter_type))) %> <% if @schemes&.any? %> <%= govuk_link_to "Download schemes (CSV)", schemes_csv_download_url, type: "text/csv", class: "govuk-!-margin-right-4", style: "white-space: nowrap" %> <%= govuk_link_to "Download locations (CSV)", locations_csv_download_url, type: "text/csv", class: "govuk-!-margin-right-4", style: "white-space: nowrap" %> <%= govuk_link_to "Download schemes and locations (CSV)", combined_csv_download_url, type: "text/csv", class: "govuk-!-margin-right-4", style: "white-space: nowrap" %> <% end %> + <% end %> <%= table.head do |head| %> <%= head.row do |row| %>