

<ul class="breadcrumb">
    <li class="breadcrumb-item" data-bs-toggle="tooltip" data-placement="top"  title="{% trans %}breadcrumb_home{% endtrans %}"><a href="{{ path('home') }}"><i class="fas fa-home"></i></a></li>
    
        

        {% if app.request.attributes.get('_controller')|extractControllerName  == 'Home' %}
            {% set notDefined = false %}
            <li class="breadcrumb-item" ><a href="{{ path('home') }}">{% trans %}breadcrumb_home{% endtrans %}</a></li>
        {% endif %}

        {% if app.request.attributes.get('_controller') == 'error_controller' %}
            <li class="breadcrumb-item" >{% trans %}breadcrumb_error{% endtrans %} {{ app.request.attributes.get('exception').statusCode }}</li>
        {% endif %}

        {% if app.request.attributes.get('_controller')|extractControllerName  == 'Me' %}
            {% set notDefined = false %}
            <li class="breadcrumb-item" ><a href="{{ path('me_index') }}">{% trans %}breadcrumb_me{% endtrans %}</a></li>
            {% if app.request.attributes.get('_controller')|extractActionName  == 'password' %}
                <li class="breadcrumb-item"><a href="{{ path( 'me_password' ) }}">{{ 'breadcrumb_me_password'|trans }}</a></li>
            {% endif %}
        {% endif %}

        {% if app.request.attributes.get('_controller')|extractControllerName  == 'Document' %}
            {% set notDefined = false %}
            {% if app.request.attributes.get("Document") %}
                <li class="breadcrumb-item"><a href="{{ path( 'document_list', {type: app.request.attributes.get('Document').classShort} ) }}">{{ ('breadcrumb_' ~ app.request.attributes.get("Document").classShort ~ 's')|trans }}</a></li>
                {% if app.request.attributes.get("Document").Directory is defined %}
                    <li class="breadcrumb-item"><a href="{{ path( 'directory_view', {id: app.request.attributes.get('Document').Directory.id } ) }}">{{ app.request.attributes.get("Document").Directory.fullName }}</a></li>
                {% endif %}
                <li class="breadcrumb-item"><a href="{{ path( 'document_view', {id:app.request.attributes.get('Document').id } ) }}">"{{ app.request.attributes.get("Document").title }}" (# {{ app.request.attributes.get("Document").id }})</a></li>
            {% else %}
                <li class="breadcrumb-item"><a href="{{ path( 'document_list', {type: app.request.attributes.get('type')} ) }}">{{ ('breadcrumb_' ~ app.request.attributes.get('type')|capitalize ~ 's')|trans }}</a></li>
            {% endif %}

            <li class="breadcrumb-item"><a href="{{ path( app.request.attributes.get('_route'), app.request.attributes.get('_route_params') ) }}">{{ ('breadcrumb_' ~ app.request.attributes.get('_controller')|extractActionName)|trans }}</a></li>

        {% endif %}

        {% if app.request.attributes.get('_controller')|extractControllerName  == 'User' %}
            {% set notDefined = false %}
            <li class="breadcrumb-item"><a href="{{ path( 'user_list' ) }}">{{ ('breadcrumb_' ~ app.request.attributes.get('_controller')|extractControllerName ~ 's')|trans }}</a></li>
            {% if app.request.attributes.get("User") %}
                <li class="breadcrumb-item"><a href="{{ path( 'user_view', {id: app.request.attributes.get('User').id}) }}">{{ app.request.attributes.get("User").fullName }}</a></li>
            {% endif %}
        {% endif %}

        {% if app.request.attributes.get('_controller')|extractControllerName  == 'Directory' %}
            {% set notDefined = false %}
            <li class="breadcrumb-item"><a href="{{ path( 'directory_list' ) }}">{{ ('breadcrumb_' ~ app.request.attributes.get('_controller')|extractControllerName ~ 's')|trans }}</a></li>
            
            {% if app.request.attributes.get('_route') == 'directory_list_dead' %}
                <li class="breadcrumb-item"><a href="{{ path( 'directory_list_dead' ) }}">{{ ('breadcrumb_directory_dead')|trans }}</a></li>
            {% endif %}
            {% if app.request.attributes.get('_route') == 'directory_list_wanted' %}
                <li class="breadcrumb-item"><a href="{{ path( 'directory_list_wanted' ) }}">{{ ('breadcrumb_directory_wanted')|trans }}</a></li>
            {% endif %}
            {% if app.request.attributes.get("Directory") %}
                <li class="breadcrumb-item"><a href="{{ path( 'directory_view', {id: app.request.attributes.get('Directory').id} ) }}">{{ app.request.attributes.get("Directory").fullName }} (# {{ app.request.attributes.get("Directory").id }})</a></li>
            {% endif %}
            <li class="breadcrumb-item"><a href="{{ path( app.request.attributes.get('_route'), app.request.attributes.get('_route_params') ) }}">{{ ('breadcrumb_' ~ app.request.attributes.get('_controller')|extractActionName)|trans }}</a></li>
        {% endif %}

        {% if app.request.attributes.get('_controller')|extractControllerName  == 'Group' %}
            {% set notDefined = false %}
            <li class="breadcrumb-item"><a href="{{ path( 'group_index' ) }}">{{ ('breadcrumb_' ~ app.request.attributes.get('_controller')|extractControllerName ~ 's')|trans }}</a></li>
            {% if app.request.attributes.get('_controller')|extractActionName  == 'employee' %}
                <li class="breadcrumb-item"><a href="{{ path( 'group_employee', {id: app.request.attributes.get('Employee').id} ) }}">{{ 'breadcrumb_Employee'|trans }}: {{ app.request.attributes.get("Employee").fullName }}</a></li>
            {% endif %}
            
        {% endif %}


        {% if app.request.attributes.get('_controller')|extractControllerName  == 'Folder' %}
            {% set notDefined = false %}
            <li class="breadcrumb-item" ><a href="{{ path('home') }}">{% trans %}breadcrumb_Folders{% endtrans %}</a></li>

            {% if app.request.attributes.get("Folder") %}
                <li class="breadcrumb-item"><a href="{{ path( 'document_view', {id: app.request.attributes.get('Folder').id} ) }}">"{{ app.request.attributes.get("Folder").title }}" (# {{ app.request.attributes.get("Folder").id }})</a></li>
            {% endif %}


            {% if app.request.attributes.get('_controller')|extractActionName in ['directory'] %}
                <li class="breadcrumb-item"><a href="{{ path( 'admin_group_list' ) }}">{{ ('breadcrumb_folder_add_directory')|trans }}</a></li>            
            {% endif %}
            {% if app.request.attributes.get('_controller')|extractActionName in ['document'] %}
                <li class="breadcrumb-item"><a href="{{ path( 'admin_group_list' ) }}">{{ ('breadcrumb_folder_add_document')|trans }}</a></li>            
            {% endif %}  
        {% endif %}


        {% if app.request.attributes.get('_controller')|extractControllerName  == 'Admin' %}
            {% set notDefined = false %}
            <li class="breadcrumb-item"><a href="{{ path( 'admin_index' ) }}">{{ ('breadcrumb_admin_dashboard')|trans }}</a></li>
            
            
            {% if app.request.attributes.get("Group") %}
                <li class="breadcrumb-item"><a href="{{ path( 'admin_group_list' ) }}">{{ ('breadcrumb_admin_groups')|trans }}</a></li>
                <li class="breadcrumb-item"><a href="{{ path( 'admin_group_view', {id: app.request.attributes.get('Group').id} ) }}">"{{ app.request.attributes.get("Group").name }}" (# {{ app.request.attributes.get("Group").id }})</a></li>
            {% endif %}

            {% if app.request.attributes.get('_controller')|extractActionName in ['group','groupAdd'] %}
                <li class="breadcrumb-item"><a href="{{ path( 'admin_group_list' ) }}">{{ ('breadcrumb_admin_groups')|trans }}</a></li>            
            {% endif %}       

            {% if app.request.attributes.get('_controller')|extractActionName in ['groupEdit'] %}            
                    <li class="breadcrumb-item"><a href="{{ path( 'admin_group_edit', {id: app.request.attributes.get('Group').id} ) }}">{{ 'breadcrumb_edit'|trans }}</a></li>
            {% endif %}

            {% if app.request.attributes.get('_controller')|extractActionName in ['groupAdd'] %}
                <li class="breadcrumb-item"><a href="{{ path( 'admin_group_add') }}">{{ 'breadcrumb_create'|trans }}</a></li>
            {% endif %}

            {% if app.request.attributes.get('_controller')|extractActionName in ['groupDocuments'] %}            
                    <li class="breadcrumb-item"><a href="{{ path( 'admin_group_documents', {id: app.request.attributes.get('Group').id} ) }}">{{ 'breadcrumb_documents'|trans }}</a></li>
            {% endif %}

            {% if app.request.attributes.get('_controller')|extractActionName in ['groupRankView', 'groupRankEdit'] %}
                <li class="breadcrumb-item"><a href="{{ path( 'admin_group_list' ) }}">{{ ('breadcrumb_admin_groups')|trans }}</a></li>
                {% if app.request.attributes.get("Rank") %}
                    <li class="breadcrumb-item"><a href="{{ path( 'admin_group_view', {id: app.request.attributes.get('Rank').mainGroup.id} ) }}">"{{ app.request.attributes.get('Rank').mainGroup.name }}" (# {{ app.request.attributes.get('Rank').mainGroup.id }})</a></li>
                    <li class="breadcrumb-item"><a href="{{ path( 'admin_group_rank_view', {id: app.request.attributes.get('Rank').id } ) }}">{{ 'breadcrumb_rank'|trans }}: {{ app.request.attributes.get('Rank').name }}</a></li>
                {% endif %}
            {% endif %}

            {% if app.request.attributes.get('_controller')|extractActionName in ['groupRankEdit'] %}            
                    <li class="breadcrumb-item"><a href="{{ path( 'admin_group_rank_edit', {id: app.request.attributes.get('Rank').mainGroup.id} ) }}">{{ 'breadcrumb_edit'|trans }}</a></li>
            {% endif %}

            {% if app.request.attributes.get('_controller')|extractActionName in ['groupRankAdd'] %}            
                    <li class="breadcrumb-item"><a href="{{ path( 'admin_group_rank_add', {id: app.request.attributes.get('Group').id} ) }}">{{ 'breadcrumb_rank'|trans }}: {{ 'breadcrumb_create'|trans }}</a></li>
            {% endif %}

            {% if app.request.attributes.get('_controller')|extractActionName in ['groupSubGroupView', 'groupSubGroupEdit'] %}
                <li class="breadcrumb-item"><a href="{{ path( 'admin_group_list' ) }}">{{ ('breadcrumb_admin_groups')|trans }}</a></li>
                {% if app.request.attributes.get("SubGroup") %}
                    <li class="breadcrumb-item"><a href="{{ path( 'admin_group_view', {id: app.request.attributes.get('SubGroup').mainGroup.id} ) }}">"{{ app.request.attributes.get('SubGroup').mainGroup.name }}" (# {{ app.request.attributes.get('SubGroup').mainGroup.id }})</a></li>
                    <li class="breadcrumb-item"><a href="{{ path( 'admin_group_subgroup_view', {id: app.request.attributes.get('SubGroup').id } ) }}">{{ 'breadcrumb_subgroup'|trans }}: {{ app.request.attributes.get('SubGroup').name }}</a></li>
                {% endif %}
            {% endif %}

            {% if app.request.attributes.get('_controller')|extractActionName in ['groupSubGroupEdit'] %}            
                    <li class="breadcrumb-item"><a href="{{ path( 'admin_group_subgroup_edit', {id: app.request.attributes.get('SubGroup').mainGroup.id} ) }}">{{ 'breadcrumb_edit'|trans }}</a></li>
            {% endif %}

            {% if app.request.attributes.get('_controller')|extractActionName in ['groupSubGroupAdd'] %}            
                    <li class="breadcrumb-item"><a href="{{ path( 'admin_group_subgroup_add', {id: app.request.attributes.get('Group').id} ) }}">{{ 'breadcrumb_subgroup'|trans }}: {{ 'breadcrumb_create'|trans }}</a></li>
            {% endif %}

            {% if app.request.attributes.get('_controller')|extractActionName  == 'user' %}
                <li class="breadcrumb-item"><a href="{{ path( 'admin_group_list' ) }}">{{ ('breadcrumb_admin_users')|trans }}</a></li>
            {% endif %}

            {% if app.request.attributes.get("User") %}
                <li class="breadcrumb-item"><a href="{{ path( 'admin_user_list' ) }}">{{ ('breadcrumb_admin_users')|trans }}</a></li>
                <li class="breadcrumb-item"><a href="{{ path( 'admin_user_view', {id: app.request.attributes.get('User').id} ) }}">{{ app.request.attributes.get("User").fullName }} (# {{ app.request.attributes.get("User").id }})</a></li>
            {% endif %}

            {% if app.request.attributes.get('_controller')|extractActionName  in ['logs', 'logsView'] %}
                <li class="breadcrumb-item"><a href="{{ path( 'admin_logs' ) }}">{{ ('breadcrumb_admin_logs')|trans }}</a></li>
                {% if app.request.attributes.get("filename") %}            
                    <li class="breadcrumb-item"><a href="{{ path( 'admin_logs_view', {filename: app.request.attributes.get('filename') } ) }}">{{ app.request.attributes.get("filename")}}</a></li>
                {% endif %}
            {% endif %}

        {% endif %}
</ul>