<li class="ui-state-default mylist noSortable datetraining" id="training_date_{{ random() }}" style="cursor: default" value="{{ datetraining.trainingid }}">
    <input type="hidden" class="dateArgs" value="{{ datetraining.toJson() }}">
    <div class="listheader-sortable d-flex align-items-center">
        <i class="fas fa-clock"></i>
        <span class="listheader-sortable-text">{{ alltrainings[datetraining.trainingId].title }} (ID: {{ alltrainings[datetraining.trainingId].id }})</span>
        <div class="ml-auto">
            <button class="btn btn-outline-secondary edit-training-date" title="Training bearbeiten" type="button" data-trainingdatedepid="{{ datetraining.id }}" {% if lockedit %}disabled style="cursor: default;"{% endif %}>
                <i class="fas fa-edit"></i>
            </button>
            <button class="btn btn-outline-secondary delete-training-date" title="Training entfernen" data-trainingdateid="{{ datetraining.id }}" data-trainingname="{{ alltrainings[datetraining.trainingId].title }}" type="button">
                <i class="fas fa-trash-alt"></i>
            </button>
        </div>
    </div>
    <span class="text-muted">
        <small>Zeitlich zugewiesen</small>
    </span>
    <div class="w-100">
        <ul class="list-group list-group-flush pl-0 mt-3">
            <li class="list-group-item noSortable">
                {% if datetraining.assignDatetime|date("H:i") == "00:00" %}
                    <b>Zeitpunkt:</b> {{ datetraining.assignDatetime|date("d.m.Y") }}
                {% else %}
                    <b>Zeitpunkt:</b> {{ datetraining.assignDatetime|date("d.m.Y H:i") }} Uhr
                {% endif %}
            </li>
            <li class="list-group-item noSortable">
                <b>Lektionen:</b> {{ alltrainings[datetraining.trainingId].lektioncount() }}
            </li>
            <li class="list-group-item noSortable">
                <b>Modus:</b> 
                {% if datetraining.trainingMode == 0 %}
                Individuell
                {% elseif datetraining.trainingMode == 1 %}
                Sequentiell
                {% elseif datetraining.trainingMode == 2 %}
                Begleitet
                {% endif %}
            </li>
            <li class="list-group-item noSortable">
                <b>E-Coaching:</b> 
                {% if datetraining.getEcoachingEnable() == "0" or (datetraining.lektionSettingsIsArray() and datetraining.getLektionSettingsJsonDecoded()|first == 1) %}
                    Deaktiviert
                {% elseif datetraining.trainingMode == 2 and datetraining.lektionSettingsIsArray() and datetraining.lektionSettingsIsDifferent() %}
                    <i>erweitert</i>
                    <ul class="w-100 list-group">
                        {% for lektion in alltrainings[datetraining.trainingId].lektionsliste %}
                            <li class="list-group-item py-1 px-2 noSortable">
                                <b>{{ lektion.title }}:</b>
                                {% if datetraining.getLektionSettingsJsonDecoded()[lektion.id] == 2 %}
                                    Aktiviert
                                {% else %}
                                    Deaktiviert
                                {% endif %}
                            </li>
                        {% endfor %}
                    </ul>
                {% else %}
                    Aktiviert
                {% endif %}
            </li>
            <li class="list-group-item noSortable">
                <b>Weiterleitung nach Login:</b> 
                {% if datetraining.getRedirect() %}
                    Ja
                {% else %}
                    Nein
                {% endif %}
            </li>
        </ul>
    </div>

</li>