backports murph-skeleton

This commit is contained in:
Simon Vieille 2021-05-13 17:50:22 +02:00
parent e272186bbe
commit 7eb6c106d1
2 changed files with 34 additions and 20 deletions

View file

@ -1,21 +1,33 @@
<ul class="nav nav-pills mt-3 mb-3 p-0">
{% for locale in configuration.locales %}
<li class="nav-item">
<a class="nav-link {% if loop.first %}active{% endif %}" data-toggle="tab" href="#form-locale-{{ loop.index }}">
<span class="flag-icon flag-icon-{{ locale }}"></span>
{% set doRender = false %}
{{ locale|upper|trans }}
</a>
</li>
{% endfor %}
</ul>
{% set render %}
<ul class="nav nav-pills mt-3 mb-3 p-0">
{% for locale in configuration.locales %}
<li class="nav-item">
<a class="nav-link {% if loop.first %}active{% endif %}" data-toggle="tab" href="#form-locale-{{ loop.index }}">
<span class="flag-icon flag-icon-{{ locale }}"></span>
<div class="tab-content">
{% for locale in configuration.locales %}
<div class="tab-pane {% if loop.first %}show active{% endif %}" id="form-locale-{{ loop.index }}">
{% for item in item.children[locale] %}
{{ include(configuration.view('form_widget', '@Core/admin/crud/_form_widget.html.twig')) }}
{% endfor %}
</div>
{% endfor %}
</div>
{{ locale|upper|trans }}
</a>
</li>
{% endfor %}
</ul>
<div class="tab-content">
{% for locale in configuration.locales %}
<div class="tab-pane {% if loop.first %}show active{% endif %}" id="form-locale-{{ loop.index }}">
{% for item in item.children[locale] %}
{% if not item.isRendered %}
{% set doRender = true %}
{% endif %}
{{ include(configuration.view('form_widget', '@Core/admin/crud/_form_widget.html.twig')) }}
{% endfor %}
</div>
{% endfor %}
</div>
{% endset %}
{% if doRender %}
{{ render|raw }}
{% endif %}

View file

@ -1 +1,3 @@
{{ form_row(item) }}
{% if not item.isRendered %}
{{ form_row(item) }}
{% endif %}