Is there a way to do this on my model in t3:

db.foto.represent=lambda foto: \
if is_admin: \
TABLE(
    A(foto.title,_href=t2.action('wiki/edit',foto.id)),\
    
A(IMG(_width=200,_src=URL(r=request,f='download',args=[foto.image])),_class='zoom'
,_href='#zoom-me'+str(foto.id)),\
    
DIV(IMG(_width=400,_src=URL(r=request,f='download',args=[foto.image])),_id='zoom-me'+str(foto.id),_class='hidden')\
)\
else:\
TABLE(\
    SPAN(foto.title),\
    
A(IMG(_width=200,_src=URL(r=request,f='download',args=[foto.image])),_class='zoom'
,_href='#zoom-me'+str(foto.id)),\
    
DIV(IMG(_width=400,_src=URL(r=request,f='download',args=[foto.image])),_id='zoom-me'+str(foto.id),_class='hidden')\
)

It's a show vs edit on the title....

thx,

-wj

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to