Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom labels and tooltips for properties in concept view #1244

Merged
merged 6 commits into from
Nov 11, 2021
Prev Previous commit
Next Next commit
Use UI language, not content language for custom/overridden labels an…
…d tooltips
osma committed Nov 11, 2021
commit c0ed36a454c0a8d1187f2aeb349cef14418b621b
6 changes: 3 additions & 3 deletions view/concept-shared.twig
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@
{% if subPrefLabelTranslation %}
{{ subPrefLabelTranslation }}
{% elseif custom_labels['skos:prefLabel'] %}
osma marked this conversation as resolved.
Show resolved Hide resolved
{{ custom_labels['skos:prefLabel']['label'][request.contentLang] }}
{{ custom_labels['skos:prefLabel']['label'][request.lang] }}
{% else %}
{{ 'skos:prefLabel'|trans }}
{% endif %}
@@ -101,10 +101,10 @@
<div class="property-label">
{% if custom_labels[property.type] %}
<h3 class="versal{% if property.type == 'rdf:type' %}-bold{% endif %}
{% if custom_labels[property.type] and custom_labels[property.type]['description'] and custom_labels[property.type]['description'][request.contentLang] %}property-click" title="{{ custom_labels[property.type]['description'][request.contentLang] }}
{% if custom_labels[property.type] and custom_labels[property.type]['description'] and custom_labels[property.type]['description'][request.lang] %}property-click" title="{{ custom_labels[property.type]['description'][request.lang] }}
{% elseif property.description %} property-click" title="{{ property.description }}
{% endif %}
">{{ custom_labels[property.type]['label'][request.contentLang] }}</h3>
">{{ custom_labels[property.type]['label'][request.lang] }}</h3>
{% else %}
<h3 class="versal{% if property.type == 'rdf:type' %}-bold{% endif %}{% if property.description %} property-click" title="{{ property.description }}{% endif %}">{{ property.label }}</h3>
{% endif %}