Hello guys!
I have a grid like this
form = SQLFORM.grid(query, args=[tipologia], fields=[db.ticket.id,
db.ticket.created_on, db.asset.tipo, db.asset.seriale,
db.asset.modello,db.asset.nome, db.asset.uo, db.asset.is_active,
db.ticket.anomalia, db.ticket.chiuso, db.ticket.risoluzione], links =
[lambda row: A('Annulla ticket', _onclick="if(confirm('Confermi
annullamento ticket?')) document.location='%s'; return false;" %
URL("default","annulla_ticket",args=[row.get('ticket',row).id]))],
field_id=db.ticket.asset, orderby=db.ticket.created_on, create=False,
details=False, editable=False, deletable=False, maxtextlength=60,
exportclasses = exportcls, onupdate=auth.archive)
I'd like to add another link to another URL only if db.ticket.created_on if
before a certain date.
I'm sure it's possible using a lambda function with and "if xxx else yyy"...
Thank's a lot.
--
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/d/optout.