Commits

Benoît Allard committed 25d734f

web: group the releases together on the list page

Comments (0)

Files changed (1)

web/templates/releases.html

 {% extends "list.html" %}
 {% set title="Releases" %}
 {% block items %}
-{% for release in releases %}
-  <li class="release">
+{% for group in releases|groupby('ref')|reverse %}
+  <li class="release">{{ group.grouper }} <ul>
+      {% for release in group.list %}
     <p>
       <a href="{{ url_for('views.release', ref=release.ref, rc=release.rc) }}">{{ release }}</a>
       (<tt>{{ release.identifier }}</tt>): 
       and
       <span class="badge {% if release.changesets %}badge-info{% else %}badge-important{% endif %}">{{ release.changesets | count }}</span> changesets.
     </p>
+    {% endfor %}</ul>
   </li>
 {% else %}
   <li> No release in DB (yet)</li>
+{% set prev = release %}
 {% endfor %}
 {% endblock %}