Thank you Leonel for taking the time to explain the syntax! Best Regards, PT
On Friday, February 27, 2015 at 11:45:03 AM UTC-6, P T wrote: > > Hello All, > > Currently using Web2Py 2.8.2-stable+timestamp.2013.11.28.13.54.07 > > I have a simple page for announcing seminars and for downloading > presentation files. > > Here are definitions for table, controller and view : > > > db.define_table("seminars", > Field('sem_date', 'date', label='Date'), > Field('Sem_Time', 'string', label='Time'), > Field('room', 'string', label='Location'), > Field('person', 'string', label='Presenter'), > Field('title', 'string', label='Seminar Title'), > Field('sem_file', 'upload', label='Files', requires=False) > ) > db.seminars.sem_file.represent = lambda value,row:A('Download', _href=URL( > 'download', args=value)) > > ---------- > > def index(): > db.seminars.id.readable=False > grid = SQLFORM.grid(db.seminars, maxtextlength=150, > details=False, deletable=False, searchable=False, > csv=False, editargs=dict(id=False), formstyle='bootstrap') > grid.element('.web2py_counter', replace=None) > return dict(grid=grid) > > ---------- > > {{extend 'seminar_layout.html'}} > > {{=grid}} > > > It works fine as intended. But, I want to replace "Download" link with "No > Files Available" and disable the link when there are there are no files > available. Any suggestion or help is appreciated. > > Thanks, > PT > > -- 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.