I have a smartgrid, thus: grid = SQLFORM.smartgrid(db.exsystem,linked_tables=['exsystem', 'disks'], user_signature=False, deletable=False, links = [ lambda row: A( SPAN(_class='icon play icon-play glyphicon glyphicon-play') ,'Start' ,_class='button btn btn-success',_title='Start' ,_href=URL(args=["exsystem/start", db.exsystem, row.id]) ), lambda row: A( SPAN(_class='icon stop icon-stop glyphicon glyphicon-stop') ,'Stop' ,_class='button btn btn-warning',_title='Stop' ,_href=URL(args=["exsystem/stop", db.exsystem, row.id]) ), lambda row: A( SPAN(_class='icon trash icon-trash glyphicon glyphicon-bin') ,'Delete' ,_class='button btn btn-danger',_title='Delete' ,_href=URL(args=["exsystem/delete", db.exsystem, row.id]) ) ] )
So this displays coloured buttons for stop, start, and delete. Ideally, I'd like the stop button to be suppressed if the entity in question is already stopped (based on db.exsystem.system_status) Or, the button function and URL and type could be changed, depending on system status I don't like having button for 'stop' on a thing which is already 'stopped' These are controls for a virtual machine manager page. How can I do this please? -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.