From f79ecbd1883d0704ccc39ad63decaa8b07fd49e1 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Fri, 16 Nov 2007 00:46:37 +0000 Subject: [PATCH] If viewing just a single note in read-only mode, make the notebook name in the header at the top of the page into a link back to that notebook. --- view/Main_page.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/view/Main_page.py b/view/Main_page.py index 73f3107..24b8440 100644 --- a/view/Main_page.py +++ b/view/Main_page.py @@ -126,7 +126,9 @@ class Main_page( Page ): Rounded_div( ( notebook.name == u"trash" ) and u"trash_notebook" or u"current_notebook", ( notebook.name == u"trash" or not notebook.read_write ) \ - and Strong( notebook.name ) \ + and ( + len( notes ) == 1 and A( Strong( notebook.name ), href = notebook_path ) or Strong( notebook.name ) + ) \ or Span( Strong( notebook.name ), id = u"notebook_header_name" ), parent_id and Span( u" | ",