summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-06-18 19:43:30 +0300
committerLars Wirzenius <liw@liw.fi>2017-06-18 19:43:30 +0300
commit3288911efe932e6aa05099d318ee13e26c39b4ff (patch)
treece34c51cf3a2cdafc702aa2bb35a45dd5538bb00
parent2fb5dbe33aebaad7d30ccfe66b016c9a96120fe3 (diff)
downloaddistix-3288911efe932e6aa05099d318ee13e26c39b4ff.tar.gz
Add: ticket id as words to ticket lists
Also, make lists of ticket be less dense, for better readability.
-rw-r--r--NEWS3
-rw-r--r--distixlib/distix.css11
-rw-r--r--distixlib/plugins/html_plugin.py10
-rw-r--r--distixlib/templates/index.html.j25
-rw-r--r--distixlib/templates/ticket.html.j23
5 files changed, 27 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index f6d5fcf..d176158 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,9 @@ Version 0.16+git, not yet released
* Mail importing logs now what is happening, to make debugging that
easier for sysadmins.
+* Ticket listings now show the word version of a ticket id, and the
+ list styling has changed a bit to be less dense.
+
Version 0.16, released 2017-04-29
----------------------------------
diff --git a/distixlib/distix.css b/distixlib/distix.css
index 1457210..219465c 100644
--- a/distixlib/distix.css
+++ b/distixlib/distix.css
@@ -30,10 +30,21 @@ span.links {
font-size: 70%;
}
+ul.ticketlist li {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+}
+
ul.ticketlist a.ticketinlist {
font-family: monospace;
}
+span.ticket_name {
+ font-family: Courier, monospace;
+ font-size: 80%;
+ font-weight: bold;
+}
+
div.footer {
margin-top: 2em;
border-top: solid black 1px;
diff --git a/distixlib/plugins/html_plugin.py b/distixlib/plugins/html_plugin.py
index 2ee8bd1..851f22b 100644
--- a/distixlib/plugins/html_plugin.py
+++ b/distixlib/plugins/html_plugin.py
@@ -136,7 +136,7 @@ class StaticSite(object):
self._ticket_store.clear_ticket_cache()
if condition(ticket):
lt = TicketLight()
- lt.set_ticket_id(ticket_id)
+ lt.set_ticket_id(ticket)
lt.set_title(ticket.get_title())
lt.set_newest_message_timestamp(
ticket.get_newest_message_timestamp())
@@ -177,8 +177,9 @@ class TicketLight(object):
self._title = None
self._timestamp = None
- def set_ticket_id(self, ticket_id):
- self._ticket_id = ticket_id
+ def set_ticket_id(self, ticket):
+ self._ticket_id = ticket.get_ticket_id()
+ self._ticket_id_as_words = ticket.get_ticket_id_as_words()
def set_title(self, title):
self._title = title
@@ -189,6 +190,9 @@ class TicketLight(object):
def get_ticket_id(self):
return self._ticket_id
+ def get_ticket_id_as_words(self):
+ return self._ticket_id_as_words
+
def get_title(self):
return self._title
diff --git a/distixlib/templates/index.html.j2 b/distixlib/templates/index.html.j2
index 60b3b22..9756afc 100644
--- a/distixlib/templates/index.html.j2
+++ b/distixlib/templates/index.html.j2
@@ -18,7 +18,10 @@
<span class="date"
>{{ticket.get_newest_message_timestamp()|date }}<span>
<a class="ticketinlist" href="{{ ticket.get_ticket_id() }}.html"
- >{{ ticket.get_title() }}</a></li>
+ >{{ ticket.get_title() }}</a>
+ <br /><span class="ticket_name">{{
+ ticket.get_ticket_id_as_words().upper() }}</span>
+ </li>
{% endfor %}
</ul>
diff --git a/distixlib/templates/ticket.html.j2 b/distixlib/templates/ticket.html.j2
index cb6b049..e751933 100644
--- a/distixlib/templates/ticket.html.j2
+++ b/distixlib/templates/ticket.html.j2
@@ -11,7 +11,8 @@
<h1>{{ ticket.get_title() }}</h1>
<p>{{ ticket.get_ticket_id() }}<br/>
- {{ ticket.get_ticket_id_as_words().upper() }}</p>
+ <span class="ticket_name"
+ >{{ ticket.get_ticket_id_as_words().upper() }}</span></p>
<ul>
{% for key in metadata.keys()|sort %}