Browse Source

Update lettings log form download (#1409)

pull/1413/head v0.3.3
kosiakkatrina 2 years ago committed by GitHub
parent
commit
7f946fef9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      app/controllers/start_controller.rb
  2. 4
      app/views/layouts/_collection_resources.html.erb
  3. 1
      config/routes.rb
  4. BIN
      public/files/2023_24_lettings_paper_form.pdf

8
app/controllers/start_controller.rb

@ -20,4 +20,12 @@ class StartController < ApplicationController
type: "application/pdf", type: "application/pdf",
) )
end end
def download_23_24_lettings_form
send_file(
Rails.root.join("public/files/2023_24_lettings_paper_form.pdf"),
filename: "2023-24 Lettings paper form.pdf",
type: "application/pdf",
)
end
end end

4
app/views/layouts/_collection_resources.html.erb

@ -6,8 +6,8 @@
<%= render DocumentListComponent.new(items: [ <%= render DocumentListComponent.new(items: [
{ {
name: "Lettings log for tenants (2023/24)", name: "Lettings log for tenants (2023/24)",
href: "https://core.communities.gov.uk/public/download/guides-and-manuals/2023-24%20Lettings%20paper%20form.pdf?download-format=pdf", href: download_23_24_lettings_form_path,
metadata: "PDF, 281 KB, 8 pages", metadata: "PDF, 278 KB, 8 pages",
}, },
]) %> ]) %>

1
config/routes.rb

@ -37,6 +37,7 @@ Rails.application.routes.draw do
get "/data-sharing-agreement", to: "content#data_sharing_agreement" get "/data-sharing-agreement", to: "content#data_sharing_agreement"
get "/download-23-24-sales-form", to: "start#download_23_24_sales_form" 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-22-23-sales-form", to: "start#download_22_23_sales_form"
get "/download-23-24-lettings-form", to: "start#download_23_24_lettings_form"
resource :account, only: %i[show edit], controller: "users" do resource :account, only: %i[show edit], controller: "users" do
get "edit/password", to: "users#edit_password" get "edit/password", to: "users#edit_password"

BIN
public/files/2023_24_lettings_paper_form.pdf

Binary file not shown.
Loading…
Cancel
Save