{% extends "MasterOrdenadoresTaller/MenuBgTemplate.html.twig" %} {% block bodyHeaderOptions %} {{ parent() }} {% set pageData = fsc.getPageData() %} {% set firstView = fsc.views | first %}
{# -- Top left buttons -- #}
{# -- Options button -- #} {{ _self.optionsButton(fsc, firstView, i18n) }} {# -- New button -- #} {% if fsc.hasData and firstView.settings.btnNew %} {{ trans('new') }} {% endif %} {# -- Action buttons -- #} {{ firstView.getRow('actions').renderTop() | raw }} {# -- Print button -- #} {% if fsc.hasData and firstView.settings.btnPrint %} {{ _self.printButton(fsc, firstView, i18n) }} {% endif %}
{# -- Top right text -- #}

{{ trans(pageData.title) }} {% set image = fsc.getImageUrl() %} {% if image is empty %} {% else %} {{ fsc.title }} {% endif %}

{% if fsc.hasData %}

{{ firstView.model.primaryDescription() | raw }}

{% else %}

{{ trans('new') }}

{% endif %}
{% endblock %} {% block body %} {% set firstView = fsc.views | first %}
{# -- Left Panel -- #} {% if fsc.views | length > 1 %}
{# -- Left tabs -- #}
{% endif %} {# -- Right Panel -- #} {% set rightPanelClass = (fsc.views | length > 1) ? 'col-lg-10' : 'col' %}
{# -- Tab content -- #}
{% for viewName, view in fsc.views %} {% set active = (viewName == fsc.active) ? ' show active' : '' %}
{% do fsc.setCurrentView(viewName) %} {{ include(view.template) }}
{% endfor %}
{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %} {% macro optionsButton(fsc, firstView, i18n) %} {% set show = false %} {% for viewName, view in fsc.views %} {% if view.settings.active and view.columns is not empty %} {% set show = true %} {% endif %} {% endfor %} {% if show and firstView.settings.btnOptions %}
{% endif %} {% endmacro %} {% macro printButton(fsc, firstView, i18n) %}
{{ trans('print') }}
{% endmacro %}