
<fieldset id="visOptions">

    {% if vis.dimensions == 1 %}
    <div class="control-group select-row">
        <label class="control-label" for="text-title">{% trans "Initial row to display" %}</label>
        <div class="controls">
            <select id="select-row" style="width:100%">
            </select>
        </div>
    </div>
    {% endif %}

    {% for key, option in vis.options %}
        {% if option.type == 'group' %}
        <div id="vis-options-{{ key }}" data-group-key="{{ key }}" class="vis-option-type-group{% if option.open %} group-open{% endif %}">
            <label class="group-title">
                <i class="fa fa-angle-double-right expand-group"></i>
                <i class="fa fa-angle-double-down collapse-group"></i>
                {{ option.label|raw }}
            </label>
            <div class="option-group-content">
            {% for key, option in option.options %}
            {{ block('option') }}
            {% endfor %}
            </div>
        </div>
        {% else %}
        {{ block('option') }}
        {% endif %}
    {% endfor %}

</fieldset>

{% block option %}
    {% if theme['option-filter'][vis.id][key] or (not option.hidden and not option.expert) %}
        <div class="control-group vis-option-group vis-option-type-{{ option.type }}{% if option.inline %} inline{% endif %}" id="vis-options-{{ key }}">

        {% if option.help %}
            <a title="{{ option.help }}" class="vis-option-help"><span>?</span></a>
        {% endif %}

        {{ hook('vis_option_controls', option, key) }}

        </div>
    {% endif %}
{% endblock %}
