From 93e88dc3580db63c803de5cbd435f6f8eb557132 Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 12:44:09 +0100 Subject: [PATCH 01/18] Added support for individual page titles --- app/views/layouts/webpack_application.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/webpack_application.html.haml b/app/views/layouts/webpack_application.html.haml index d0f64e91..3e5ef16c 100644 --- a/app/views/layouts/webpack_application.html.haml +++ b/app/views/layouts/webpack_application.html.haml @@ -5,7 +5,7 @@ %meta{ 'http-equiv' => 'x-ua-compatible', content: 'ie=edge' } %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no' } %title - = I18n.t('common.header.app_title') + = (yield(:title) + " - " unless yield(:title).blank?).to_s + I18n.t('common.header.app_title') :javascript document.querySelector('html').classList.add('js'); window.ukhpi = window.ukhpi || {}; From 6e3b3167983265fa3a857289b9f8dc6296689f3b Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 12:44:29 +0100 Subject: [PATCH 02/18] Set heading based on title for english landing page --- app/views/landing/_index_en.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/landing/_index_en.html.haml b/app/views/landing/_index_en.html.haml index cc900970..6ba8dee7 100644 --- a/app/views/landing/_index_en.html.haml +++ b/app/views/landing/_index_en.html.haml @@ -1,5 +1,6 @@ %section#main.c-landing-page.u-lang--en - %h1.heading-large UK House Price Index + %h1.heading-large + = I18n.t('common.header.app_title') %p Use the search tool to find house price trends in the UK: From 543ee5cb61b5da3892a8c28d023914983d316b1b Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 12:44:37 +0100 Subject: [PATCH 03/18] Set heading based on title for welsh landing page --- app/views/landing/_index_cy.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/landing/_index_cy.html.haml b/app/views/landing/_index_cy.html.haml index f0109656..e8023f23 100644 --- a/app/views/landing/_index_cy.html.haml +++ b/app/views/landing/_index_cy.html.haml @@ -1,5 +1,6 @@ %section#main.c-landing-page.u-lang--en - %h1.heading-large Mynegai Prisiau Tai y DU + %h1.heading-large + = I18n.t('common.header.app_title') %p Defnyddiwch y teclyn chwilio i weld tueddiadau prisiau tai yn y DU: From 5888afdf1bf33a9db8f8022722d33ed3d14ff957 Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 12:45:10 +0100 Subject: [PATCH 04/18] Further added support for individual page titles --- app/views/layouts/application.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 760463c0..36cc3821 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -5,7 +5,7 @@ %meta{ 'http-equiv' => 'x-ua-compatible', content: 'ie=edge' } %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no' } %title - = I18n.t('common.header.app_title') + = (yield(:title) + " - " unless yield(:title).blank?).to_s + I18n.t('common.header.app_title') - if Rails.env.production? = render partial: 'common/google-analytics' = javascript_include_tag 'cookie', defer: true From 2cafa61ff98a83e4bc3414c9b60c53140dd808fa Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 12:45:32 +0100 Subject: [PATCH 05/18] Making sure individual page titles show up when printing --- app/views/layouts/print.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/print.html.haml b/app/views/layouts/print.html.haml index 5b6b05e1..bfbf4501 100644 --- a/app/views/layouts/print.html.haml +++ b/app/views/layouts/print.html.haml @@ -5,7 +5,7 @@ %meta{ 'http-equiv' => 'x-ua-compatible', content: 'ie=edge' } %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no' } %title - = I18n.t('common.header.app_title') + = (yield(:title) + " - " unless yield(:title).blank?).to_s + I18n.t('common.header.app_title') - if Rails.env.production? = render partial: 'common/google-analytics' = csrf_meta_tags From 59fddb00ef8476022cbf99268910ab151ba9b157 Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 12:46:27 +0100 Subject: [PATCH 06/18] Set title for the about page Both english and welsh versions --- app/views/doc/_about_ukhpi_cy.html.haml | 2 +- app/views/doc/_about_ukhpi_en.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/doc/_about_ukhpi_cy.html.haml b/app/views/doc/_about_ukhpi_cy.html.haml index 8dd3bf9e..4e8b3d23 100644 --- a/app/views/doc/_about_ukhpi_cy.html.haml +++ b/app/views/doc/_about_ukhpi_cy.html.haml @@ -1,4 +1,4 @@ -%h1.heading-large Data Cysylltiedig Mynegai Prisiau Tai y DU += content_for(:title, "Am") %h2.heading-medium Beth sydd wedi ei gynnwys yn Set Ddata’r Mynegai Prisiau Tai? diff --git a/app/views/doc/_about_ukhpi_en.html.haml b/app/views/doc/_about_ukhpi_en.html.haml index 3827e33a..540d5499 100644 --- a/app/views/doc/_about_ukhpi_en.html.haml +++ b/app/views/doc/_about_ukhpi_en.html.haml @@ -1,4 +1,4 @@ -%h1.heading-large UK House Price Index Linked Data += content_for(:title, "About") %h2.heading-medium What does the House Price Index Dataset consist of? From 9c97efc3c4eb6835f615088ab28df397e6741d5c Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 12:46:42 +0100 Subject: [PATCH 07/18] Set custom heading based on title for about page Both english and welsh versions --- app/views/doc/_about_ukhpi_cy.html.haml | 3 +++ app/views/doc/_about_ukhpi_en.html.haml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/app/views/doc/_about_ukhpi_cy.html.haml b/app/views/doc/_about_ukhpi_cy.html.haml index 4e8b3d23..dc3602ad 100644 --- a/app/views/doc/_about_ukhpi_cy.html.haml +++ b/app/views/doc/_about_ukhpi_cy.html.haml @@ -1,5 +1,8 @@ = content_for(:title, "Am") +%h1.heading-large + = yield(:title) + " - " + I18n.t('common.header.app_title') + %h2.heading-medium Beth sydd wedi ei gynnwys yn Set Ddata’r Mynegai Prisiau Tai? diff --git a/app/views/doc/_about_ukhpi_en.html.haml b/app/views/doc/_about_ukhpi_en.html.haml index 540d5499..b46b0683 100644 --- a/app/views/doc/_about_ukhpi_en.html.haml +++ b/app/views/doc/_about_ukhpi_en.html.haml @@ -1,5 +1,8 @@ = content_for(:title, "About") +%h1.heading-large + = yield(:title) + " - " + I18n.t('common.header.app_title') + %h2.heading-medium What does the House Price Index Dataset consist of? From e4e5bc3467e2103eb6516923d4776e7b13cb2596 Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 12:47:00 +0100 Subject: [PATCH 08/18] Set title for browse page --- app/views/browse/show.html.haml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/browse/show.html.haml b/app/views/browse/show.html.haml index 0901a8d2..cc8a37e9 100644 --- a/app/views/browse/show.html.haml +++ b/app/views/browse/show.html.haml @@ -1,3 +1,5 @@ += content_for(:title, "Browse") + .grid-row .column-full %article From a6521b45ddb72b8657d21f042336a3128171b5b0 Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 12:47:10 +0100 Subject: [PATCH 09/18] Set title for compare locations page --- app/views/compare/show.html.haml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/compare/show.html.haml b/app/views/compare/show.html.haml index d287abe6..f5293dd9 100644 --- a/app/views/compare/show.html.haml +++ b/app/views/compare/show.html.haml @@ -1,3 +1,5 @@ += content_for(:title, "Compare Locations") + .grid-row .column-full %article.c-compare From da8627c758c4357c2980d72b75d0a2e0a4366b04 Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 12:50:09 +0100 Subject: [PATCH 10/18] Set title for change history page Both english and welsh versions --- app/views/changelog/_changelog_cy.html.haml | 2 ++ app/views/changelog/_changelog_en.html.haml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/views/changelog/_changelog_cy.html.haml b/app/views/changelog/_changelog_cy.html.haml index e6499f09..ba3e263c 100644 --- a/app/views/changelog/_changelog_cy.html.haml +++ b/app/views/changelog/_changelog_cy.html.haml @@ -1,3 +1,5 @@ += content_for(:title, "Hanes Newid") + %section#main.c-changelog %h1.heading-large Mynegai Prisiau Tai y DU: hanes newid diff --git a/app/views/changelog/_changelog_en.html.haml b/app/views/changelog/_changelog_en.html.haml index a9578a43..bb5ee09e 100644 --- a/app/views/changelog/_changelog_en.html.haml +++ b/app/views/changelog/_changelog_en.html.haml @@ -1,3 +1,5 @@ += content_for(:title, "Change History") + %section#main.c-changelog %h1.heading-large UK House Price Index: change history From 74f50a1b07991506a1f37ef576645af432fe8639 Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 12:50:27 +0100 Subject: [PATCH 11/18] Set heading based on page title for change history page Both english and welsh versions --- app/views/changelog/_changelog_cy.html.haml | 3 ++- app/views/changelog/_changelog_en.html.haml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/changelog/_changelog_cy.html.haml b/app/views/changelog/_changelog_cy.html.haml index ba3e263c..fcc0d38b 100644 --- a/app/views/changelog/_changelog_cy.html.haml +++ b/app/views/changelog/_changelog_cy.html.haml @@ -1,7 +1,8 @@ = content_for(:title, "Hanes Newid") %section#main.c-changelog - %h1.heading-large Mynegai Prisiau Tai y DU: hanes newid + %h1.heading-large + = yield(:title) + " - " + I18n.t('common.header.app_title') %h2.heading-medium Ebrill 2023 – Newidiadau i ddaearyddiaeth awdurdodau lleol yn Lloegr diff --git a/app/views/changelog/_changelog_en.html.haml b/app/views/changelog/_changelog_en.html.haml index bb5ee09e..9b75cbca 100644 --- a/app/views/changelog/_changelog_en.html.haml +++ b/app/views/changelog/_changelog_en.html.haml @@ -1,7 +1,8 @@ = content_for(:title, "Change History") %section#main.c-changelog - %h1.heading-large UK House Price Index: change history + %h1.heading-large + = yield(:title) + " - " + I18n.t('common.header.app_title') %h2.heading-medium April 2023 – Changes to local authority geography in England From 9d1afdb4faab88f2af6e19e863523740a21d5719 Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 12:50:35 +0100 Subject: [PATCH 12/18] Added changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72769f20..2972282c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## 1.7.5 - 2024-08 +- (Bogdan) Added page titles for each individual view [GH-409](https://github.com/epimorphics/ukhpi/issues/409) - (Bogdan) Set correct values for `aria-label` link attributes on the about page [GH-413](https://github.com/epimorphics/ukhpi/issues/413) - (Bogdan) Increased contrast for compare location dropdowns [GH-412](https://github.com/epimorphics/ukhpi/issues/412) From e902cf3b46453d68eb4cee2603c6253761a9d84a Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 13:56:58 +0100 Subject: [PATCH 13/18] Reverse order of change history heading text --- app/views/changelog/_changelog_cy.html.haml | 2 +- app/views/changelog/_changelog_en.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/changelog/_changelog_cy.html.haml b/app/views/changelog/_changelog_cy.html.haml index fcc0d38b..d3fdc994 100644 --- a/app/views/changelog/_changelog_cy.html.haml +++ b/app/views/changelog/_changelog_cy.html.haml @@ -2,7 +2,7 @@ %section#main.c-changelog %h1.heading-large - = yield(:title) + " - " + I18n.t('common.header.app_title') + = I18n.t('common.header.app_title') + " : " + yield(:title) %h2.heading-medium Ebrill 2023 – Newidiadau i ddaearyddiaeth awdurdodau lleol yn Lloegr diff --git a/app/views/changelog/_changelog_en.html.haml b/app/views/changelog/_changelog_en.html.haml index 9b75cbca..39a7f846 100644 --- a/app/views/changelog/_changelog_en.html.haml +++ b/app/views/changelog/_changelog_en.html.haml @@ -2,7 +2,7 @@ %section#main.c-changelog %h1.heading-large - = yield(:title) + " - " + I18n.t('common.header.app_title') + = I18n.t('common.header.app_title') + " : " + yield(:title) %h2.heading-medium April 2023 – Changes to local authority geography in England From a62b8d429c9923cc4776015e8edfb2cb5f6f6216 Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 13:57:10 +0100 Subject: [PATCH 14/18] Reversed order of about page heading text --- app/views/doc/_about_ukhpi_cy.html.haml | 2 +- app/views/doc/_about_ukhpi_en.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/doc/_about_ukhpi_cy.html.haml b/app/views/doc/_about_ukhpi_cy.html.haml index dc3602ad..64c028e7 100644 --- a/app/views/doc/_about_ukhpi_cy.html.haml +++ b/app/views/doc/_about_ukhpi_cy.html.haml @@ -1,7 +1,7 @@ = content_for(:title, "Am") %h1.heading-large - = yield(:title) + " - " + I18n.t('common.header.app_title') + = I18n.t('common.header.app_title') + " : " + yield(:title) %h2.heading-medium Beth sydd wedi ei gynnwys yn Set Ddata’r Mynegai Prisiau Tai? diff --git a/app/views/doc/_about_ukhpi_en.html.haml b/app/views/doc/_about_ukhpi_en.html.haml index b46b0683..d0fcfcf1 100644 --- a/app/views/doc/_about_ukhpi_en.html.haml +++ b/app/views/doc/_about_ukhpi_en.html.haml @@ -1,7 +1,7 @@ = content_for(:title, "About") %h1.heading-large - = yield(:title) + " - " + I18n.t('common.header.app_title') + = I18n.t('common.header.app_title') + " : " + yield(:title) %h2.heading-medium What does the House Price Index Dataset consist of? From f09933bcf88cfe26b0825ba65c77a102badcd578 Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 13:59:50 +0100 Subject: [PATCH 15/18] Use translation for browse page title --- app/views/browse/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/browse/show.html.haml b/app/views/browse/show.html.haml index cc8a37e9..afc7f0cf 100644 --- a/app/views/browse/show.html.haml +++ b/app/views/browse/show.html.haml @@ -1,4 +1,4 @@ -= content_for(:title, "Browse") += content_for(:title, t('browse.show.main_heading')) .grid-row .column-full From 39fcbbfd3ba959e802274da31ce0b020a1cb354b Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 14:00:04 +0100 Subject: [PATCH 16/18] Use translation for compare locations page title --- app/views/compare/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/compare/show.html.haml b/app/views/compare/show.html.haml index f5293dd9..fd4f7fc7 100644 --- a/app/views/compare/show.html.haml +++ b/app/views/compare/show.html.haml @@ -1,4 +1,4 @@ -= content_for(:title, "Compare Locations") += content_for(:title, t('compare.show.heading')) .grid-row .column-full From 821c292c7f99ade235303f5e33634dff0e7c42d6 Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 14:00:23 +0100 Subject: [PATCH 17/18] Fixed a duplicate character bug --- config/locales/cy.yml | 4 ++-- config/locales/en.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/locales/cy.yml b/config/locales/cy.yml index 64210db7..b2f94200 100644 --- a/config/locales/cy.yml +++ b/config/locales/cy.yml @@ -238,8 +238,8 @@ cy: dates_picker: select_dates: "newid dyddiad dechrau neu ddiwedd" date_range_prompt: "Newid amrediad y dyddiadau" - start: "Dechrau:" - end: "Diwedd:" + start: "Dechrau" + end: "Diwedd" date: abbr_day_names: diff --git a/config/locales/en.yml b/config/locales/en.yml index b9fa4e5a..668003c1 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -238,8 +238,8 @@ en: dates_picker: select_dates: "change start or end date" date_range_prompt: "Change the date range" - start: "Start:" - end: "End:" + start: "Start" + end: "End" # old------------- From f15602933a27d4cc0b6728f96468113ea1783c76 Mon Sep 17 00:00:00 2001 From: Bogdan Marc Date: Fri, 16 Aug 2024 14:01:40 +0100 Subject: [PATCH 18/18] Added changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2972282c..3fd76b3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## 1.7.5 - 2024-08 +- (Bogdan) Fixed a duplicate character bug when selecting dates - (Bogdan) Added page titles for each individual view [GH-409](https://github.com/epimorphics/ukhpi/issues/409) - (Bogdan) Set correct values for `aria-label` link attributes on the about page [GH-413](https://github.com/epimorphics/ukhpi/issues/413)