{% load i18n template_tools %}
{% for training in training_list %}
    {% if not excluded_ids or training.id not in excluded_ids %}
        <tr class="training_item_{{ training.id }}">
            <td>
                {% include 'trainings/training_actions.html' %}
            </td>
            <td>
                <h4 style="margin:0">
                    <span class="label label-default">
                        <i class="fa fa-{% nospaces %}
                            {% if training.version_state == training.VERSION_STATES.DRAFT %}pencil{% endif %}
                            {% if training.version_state == training.VERSION_STATES.PUBLISHED %}paper-plane{% endif %}
                            {% if training.version_state == training.VERSION_STATES.ARCHIVED %}archive{% endif %}
                        {% endnospaces %}"></i>
                        {{ training.get_version_state_display }}
                    </span>
                </h4>
            </td>
            <td>
                <a href="{{ training.get_edit_url }}">
                    <strong>{{ training.name }}</strong>
                </a>
                {% if training.notice %}
                    <aside>{{ training.notice }}</aside>
                {% endif %}
            </td>
            <td>
                {{ training.business_unit.name }}
            </td>
            <td>{{ training.created_at }}</td>
            {% if user_can_have_survey %}
                <td>
                    <a class="btn btn-default" href="{{ training.get_survey_url }}">
                        <i class="fa fa-list-ul"></i>
                    </a>
                </td>
            {% endif %}
        </tr>
    {% endif %}
{% endfor %}
