diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-01-07 17:43:43 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-01-07 17:43:43 +0200 |
commit | 124861570fff2f724501c3d39f3da6ff684ba90f (patch) | |
tree | 45cfd51de6865ef306c05bc27e2eeee216fc814c | |
parent | 8d2ce0b211f03ca6d9777b35330b0af023c4c1ed (diff) | |
download | distix-124861570fff2f724501c3d39f3da6ff684ba90f.tar.gz |
Show ticket-id-as-words in cli, html output
-rw-r--r-- | distixlib/plugins/show_plugin.py | 1 | ||||
-rw-r--r-- | distixlib/templates/list.j2 | 3 | ||||
-rw-r--r-- | distixlib/templates/show.j2 | 1 | ||||
-rw-r--r-- | distixlib/templates/ticket.html.j2 | 5 |
4 files changed, 8 insertions, 2 deletions
diff --git a/distixlib/plugins/show_plugin.py b/distixlib/plugins/show_plugin.py index 92ec56b..e1281f9 100644 --- a/distixlib/plugins/show_plugin.py +++ b/distixlib/plugins/show_plugin.py @@ -59,6 +59,7 @@ class ShowTicketPlugin(cliapp.Plugin): variables = { 'ticket_id': ticket.get_ticket_id(), + 'ticket': ticket, 'metadata': metadata, 'metadata_keys': sorted(metadata.keys()), 'msgs': [ diff --git a/distixlib/templates/list.j2 b/distixlib/templates/list.j2 index d3453ea..e3adcdb 100644 --- a/distixlib/templates/list.j2 +++ b/distixlib/templates/list.j2 @@ -1,3 +1,4 @@ {% for ticket in tickets %} -{{ ticket.get_ticket_id() }} ({{ ticket.get_ticket_id_as_words().upper() }}) {{ ticket.get_newest_message_timestamp()|date }} {{ ticket.get_title() }} +{{ ticket.get_title() }} + {{ ticket.get_newest_message_timestamp()|date }} {{ ticket.get_ticket_id() }} ({{ ticket.get_ticket_id_as_words().upper() }}) {% endfor %} diff --git a/distixlib/templates/show.j2 b/distixlib/templates/show.j2 index 3ba178f..36afa5b 100644 --- a/distixlib/templates/show.j2 +++ b/distixlib/templates/show.j2 @@ -1,4 +1,5 @@ {{ ticket_id }}: {{ metadata.get_first_value('title') }} +{{ ticket.get_ticket_id_as_words().upper() }} {% for key in metadata_keys %} {% for value in metadata.get_all_values(key) %} diff --git a/distixlib/templates/ticket.html.j2 b/distixlib/templates/ticket.html.j2 index f31dbf2..cb6b049 100644 --- a/distixlib/templates/ticket.html.j2 +++ b/distixlib/templates/ticket.html.j2 @@ -6,9 +6,12 @@ </head> <body> + <p><a href="index.html">Front page</a></p> + <h1>{{ ticket.get_title() }}</h1> - <p><a href="index.html">Front page</a></p> + <p>{{ ticket.get_ticket_id() }}<br/> + {{ ticket.get_ticket_id_as_words().upper() }}</p> <ul> {% for key in metadata.keys()|sort %} |