Changed things so the client is responsible for filtering out deleted notebooks from the display instead of the server.
This commit is contained in:
parent
8fe52cef50
commit
34f7d223d1
|
@ -129,7 +129,7 @@ class User( Persistent ):
|
|||
def sql_load_by_email_address( email_address ):
|
||||
return "select * from luminotes_user_current where email_address = %s;" % quote( email_address )
|
||||
|
||||
def sql_load_notebooks( self, parents_only = False, deleted = False ):
|
||||
def sql_load_notebooks( self, parents_only = False ):
|
||||
"""
|
||||
Return a SQL string to load a list of the notebooks to which this user has access.
|
||||
"""
|
||||
|
@ -138,15 +138,10 @@ class User( Persistent ):
|
|||
else:
|
||||
parents_only_clause = ""
|
||||
|
||||
if deleted:
|
||||
deleted_clause = " and deleted = 't'"
|
||||
else:
|
||||
deleted_clause = " and deleted = 'f'"
|
||||
|
||||
return \
|
||||
"select notebook_current.*, user_notebook.read_write from user_notebook, notebook_current " + \
|
||||
"where user_id = %s%s%s and user_notebook.notebook_id = notebook_current.id order by revision;" % \
|
||||
( quote( self.object_id ), parents_only_clause, deleted_clause )
|
||||
"where user_id = %s%s and user_notebook.notebook_id = notebook_current.id order by revision;" % \
|
||||
( quote( self.object_id ), parents_only_clause )
|
||||
|
||||
def sql_save_notebook( self, notebook_id, read_write = True ):
|
||||
"""
|
||||
|
|
|
@ -4,7 +4,7 @@ from Rounded_div import Rounded_div
|
|||
|
||||
class Link_area( Div ):
|
||||
def __init__( self, notebooks, notebook, total_notes_count, parent_id, notebook_path, user ):
|
||||
linked_notebooks = [ nb for nb in notebooks if nb.read_write and nb.name not in ( u"trash" ) ]
|
||||
linked_notebooks = [ nb for nb in notebooks if nb.read_write and nb.name not in ( u"trash" ) and nb.deleted is False ]
|
||||
|
||||
Div.__init__(
|
||||
self,
|
||||
|
|
Reference in New Issue