diff --git a/app/components/document_list_component.rb b/app/components/document_list_component.rb
index 253370c98..e5ad9c843 100644
--- a/app/components/document_list_component.rb
+++ b/app/components/document_list_component.rb
@@ -1,8 +1,9 @@
class DocumentListComponent < ViewComponent::Base
- attr_reader :items
+ attr_reader :items, :label
- def initialize(items:)
+ def initialize(items:, label:)
@items = items
+ @label = label
super
end
end
diff --git a/app/controllers/start_controller.rb b/app/controllers/start_controller.rb
index 318e7cace..e07615901 100644
--- a/app/controllers/start_controller.rb
+++ b/app/controllers/start_controller.rb
@@ -5,6 +5,14 @@ class StartController < ApplicationController
end
end
+ def download_24_25_sales_form
+ send_file(
+ Rails.root.join("public/files/2024_25_sales_paper_form.pdf"),
+ filename: "2024-25 Sales paper form.pdf",
+ type: "application/pdf",
+ )
+ end
+
def download_23_24_sales_form
send_file(
Rails.root.join("public/files/2023_24_sales_paper_form.pdf"),
@@ -21,6 +29,14 @@ class StartController < ApplicationController
)
end
+ def download_24_25_lettings_form
+ send_file(
+ Rails.root.join("public/files/2024_25_lettings_paper_form.pdf"),
+ filename: "2024-25 Lettings paper form.pdf",
+ type: "application/pdf",
+ )
+ end
+
def download_23_24_lettings_form
send_file(
Rails.root.join("public/files/2023_24_lettings_paper_form.pdf"),
@@ -37,6 +53,38 @@ class StartController < ApplicationController
)
end
+ def download_24_25_lettings_bulk_upload_template
+ send_file(
+ Rails.root.join("public/files/bulk-upload-lettings-template-2024-25.xlsx"),
+ filename: "2024-25-lettings-bulk-upload-template.xlsx",
+ type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ )
+ end
+
+ def download_24_25_lettings_bulk_upload_specification
+ send_file(
+ Rails.root.join("public/files/bulk-upload-lettings-specification-2024-25.xlsx"),
+ filename: "2024-25-lettings-bulk-upload-specification.xlsx",
+ type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ )
+ end
+
+ def download_24_25_sales_bulk_upload_template
+ send_file(
+ Rails.root.join("public/files/bulk-upload-sales-template-2024-25.xlsx"),
+ filename: "2024-25-sales-bulk-upload-template.xlsx",
+ type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ )
+ end
+
+ def download_24_25_sales_bulk_upload_specification
+ send_file(
+ Rails.root.join("public/files/bulk-upload-sales-specification-2024-25.xlsx"),
+ filename: "2024-25-sales-bulk-upload-specification.xlsx",
+ type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+ )
+ end
+
def download_23_24_lettings_bulk_upload_template
send_file(
Rails.root.join("public/files/bulk-upload-lettings-template-2023-24.xlsx"),
diff --git a/app/frontend/styles/_tab.scss b/app/frontend/styles/_tab.scss
new file mode 100644
index 000000000..8dbaf3418
--- /dev/null
+++ b/app/frontend/styles/_tab.scss
@@ -0,0 +1,15 @@
+.app-tab__small-headers {
+ @include govuk-font(16);
+}
+
+@media (min-width: 35.375em) {
+ .app-tab__list-view {
+ min-width: 35.375em;
+ }
+}
+
+@media (min-width: 35.375em) {
+ .app-tab__underline {
+ min-width: 35.375em;
+ }
+}
diff --git a/app/frontend/styles/application.scss b/app/frontend/styles/application.scss
index 6309425de..a81214894 100644
--- a/app/frontend/styles/application.scss
+++ b/app/frontend/styles/application.scss
@@ -38,6 +38,7 @@ $govuk-breakpoints: (
@import "metadata";
@import "related-navigation";
@import "section-skip-link";
+@import "tab";
@import "table-group";
@import "tag";
@import "task-list";
diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb
index aa8f7135f..852cbda93 100644
--- a/app/views/home/index.html.erb
+++ b/app/views/home/index.html.erb
@@ -48,7 +48,7 @@
<%= render partial: "layouts/collection_resources" %>
-
+
<%= render partial: "home/upcoming_deadlines" %>
<%= render partial: "layouts/about_this_service" %>
diff --git a/app/views/layouts/_collection_resources.html.erb b/app/views/layouts/_collection_resources.html.erb
index 0c084596e..bc0e07360 100644
--- a/app/views/layouts/_collection_resources.html.erb
+++ b/app/views/layouts/_collection_resources.html.erb
@@ -4,56 +4,111 @@
<% else %>
Collection resources
<% end %>
+
Use the 2024 to 2025 forms for lettings that start and sales that complete between 1 April 2024 and 31 March 2025.
Use the 2023 to 2024 forms for lettings that start and sales that complete between 1 April 2023 and 31 March 2024.
-<%= govuk_tabs(title: "Collection resources") do |c| %>
+
+<%= govuk_tabs(title: "Collection resources", classes: %w[app-tab__small-headers]) do |c| %>
+ <% if FormHandler.instance.lettings_form_for_start_year(2024) && FormHandler.instance.lettings_form_for_start_year(2024).edit_end_date > Time.zone.today %>
+ <% c.with_tab(label: "Lettings 24/25") do %>
+ <%= render DocumentListComponent.new(
+ items: [
+ {
+ name: "Download the lettings log for tenants (2024 to 2025)",
+ href: download_24_25_lettings_form_path,
+ metadata: file_type_size_and_pages("2024_25_lettings_paper_form.pdf", number_of_pages: 8),
+ },
+ {
+ name: "Download the lettings bulk upload template (2024 to 2025)",
+ href: download_24_25_lettings_bulk_upload_template_path,
+ metadata: file_type_size_and_pages("bulk-upload-lettings-template-2024-25.xlsx"),
+ },
+ {
+ name: "Download the lettings bulk upload specification (2024 to 2025)",
+ href: download_24_25_lettings_bulk_upload_specification_path,
+ metadata: file_type_size_and_pages("bulk-upload-lettings-specification-2024-25.xlsx"),
+ },
+ ],
+ label: "Lettings 2024 to 2025",
+ ) %>
+ <% end %>
+ <% c.with_tab(label: "Sales 24/25") do %>
+ <%= render DocumentListComponent.new(
+ items: [
+ {
+ name: "Download the sales log for buyers (2024 to 2025)",
+ href: download_24_25_sales_form_path,
+ metadata: file_type_size_and_pages("2024_25_sales_paper_form.pdf", number_of_pages: 8),
+ },
+ {
+ name: "Download the sales bulk upload template (2024 to 2025)",
+ href: download_24_25_sales_bulk_upload_template_path,
+ metadata: file_type_size_and_pages("bulk-upload-sales-template-2024-25.xlsx"),
+ },
+ {
+ name: "Download the sales bulk upload specification (2024 to 2025)",
+ href: download_24_25_sales_bulk_upload_specification_path,
+ metadata: file_type_size_and_pages("bulk-upload-sales-specification-2024-25.xlsx"),
+ },
+ ],
+ label: "Sales 2024 to 2025",
+ ) %>
+ <% end %>
+ <% end %>
<% if FormHandler.instance.lettings_form_for_start_year(2023) && FormHandler.instance.lettings_form_for_start_year(2023).edit_end_date > Time.zone.today %>
- <% c.with_tab(label: "Lettings 2023/24") do %>
- <%= render DocumentListComponent.new(items: [
- {
- name: "Download the lettings log for tenants (2023 to 2024)",
- href: download_23_24_lettings_form_path,
- metadata: file_type_size_and_pages("2023_24_lettings_paper_form.pdf", number_of_pages: 8),
- },
- {
- name: "Download the lettings bulk upload template (2023 to 2024) – New question ordering",
- href: download_23_24_lettings_bulk_upload_template_path,
- metadata: file_type_size_and_pages("bulk-upload-lettings-template-2023-24.xlsx"),
- },
- {
- name: "Download the lettings bulk upload template (2023 to 2024) – Legacy version",
- href: download_23_24_lettings_bulk_upload_legacy_template_path,
- metadata: file_type_size_and_pages("bulk-upload-lettings-legacy-template-2023-24.xlsx"),
- },
- {
- name: "Download the lettings bulk upload specification (2023 to 2024)",
- href: download_23_24_lettings_bulk_upload_specification_path,
- metadata: file_type_size_and_pages("bulk-upload-lettings-specification-2023-24.xlsx"),
- },
- ]) %>
+ <% c.with_tab(label: "Lettings 23/24") do %>
+ <%= render DocumentListComponent.new(
+ items: [
+ {
+ name: "Download the lettings log for tenants (2023 to 2024)",
+ href: download_23_24_lettings_form_path,
+ metadata: file_type_size_and_pages("2023_24_lettings_paper_form.pdf", number_of_pages: 8),
+ },
+ {
+ name: "Download the lettings bulk upload template (2023 to 2024) – New question ordering",
+ href: download_23_24_lettings_bulk_upload_template_path,
+ metadata: file_type_size_and_pages("bulk-upload-lettings-template-2023-24.xlsx"),
+ },
+ {
+ name: "Download the lettings bulk upload template (2023 to 2024) – Legacy version",
+ href: download_23_24_lettings_bulk_upload_legacy_template_path,
+ metadata: file_type_size_and_pages("bulk-upload-lettings-legacy-template-2023-24.xlsx"),
+ },
+ {
+ name: "Download the lettings bulk upload specification (2023 to 2024)",
+ href: download_23_24_lettings_bulk_upload_specification_path,
+ metadata: file_type_size_and_pages("bulk-upload-lettings-specification-2023-24.xlsx"),
+ },
+ ],
+ label: "Lettings 2023 to 2024",
+ ) %>
<% end %>
- <% c.with_tab(label: "Sales 2023/24") do %>
- <%= render DocumentListComponent.new(items: [
- {
- name: "Download the sales log for buyers (2023 to 2024)",
- href: download_23_24_sales_form_path,
- metadata: file_type_size_and_pages("2023_24_sales_paper_form.pdf", number_of_pages: 8),
- },
- {
- name: "Download the sales bulk upload template (2023 to 2024) – New question ordering",
- href: download_23_24_sales_bulk_upload_template_path,
- metadata: file_type_size_and_pages("bulk-upload-sales-template-2023-24.xlsx"),
- },
- {
- name: "Download the sales bulk upload template (2023 to 2024) – Legacy version",
- href: download_23_24_sales_bulk_upload_legacy_template_path,
- metadata: file_type_size_and_pages("bulk-upload-sales-legacy-template-2023-24.xlsx"),
- },
- {
- name: "Download the sales bulk upload specification (2023 to 2024)",
- href: download_23_24_sales_bulk_upload_specification_path,
- metadata: file_type_size_and_pages("bulk-upload-sales-specification-2023-24.xlsx"),
- },
- ]) %>
+ <% c.with_tab(label: "Sales 23/24") do %>
+ <%= render DocumentListComponent.new(
+ items: [
+ {
+ name: "Download the sales log for buyers (2023 to 2024)",
+ href: download_23_24_sales_form_path,
+ metadata: file_type_size_and_pages("2023_24_sales_paper_form.pdf", number_of_pages: 8),
+ },
+ {
+ name: "Download the sales bulk upload template (2023 to 2024) – New question ordering",
+ href: download_23_24_sales_bulk_upload_template_path,
+ metadata: file_type_size_and_pages("bulk-upload-sales-template-2023-24.xlsx"),
+ },
+ {
+ name: "Download the sales bulk upload template (2023 to 2024) – Legacy version",
+ href: download_23_24_sales_bulk_upload_legacy_template_path,
+ metadata: file_type_size_and_pages("bulk-upload-sales-legacy-template-2023-24.xlsx"),
+ },
+ {
+ name: "Download the sales bulk upload specification (2023 to 2024)",
+ href: download_23_24_sales_bulk_upload_specification_path,
+ metadata: file_type_size_and_pages("bulk-upload-sales-specification-2023-24.xlsx"),
+ },
+ ],
+ label: "Sales 2023 to 2024",
+ ) %>
<% end %>
<% end %>
<% end %>
+
diff --git a/app/views/start/index.html.erb b/app/views/start/index.html.erb
index 79abb5df7..14ed39282 100644
--- a/app/views/start/index.html.erb
+++ b/app/views/start/index.html.erb
@@ -22,10 +22,10 @@
Use your account details to sign in.
If you need to set up a new account, speak to your organisation’s CORE data coordinator. If you don’t know who that is, <%= govuk_link_to("contact the helpdesk", GlobalConstants::HELPDESK_URL) %>.
You can <%= govuk_mail_to("dluhc.digital-services@levellingup.gov.uk", "request an account", subject: "CORE: Request a new account") %> if your organisation doesn’t have one.
-
<%= govuk_link_to guidance_path do %>Guidance for submitting social housing lettings and sales data (CORE)<% end %>
+
<%= govuk_link_to guidance_path do %>Guidance for submitting social housing lettings and sales data (CORE)<% end %>
<%= render partial: "layouts/collection_resources" %>
-
+
<%= render partial: "layouts/about_this_service" %>
diff --git a/config/routes.rb b/config/routes.rb
index 06cb4f8d3..6dcaf1d90 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -39,23 +39,31 @@ Rails.application.routes.draw do
get "/service-moved", to: "maintenance#service_moved"
get "/service-unavailable", to: "maintenance#service_unavailable"
- get "/download-23-24-lettings-form", to: "start#download_23_24_lettings_form"
get "/download-22-23-lettings-form", to: "start#download_22_23_lettings_form"
+ get "/download-22-23-lettings-bulk-upload-template", to: "start#download_22_23_lettings_bulk_upload_template"
+ get "/download-22-23-lettings-bulk-upload-specification", to: "start#download_22_23_lettings_bulk_upload_specification"
+
+ get "/download-22-23-sales-form", to: "start#download_22_23_sales_form"
+ get "/download-22-23-sales-bulk-upload-template", to: "start#download_22_23_sales_bulk_upload_template"
+ get "/download-22-23-sales-bulk-upload-specification", to: "start#download_22_23_sales_bulk_upload_specification"
+
+ get "/download-23-24-lettings-form", to: "start#download_23_24_lettings_form"
get "/download-23-24-lettings-bulk-upload-template", to: "start#download_23_24_lettings_bulk_upload_template"
get "/download-23-24-lettings-bulk-upload-legacy-template", to: "start#download_23_24_lettings_bulk_upload_legacy_template"
get "/download-23-24-lettings-bulk-upload-specification", to: "start#download_23_24_lettings_bulk_upload_specification"
- get "/download-22-23-lettings-bulk-upload-template", to: "start#download_22_23_lettings_bulk_upload_template"
- get "/download-22-23-lettings-bulk-upload-specification", to: "start#download_22_23_lettings_bulk_upload_specification"
-
get "/download-23-24-sales-form", to: "start#download_23_24_sales_form"
- get "/download-22-23-sales-form", to: "start#download_22_23_sales_form"
get "/download-23-24-sales-bulk-upload-template", to: "start#download_23_24_sales_bulk_upload_template"
get "/download-23-24-sales-bulk-upload-legacy-template", to: "start#download_23_24_sales_bulk_upload_legacy_template"
get "/download-23-24-sales-bulk-upload-specification", to: "start#download_23_24_sales_bulk_upload_specification"
- get "/download-22-23-sales-bulk-upload-template", to: "start#download_22_23_sales_bulk_upload_template"
- get "/download-22-23-sales-bulk-upload-specification", to: "start#download_22_23_sales_bulk_upload_specification"
+ get "/download-24-25-lettings-form", to: "start#download_24_25_lettings_form"
+ get "/download-24-25-lettings-bulk-upload-template", to: "start#download_24_25_lettings_bulk_upload_template"
+ get "/download-24-25-lettings-bulk-upload-specification", to: "start#download_24_25_lettings_bulk_upload_specification"
+
+ get "/download-24-25-sales-form", to: "start#download_24_25_sales_form"
+ get "/download-24-25-sales-bulk-upload-template", to: "start#download_24_25_sales_bulk_upload_template"
+ get "/download-24-25-sales-bulk-upload-specification", to: "start#download_24_25_sales_bulk_upload_specification"
get "clear-filters", to: "sessions#clear_filters"
diff --git a/public/files/2023_24_lettings_paper_form.pdf b/public/files/2023_24_lettings_paper_form.pdf
index 3aa0691b7..73489019a 100644
Binary files a/public/files/2023_24_lettings_paper_form.pdf and b/public/files/2023_24_lettings_paper_form.pdf differ
diff --git a/public/files/2024_25_lettings_paper_form.pdf b/public/files/2024_25_lettings_paper_form.pdf
new file mode 100644
index 000000000..011e65545
Binary files /dev/null and b/public/files/2024_25_lettings_paper_form.pdf differ
diff --git a/public/files/2024_25_sales_paper_form.pdf b/public/files/2024_25_sales_paper_form.pdf
new file mode 100644
index 000000000..0e5261b5b
Binary files /dev/null and b/public/files/2024_25_sales_paper_form.pdf differ
diff --git a/public/files/bulk-upload-lettings-specification-2024-25.xlsx b/public/files/bulk-upload-lettings-specification-2024-25.xlsx
new file mode 100644
index 000000000..eedc78478
Binary files /dev/null and b/public/files/bulk-upload-lettings-specification-2024-25.xlsx differ
diff --git a/public/files/bulk-upload-lettings-template-2024-25.xlsx b/public/files/bulk-upload-lettings-template-2024-25.xlsx
new file mode 100644
index 000000000..f33098e3b
Binary files /dev/null and b/public/files/bulk-upload-lettings-template-2024-25.xlsx differ
diff --git a/public/files/bulk-upload-sales-legacy-template-2023-24.xlsx b/public/files/bulk-upload-sales-legacy-template-2023-24.xlsx
index 531775d00..d52e722e5 100644
Binary files a/public/files/bulk-upload-sales-legacy-template-2023-24.xlsx and b/public/files/bulk-upload-sales-legacy-template-2023-24.xlsx differ
diff --git a/public/files/bulk-upload-sales-specification-2024-25.xlsx b/public/files/bulk-upload-sales-specification-2024-25.xlsx
new file mode 100644
index 000000000..7e94ee89d
Binary files /dev/null and b/public/files/bulk-upload-sales-specification-2024-25.xlsx differ
diff --git a/public/files/bulk-upload-sales-template-2024-25.xlsx b/public/files/bulk-upload-sales-template-2024-25.xlsx
new file mode 100644
index 000000000..a75800377
Binary files /dev/null and b/public/files/bulk-upload-sales-template-2024-25.xlsx differ
diff --git a/spec/components/document_list_component_spec.rb b/spec/components/document_list_component_spec.rb
index ee0c32301..1cbde7258 100644
--- a/spec/components/document_list_component_spec.rb
+++ b/spec/components/document_list_component_spec.rb
@@ -8,8 +8,9 @@ RSpec.describe DocumentListComponent, type: :component do
context "when rendering tabs" do
it "all of the nav tabs specified in the items hash are passed to it" do
- result = render_inline(described_class.new(items:))
+ result = render_inline(described_class.new(items:, label: "Label"))
+ expect(result.text).to include("Label")
expect(result.text).to include("PDF Form")
expect(result.text).to include("An important form")
expect(result.text).to include("4 pages")
diff --git a/spec/helpers/collection_resources_helper_spec.rb b/spec/helpers/collection_resources_helper_spec.rb
index 90efe3b95..0c87188d7 100644
--- a/spec/helpers/collection_resources_helper_spec.rb
+++ b/spec/helpers/collection_resources_helper_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe CollectionResourcesHelper do
describe "when displaying file metadata" do
context "with pages" do
it "returns correct metadata" do
- expect(file_type_size_and_pages("2023_24_lettings_paper_form.pdf", number_of_pages: 8)).to eq("PDF, 285 KB, 8 pages")
+ expect(file_type_size_and_pages("2023_24_lettings_paper_form.pdf", number_of_pages: 8)).to eq("PDF, 286 KB, 8 pages")
end
end
diff --git a/spec/requests/start_controller_spec.rb b/spec/requests/start_controller_spec.rb
index edca4d7c4..190c343bc 100644
--- a/spec/requests/start_controller_spec.rb
+++ b/spec/requests/start_controller_spec.rb
@@ -37,10 +37,16 @@ RSpec.describe StartController, type: :request do
allow(Time).to receive(:now).and_return(Time.zone.local(2024, 1, 1))
end
- it "displays correct resources for 2022/23 and 2023/24 collection years" do
+ it "displays correct resources for 2023/24 and 2024/25 collection years" do
get "/", headers: headers, params: {}
- expect(page).to have_content("Lettings 2023/24")
- expect(page).to have_content("Sales 2023/24")
+ expect(page).to have_content("Lettings 24/25")
+ expect(page).to have_content("Lettings 23/24")
+ expect(page).to have_content("Lettings 2024 to 2025")
+ expect(page).to have_content("Lettings 2023 to 2024")
+ expect(page).to have_content("Sales 24/25")
+ expect(page).to have_content("Sales 23/24")
+ expect(page).to have_content("Sales 2024 to 2025")
+ expect(page).to have_content("Sales 2023 to 2024")
end
end
@@ -49,10 +55,16 @@ RSpec.describe StartController, type: :request do
allow(Time).to receive(:now).and_return(Time.zone.local(2025, 1, 1))
end
- it "displays correct resources for 2022/23 and 2023/24 collection years" do
+ it "displays correct resources for 2023/24 and 2024/25 collection years" do
get "/", headers: headers, params: {}
- expect(page).not_to have_content("Lettings 2023/24")
- expect(page).not_to have_content("Sales 2023/24")
+ expect(page).to have_content("Lettings 24/25")
+ expect(page).not_to have_content("Lettings 23/24")
+ expect(page).to have_content("Lettings 2024 to 2025")
+ expect(page).not_to have_content("Lettings 2023 to 2024")
+ expect(page).to have_content("Sales 24/25")
+ expect(page).not_to have_content("Sales 23/24")
+ expect(page).to have_content("Sales 2024 to 2025")
+ expect(page).not_to have_content("Sales 2023 to 2024")
end
end