Skip to content

Commit

Permalink
Merge pull request #7454 from bolt/hotfix/no-stack-in-recordbrowser
Browse files Browse the repository at this point in the history
If stack is disabled, don't show it in recordbrowser popup
  • Loading branch information
GwendolenLynch committed Apr 29, 2018
2 parents b28b491 + 4255628 commit b781c24
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/view/twig/recordbrowser/_content.twig
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<div class="tab-content">

{% if not config.get('general/backend/stack/disable', false) %}
<div class="tab-pane active" id="stacktab">
{{ render(path("stack/show", {'options': 'list'})) }}
</div>
{% endif %}

{% for contenttype, records in context.results %}
<div class="tab-pane" id="{{ contenttype }}">
<div class="tab-pane
{%- if loop.first and config.get('general/backend/stack/disable') %} active{% endif -%}
" id="{{ contenttype }}">
<ul>
{% for record in records %}
<li><a class="filebrowserCallbackLink" href="{{ record.link }}" >№ {{ record.id }}. {{ record.title }}</a></li>
Expand Down
6 changes: 5 additions & 1 deletion app/view/twig/recordbrowser/_navigation.twig
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
<ul class="nav nav-tabs" id="filtertabs">

{% if not config.get('general/backend/stack/disable', false) %}
<li class="active">
<a href="#stacktab" data-toggle="tab">
{{ __('general.phrase.stack') }}
</a>
</li>
{% endif %}

{% for contenttype, records in context.results %}
<li>
<li
{%- if loop.first and config.get('general/backend/stack/disable') %} class="active"{% endif -%}
>
<a href="#{{ contenttype }}" data-toggle="tab">
{{ config.get('contenttypes')[ contenttype ].name }}
</a>
Expand Down

0 comments on commit b781c24

Please sign in to comment.