Skip to content

Commit

Permalink
Merge pull request #884 from City-of-Helsinki/UHF-9230-after-school-a…
Browse files Browse the repository at this point in the history
…ctivity-search-card

UHF-9230: after school activity search card
  • Loading branch information
hyrsky authored Jan 19, 2024
2 parents 843696b + b0320fd commit 5ec0b80
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% include '@hdbt/module/helfi_tpr/tpr-unit--minimal.html.twig' %}
31 changes: 22 additions & 9 deletions templates/module/helfi_tpr/tpr-unit--minimal.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,36 @@
{% if content.distance|render %}
{% set card_metas = card_metas|merge([{
icon: 'locate',
label: 'Distance'|t({}, {'context': 'TPR unit daycare distance'}),
label: 'Distance from the address you have given'|t({}, {'context': 'TPR unit result card'}),
content: content.distance,
}]) %}
{% endif %}
{% if content.provided_languages|render %}
{% set card_metas = card_metas|merge([{
icon: 'globe',
label: 'Operating language'|t({}, {'context': 'TPR unit result card'}),
content: content.provided_languages,
}]) %}
{% endif %}
{% if content.opening_hours|render %}
{% set card_metas = card_metas|merge([{
icon: 'clock',
label: 'Opening hours'|t({}, {'context': 'TPR unit result card'}),
content: content.opening_hours|render|striptags,
}]) %}
{% endif %}

{%
set card_tpr_classes = [
not content_entity_published ? 'card--unpublished',
'card--tpr-minimal',
]
not content_entity_published ? 'card--unpublished', 'card--tpr-minimal',
]
%}

{% embed '@hdbt/component/card.twig' with {
card_modifier_class: card_tpr_classes|join(' '),
card_title: entity.label,
card_url: unit_url,
card_tags: card_tags,
card_metas: card_metas,
card_modifier_class: card_tpr_classes|join(' '),
card_title: entity.label,
card_url: unit_url,
card_tags: card_tags,
card_metas: card_metas,
} %}
{% endembed %}
14 changes: 11 additions & 3 deletions translations/fi.po
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,17 @@ msgctxt "Header top navigation screen reader name"
msgid "Quick links"
msgstr "Pikalinkit"

msgctxt "TPR unit daycare distance"
msgid "Distance"
msgstr "Etäisyys"
msgctxt "TPR unit result card"
msgid "Distance from the address you have given"
msgstr "Etäisyys kirjoittamastasi osoitteesta"

msgctxt "TPR unit result card"
msgid "Operating language"
msgstr "Toimintakieli"

msgctxt "TPR unit result card"
msgid "Opening hours"
msgstr "Aukioloaika"

msgctxt "When newslist component does not have any news to list"
msgid "No related news."
Expand Down
14 changes: 11 additions & 3 deletions translations/sv.po
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,17 @@ msgctxt "Header top navigation screen reader name"
msgid "Quick links"
msgstr "Snabblänkar"

msgctxt "TPR unit daycare distance"
msgid "Distance"
msgstr "Distans"
msgctxt "TPR unit result card"
msgid "Distance from the address you have given"
msgstr "Avstånd från adressen du angett"

msgctxt "TPR unit result card"
msgid "Operating language"
msgstr "Verksamhetsspråk"

msgctxt "TPR unit result card"
msgid "Opening hours"
msgstr "Öppettid"

msgctxt "When newslist component does not have any news to list"
msgid "No related news."
Expand Down

0 comments on commit 5ec0b80

Please sign in to comment.