Could somebody please type in syntax for displaying *"Are you sure? All
comments on your suggestion will also be deleted." if user chooses to
delete their record?"*
w2p displays the standard 3 buttons for user-created record: view, edit,
delete. What is confirmation syntax when user chooses delete?
@auth.requires_login()
def view_suggestions():
is_owner = (lambda row: row.created_by == auth.user_id) if auth.user
else False
grid = SQLFORM.grid(db.Idea,editable=is_owner, deletable=is_owner,
user_signature=True,fields=[db.Idea.id,db.Idea.ideaShortSummary,db.Idea.created_by,],
headers={ 'Idea.ideaShortSummary':'Description'}, maxtextlengths={
'Idea.ideaShortSummary':140},links = [dict(header='Post comment',
body=lambda row: A('Post comment',_class="btn btn-mini",
_href=URL('comment_on_a_suggestion', vars=dict(filter=row.id))))]),
return dict(grid = grid)
thanks,
Alex Glaros
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.