Author
|
zPlus <zplus@peers.community>
2022-07-29 12:52:33
|
Committer
|
zPlus <zplus@peers.community>
2022-07-29 12:52:33
|
Commit
|
01a4203
(patch)
|
Tree
|
505508a
|
Parent(s)
|
|
Show labels in threads list.
Add labels to the list of threads in a mailing list.
commits diff:
d006c2a..01a4203
3 files changed,
26 insertions,
5 deletions
—
download
Diffstat
Diff options
+7/-0
M static/css/clif.css
+7/-0
M templates/mailing_list/emails.html
9
|
9
|
|
<a href="{{ url('thread', repository=repository[:-10], thread_id=thread.id) }}">{{ thread.title }}</a>
|
10
|
10
|
|
</div>
|
11
|
11
|
|
<div class="subtitle">
|
|
12
|
+ |
#{{ thread.id }}
|
12
|
13
|
|
Created {{ thread.datetime|ago }}
|
|
14
|
+ |
|
|
15
|
+ |
{% if 'label' in thread['tags'] %}
|
|
16
|
+ |
{% for label in thread['tags']['label'] %}
|
|
17
|
+ |
<span class="tag">{{ label }}</span>
|
|
18
|
+ |
{% endfor %}
|
|
19
|
+ |
{% endif %}
|
13
|
20
|
|
</div>
|
14
|
21
|
|
</div>
|
15
|
22
|
|
{% endfor %}
|
+12/-5
M web.py
602
|
602
|
|
if obj.type != pygit2.GIT_OBJ_TREE:
|
603
|
603
|
|
continue
|
604
|
604
|
|
|
605
|
|
- |
threads_list.append(obj.name)
|
606
|
|
- |
|
607
|
|
- |
threads_list.sort(reverse=True)
|
|
605
|
+ |
threads_list.append(obj)
|
608
|
606
|
|
|
609
|
607
|
|
for i in range(0, len(threads_list)):
|
610
|
|
- |
thread_date, thread_time, thread_id, thread_title = threads_list[i].split(' ', 3)
|
|
608
|
+ |
thread_date, thread_time, thread_id, thread_title = threads_list[i].name.split(' ', 3)
|
|
609
|
+ |
|
|
610
|
+ |
thread_tags = {}
|
|
611
|
+ |
try:
|
|
612
|
+ |
thread_tags = parse_thread_tags(threads_list[i]['tags'].data.decode('UTF-8'))
|
|
613
|
+ |
except:
|
|
614
|
+ |
pass
|
611
|
615
|
|
|
612
|
616
|
|
threads_list[i] = {
|
613
|
617
|
|
'datetime': thread_date + ' ' + thread_time,
|
614
|
618
|
|
'id': thread_id,
|
615
|
|
- |
'title': thread_title
|
|
619
|
+ |
'title': thread_title,
|
|
620
|
+ |
'tags': thread_tags
|
616
|
621
|
|
}
|
617
|
622
|
|
|
|
623
|
+ |
threads_list.reverse()
|
|
624
|
+ |
|
618
|
625
|
|
return template('mailing_list/emails.html', threads=threads_list,
|
619
|
626
|
|
list_address=list_address,
|
620
|
627
|
|
repository=repository)
|