Commit 1a84c70b authored by berumuron's avatar berumuron
Browse files

List only the 3 last projects events

parent 8cf7421c
......@@ -50,10 +50,12 @@
</div>
<ul class="events">
{% for event in project.events(with_private=g.current_user) %}
{% set events = project.events(with_private=g.current_user)|sort(attribute='date', reverse=True) %}
{% for event in events[:3] %}
<li class="event {{ 'event-private' if event.is_private }} {{ 'folder folder-folded' if event.description }}">
<span class="event-date">
{{ event.date.strftime('%d %b') }}
{{ event.date.strftime('%d %b %y') }}
</span>
{% if event.description %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment