Hiding some navigation on the main notebook, and moving to the forum displayed on a thread page.
This commit is contained in:
parent
a1e8928529
commit
e745025c6f
|
@ -16,22 +16,28 @@ class Link_area( Div ):
|
||||||
|
|
||||||
if [ tag for tag in notebook.tags if tag.name == u"forum" ]:
|
if [ tag for tag in notebook.tags if tag.name == u"forum" ]:
|
||||||
forum_tag = True
|
forum_tag = True
|
||||||
|
forum_name = tag.value
|
||||||
notebook_word = u"discussion"
|
notebook_word = u"discussion"
|
||||||
note_word = u"post"
|
note_word = u"post"
|
||||||
else:
|
else:
|
||||||
forum_tag = False
|
forum_tag = False
|
||||||
|
forum_name = None
|
||||||
notebook_word = u"notebook"
|
notebook_word = u"notebook"
|
||||||
note_word = u"note"
|
note_word = u"note"
|
||||||
|
|
||||||
Div.__init__(
|
Div.__init__(
|
||||||
self,
|
self,
|
||||||
toolbar,
|
toolbar,
|
||||||
Div(
|
( user.username != u"anonymous" ) and Div(
|
||||||
Div(
|
( notebook_path != u"/" ) and Div(
|
||||||
H4(
|
H4(
|
||||||
u"this %s" % notebook_word,
|
u"this %s" % notebook_word,
|
||||||
id = u"this_notebook_area_title",
|
id = u"this_notebook_area_title",
|
||||||
),
|
),
|
||||||
|
forum_tag and Div(
|
||||||
|
A( u"%s forum" % forum_name, href = "/forums/%s" % forum_name ),
|
||||||
|
class_ = u"link_area_item",
|
||||||
|
) or None,
|
||||||
|
|
||||||
( rate_plan.get( u"notebook_sharing" ) and notebook.name == u"Luminotes blog" ) and Div(
|
( rate_plan.get( u"notebook_sharing" ) and notebook.name == u"Luminotes blog" ) and Div(
|
||||||
A(
|
A(
|
||||||
|
@ -152,7 +158,7 @@ class Link_area( Div ):
|
||||||
) or None,
|
) or None,
|
||||||
|
|
||||||
id = u"this_notebook_area",
|
id = u"this_notebook_area",
|
||||||
),
|
) or None,
|
||||||
|
|
||||||
( not forum_tag ) and Div(
|
( not forum_tag ) and Div(
|
||||||
( len( linked_notebooks ) > 0 ) and H4(
|
( len( linked_notebooks ) > 0 ) and H4(
|
||||||
|
@ -199,6 +205,6 @@ class Link_area( Div ):
|
||||||
id = u"storage_usage_area",
|
id = u"storage_usage_area",
|
||||||
),
|
),
|
||||||
id = u"link_area_holder",
|
id = u"link_area_holder",
|
||||||
),
|
) or None,
|
||||||
id = u"link_area",
|
id = u"link_area",
|
||||||
)
|
)
|
||||||
|
|
|
@ -40,10 +40,6 @@ class Note_tree_area( Div ):
|
||||||
Search_form(),
|
Search_form(),
|
||||||
class_ = u"link_area_item",
|
class_ = u"link_area_item",
|
||||||
),
|
),
|
||||||
forum_tag and Div(
|
|
||||||
A( u"%s forum" % forum_name, href = "/forums/%s" % forum_name ),
|
|
||||||
class_ = u"link_area_item",
|
|
||||||
) or None,
|
|
||||||
( not forum_tag ) and self.make_tree(
|
( not forum_tag ) and self.make_tree(
|
||||||
[ self.make_item(
|
[ self.make_item(
|
||||||
title = note.title,
|
title = note.title,
|
||||||
|
|
Reference in New Issue