diff --git a/CHANGELOG.md b/CHANGELOG.md index 7468a40c1..c6cb263b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). not publicly viewable) - Add reduced support service banner to the service for the christmas period - Build the export journey for Academies due to transfer in a time period +- Build a landing page for all exports, under the Exports tab. This page is + viewable by all teams who have access to exports. ### Changed diff --git a/app/assets/stylesheets/components/app-content.scss b/app/assets/stylesheets/components/app-content.scss index 32f8a83b5..16c7859d5 100644 --- a/app/assets/stylesheets/components/app-content.scss +++ b/app/assets/stylesheets/components/app-content.scss @@ -2,7 +2,6 @@ h4, h5, h6, - p, ul:not(.app-task-list):not(.app-tabs):not(.moj-sub-navigation__list):not( .app-task-list__items ):not(.projects-list), diff --git a/app/controllers/all/export/projects_controller.rb b/app/controllers/all/export/projects_controller.rb new file mode 100644 index 000000000..c4fce56a1 --- /dev/null +++ b/app/controllers/all/export/projects_controller.rb @@ -0,0 +1,5 @@ +class All::Export::ProjectsController < ApplicationController + def index + authorize :export + end +end diff --git a/app/views/all/export/projects/index.html.erb b/app/views/all/export/projects/index.html.erb new file mode 100644 index 000000000..fd32990d4 --- /dev/null +++ b/app/views/all/export/projects/index.html.erb @@ -0,0 +1,32 @@ +<% content_for :primary_navigation do %> + <%= render partial: "shared/navigation/all_projects_primary_navigation" %> +<% end %> + +<% content_for :page_title do %> + <%= page_title(t("export.landing_page.title")) %> +<% end %> + +
+
+

<%= t("export.landing_page.title") %>

+

<%= t("export.landing_page.body") %>

+
+
+ +
+
+

<%= t("export.landing_page.conversions.title") %>

+

<%= t("export.landing_page.conversions.body") %>

+

<%= t("export.landing_page.conversions.funding_agreement_letters_html", link: all_export_funding_agreement_letters_conversions_projects_path) %>

+

<%= t("export.landing_page.conversions.risk_protection_arrangements_html", link: all_export_education_and_skills_funding_agency_conversions_projects_path) %>

+

<%= t("export.landing_page.conversions.grant_management_html", link: all_export_grant_management_and_finance_unit_conversions_projects_path) %>

+
+
+ +
+
+

<%= t("export.landing_page.transfers.title") %>

+

<%= t("export.landing_page.transfers.body") %>

+

<%= t("export.landing_page.transfers.academies_due_to_transfer_html", link: all_export_by_month_transfers_projects_path) %>

+
+
diff --git a/app/views/shared/navigation/_all_projects_primary_navigation.html.erb b/app/views/shared/navigation/_all_projects_primary_navigation.html.erb index 40aa28e62..067d52630 100644 --- a/app/views/shared/navigation/_all_projects_primary_navigation.html.erb +++ b/app/views/shared/navigation/_all_projects_primary_navigation.html.erb @@ -24,7 +24,7 @@ <%= render partial: "shared/navigation/primary_navigation_item", locals: {name: t("navigation.primary.all_projects.statistics"), path: all_statistics_projects_path, namespace: "/projects/all/statistics"} %> - <%= render partial: "shared/navigation/primary_navigation_item", locals: {name: t("navigation.primary.all_projects.exports"), path: all_export_education_and_skills_funding_agency_conversions_projects_path, namespace: "/projects/all/export"} if policy(:export).index? %> + <%= render partial: "shared/navigation/primary_navigation_item", locals: {name: t("navigation.primary.all_projects.exports"), path: all_export_projects_path, namespace: "/projects/all/export"} if policy(:export).index? %> diff --git a/config/locales/export/landing_page.en.yml b/config/locales/export/landing_page.en.yml new file mode 100644 index 000000000..6087a77b0 --- /dev/null +++ b/config/locales/export/landing_page.en.yml @@ -0,0 +1,15 @@ +en: + export: + landing_page: + title: Exports + body: Check tables that show the progress of projects that will convert or transfer soon. You can also download .CSV file spreadsheets of the data. + conversions: + title: Conversion project data + body: View tables and download spreadsheets that show information about conversions. + funding_agreement_letters_html: You can find out who should be sent the funding agreement letters. + risk_protection_arrangements_html: You can check details about schools' risk protection arrangements and start-up grant funding. + grant_management_html: You can get information pre-opening grants for schools becoming academies. + transfers: + title: Transfer project data + body: View tables and download spreadsheets that show information about transfers. + academies_due_to_transfer_html: You can check which academies are due to transfer in an particular month. diff --git a/config/routes.rb b/config/routes.rb index 397c6b16c..b61b65771 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -134,6 +134,7 @@ get ":user_id", to: "projects#show", as: :by_user, constraints: {user_id: VALID_UUID_REGEX} end namespace :export do + get "/", to: "projects#index" namespace :funding_agreement_letters, path: "funding-agreement-letters" do namespace :conversions do get "/", to: "projects#index" diff --git a/spec/features/all_projects/export/esfa_users_can_export_download_spec.rb b/spec/features/all_projects/export/esfa_users_can_export_download_spec.rb index b21d7f307..1672632af 100644 --- a/spec/features/all_projects/export/esfa_users_can_export_download_spec.rb +++ b/spec/features/all_projects/export/esfa_users_can_export_download_spec.rb @@ -27,6 +27,8 @@ click_on "Exports" + click_on "check details about schools' risk protection arrangements and start-up grant funding" + expect(page).to have_link(Date.today.to_fs(:govuk_month)) expect(page).to have_link(Date.today.next_month.to_fs(:govuk_month)) end @@ -39,6 +41,8 @@ click_on "Exports" + click_on "check details about schools' risk protection arrangements and start-up grant funding" + click_on "Export for #{Date.today.to_fs(:govuk_month)}" expect(page).to have_link("Download csv file") diff --git a/spec/features/all_projects/export/export_users_can_see_an_export_landing_page_spec.rb b/spec/features/all_projects/export/export_users_can_see_an_export_landing_page_spec.rb new file mode 100644 index 000000000..df97caca6 --- /dev/null +++ b/spec/features/all_projects/export/export_users_can_see_an_export_landing_page_spec.rb @@ -0,0 +1,34 @@ +require "rails_helper" + +RSpec.feature "Export users can see the exports landing page" do + scenario "other users do not see the navigation" do + user = create(:regional_delivery_officer_user) + + sign_in_with_user(user) + visit all_in_progress_projects_path + + expect(page).not_to have_link("Exports") + end + + scenario "an ESFA user can see the exports landing page" do + user = create(:user, team: :education_and_skills_funding_agency) + + sign_in_with_user(user) + click_on "Exports" + + expect(page).to have_content("You can find out who should be sent the funding agreement letters.") + expect(page).to have_content("You can check details about schools' risk protection arrangements and start-up grant funding.") + expect(page).to have_content("You can get information pre-opening grants for schools becoming academies.") + end + + scenario "an AOPU user can see the exports landing page" do + user = create(:user, team: :academies_operational_practice_unit) + + sign_in_with_user(user) + click_on "Exports" + + expect(page).to have_content("You can find out who should be sent the funding agreement letters.") + expect(page).to have_content("You can check details about schools' risk protection arrangements and start-up grant funding.") + expect(page).to have_content("You can get information pre-opening grants for schools becoming academies.") + end +end