diff options
| author | Aurélien Bompard <aurelien@bompard.org> | 2013-02-07 14:52:18 +0100 |
|---|---|---|
| committer | Aurélien Bompard <aurelien@bompard.org> | 2013-02-07 15:00:29 +0100 |
| commit | aae9a5a1b6c75095817c0914ef7b92e63903fc2e (patch) | |
| tree | 6173bf6f1f64f1296dabf792e63679e9e955b53f /hyperkitty/templates/threads | |
| parent | 76e48cc49fc7c73ba9642129059c2e51234c3fe6 (diff) | |
| download | hyperkitty-aae9a5a1b6c75095817c0914ef7b92e63903fc2e.tar.gz hyperkitty-aae9a5a1b6c75095817c0914ef7b92e63903fc2e.tar.xz hyperkitty-aae9a5a1b6c75095817c0914ef7b92e63903fc2e.zip | |
Fix the tags search view (#35)
And factor some views/templates while I'm at it. And remove
unused/obsolete stuff in the same move.
Diffstat (limited to 'hyperkitty/templates/threads')
| -rw-r--r-- | hyperkitty/templates/threads/month_list.html | 6 | ||||
| -rw-r--r-- | hyperkitty/templates/threads/right_col.html | 4 | ||||
| -rw-r--r-- | hyperkitty/templates/threads/summary_thread.html | 6 | ||||
| -rw-r--r-- | hyperkitty/templates/threads/summary_thread_large.html | 67 | ||||
| -rw-r--r-- | hyperkitty/templates/threads/tags.html | 2 |
5 files changed, 76 insertions, 9 deletions
diff --git a/hyperkitty/templates/threads/month_list.html b/hyperkitty/templates/threads/month_list.html index 75b72d4..f7178af 100644 --- a/hyperkitty/templates/threads/month_list.html +++ b/hyperkitty/templates/threads/month_list.html @@ -1,12 +1,12 @@ {% load hk_generic %} <div id="months-list" class="span2"> - {% for year, months in archives_length|sort %} + {% for year, months in months_list|sort %} <h3>{{ year }}</h3> <ul> {% for ar_month in months %} - <li class="{% if year == month.year and ar_month == month.month %}current{% endif %}"> - <a href="{% url archives_with_month year=year, mlist_fqdn=list_address, month=ar_month %}" + <li class="{% if month and year == month.year and ar_month == month.month %}current{% endif %}"> + <a href="{% url archives_with_month year=year, mlist_fqdn=mlist.name, month=ar_month %}" >{{ ar_month|monthtodate:year|date:"F" }}</a> </li> {% endfor %} diff --git a/hyperkitty/templates/threads/right_col.html b/hyperkitty/templates/threads/right_col.html index 355663d..15a5fec 100644 --- a/hyperkitty/templates/threads/right_col.html +++ b/hyperkitty/templates/threads/right_col.html @@ -23,7 +23,7 @@ </div> </div> <form id="fav_form" name="favorite" method="post" class="favorite" - action="{% url favorite mlist_fqdn=list_address, threadid=threadid %}"> + action="{% url favorite mlist_fqdn=mlist.name, threadid=threadid %}"> {% csrf_token %} <input type="hidden" name="action" value="{{ fav_action }}" /> <p> @@ -37,7 +37,7 @@ </div> <div id="add_tag"> <form id="add_tag_form" name="addtag" method="post" - action="{% url add_tag mlist_fqdn=list_address, threadid=threadid %}"> + action="{% url add_tag mlist_fqdn=mlist.name, threadid=threadid %}"> {% csrf_token %} {{ addtag_form.as_p }} </form> diff --git a/hyperkitty/templates/threads/summary_thread.html b/hyperkitty/templates/threads/summary_thread.html index 16b6804..578b051 100644 --- a/hyperkitty/templates/threads/summary_thread.html +++ b/hyperkitty/templates/threads/summary_thread.html @@ -4,19 +4,19 @@ <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 %}" + href="{% url thread threadid=thread.thread_id, mlist_fqdn=mlist.name %}" >{{ 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 %}" + <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=list_address, tag=thread.category|lower %}" + <a href="{% url search_tag mlist_fqdn=mlist.name, tag=thread.category|lower %}" >{{thread.category}}</a> </li> {% endif %} diff --git a/hyperkitty/templates/threads/summary_thread_large.html b/hyperkitty/templates/threads/summary_thread_large.html new file mode 100644 index 0000000..43e7d10 --- /dev/null +++ b/hyperkitty/templates/threads/summary_thread_large.html @@ -0,0 +1,67 @@ +{% load gravatar %} +{% load hk_generic %} +{% load storm %} + + <div class="thread"> + <div class="{% if thread.favorite %}saved{% else %}notsaved{% endif %}"> + <span class="thread_title"><a name="{{thread.thread_id}}" + href="{% url thread threadid=thread.thread_id, mlist_fqdn=mlist.name %}" + >{{ thread.starting_email.subject|strip_subject:mlist }}</a></span> + <span class="thread_date">{{thread.date_active|timesince }}</span> + </div> + <div class="thread_content"> + {% if thread.category_tag %} + <div class="inline-block type type_{{thread.category_tag}}"> + <a href="{% url search_tag mlist_fqdn=mlist.name, tag=thread.category_tag %}" + >{{thread.category}}</a> + </div> + {% endif %} + {% if thread.category %} + <div class="inline-block type type_{{thread.category|lower}}"> + <a href="{% url search_tag mlist_fqdn=mlist.name, tag=thread.category|lower %}" + >{{thread.category}}</a> + </div> + {% endif %} + <div class="gravatar"> + {% if thread.starting_email.sender_email %} + {% gravatar thread.starting_email.sender_email 40 %} + <br /> + {% endif %} + {{ thread.starting_email.sender_name|escapeemail }} + </div> + <div class="thread_email"> + <span class="expander collapsed"> + {{ thread.starting_email.content|urlizetrunc:76|escapeemail }} + </span> + </div> + </div> + <div class="thread_info"> + <ul class="tags inline"> + {% if thread.tags|length %} + <li> + Tags: + </li> + {% for tag in thread.tags %} + <li> + <a href="{% url search_tag mlist_fqdn=mlist.name, tag=tag %}">{{tag}}</a> + </li> + {% endfor %} + {% endif %} + </ul> + <ul class="inline-block"> + <li class="participant"> + {{ thread.participants|length }} participants + </li> + <li class="discussion"> + {{ thread|length }} comments + </li> + </ul> + <ul class="inline-block"> + {% include "messages/like_form.html" with message_id_hash=thread.starting_email.message_id_hash object=thread %} + </ul> + <a href="{% url thread threadid=thread.thread_id, mlist_fqdn=mlist.name %}" + class="btn">Show discussion</a> + </div> + </div> + +{# vim: set noet: #} diff --git a/hyperkitty/templates/threads/tags.html b/hyperkitty/templates/threads/tags.html index ce162ed..6307d1f 100644 --- a/hyperkitty/templates/threads/tags.html +++ b/hyperkitty/templates/threads/tags.html @@ -3,7 +3,7 @@ <ul class="inline"> {% for tag in tags %} <li> - <a href="{% url search_tag mlist_fqdn=list_address, tag=tag.tag %}" >{{ tag.tag }}</a> + <a href="{% url search_tag mlist_fqdn=mlist.name, tag=tag.tag %}" >{{ tag.tag }}</a> {% if not forloop.last %} | {% endif %} </li> {% endfor %} |
