What i'm trying to do is below:

db.foto.represent=lambda foto: \
    TABLE(

if is_admin:
     # if admin show edit link
     A(foto.title,_id='fid'+str(foto.id),_href=t2.action('wiki/edit',foto.id))
else:
     # if not admin show only text
    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'))

On Fri, Dec 12, 2008 at 3:28 PM, mdipierro <[email protected]> wrote:
>
> Not on T3.
>
> Wes, what is the question. You are asking if you can do what you just
> did? or is it not working? If so how?
>
> Massimo
>
> On Dec 12, 4:03 pm, Timothy Farrell <[email protected]> wrote:
>> If you look at the admin interface code, it reads the 
>> parameters_<portnum>.py file directly.
>> Perhaps we could implement an IS_ADMIN_PASSWORD(pass) validator to check 
>> this.
>> -tim
>> Wes James wrote: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-- Timothy 
>> Farrell<[email protected]>Computer Guy Statewide General Insurance Agency 
>> (www.swgen.com)
> >
>

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

Reply via email to