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

If stack is disabled, don't show it in recordbrowser popup #7454

Merged
merged 1 commit into from
Apr 29, 2018
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
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