From 9738e5b20ce3eae5e5e7ddcc63591e21ea6d6055 Mon Sep 17 00:00:00 2001 From: Kat Date: Fri, 4 Oct 2024 11:27:05 +0100 Subject: [PATCH] Update styling --- .../_collection_resource_summary_list.erb | 50 +++++++++++-------- app/views/collection_resources/index.html.erb | 2 - 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/app/views/collection_resources/_collection_resource_summary_list.erb b/app/views/collection_resources/_collection_resource_summary_list.erb index b64f8d41f..148c52500 100644 --- a/app/views/collection_resources/_collection_resource_summary_list.erb +++ b/app/views/collection_resources/_collection_resource_summary_list.erb @@ -1,24 +1,32 @@ -<%= govuk_summary_list do |summary_list| %> - <% mandatory_resources.each do |resource| %> - <% summary_list.with_row do |row| %> - <% row.with_key { resource.short_display_name } %> - <% if file_exists_on_s3?(resource.download_filename) %> - <% row.with_value do %> - <%= render DocumentListComponent.new(items: document_list_edit_component_items([resource]), label: "") %> +
+
+ <%= govuk_summary_list do |summary_list| %> + <% mandatory_resources.each do |resource| %> + <% summary_list.with_row do |row| %> + <% row.with_key { resource.short_display_name } %> + <% if file_exists_on_s3?(resource.download_filename) %> + <% row.with_value do %> + <%= render DocumentListComponent.new(items: document_list_edit_component_items([resource]), label: "") %> + <% end %> + <% row.with_action( + text: "Change", + href: "/", + ) %> + <% else %> + <% row.with_value do %> +

No file uploaded

+ <% end %> + <% row.with_action( + text: "Upload", + href: "/", + ) %> + <% end %> <% end %> - <% row.with_action( - text: "Change", - href: "/", - ) %> - <% else %> - <% row.with_value do %> -

No file uploaded

- <% end %> - <% row.with_action( - text: "Upload", - href: "/", - ) %> <% end %> <% end %> - <% end %> -<% end %> \ No newline at end of file +
+ <%= govuk_link_to "Add new #{mandatory_resources.first.log_type} #{text_year_range_format(mandatory_resources.first.year)} resource", href: "/" %> +
+
+
+
diff --git a/app/views/collection_resources/index.html.erb b/app/views/collection_resources/index.html.erb index 7ce6d5eb6..f6a999e59 100644 --- a/app/views/collection_resources/index.html.erb +++ b/app/views/collection_resources/index.html.erb @@ -11,7 +11,6 @@ Lettings <%= text_year_range_format(year) %> <%= render partial: "collection_resource_summary_list", locals: { mandatory_resources: } %> -
<% end %> <% @mandatory_sales_collection_resources_per_year.each do |year, mandatory_resources| %> @@ -19,5 +18,4 @@ Sales <%= text_year_range_format(year) %> <%= render partial: "collection_resource_summary_list", locals: { mandatory_resources: } %> -
<% end %>