<table class="panes variables">
    <tbody>
        {% set ns = namespace(last_section='') %}
        {% for variable in variables %}
            {% set section_change = variable.plugin and ns.last_section != variable.plugin %}

            {% if section_change %}
                {% if not loop.first %}</tbody><tbody>{% endif %}
                <tr class="title-item">
                    <td colspan="3">
                        {% set plugin = plugins[variable.plugin] %}
                        {{ t(plugin.use_title()) }}

                        {% if plugin.use_description() %}
                            <div class="more">{{ t(plugin.use_description()) }}</div>
                        {% endif %}
                    </td>
                </tr>
            {% endif %}
            <tr class="variable-item variable-edit" data-level="{{ variable.id }}" data-entity="{{ variable.to_json() }}">
                <td class="description">
                    {{ t(variable.description) }}
                </td>
                <td class="value">
                    <i class="fa fa-pencil icon-legend"></i>
                    {% if variable.value %}
                        {% if variable.type.value == 'bool' %}
                            {% if variable.display() %}
                                <i class="fa fa-check alert alert-success alert-icon icon-value"></i>
                            {% else %}
                                <i class="fa fa-times alert alert-error alert-icon icon-value"></i>
                            {% endif %}
                        {% else %}
                            {{ variable.display() }}
                        {% endif %}
                    {% else %}
                        <span class="empty">{{ l.common_empty }}</span>
                    {% endif %}
                </td>
            </tr>

            {% set ns.last_section = variable.plugin %}
        {% endfor %}
    </tbody>
</table>