summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2013-07-11 17:41:02 +0200
committerAurélien Bompard <aurelien@bompard.org>2013-07-11 17:41:02 +0200
commit21d28e145152cc7447b64cee54c732787090260e (patch)
tree71ab06efe7ae59783ec93b3688ee0f9fddd0f227
parent39deff37c950534d2a44e4bd040e49118b34a731 (diff)
downloadhyperkitty-21d28e145152cc7447b64cee54c732787090260e.tar.gz
hyperkitty-21d28e145152cc7447b64cee54c732787090260e.tar.xz
hyperkitty-21d28e145152cc7447b64cee54c732787090260e.zip
Improve display of the category on the threads list
-rw-r--r--hyperkitty/lib/__init__.py2
-rw-r--r--hyperkitty/static/css/hyperkitty-common.css5
-rw-r--r--hyperkitty/static/css/hyperkitty-threadslist.css19
-rw-r--r--hyperkitty/templates/threads/category.html2
-rw-r--r--hyperkitty/templates/threads/summary_thread_large.html18
5 files changed, 18 insertions, 28 deletions
diff --git a/hyperkitty/lib/__init__.py b/hyperkitty/lib/__init__.py
index 0cb1c7d..6dbfbea 100644
--- a/hyperkitty/lib/__init__.py
+++ b/hyperkitty/lib/__init__.py
@@ -183,7 +183,7 @@ def paginate(objects, page_num, max_page_range=10, paginator=None):
def get_category_widget(request, current_category=None):
categories = [ (c.name, c.name.upper())
for c in ThreadCategory.objects.all() ] \
- + [("", "no categories")]
+ + [("", "no category")]
if request.method == "POST":
category_form = CategoryForm(request.POST)
diff --git a/hyperkitty/static/css/hyperkitty-common.css b/hyperkitty/static/css/hyperkitty-common.css
index 419cb7f..fa8b6d4 100644
--- a/hyperkitty/static/css/hyperkitty-common.css
+++ b/hyperkitty/static/css/hyperkitty-common.css
@@ -303,15 +303,18 @@ a.thread-new strong {
.thread-category {
padding: 0;
- padding-bottom: 10px;
}
.thread-category form {
margin: 0;
display: none;
}
+.thread-category form p {
+ margin: 0;
+}
.thread-category form select {
font-size: 90%;
width: 12em;
+ margin: 0;
}
.thread-category form .errorlist {
display: none; /* Displayed manually */
diff --git a/hyperkitty/static/css/hyperkitty-threadslist.css b/hyperkitty/static/css/hyperkitty-threadslist.css
index 653d5d7..5080de5 100644
--- a/hyperkitty/static/css/hyperkitty-threadslist.css
+++ b/hyperkitty/static/css/hyperkitty-threadslist.css
@@ -60,13 +60,20 @@
font-style: italic;
font-size: 70%;
color: rgb(128, 0, 0);
+ margin-left: 1em;
}
.thread-info {
text-align:right;
clear: both;
- margin-left: 46px;
+ margin-left: 60px;
}
+
+.thread .thread-category {
+ /*margin-left: 1em;*/
+ float: left;
+}
+
.thread-info .tags {
display: inline;
margin-right: 1em;
@@ -89,7 +96,7 @@
}
.thread-content .thread-email {
display: block;
- margin-left: 46px;
+ margin-left: 60px;
margin-bottom: 5px;
}
@@ -115,7 +122,6 @@
-moz-border-radius: 5px 5px 5px 5px;
border-radius: 5px 5px 5px 5px;
padding: 1em;
- margin-left: 21px;
display: block;
vertical-align: top;
white-space: pre;
@@ -184,10 +190,3 @@
.type_test {
background-color: rgb(200, 171, 55);
}
-
-
-
-/* Category */
-.thread .thread-category {
- float: right;
-}
diff --git a/hyperkitty/templates/threads/category.html b/hyperkitty/templates/threads/category.html
index e6e1f03..c315a2e 100644
--- a/hyperkitty/templates/threads/category.html
+++ b/hyperkitty/templates/threads/category.html
@@ -6,7 +6,7 @@
{% if category %}
{{ category.name|upper }}
{% else %}
- No category
+ no category
{% endif %}
</a>
<form method="post" action="{% url 'thread_set_category' mlist_fqdn=mlist.name threadid=threadid %}">
diff --git a/hyperkitty/templates/threads/summary_thread_large.html b/hyperkitty/templates/threads/summary_thread_large.html
index f03bbbf..05a7e99 100644
--- a/hyperkitty/templates/threads/summary_thread_large.html
+++ b/hyperkitty/templates/threads/summary_thread_large.html
@@ -13,23 +13,8 @@
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|get_date|timesince }}</span>
- <span class="thread-category">
- {% include 'threads/category.html' with category=thread.category_hk category_form=thread.category_form threadid=thread.thread_id %}
- </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 %}
@@ -44,6 +29,9 @@
</div>
</div>
<div class="thread-info">
+ <span class="thread-category">
+ {% include 'threads/category.html' with category=thread.category_hk category_form=thread.category_form threadid=thread.thread_id %}
+ </span>
<div class="tags">
{% if thread.tags|length %}
Tags: