summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templates
diff options
context:
space:
mode:
Diffstat (limited to 'hyperkitty/templates')
-rw-r--r--hyperkitty/templates/recent_activities.html25
-rw-r--r--hyperkitty/templates/threads/summary_thread.html17
2 files changed, 16 insertions, 26 deletions
diff --git a/hyperkitty/templates/recent_activities.html b/hyperkitty/templates/recent_activities.html
index 3a475e4..64d3db8 100644
--- a/hyperkitty/templates/recent_activities.html
+++ b/hyperkitty/templates/recent_activities.html
@@ -119,20 +119,17 @@
<div class="span6">
- {% if threads_per_category %}
- <section id="discussion-by-topic" class="widget">
- <h3>Discussion by topic the last 30 days</h3>
- {% for category, thread in threads_per_category.items %}
- <div>
- <h3 class="category type_{{category}}"> {{category}} </h3>
- <ul class="category_entry">
- {% for email in thread %}
- <li>
- {{email.title}}
- </li>
- {% endfor %}
- </ul>
- </div>
+ {% if threads_by_category %}
+ <section id="discussion-by-category" class="widget">
+ <h3>Discussion by category</h3>
+ {% for category, threads in threads_by_category.items %}
+ <h4 class="label{% if forloop.first %} first{% endif %}"
+ style="background-color:{{category.color}}"
+ >{{ category.name|upper }}
+ </h4>
+ {% for thread in threads %}
+ {% include "threads/summary_thread.html" %}
+ {% endfor %}
{% endfor %}
</section>
{% endif %}
diff --git a/hyperkitty/templates/threads/summary_thread.html b/hyperkitty/templates/threads/summary_thread.html
index 87a5433..82c9398 100644
--- a/hyperkitty/templates/threads/summary_thread.html
+++ b/hyperkitty/templates/threads/summary_thread.html
@@ -3,23 +3,16 @@
{% load storm %}
<div class="thread">
- <span class="thread-id">#{{counter}}</span>
+ {% if counter %}<span class="thread-id">#{{counter}}</span>{% endif %}
<span class="thread-title"><a name="{{thread.thread_id}}"
href="{% url 'thread' threadid=thread.thread_id mlist_fqdn=mlist.name %}"
>{{ thread.subject|strip_subject:mlist }}</a></span>
- <div class="thread_stats">
+ <div class="thread-stats">
<ul class="inline-block">
- {% if thread.category_tag %}
- <li class="type type_{{thread.category_tag}}">
- <a href="{% url 'search_tag' mlist_fqdn=mlist.name tag=thread.category_tag %}"
- >{{thread.category}}</a>
- </li>
- {% endif %}
{% if thread.category %}
- <li class="type type_{{thread.category|lower}}">
- <a href="{% url 'search_tag' mlist_fqdn=mlist.name tag=thread.category|lower %}"
- >{{thread.category}}</a>
- </li>
+ <span class="label category" style="background-color:{{thread.category.color}}">
+ {{ thread.category.name|upper }}
+ </span>
{% endif %}
<li class="participant">
{{ thread.participants|length }}