{% import 'InnovaPathBundle::Player/components/macros.html.twig' as macros %}

<ul>
    {# Display all step chain to current selected step #}
    {% set parents = currentStep.getParents() %}
    {% for parent in parents %}
        {{ macros.dropdownBreadcrumb(workspace, path, parent, "") }}
    {% endfor %}

    {# Display current step and siblings #}
    {{ macros.dropdownBreadcrumb(workspace, path, currentStep, "") }}

    {# Display children #}
    {% if currentStep.children is not empty and ghost is empty %}
        <li class="dropdown">
            <a class="dropdown-label btn btn-default children" data-toggle="dropdown" href="#">
                {{ 'next_step' | trans({}, 'path_player') }}
                <b class="caret"></b>
            </a>
            <ul class="dropdown-menu">
            {% for child in currentStep.children %}
                {{ macros.breadcrumbItem(workspace, path, child) }}
            {% endfor %}
            </ul>
        </li>
    {% endif %}

    {# Display previous path #}
    {% if ghost is not empty %}
        {% for ghostItem in ghost %}
            {{ macros.dropdownBreadcrumb(workspace, path, ghostItem, "ghost") }}
        {% endfor %}
    {% endif %}
</ul>