diff --git a/pagure/lib/git.py b/pagure/lib/git.py index c1a90d4..99c0e11 100644 --- a/pagure/lib/git.py +++ b/pagure/lib/git.py @@ -1258,9 +1258,9 @@ def get_git_tags_objects(project): for tag in tags: # If the object is a tag, get his associated commit time if isinstance(tag[0], pygit2.Tag): - tags_sort[tag[0].get_object().commit_time] = [tag[0]] + tags_sort[tag[0].get_object().commit_time] = [tag[0].get_object().commit_time, tag[0]] elif isinstance(tag[0], pygit2.Commit): - tags_sort[tag[0].commit_time] = tag + tags_sort[tag[0].commit_time] = [tag[0].commit_time, tag[0], tag[1]] # If object is neither a tag or commit return an unsorted list else: return tags @@ -1268,5 +1268,4 @@ def get_git_tags_objects(project): for tag in sorted(tags_sort, reverse=True): sorted_tags.append(tags_sort[tag]) - print sorted_tags return sorted_tags diff --git a/pagure/templates/releases.html b/pagure/templates/releases.html index 38ed010..ed89881 100644 --- a/pagure/templates/releases.html +++ b/pagure/templates/releases.html @@ -34,15 +34,22 @@
{% for tag in tags %} - {% if tag|length == 1 %} - {% if tag[0].message %} - {{tag[0].name}} -- {{ tag[0].message.split('\n')[0] }} + identifier=tag[1].oid) }}"> +
{{tag[0] | humanize }} {{ tag[1].oid | short }}
+ {% if tag|length == 2 %} + {% if tag[1].message %} + {{tag[1].name}} + {{ tag[1].message.split('\n')[0] }} + {% set detailtext = tag[1].message.partition('\n')[2] %} + {% if detailtext != "" %} +
+ {{ detailtext }} +
+ {% endif %} {% endif %} {% else %} - {{tag[1]}} + {{tag[2]}} {% endif %} - {{ tag[0].oid | short }}
{% endfor %}