summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templates
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2012-11-09 13:54:13 +0100
committerAurélien Bompard <aurelien@bompard.org>2012-11-09 13:54:13 +0100
commitb6b540c44917744098805e5f70207289a3755eac (patch)
tree87902efd48c052eadb909092e033c50cbef62783 /hyperkitty/templates
parent9433114ad50a8a1eab972e3990b9a37447e931f3 (diff)
downloadhyperkitty-b6b540c44917744098805e5f70207289a3755eac.tar.gz
hyperkitty-b6b540c44917744098805e5f70207289a3755eac.tar.xz
hyperkitty-b6b540c44917744098805e5f70207289a3755eac.zip
Use the new thread object in KittyStore
Diffstat (limited to 'hyperkitty/templates')
-rw-r--r--hyperkitty/templates/month_view.html55
-rw-r--r--hyperkitty/templates/recent_activities.html64
-rw-r--r--hyperkitty/templates/threads/right_col.html9
3 files changed, 69 insertions, 59 deletions
diff --git a/hyperkitty/templates/month_view.html b/hyperkitty/templates/month_view.html
index 97bd2e8..f3d0935 100644
--- a/hyperkitty/templates/month_view.html
+++ b/hyperkitty/templates/month_view.html
@@ -25,43 +25,46 @@
{% endif %}
</div>
- {% for email in threads %}
+ {% for thread in threads %}
<!-- New thread -->
<div class="thread">
<div class="notsaved">
- <span class="thread_title"><a name="{{email.thread_id}}"
- href="{% url thread threadid=email.thread_id, mlist_fqdn=list_address %}">{{ email.subject|strip_subject:mlist }}</a></span>
- <span class="thread_date">{{email.date|timesince }}</span>
+ <span class="thread_title"><a name="{{thread.thread_id}}"
+ href="{% url thread threadid=thread.thread_id, mlist_fqdn=list_address %}"
+ >{{ thread.starting_email.subject|strip_subject:mlist }}</a></span>
+ <span class="thread_date">{{thread.date_active|timesince }}</span>
</div>
<div class="thread_content">
- {% if email.category_tag %}
- <div class="inline-block type type_{{email.category_tag}}">
- <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category_tag %}">{{email.category}}</a>
+ {% if thread.category_tag %}
+ <div class="inline-block type type_{{thread.category_tag}}">
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=thread.category_tag %}"
+ >{{thread.category}}</a>
</div>
{% endif %}
- {% if email.category %}
- <div class="inline-block type type_{{email.category|lower}}">
- <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category|lower %}">{{email.category}}</a>
+ {% if thread.category %}
+ <div class="inline-block type type_{{thread.category|lower}}">
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=thread.category|lower %}"
+ >{{thread.category}}</a>
</div>
{% endif %}
<div class="inline-block gravatar">
- {% if email.sender_email %}
- {% gravatar_img_for_email email.sender_email 40 %}
+ {% if thread.starting_email.sender_email %}
+ {% gravatar_img_for_email thread.starting_email.sender_email 40 %}
<br />
{% endif %}
- {{email.sender_name}}
+ {{ thread.starting_email.sender_name }}
</div>
<div class="thread_email">
- <span class="expander"> {{email.content}} </span>
+ <span class="expander">{{ thread.starting_email.content }}</span>
</div>
</div>
<div class="thread_info">
<ul class="tags inline">
- {% if email.tags|length %}
+ {% if thread.tags|length %}
<li>
Tags:
</li>
- {% for tag in email.tags %}
+ {% for tag in thread.tags %}
<li>
<a href="{% url search_tag mlist_fqdn=list_address, tag=tag %}">{{tag}}</a>
</li>
@@ -70,16 +73,16 @@
</ul>
<ul class="inline-block">
<li class="participant">
- {{email.participants|length}} participants
+ {{ thread.participants|length }} participants
</li>
<li class="discussion">
- {{email.answers}} comments
+ {{ thread|length }} comments
</li>
</ul>
- {% if use_mockups %}
- <ul class="inline-block" messageid="{{email.message_id_hash}}">
- <li class="likestatus {{email.likestatus}}">
- +{{email.avglike}}/-{{email.avgdislike}}
+ {% if use_mockups %}
+ <ul class="inline-block" messageid="{{ thread.thread_id }}">
+ <li class="likestatus {{ thread.likestatus }}">
+ +{{ thread.avglike }}/-{{ thread.avgdislike }}
</li>
<li class="voteup">
<a class="youlike" href="#like">Like</a>
@@ -88,9 +91,9 @@
<a class="youdislike" href="#dislike">Dislike</a>
</li>
</ul>
- <a href="{% url thread threadid=email.thread_id, mlist_fqdn=list_address %}"
- class="btn">Show discussion</a>
- {% endif %}
+ <a href="{% url thread threadid=thread.thread_id, mlist_fqdn=list_address %}"
+ class="btn">Show discussion</a>
+ {% endif %}
</div>
</div>
<!-- End of thread -->
@@ -113,7 +116,7 @@
userCollapseText : 'View Less',
expandText : 'View More'
});
- });
+ });
</script>
{% endblock %}
diff --git a/hyperkitty/templates/recent_activities.html b/hyperkitty/templates/recent_activities.html
index 50e9057..f946bb9 100644
--- a/hyperkitty/templates/recent_activities.html
+++ b/hyperkitty/templates/recent_activities.html
@@ -81,34 +81,37 @@
</section>
<section id="most_active">
<h2>Recently active discussions</h2>
- {% for email in most_active_threads %}
+ {% for thread in most_active_threads %}
<!-- Start thread -->
<div class="thread">
<span class="thread_id">#{{forloop.counter}}</span>
- <span class="thread_title"> <a name="{{email.thread_id}}"
- href="{% url thread threadid=email.thread_id, mlist_fqdn=list_address %}">{{ email.subject|strip_subject:mlist }}</a> </span>
+ <span class="thread_title"><a name="{{thread.thread_id}}"
+ href="{% url thread threadid=thread.thread_id, mlist_fqdn=list_address %}"
+ >{{ thread.starting_email.subject|strip_subject:mlist }}</a></span>
<div class="thread_stats">
<ul class="inline-block">
- {% if email.category_tag %}
- <li class="type type_{{email.category_tag}}">
- <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category_tag %}">{{email.category}}</a>
+ {% if thread.category_tag %}
+ <li class="type type_{{thread.category_tag}}">
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=thread.category_tag %}"
+ >{{thread.category}}</a>
</li>
{% endif %}
- {% if email.category %}
- <li class="type type_{{email.category|lower}}">
- <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category|lower %}">{{email.category}}</a>
+ {% if thread.category %}
+ <li class="type type_{{thread.category|lower}}">
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=thread.category|lower %}"
+ >{{thread.category}}</a>
</li>
{% endif %}
- {% if use_mockups %}
+ {% if use_mockups %}
<li class="likestatus neutral">
+0/-0
</li>
{% endif %}
<li class="participant">
- {{email.participants|length}}
+ {{ thread.participants|length }}
</li>
<li class="discussion">
- {{email.answers}}
+ {{ thread|length }}
</li>
</ul>
</div>
@@ -119,34 +122,37 @@
<section id="top_discussion">
<h2>Top discussions the last 30 days</h2>
- {% for email in top_threads %}
+ {% for thread in top_threads %}
<!-- Start thread -->
<div class="thread">
<span class="thread_id">#{{forloop.counter}}</span>
- <span class="thread_title"> <a name="{{email.thread_id}}"
- href="{% url thread threadid=email.thread_id, mlist_fqdn=list_address %}">{{ email.subject|strip_subject:mlist }}</a> </span>
+ <span class="thread_title"> <a name="{{thread.thread_id}}"
+ href="{% url thread threadid=thread.thread_id, mlist_fqdn=list_address %}"
+ >{{ thread.starting_email.subject|strip_subject:mlist }}</a> </span>
<div class="thread_stats">
<ul class="inline-block">
- {% if email.category_tag %}
- <li class="type type_{{email.category_tag}}">
- <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category_tag %}">{{email.category}}</a>
+ {% if thread.category_tag %}
+ <li class="type type_{{thread.category_tag}}">
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=thread.category_tag %}"
+ >{{ thread.category }}</a>
</li>
{% endif %}
- {% if email.category %}
- <li class="type type_{{email.category|lower}}">
- <a href="{% url search_tag mlist_fqdn=list_address, tag=email.category|lower %}">{{email.category}}</a>
+ {% if thread.category %}
+ <li class="type type_{{thread.category|lower}}">
+ <a href="{% url search_tag mlist_fqdn=list_address, tag=thread.category|lower %}"
+ >{{ thread.category }}</a>
</li>
{% endif %}
- {% if use_mockups %}
+ {% if use_mockups %}
<li class="likestatus neutral">
+0/-0
</li>
- {% endif %}
+ {% endif %}
<li class="participant">
- {{email.participants|length}}
+ {{ thread.participants|length }}
</li>
<li class="discussion">
- {{email.answers}}
+ {{ thread|length }}
</li>
</ul>
</div>
@@ -155,7 +161,7 @@
{% endfor %}
</section>
- {% if top_author %}
+ {% if top_author %}
<section id="discussion_marker">
<h2>Prominent discussion maker</h2>
{% for author in top_author %}
@@ -181,9 +187,9 @@
<h2>Tag cloud</h2>
</section>
- {% endif %}
+ {% endif %}
- {% if threads_per_category %}
+ {% if threads_per_category %}
<section id="discussion_by_topic">
<h2>Discussion by topic the last 30 days</h2>
{% for category, thread in threads_per_category.items %}
@@ -199,7 +205,7 @@
</div>
{% endfor %}
</section>
- {% endif %}
+ {% endif %}
</section>
diff --git a/hyperkitty/templates/threads/right_col.html b/hyperkitty/templates/threads/right_col.html
index 253aa10..1b1cf76 100644
--- a/hyperkitty/templates/threads/right_col.html
+++ b/hyperkitty/templates/threads/right_col.html
@@ -1,4 +1,5 @@
{% load gravatar %}
+{% load hk_generic %}
<!-- right column -->
<section id="thread_overview_info">
@@ -47,12 +48,12 @@
</form>
</div>
<div id="participants">
- <span id="participants_title"> participants </span>({{participants|length}})
+ <span id="participants_title">participants</span> ({{participants|length}})
<ul>
- {% for key,value in participants.items %}
+ {% for name, email in participants.items|sort %}
<li>
- {% gravatar_img_for_email value.email 20%}
- {{key}}
+ {% gravatar_img_for_email email 20 %}
+ {{ name }}
</li>
{% endfor %}
</ul>