summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--boartty/palette.py2
-rw-r--r--boartty/view/story.py6
2 files changed, 8 insertions, 0 deletions
diff --git a/boartty/palette.py b/boartty/palette.py
index af72be2..deaae77 100644
--- a/boartty/palette.py
+++ b/boartty/palette.py
@@ -24,6 +24,8 @@ DEFAULT_PALETTE={
24 # Story view 24 # Story view
25 'story-data': ['dark cyan', ''], 25 'story-data': ['dark cyan', ''],
26 'focused-story-data': ['light cyan', ''], 26 'focused-story-data': ['light cyan', ''],
27 'story-notice-data': ['yellow', ''],
28 'focused-story-notice-data': ['yellow,standout', ''],
27 'story-header': ['light blue', ''], 29 'story-header': ['light blue', ''],
28 'task-id': ['dark cyan', ''], 30 'task-id': ['dark cyan', ''],
29 'task-title': ['light green', ''], 31 'task-title': ['light green', ''],
diff --git a/boartty/view/story.py b/boartty/view/story.py
index 3931cff..c402030 100644
--- a/boartty/view/story.py
+++ b/boartty/view/story.py
@@ -518,6 +518,7 @@ class StoryView(urwid.WidgetWrap, mywid.Searchable):
518 self.created_label = urwid.Text(u'', wrap='clip') 518 self.created_label = urwid.Text(u'', wrap='clip')
519 self.updated_label = urwid.Text(u'', wrap='clip') 519 self.updated_label = urwid.Text(u'', wrap='clip')
520 self.status_label = urwid.Text(u'', wrap='clip') 520 self.status_label = urwid.Text(u'', wrap='clip')
521 self.access_label = urwid.Text(u'', wrap='clip')
521 self.permalink_label = mywid.TextButton(u'', on_press=self.openPermalink) 522 self.permalink_label = mywid.TextButton(u'', on_press=self.openPermalink)
522 story_info = [] 523 story_info = []
523 story_info_map={'story-data': 'focused-story-data'} 524 story_info_map={'story-data': 'focused-story-data'}
@@ -531,6 +532,7 @@ class StoryView(urwid.WidgetWrap, mywid.Searchable):
531 ("Created", self.created_label), 532 ("Created", self.created_label),
532 ("Updated", self.updated_label), 533 ("Updated", self.updated_label),
533 ("Status", self.status_label), 534 ("Status", self.status_label),
535 ("Access", self.access_label),
534 ("Permalink", urwid.Padding(urwid.AttrMap(self.permalink_label, None, 536 ("Permalink", urwid.Padding(urwid.AttrMap(self.permalink_label, None,
535 focus_map=story_info_map), 537 focus_map=story_info_map),
536 width='pack')), 538 width='pack')),
@@ -604,6 +606,10 @@ class StoryView(urwid.WidgetWrap, mywid.Searchable):
604 self.created_label.set_text(('story-data', str(self.app.time(story.created)))) 606 self.created_label.set_text(('story-data', str(self.app.time(story.created))))
605 self.updated_label.set_text(('story-data', str(self.app.time(story.updated)))) 607 self.updated_label.set_text(('story-data', str(self.app.time(story.updated))))
606 self.status_label.set_text(('story-data', story.status)) 608 self.status_label.set_text(('story-data', story.status))
609 if story.private:
610 self.access_label.set_text(('story-notice-data', 'private'))
611 else:
612 self.access_label.set_text(('story-data', 'public'))
607 self.permalink_url = '' # storyboard urlparse.urljoin(self.app.config.url, str(story.number)) 613 self.permalink_url = '' # storyboard urlparse.urljoin(self.app.config.url, str(story.number))
608 self.permalink_label.text.set_text(('story-data', self.permalink_url)) 614 self.permalink_label.text.set_text(('story-data', self.permalink_url))
609 self.description.set_text(story.description) 615 self.description.set_text(story.description)