diff --git a/static/css/clif.css b/static/css/clif.css
index dadeb6a..be2516c 100644
--- a/static/css/clif.css
+++ b/static/css/clif.css
@@ -207,6 +207,13 @@ div.threads {
font-size: 0.8rem;
padding-top: .5rem;
}
+
+ div.threads div.subtitle .tag {
+ background: gray;
+ border-radius: .2rem;
+ color: white;
+ padding: .1rem .5rem;
+ }
.thread {
}
diff --git a/templates/mailing_list/emails.html b/templates/mailing_list/emails.html
index 25166b2..ac36efc 100644
--- a/templates/mailing_list/emails.html
+++ b/templates/mailing_list/emails.html
@@ -9,7 +9,14 @@
{{ thread.title }}
+ #{{ thread.id }}
Created {{ thread.datetime|ago }}
+
+ {% if 'label' in thread['tags'] %}
+ {% for label in thread['tags']['label'] %}
+ {{ label }}
+ {% endfor %}
+ {% endif %}
{% endfor %}
diff --git a/web.py b/web.py
index dfdc1f7..662f336 100644
--- a/web.py
+++ b/web.py
@@ -602,19 +602,26 @@ def threads(repository):
if obj.type != pygit2.GIT_OBJ_TREE:
continue
- threads_list.append(obj.name)
-
- threads_list.sort(reverse=True)
+ threads_list.append(obj)
for i in range(0, len(threads_list)):
- thread_date, thread_time, thread_id, thread_title = threads_list[i].split(' ', 3)
+ thread_date, thread_time, thread_id, thread_title = threads_list[i].name.split(' ', 3)
+
+ thread_tags = {}
+ try:
+ thread_tags = parse_thread_tags(threads_list[i]['tags'].data.decode('UTF-8'))
+ except:
+ pass
threads_list[i] = {
'datetime': thread_date + ' ' + thread_time,
'id': thread_id,
- 'title': thread_title
+ 'title': thread_title,
+ 'tags': thread_tags
}
+ threads_list.reverse()
+
return template('mailing_list/emails.html', threads=threads_list,
list_address=list_address,
repository=repository)