In desktop mode, most header links are now undisplayed. Also, no longer creating default notes in initdb.py for desktop version.
This commit is contained in:
parent
27581a0445
commit
81fabe98c0
|
@ -44,6 +44,7 @@ class Initializer( object ):
|
|||
self.create_anonymous_user()
|
||||
if desktop is True:
|
||||
self.create_desktop_user()
|
||||
|
||||
self.database.commit()
|
||||
|
||||
def create_main_notebook( self ):
|
||||
|
@ -52,6 +53,10 @@ class Initializer( object ):
|
|||
self.main_notebook = Notebook.create( main_notebook_id, u"Luminotes" )
|
||||
self.database.save( self.main_notebook, commit = False )
|
||||
|
||||
# no need to create default notes for the desktop version
|
||||
if self.desktop is True:
|
||||
return
|
||||
|
||||
# create an id for each note
|
||||
note_ids = {}
|
||||
for ( filename, startup ) in self.NOTE_FILES:
|
||||
|
|
|
@ -1,13 +1,31 @@
|
|||
from Tags import Div, A, Img, Span
|
||||
|
||||
class Header( Div ):
|
||||
def __init__( self, user, first_notebook, login_url, logout_url, note_title ):
|
||||
def __init__( self, user, first_notebook, login_url, logout_url, note_title, rate_plan = None ):
|
||||
title_image = Img(
|
||||
src ="/static/images/luminotes_title.png",
|
||||
class_ = u"luminotes_title", width = u"193", height = u"60",
|
||||
alt = u"Luminotes",
|
||||
)
|
||||
|
||||
if rate_plan and rate_plan.get( u"name" ) == u"desktop":
|
||||
Div.__init__(
|
||||
self,
|
||||
Div(
|
||||
( note_title == u"home" ) and title_image or
|
||||
A( title_image, href = u"http://luminotes.com/", target = "_new" ),
|
||||
Div(
|
||||
A( u"support", href = u"http://luminotes.com/support", target = "_new" ), u" | ",
|
||||
A( u"blog", href = u"http://luminotes.com/blog", target = "_new" ),
|
||||
class_ = u"header_links",
|
||||
),
|
||||
class_ = u"wide_center_area",
|
||||
),
|
||||
id = u"header",
|
||||
class_ = u"header",
|
||||
)
|
||||
return
|
||||
|
||||
Div.__init__(
|
||||
self,
|
||||
Div(
|
||||
|
|
|
@ -152,7 +152,7 @@ class Main_page( Page ):
|
|||
Div(
|
||||
id = u"status_area",
|
||||
),
|
||||
Header( user, header_notebook, login_url, logout_url, header_note_title ),
|
||||
Header( user, header_notebook, login_url, logout_url, header_note_title, rate_plan ),
|
||||
Div(
|
||||
Div(
|
||||
Note_tree_area(
|
||||
|
|
Reference in New Issue