Skip to content

Commit

Permalink
Merge pull request #1328 from NatLibFi/fix-tabs-after-bootstrap-5
Browse files Browse the repository at this point in the history
Fix highlighting of the New tab after Bootstrap 5 upgrade
  • Loading branch information
osma authored Jun 2, 2022
2 parents 290296c + 7971ff6 commit 1c4fd32
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion view/changes.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<li id="groups" class="nav-item"><a class="{{ css_class|join(' ') }}" href="{{ request.vocabid }}/{{ request.lang }}/groups{% if request.contentLang != request.lang %}?clang={{ request.contentLang }}{% endif %}">{% trans "Group-nav" %}</a></li>
{% endif %}
{% if vocab.config.showChangeList %}
{% if vocab.config.showDeprecatedChanges %}
{% set css_class = ['nav-link'] %}
{% set css_class = css_class|merge(['active']) %}
{% if vocab.config.showDeprecatedChanges %}
<h3 class="sr-only">{% trans "List vocabulary concepts by newest additions including removed" %}</h3>
<li id="changes" class="nav-item"><a class="{{ css_class|join(' ') }}" href="{{ request.vocabid }}/{{ request.lang }}/new{% if request.contentLang != request.lang %}?clang={{ request.contentLang }}{% endif %}">{% trans "Changes-and-deprecations-nav" %}</a></li>
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion view/group-contents.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
<li id="groups" class="nav-item"><a class="{{ css_class|join(' ') }}" href="{{ request.vocabid }}/{{ request.lang }}/groups{% if request.contentLang != request.lang %}?clang={{ request.contentLang }}{% endif %}">{% trans "Group-nav" %}</a></li>
{% endif %}
{% if vocab.config.showChangeList %}
{% set css_class = ['nav-link'] %}
{% if vocab.config.showDeprecatedChanges %}
<h3 class="sr-only">{% trans "List vocabulary concepts by newest additions including removed" %}</h3>
<li id="changes"><a href="{{ request.vocabid }}/{{ request.lang }}/new{% if request.contentLang != request.lang %}?clang={{ request.contentLang }}{% endif %}">{% trans "Changes-and-deprecations-nav" %}</a></li>
{% else %}
{% set css_class = ['nav-link'] %}
<h3 class="sr-only">{% trans "List vocabulary concepts by newest additions" %}</h3>
<li id="changes" class="nav-item"><a class="{{ css_class|join(' ') }}" href="{{ request.vocabid }}/{{ request.lang }}/new{% if request.contentLang != request.lang %}?clang={{ request.contentLang }}{% endif %}">{% trans "Changes-nav" %}</a></li>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion view/group-index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<li id="groups" class="nav-item"><a class="{{ css_class|join(' ') }}" href="{{ request.vocabid }}/{{ request.lang }}/groups{% if request.contentLang != request.lang %}?clang={{ request.contentLang }}{% endif %}">{% trans "Group-nav" %}</a></li>
{% endif %}
{% if vocab.config.showChangeList %}
{% set css_class = ['nav-link'] %}
{% if vocab.config.showDeprecatedChanges %}
<h3 class="sr-only">{% trans "List vocabulary concepts by newest additions including removed" %}</h3>
<li id="changes"><a href="{{ request.vocabid }}/{{ request.lang }}/new{% if request.contentLang != request.lang %}?clang={{ request.contentLang }}{% endif %}">{% trans "Changes-and-deprecations-nav" %}</a></li>
{% else %}
{% set css_class = ['nav-link'] %}
<h3 class="sr-only">{% trans "List vocabulary concepts by newest additions" %}</h3>
<li id="changes" class="nav-item"><a class="{{ css_class|join(' ') }}" href="{{ request.vocabid }}/{{ request.lang }}/new{% if request.contentLang != request.lang %}?clang={{ request.contentLang }}{% endif %}">{% trans "Changes-nav" %}</a></li>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion view/light.twig
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
<li id="groups" class="nav-item"><a class="{{ css_class|join(' ') }}" href="{{ request.vocabid }}/{{ request.lang }}/groups{% if request.contentLang != request.lang %}?clang={{ request.contentLang }}{% endif %}">{% trans "Group-nav" %}</a></li>
{% endif %}
{% if vocab.config.showChangeList %}
{% if vocab.config.showDeprecatedChanges %}
{% if active_tab == 'new' %}{% set css_class = css_class|merge(['active']) %}{% endif %}
{% if vocab.config.showDeprecatedChanges %}
<h3 class="sr-only">{% trans "List vocabulary concepts by newest additions including removed" %}</h3>
<li id="changes" class="nav-item"><a class="{{ css_class|join(' ') }}" href="{{ request.vocabid }}/{{ request.lang }}/new{% if request.contentLang != request.lang %}?clang={{ request.contentLang }}{% endif %}">{% trans "Changes-and-deprecations-nav" %}</a></li>
{% else %}
Expand Down

0 comments on commit 1c4fd32

Please sign in to comment.