diff --git a/app/controllers/start_controller.rb b/app/controllers/start_controller.rb index d09934cbc..a31251c11 100644 --- a/app/controllers/start_controller.rb +++ b/app/controllers/start_controller.rb @@ -4,4 +4,20 @@ class StartController < ApplicationController redirect_to(lettings_logs_path) end end + + def download_23_24_sales_form + send_file( + Rails.root.join("public/files/2023_24_sales_paper_form.pdf"), + filename: "2023-24 Sales paper form.pdf", + type: "application/pdf", + ) + end + + def download_22_23_sales_form + send_file( + Rails.root.join("public/files/2022_23_sales_paper_form.pdf"), + filename: "2022-23 Sales paper form.pdf", + type: "application/pdf", + ) + end end diff --git a/app/views/layouts/_collection_resources.html.erb b/app/views/layouts/_collection_resources.html.erb index 726cd1a86..289c0c7f1 100644 --- a/app/views/layouts/_collection_resources.html.erb +++ b/app/views/layouts/_collection_resources.html.erb @@ -19,4 +19,22 @@ metadata: "PDF, 654 KB, 4 pages", }, ]) %> + +

Sales 23/24

+ <%= render DocumentListComponent.new(items: [ + { + name: "Sales log for buyers (2023/24)", + href: download_23_24_sales_form_path, + metadata: "PDF, 421 KB, 8 pages", + }, + ]) %> + +

Sales 22/23

+ <%= render DocumentListComponent.new(items: [ + { + name: "Sales log for buyers (2022/23)", + href: download_22_23_sales_form_path, + metadata: "PDF, 397 KB, 5 pages", + }, + ]) %> diff --git a/config/routes.rb b/config/routes.rb index 02a9cb707..327a0b4c2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -35,6 +35,8 @@ Rails.application.routes.draw do get "/accessibility-statement", to: "content#accessibility_statement" get "/privacy-notice", to: "content#privacy_notice" get "/data-sharing-agreement", to: "content#data_sharing_agreement" + 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" resource :account, only: %i[show edit], controller: "users" do get "edit/password", to: "users#edit_password" diff --git a/public/files/2022_23_sales_paper_form.pdf b/public/files/2022_23_sales_paper_form.pdf new file mode 100644 index 000000000..961350f37 Binary files /dev/null and b/public/files/2022_23_sales_paper_form.pdf differ diff --git a/public/files/2023_24_sales_paper_form.pdf b/public/files/2023_24_sales_paper_form.pdf new file mode 100644 index 000000000..327c90ab8 Binary files /dev/null and b/public/files/2023_24_sales_paper_form.pdf differ