diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2012-12-10 12:25:38 +0100 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2012-12-10 12:25:38 +0100 |
commit | 186fe84212d4eb3f9420b90424d830fcf1b78a6f (patch) | |
tree | b72fc86a5f64a3e4fb308c1dc327f049e2c4a752 /hyperkitty/templates | |
parent | e324f9e52b2f78cdcc0dcb0046c8effe820ccf67 (diff) | |
download | hyperkitty-186fe84212d4eb3f9420b90424d830fcf1b78a6f.tar.gz hyperkitty-186fe84212d4eb3f9420b90424d830fcf1b78a6f.tar.xz hyperkitty-186fe84212d4eb3f9420b90424d830fcf1b78a6f.zip |
Factor the thread summaries form out in a separate file
Diffstat (limited to 'hyperkitty/templates')
-rw-r--r-- | hyperkitty/templates/recent_activities.html | 72 | ||||
-rw-r--r-- | hyperkitty/templates/threads/summary_thread.html | 38 |
2 files changed, 40 insertions, 70 deletions
diff --git a/hyperkitty/templates/recent_activities.html b/hyperkitty/templates/recent_activities.html index 089ca1f..c982182 100644 --- a/hyperkitty/templates/recent_activities.html +++ b/hyperkitty/templates/recent_activities.html @@ -77,82 +77,14 @@ <section id="most_active"> <h2>Recently active discussions</h2> {% for thread in most_active_threads %} - <!-- Start thread --> - <div class="thread"> - <span class="thread_id">#{{forloop.counter}}</span> - <span class="thread_title"><a name="{{thread.thread_id}}" - href="{% url thread threadid=thread.thread_id, mlist_fqdn=list_address %}" - >{{ thread.subject|strip_subject:mlist }}</a></span> - <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=list_address, 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=list_address, tag=thread.category|lower %}" - >{{thread.category}}</a> - </li> - {% endif %} - {% if use_mockups %} - <li class="likestatus neutral"> - +0/-0 - </li> - {% endif %} - <li class="participant"> - {{ thread.participants|length }} - </li> - <li class="discussion"> - {{ thread.length }} - </li> - </ul> - </div> - </div> - <!-- End thread --> + {% include "threads/summary_thread.html" with counter=forloop.counter %} {% endfor %} </section> <section id="top_discussion"> <h2>Top discussions the last 30 days</h2> {% for thread in top_threads %} - <!-- Start thread --> - <div class="thread"> - <span class="thread_id">#{{forloop.counter}}</span> - <span class="thread_title"> <a name="{{thread.thread_id}}" - href="{% url thread threadid=thread.thread_id, mlist_fqdn=list_address %}" - >{{ thread.subject|strip_subject:mlist }}</a> </span> - <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=list_address, 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=list_address, tag=thread.category|lower %}" - >{{ thread.category }}</a> - </li> - {% endif %} - {% if use_mockups %} - <li class="likestatus neutral"> - +0/-0 - </li> - {% endif %} - <li class="participant"> - {{ thread.participants|length }} - </li> - <li class="discussion"> - {{ thread.length }} - </li> - </ul> - </div> - </div> - <!-- End thread --> + {% include "threads/summary_thread.html" with counter=forloop.counter %} {% endfor %} </section> diff --git a/hyperkitty/templates/threads/summary_thread.html b/hyperkitty/templates/threads/summary_thread.html new file mode 100644 index 0000000..16b6804 --- /dev/null +++ b/hyperkitty/templates/threads/summary_thread.html @@ -0,0 +1,38 @@ +{% load hk_generic %} +{% load storm %} + + <div class="thread"> + <span class="thread_id">#{{counter}}</span> + <span class="thread_title"><a name="{{thread.thread_id}}" + href="{% url thread threadid=thread.thread_id, mlist_fqdn=list_address %}" + >{{ thread.subject|strip_subject:mlist }}</a></span> + <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=list_address, 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=list_address, tag=thread.category|lower %}" + >{{thread.category}}</a> + </li> + {% endif %} + {% if use_mockups %} + <li class="likestatus neutral"> + +0/-0 + </li> + {% endif %} + <li class="participant"> + {{ thread.participants|length }} + </li> + <li class="discussion"> + {{ thread.length }} + </li> + </ul> + </div> + </div> + +{# vim: set noet: #} |