Skip to content

Commit

Permalink
Merge pull request #834 from City-of-Helsinki/UHF-9309_site-copy-link
Browse files Browse the repository at this point in the history
UHF-9309 link to static copy of the site
  • Loading branch information
dire authored Nov 24, 2023
2 parents dfc3be8 + 8eb958b commit 145307d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
3 changes: 3 additions & 0 deletions hdbt.theme
Original file line number Diff line number Diff line change
Expand Up @@ -1499,16 +1499,19 @@ function hdbt_preprocess_maintenance_page(&$variables): void {
case 'fi':
$variables['maintenance_page_home_link'] = 'https://www.hel.fi/helsinki/fi';
$variables['maintenance_page_feedback_link'] = 'https://www.hel.fi/helsinki/fi/kaupunki-ja-hallinto/osallistu-ja-vaikuta/palaute';
$variables['maintenance_page_copy_link'] = 'https://kopio.hel.fi/fi.html';
break;

case 'sv':
$variables['maintenance_page_home_link'] = 'https://www.hel.fi/helsinki/sv';
$variables['maintenance_page_feedback_link'] = 'https://www.hel.fi/helsinki/sv/stad-och-forvaltning/delta/feedback';
$variables['maintenance_page_copy_link'] = 'https://kopio.hel.fi/sv.html';
break;

default:
$variables['maintenance_page_home_link'] = 'https://www.hel.fi/helsinki/en';
$variables['maintenance_page_feedback_link'] = 'https://www.hel.fi/helsinki/en/administration/participate/feedback';
$variables['maintenance_page_copy_link'] = 'https://kopio.hel.fi/en.html';
break;
}
}
Expand Down
16 changes: 15 additions & 1 deletion templates/layout/maintenance-page.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{% block container_content %}
<div class="maintenance-page__text-container">
<header role="banner">
<h1 class="maintenance-page__title">{{ 'The site is currently under maintenance'|t }}</h1>
<h1 class="maintenance-page__title" {{ alternative_language ? create_attribute(({ 'lang': lang_attributes.fallback_lang, 'dir': lang_attributes.fallback_dir })) }}>{{ 'The site is currently under maintenance'|t }}</h1>
</header>
<main role="main">
<p class="maintenance-page__description">
Expand All @@ -28,6 +28,13 @@
'maintenance-page__link',
],
} %}
{% if alternative_language %}
{% set link_attributes = link_attributes|merge({
'dir': lang_attributes.fallback_dir,
'lang': lang_attributes.fallback_lang
})
%}
{% endif %}
{{ link(link_title, maintenance_page_home_link, link_attributes) }}

<br>
Expand All @@ -37,6 +44,13 @@
{% endset %}
{{ link(feedback_link_title, maintenance_page_feedback_link, link_attributes) }}

<br>

{% set copy_link_title %}
{{ 'If the problem persist, go to the copy of the pages.'|t({}, {'context': 'Copy of site link for error pages'}) }}
{% endset %}
{{ link(copy_link_title, maintenance_page_copy_link, link_attributes) }}

</main>
</div>
<div class="maintenance-page__illustration-container">
Expand Down
4 changes: 4 additions & 0 deletions translations/fi.po
Original file line number Diff line number Diff line change
Expand Up @@ -838,3 +838,7 @@ msgstr "Hakuehtoja vastaavia työpaikkoja ei löytynyt. Kokeile muita hakuehtoja
msgctxt "TPR Unit tpr data accordion heading"
msgid "Contact details of daycare centre groups"
msgstr "Päiväkotiryhmien yhteystiedot"

msgctxt "Copy of site link for error pages"
msgid "If the problem persist, go to the copy of the pages."
msgstr "Jos ongelma jatkuu siirry sivun kopioon."
4 changes: 4 additions & 0 deletions translations/sv.po
Original file line number Diff line number Diff line change
Expand Up @@ -831,3 +831,7 @@ msgstr "Lediga jobb som uppfyller kriterierna finns inte. Prova andra kriteriern
msgctxt "TPR Unit tpr data accordion heading"
msgid "Contact details of daycare centre groups"
msgstr "Barngruppernas kontaktuppgifter"

msgctxt "Copy of site link for error pages"
msgid "If the problem persist, go to the copy of the pages."
msgstr "Om problemet kvarstår, gå till den kopian av sidorna."

0 comments on commit 145307d

Please sign in to comment.