82 lines
3.0 KiB
Twig

{#
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
<info@champs-libres.coop> / <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "ChillMainBundle::layoutWithVerticalMenu.html.twig" %}
{% block title %}{{ export.title|trans }}{% endblock %}
{% block layout_wvm_content %}
<h1>{{ export.title|trans }}</h1>
<p>{{ export.description|trans }}</p>
{{ form_start(form) }}
{% if form.children.export.children.filters is not empty%}
<div>
<h2>{{ 'Filters'| trans }}</h2>
{% for filter_form in form.children.export.children.filters %}
{{ form_label(filter_form) }}
{{ form_row(filter_form.enabled) }}
{{ form_widget(filter_form.form) }}
{% endfor %}
</div>
{% else %}
{# render the children, to mark the widget as 'rendered' #}
{{ form_widget(form.children.export.children.filters) }}
{% endif %}
{% if form.children.export.children.aggregators is not empty %}
<div>
<h2>{{ 'Aggregators'| trans }}</h2>
{% for aggregator_form in form.children.export.children.aggregators %}
{{ form_label(aggregator_form) }}
{{ form_row(aggregator_form.enabled) }}
{{ form_widget(aggregator_form.form) }}
{% endfor %}
</div>
{% else %}
{# render the children, to mark the widget as 'rendered' #}
{{ form_widget(form.children.export.children.aggregators) }}
{% endif %}
{% if form.children.export.children.export.children|length > 0 %}
<div>
<h2>{{ 'Export parameters'|trans }}</h2>
{{ form_widget(form.children.export.children.export) }}
</div>
{% else %}
{# render the children, to mark the widget as 'rendered'
{{ form_widget(form.children.export.children.export) }}#}
{% endif %}
<div style="clear: both;">
<h2>{{ 'Formatter'| trans }}</h2>
<p> {{ 'Choose the formatter'|trans }}</p>
{{ form_row(form.children.export.children.pick_formatter.children.alias, { 'label' : 'Formatter' }) }}
</div>
<p>{{ form_widget(form.submit, { 'attr' : { 'class' : 'sc-button btn-create' }, 'label' : 'Go to formatter options' } ) }}</p>
{{ form_end(form) }}
{% endblock layout_wvm_content %}