From 0de68afc823627fa20bfad7cc7c04d24a2017865 Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Wed, 13 Feb 2013 19:04:27 +0100 Subject: Fix the tags display --- hyperkitty/static/css/hyperkitty.css | 33 ++++++++++++++-------- .../templates/threads/summary_thread_large.html | 32 ++++++++------------- hyperkitty/templates/threads/tags.html | 2 +- hyperkitty/views/list.py | 7 +++++ hyperkitty/views/thread.py | 2 +- 5 files changed, 42 insertions(+), 34 deletions(-) (limited to 'hyperkitty') diff --git a/hyperkitty/static/css/hyperkitty.css b/hyperkitty/static/css/hyperkitty.css index bc57a32..9d5b724 100644 --- a/hyperkitty/static/css/hyperkitty.css +++ b/hyperkitty/static/css/hyperkitty.css @@ -150,7 +150,6 @@ table.user-data { /* Add icons to some text */ .participant, .discussion, .saved, .notsaved { padding-left: 20px; - padding-right: 10px; background: no-repeat scroll left center; } @@ -441,20 +440,30 @@ form.likeform { color: rgb(128, 0, 0); } -.thread_content { - margin-top: 0.5em; -} - .thread_info { text-align:right; clear: both; margin-left: 46px; } -.thread_info .btn { +.thread_info .tags { + display: inline; + margin-right: 1em; +} +.thread_info .participant { + margin-right: 1em; +} +.thread_info .discussion { + margin-right: 2em; +} +.thread_info .thread-show { padding-top: 2px; padding-bottom: 2px; + margin-left: 2em; } +.thread_content { + margin-top: 0.5em; +} .thread_content .gravatar { float: left; } @@ -464,12 +473,6 @@ form.likeform { margin-bottom: 5px; } -.tags { - text-align:left; - margin: 0px 0px 0px 200px; - padding: 0px; -} - /* Part containing the body of the mail which can be shown/hidden */ .expander { background-image: linear-gradient(bottom, rgb(236,236,236) 11%, rgb(255,255,255) 100%); @@ -748,6 +751,12 @@ a.attachments { padding: 10px 0; margin: 0; } +#tags ul li { + padding-left: 0; +} +#tags ul li span { + margin-left: 5px; +} #add_tag { margin-top: 0.3em; diff --git a/hyperkitty/templates/threads/summary_thread_large.html b/hyperkitty/templates/threads/summary_thread_large.html index 43e7d10..b42f76d 100644 --- a/hyperkitty/templates/threads/summary_thread_large.html +++ b/hyperkitty/templates/threads/summary_thread_large.html @@ -36,31 +36,23 @@
- - - +
+ {{ thread.participants|length }} participants + {{ thread|length }} comments + {% include "messages/like_form.html" with message_id_hash=thread.starting_email.message_id_hash object=thread %} Show discussion + class="btn thread-show">Show discussion diff --git a/hyperkitty/templates/threads/tags.html b/hyperkitty/templates/threads/tags.html index 6307d1f..df0bbde 100644 --- a/hyperkitty/templates/threads/tags.html +++ b/hyperkitty/templates/threads/tags.html @@ -4,7 +4,7 @@ {% for tag in tags %}
  • {{ tag.tag }} - {% if not forloop.last %} | {% endif %} + {% if not forloop.last %} | {% endif %}
  • {% endfor %} diff --git a/hyperkitty/views/list.py b/hyperkitty/views/list.py index 7dbb1ad..66f7913 100644 --- a/hyperkitty/views/list.py +++ b/hyperkitty/views/list.py @@ -113,6 +113,13 @@ def _thread_list(request, mlist, threads, template_name='thread_list.html', extr else: thread.favorite = True + # Tags + try: + thread.tags = Tag.objects.filter(threadid=thread.thread_id, + list_address=mlist.name) + except Tag.DoesNotExist: + thread.tags = [] + all_threads = threads paginator = Paginator(threads, 10) page_num = request.GET.get('page') diff --git a/hyperkitty/views/thread.py b/hyperkitty/views/thread.py index a1788cd..7929ac6 100644 --- a/hyperkitty/views/thread.py +++ b/hyperkitty/views/thread.py @@ -74,7 +74,7 @@ def thread_index(request, mlist_fqdn, threadid, month=None, year=None): try: tags = Tag.objects.filter(threadid=threadid, list_address=mlist_fqdn) except Tag.DoesNotExist: - tags = {} + tags = [] # Favorites fav_action = "add" -- cgit