show story creation time in details view

This commit is contained in:
2018-05-21 17:58:30 -07:00
parent 1d81648ee4
commit 47eff82d3f
4 changed files with 14 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
palette = [
('atm_section', 'white,bold', 'dark blue'),
('author', 'bold,dark blue', ''),
('timestamp', 'underline', ''),
('custom_fields', 'dark red', ''),
('header', 'bold,light green', ''),
('project', 'yellow', ''),

View File

@@ -75,7 +75,11 @@ class CustomFields(object):
class Stories(object):
def __init__(self, stories):
components = [
urwid.Text([('author', s.creator())] + s.text())
urwid.Text([
('timestamp', s.created_at().strftime('%Y-%m-%d %H:%M')),
' ',
('author', s.creator()),
] + s.text())
for s in stories]
self.stories = urwid.Pile(components)