{% load staticfiles %}
{% load i18n %}

{% if obj.logged_actions.exists %}
<div class="panel panel-default">
    <div class="panel-heading"><legend>
        {% trans "History" %}
    </legend></div>

    <ul class="list-group">
        {% for log in obj.logged_actions %}
            <li class="list-group-item logentry">
                <p class="meta">
                    <span class="fa fa-clock-o"></span> {{ log.timestamp|date:"Y-m-d H:i" }}
                    {% if log.person %}
                        {% if log.is_orga_action %}
                            <br><span class="fa fa-check-circle fa-fw"
                                    data-toggle="tooltip"
                                    title="{% trans "This change was performed by a member of the event orga." %}">
                            </span>
                        {% else %}
                            <br><span class="fa fa-user fa-fw"></span>
                        {% endif %}
                        {% if log.is_orga_action and hide_orga %}
                            {% trans "An orga member" %}
                        {% else %}
                            {% if log.person.name %}
                                {{ log.person.name }}
                            {% else %}
                                {{ log.person.nick }}
                            {% endif %}
                        {% endif %}
                    {% endif %}
                </p>

                <p>
                    {{ log.display }}
                </p>
            </li>
        {% endfor %}
    </ul>
</div>
{% endif %}
