Skip to content

Commit

Permalink
UHF-10773: Add services near you block to Helsinki near you results p…
Browse files Browse the repository at this point in the history
…age with dummy links
  • Loading branch information
teroelonen committed Dec 10, 2024
1 parent f0844a0 commit 5353b6f
Show file tree
Hide file tree
Showing 7 changed files with 219 additions and 0 deletions.
1 change: 1 addition & 0 deletions public/modules/custom/helfi_etusivu/helfi_etusivu.module
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ function helfi_etusivu_theme() : array {
'back_link_url' => NULL,
'coordinates' => NULL,
'title' => NULL,
'service_groups' => NULL,
],
'template' => 'helsinki-near-you-results-page',
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,68 @@ public function content(Request $request) : array|RedirectResponse {
['@address' => $addressData ? $this->resolveTranslation($addressData['address_translations']) : ''],
['context' => 'Helsinki near you']
),
'#service_groups' => [
[
'title' => $this->t('Health is key', [], ['context' => 'Helsinki near you']),
'service_links' => [
[
'link_label' => $this->t('Your own health station', [], ['context' => 'Helsinki near you']),
'link_url' => Url::fromRoute('helfi_etusivu.helsinki_near_you'),
],
[
'link_label' => $this->t('Closest maternity and child health clinic', [], ['context' => 'Helsinki near you']),
'link_url' => Url::fromRoute('helfi_etusivu.helsinki_near_you'),
],
],
],
[
'title' => $this->t('Grow and learn', [], ['context' => 'Helsinki near you']),
'service_links' => [
[
'link_label' => $this->t('Schools close to you', [], ['context' => 'Helsinki near you']),
'link_url' => Url::fromRoute('helfi_etusivu.helsinki_near_you'),
],
[
'link_label' => $this->t('Closest playgrounds and family houses', [], ['context' => 'Helsinki near you']),
'link_url' => Url::fromRoute('helfi_etusivu.helsinki_near_you'),
],
[
'link_label' => $this->t('Closest daycare centres', [], ['context' => 'Helsinki near you']),
'link_url' => Url::fromRoute('helfi_etusivu.helsinki_near_you'),
],
],
],
[
'title' => $this->t('Move around the city', [], ['context' => 'Helsinki near you']),
'service_links' => [
[
'link_label' => $this->t('Roadway ploughing schedule', [], ['context' => 'Helsinki near you']),
'link_url' => Url::fromRoute('helfi_etusivu.helsinki_near_you'),
],
[
'link_label' => $this->t('Roadworks and events on map', [], ['context' => 'Helsinki near you']),
'link_url' => Url::fromUri('https://kartta.hel.fi'),
],
[
'link_label' => $this->t('City bike stations', [], ['context' => 'Helsinki near you']),
'link_url' => Url::fromUri('https://www.hsl.fi/en/citybikes/helsinki'),
],
],
],
[
'title' => $this->t('The city is developing', [], ['context' => 'Helsinki near you']),
'service_links' => [
[
'link_label' => $this->t('Street and park development', [], ['context' => 'Helsinki near you']),
'link_url' => Url::fromUri('https://kartta.hel.fi'),
],
[
'link_label' => $this->t('Plans in process', [], ['context' => 'Helsinki near you']),
'link_url' => Url::fromUri('https://kartta.hel.fi'),
],
],
],
],
];
}

Expand Down
56 changes: 56 additions & 0 deletions public/modules/custom/helfi_etusivu/translations/fi.po
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,59 @@ msgstr "Antamallasi osoitteella ei löytynyt tuloksia. Voit kokeilla muuttaa hak
msgctxt "Helsinki near you"
msgid "Search"
msgstr "Hae"

msgctxt "Helsinki near you"
msgid "Health is key"
msgstr "Hoida terveyttä"

msgctxt "Helsinki near you"
msgid "Your own health station"
msgstr "Oma terveysasema"

msgctxt "Helsinki near you"
msgid "Closest maternity and child health clinic"
msgstr "Lähin neuvola"

msgctxt "Helsinki near you"
msgid "Grow and learn"
msgstr "Kasva ja opi"

msgctxt "Helsinki near you"
msgid "Schools close to you"
msgstr "Lähikoulut"

msgctxt "Helsinki near you"
msgid "Closest playgrounds and family houses"
msgstr "Lähimmät leikkipuistot ja perhetalot"

msgctxt "Helsinki near you"
msgid "Closest daycare centres"
msgstr "Lähimmät päiväkodit"

msgctxt "Helsinki near you"
msgid "Move around the city"
msgstr "Move around the city"

msgctxt "Helsinki near you"
msgid "Roadway ploughing schedule"
msgstr "Aurausaikataulu"

