{% load seahub_tags avatar_tags i18n %}

{% for e_group in event_groups %}
<ol class="event-group-bd">
    {% for e in e_group.events %}
    <li class="event-item" data-url="{{ e.link }}">
        {% avatar e.author 36 %}
        <div class="txt">
            {% if e.etype == "repo-update" %}
            <p class="w100 ovhd">
            <span class="updated-repo fright">{{ e.repo.name }}</span>
            <span class="cmt-desc"{% if e.commit.more_files %} data-more="true"{% endif %}>{{ e.desc|translate_commit_desc|safe }}</span>
            </p>
            {% endif %}

            {% if e.etype == "repo-create" %}
            <p>{% trans "Created library" %} <span class="repo-name">{{ e.repo_name }}</span></p>
            {% endif %}

            {% if e.etype == "repo-delete" %}
            <p>{% blocktrans with library_name=e.repo_name %}Deleted library {{ library_name }}{% endblocktrans %}</p>
            {% endif %}

            <p><span class="author">{{ e.author|email2nickname }}</span> <span class="time">{{ e.time|translate_seahub_time }}</span></p>
        </div>
    </li>
    {% endfor %}
</ol>
{% endfor %}
