Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 69 additions & 119 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@
{
"ajv": ">=8.18.0, dependency of hds-react",
"tar-fs": ">=3.0.9, dependency of backstopjs",
"diff": "^8.0.3, dependency of backstopjs"
"diff": "^8.0.3, dependency of backstopjs",
"minimatch": ">=10.2.1, dependency of hds-core (eslint)"
}
],
"overrides": {
"diff": "^8.0.3",
"ajv": "^8.18.0"
"ajv": "^8.18.0",
"minimatch": "^10.2.1"
},
"dependencies": {
"@dotenvx/dotenvx": "^1.15.0",
Expand Down
31 changes: 7 additions & 24 deletions templates/module/helfi_tpr/tpr-service-channel.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
{% if entity.type.value|lower == 'local' or entity.type.value|lower == 'mail' %}
{% set show_mail = true %}
{% endif %}

{% set service_channel_eservice_links_new_tab = service_channel_eservice_links_new_tab|default(0) %}
<div class="service-channel__content">

{% if content.name|render %}
Expand Down Expand Up @@ -65,39 +63,24 @@
<div class="service-channel__address">{{ content.address }}</div>
{% endif %}

{% if entity.requires_authentication.value == 1 or (content.links and service_channel_eservice_links_new_tab and entity.type.value|lower == 'eservice') %}
{% if entity.requires_authentication.value == 1 or (content.links and entity.type.value|lower == 'eservice') %}
<div class="service-channel__extra-information">
{% if entity.requires_authentication.value == 1 %}
{{ 'Requires authentication'|t }}.
{% endif %}
{% if content.links and service_channel_eservice_links_new_tab and entity.type.value|lower == 'eservice' %}
{{ 'The link opens in a new tab'|t({}, {'context': 'Explanation for users that the link opens in a new tab instead of the expected current tab'}) }}.
{% endif %}
</div>
{% endif %}

{% if content.links|render %}
<div class="service-channel__links">
{% for link in content.links['#items'] %}
{% if entity.type.value|lower == 'eservice' %}
{% if service_channel_eservice_links_new_tab %}
{% set link_attributes = {
'class': [
'hds-button',
'hds-button--primary',
],
'target': [
'_blank',
]
} %}
{% else %}
{% set link_attributes = {
'class': [
'hds-button',
'hds-button--primary',
],
} %}
{% endif %}
{% set link_attributes = {
'class': [
'hds-button',
'hds-button--primary',
],
} %}
{% set link_title %}
<span class="hds-button__label">{{ link.title }}</span>
{% endset %}
Expand Down