{% extends "SsoBackendBundle:layout:base.html.twig" %}

{% block title %}{{ parent() }} - Show{% endblock %}

{% block body %}
    <h1>Objects Structure</h1>
    {% for type in types if type.typeOrder == 0 %}
        <table class="table table-striped table-bordered table-condensed">
            <thead>
            <tr>
                <th>Type 0</th>
                <th>Type 1</th>
                <th>Type 2</th>
                <th>Type 3</th>
                <th>treeID</th>
                <th>Name</th>
            </tr>
            </thead>
            <tbody>
            {% for object in type.objects %}
            <tr>
                <td>{{ type.name }}</td>
                <td></td>
                <td></td>
                <td></td>
                <td>{{ object.treeId }}</td>
                <td>{{ object.name }}</td>
            </tr>

            {% for level1 in object.children %}
            <tr>
                <td></td>
                <td>{{ level1.type.name }}</td>
                <td></td>
                <td></td>
                <td>{{ level1.treeId }}</td>
                <td>{{ level1.name }}</td>
            </tr>

            {% for level2 in level1.children %}
            <tr>
                <td></td>
                <td></td>
                <td>{{ level2.type.name }}</td>
                <td></td>
                <td>{{ level2.treeId }}</td>
                <td>{{ level2.name }}</td>
            </tr>
            {% for level3 in level2.children %}
            <tr>
                <td></td>
                <td></td>
                <td></td>
                <td>{{ level3.type.name }}</td>
                <td>{{ level3.treeId }}</td>
                <td>{{ level3.name }}</td>
                {% for level4 in level3.children %}
            <tr>
                <td></td>
                <td></td>
                <td></td>
                <td>{{ level4.type.name }}</td>
                <td>{{ level4.treeId }}</td>
                <td>{{ level4.name }}</td>

                {% endfor %}
                {% endfor %}
                {% endfor %}

                {% endfor %}
                {% endfor %}

            </tbody>
        </table>
    {% endfor %}




{% endblock %}