msgctxt "Helsinki near you"
msgid "Roadworks and events on map"
msgstr "Katutyöt ja tapahtumat kartalla"

msgctxt "Helsinki near you"
msgid "City bike stations"
msgstr "Kaupunkipyöräasemat ja pyörätelineet"

msgctxt "Helsinki near you"
msgid "The city is developing"
msgstr "Kaupunki kehittyy"

msgctxt "Helsinki near you"
msgid "Street and park development"
msgstr "Katu- ja puistohankkeet"

msgctxt "Helsinki near you"
msgid "Plans in process"
msgstr "Valmisteilla oleva kaavat"
56 changes: 56 additions & 0 deletions public/modules/custom/helfi_etusivu/translations/sv.po
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,59 @@ msgstr "Adressen du angav gav inga resultat. Du kanske vill prova en annan adres
msgctxt "Helsinki near you"
msgid "Search"
msgstr "Söka"

msgctxt "Helsinki near you"
msgid "Health is key"
msgstr "Ta hand om din hälsa"

msgctxt "Helsinki near you"
msgid "Your own health station"
msgstr "Din egen hälsostation"

msgctxt "Helsinki near you"
msgid "Closest maternity and child health clinic"
msgstr "Närmaste mödra- och barnrådgivning"

msgctxt "Helsinki near you"
msgid "Grow and learn"
msgstr "Väx och lär dig"

msgctxt "Helsinki near you"
msgid "Schools close to you"
msgstr "Närliggande skolor"

msgctxt "Helsinki near you"
msgid "Closest playgrounds and family houses"
msgstr "Närmaste lekparker och familjehus"

msgctxt "Helsinki near you"
msgid "Closest daycare centres"
msgstr "Närmaste daghem"

msgctxt "Helsinki near you"
msgid "Move around the city"
msgstr "Rör dig i staden"

msgctxt "Helsinki near you"
msgid "Roadway ploughing schedule"
msgstr "Plogningstidtabell"

msgctxt "Helsinki near you"
msgid "Roadworks and events on map"
msgstr "Vägarbeten och evenemang på kartan"

msgctxt "Helsinki near you"
msgid "City bike stations"
msgstr "Stadscykelstationer och cykelställ"

msgctxt "Helsinki near you"
msgid "The city is developing"
msgstr "Staden utvecklas"

msgctxt "Helsinki near you"
msgid "Street and park development"
msgstr "Gatu- och parkområdesprojekt"

msgctxt "Helsinki near you"
msgid "Plans in process"
msgstr "Pågående planeringsprojekt"
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,33 @@
} %}
{% endblock component_content %}
{% endembed %}

{% embed "@hdbt/misc/component.twig" with
{
component_classes: [ 'component--popular-services' ],
component_title: 'Services close to you'|t({}, {'context': 'Services close to you block'}),
component_description: 'Use the links to go to results based on your address.'|t({}, {'context': 'Services close to you block'}),
component_content_class: 'popular-services',
}
%}
{% block component_content %}
{% for service_group in service_groups %}
{% embed "@hdbt/misc/popular-service-item.twig" with { title: service_group.title } %}
{% block links %}
{% embed "@hdbt/misc/popular-service-links.twig" with { items: service_group.service_links } %}
{% block link %}
{% set link_attributes = {
'class': [
'link__style--highlight',
],
} %}
{{ link(item.link_label, item.link_url, link_attributes) }}
{% endblock %}
{% endembed %}
{% endblock links %}
{% endembed %}
{% endfor %}
{% endblock component_content %}
{% endembed %}
</div>
</article>
8 changes: 8 additions & 0 deletions public/themes/custom/hdbt_subtheme/translations/fi.po
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,11 @@ msgstr "Syvenny ja inspiroidu"
msgctxt "Front page news of interest title"
msgid "You might be interested in"
msgstr "Sinua voisi kiinnostaa"

msgctxt "Services close to you block"
msgid "Services close to you"
msgstr "Palvelut lähelläsi"

msgctxt "Services close to you block"
msgid "Use the links to go to results based on your address."
msgstr "Siirry linkeistä oman osoitteesi mukaisiin hakutuloksiin."
8 changes: 8 additions & 0 deletions public/themes/custom/hdbt_subtheme/translations/sv.po
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,11 @@ msgstr "Läs mer och få inspiration"
msgctxt "Front page news of interest title"
msgid "You might be interested in"
msgstr "Du kanske är intresserad av"

msgctxt "Services close to you block"
msgid "Services close to you"
msgstr "Tjänster nära dig"

msgctxt "Services close to you block"
msgid "Use the links to go to results based on your address."
msgstr "Använd länkarna för att visa resultat baserat på din adress."

0 comments on commit 5353b6f

Please sign in to comment.