witten
/
luminotes
Archived
1
0
Fork 0
This repository has been archived on 2023-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
luminotes/view/Note_tree_area.py

32 lines
946 B
Python
Raw Normal View History

from Tags import Div, Span, H4, A
class Note_tree_area( Div ):
def __init__( self, toolbar, notebook, root_notes, total_notes_count ):
Div.__init__(
self,
toolbar,
Div(
H4( u"notes",
Span(
Span( total_notes_count, id = u"total_notes_count" ), u"total",
class_ = u"small_text link_area_item",
),
id = u"note_tree_area_title",
),
[ Div(
Div( class_ = u"tree_expander" ),
A(
note.title or u"untitled note",
href = u"/notebooks/%s?note_id=%s" % ( notebook.object_id, note.object_id ),
id = u"note_tree_link_" + note.object_id,
class_ = u"note_tree_link",
),
id = u"note_tree_item_" + note.object_id,
class_ = u"note_tree_item",
) for note in root_notes ],
id = u"note_tree_area_holder",
),
id = u"note_tree_area",
)