{% if not notrainings %}
    {% for training_category in trainings %}
        {% if training_category['trainings'] is not empty %}
            {% if training_category['name'] is not empty %}
                {% if show_category_name %}
                    <h4 class="mt-5 mb-3">{{ training_category['name'] }}</h4>
                {% endif %}
                {% if category_text is not empty %}
                    <p>{{ category_text|raw }}</p>
                {% endif %}
            {% endif %}
        {% endif %}
        {% for training in training_category['trainings'] %}
            {% if training.trainingEnabled() or (not training.trainingEnabled() and canSeeHiddenTrainings) %}
                {% if showalltrainings != true  %}
                    {% if (training.getFin() >0) and (training.getFin()<100) %}
                        <div class="d-flex justify-content-between mb-1"> 
                            <p class="bg-white mb-0 pe-3 lesson-name mw-100">
                                {% if not training.trainingEnabled() and canSeeHiddenTrainings %}
                                    <i class="fas fa-eye-slash" title="Training ist ausgeblendet"></i>&nbsp;
                                {% endif %}
                                {{training.title}}
                            </p>
                            <p class="bg-white mb-0 pe-3 lesson-name"><a class="text-color-black" href="{{training.getLastPage().getUrl()}}">fortsetzen<i class="fas fa-chevron-right ml-1"></i></a></p>
                        </div>
                        <div class="progress mb-4">
                            <div class="progress-bar primary-bg-color" role="progressbar" style="width: {{training.fin}}%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">{{training.fin}}%</div>
                        </div>
                    {% endif %}
                {% else %}
                    <div class="d-flex justify-content-between mb-1"> 
                        <p class="bg-white mb-0 pe-3 lesson-name mw-100">
                            {% if not training.trainingEnabled() and canSeeHiddenTrainings %}
                                <i class="fas fa-eye-slash" title="Training ist ausgeblendet"></i>&nbsp;
                            {% endif %}
                            {{training.title}}
                        </p>
                        <p class="bg-white mb-0 pe-3 lesson-name"><a class="text-color-black" {% if (training.getFin() >0) and (training.getFin()<100) %}
                            href="{{training.getLastPage().getUrl()}}">fortsetzen{% else %} href="{{training.url}}">Übersicht{% endif %}<i class="fas fa-chevron-right ml-1"></i></a></p>
                    </div>
                    <div class="progress mb-4">
                        <div class="progress-bar primary-bg-color" role="progressbar" style="width: {{training.fin}}%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100">{{training.fin}}%</div>
                    </div>
                {% endif %}
            {% endif %}
        {% endfor %}
    {% endfor %}
{% else %}
    {% include "dashboard/no-dashboard-item.html" with {'heading': defaultErrorSubject} %}
{% endif %}