From de440b4d44942c1172e7455ec5dcab275e531668 Mon Sep 17 00:00:00 2001 From: JG Date: Thu, 26 May 2022 14:38:40 +0100 Subject: [PATCH] correct UI --- app/frontend/styles/_table-group.scss | 2 +- app/views/case_logs/_log_list.html.erb | 2 ++ app/views/case_logs/index.html.erb | 6 ++---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/frontend/styles/_table-group.scss b/app/frontend/styles/_table-group.scss index 71905dfec..b3e29acb7 100644 --- a/app/frontend/styles/_table-group.scss +++ b/app/frontend/styles/_table-group.scss @@ -2,7 +2,7 @@ overflow-x: auto; overflow-y: hidden; margin: govuk-spacing(-3) govuk-spacing(-3) govuk-spacing(3); - padding: 0 govuk-spacing(3); + padding: govuk-spacing(1) govuk-spacing(3); scrollbar-color: $govuk-text-colour govuk-colour("light-grey"); .govuk-table { diff --git a/app/views/case_logs/_log_list.html.erb b/app/views/case_logs/_log_list.html.erb index bb2efe184..0450c04ad 100644 --- a/app/views/case_logs/_log_list.html.erb +++ b/app/views/case_logs/_log_list.html.erb @@ -1,11 +1,13 @@
<%= govuk_table do |table| %> <%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular], id: title.dasherize) do |caption| %> + <% if searched.present? %> <%= pagy.count %> <%= item_label %> found matching ‘<%= searched %>’ of <%= total_count %> total <%= title.downcase %>. <%= govuk_link_to("Clear search", request.path) %> <% else %> <%= pagy.count %> total <%= title.downcase %> <% end %> + <%= govuk_link_to "Download (CSV)", "/logs.csv", type: "text/csv" %> <% end %> <%= table.head do |head| %> diff --git a/app/views/case_logs/index.html.erb b/app/views/case_logs/index.html.erb index 421f72fb5..bc1e8b0f0 100644 --- a/app/views/case_logs/index.html.erb +++ b/app/views/case_logs/index.html.erb @@ -12,10 +12,6 @@ <%= content_for(:title) %> -<%= render SearchComponent.new(current_user:, search_label: "Search by log ID, tenant code, property reference or postcode", value: @searched) %> - -
-
<%= govuk_button_to "Create a new lettings log", case_logs_path %> @@ -25,6 +21,8 @@ <%= render partial: "log_filters" %> <% if @case_logs.present? %>
+ <%= render SearchComponent.new(current_user:, search_label: "Search by log ID, tenant code, property reference or postcode", value: @searched) %> +
<%= render partial: "log_list", locals: { case_logs: @case_logs, title: "Logs", pagy: @pagy, searched: @searched, item_label:, total_count: @total_count } %> <%== render partial: "pagy/nav", locals: { pagy: @pagy, item_name: "logs" } %>