I would like to have images instead of text (or text AND image) in
each label for row, when I click edit in form generated by
SQLFORM.grid. How to do this in easiest way ?
Regards
brushek
regards
brushek
LABEL have some bug:
http://code.google.com/p/web2py/issues/detail?id=566
On 16 Gru, 23:32, Anthony <abasta...@gmail.com> wrote:
But...LABEL have some bug:
None of this soulutions works :(. I mean, the app doesn't crash, but I
can see the text:
<img alt="Woda" src="/sdadmin/static/img_towary/1.png" />
in label of row, but no image, it isn't that what I want.
I tried:
Field('tw1','integer',label=str(IMG(_alt='Woda',_src=URL('static','img_towary/
1.png')))),
and:
Field('tw1','integer',label=IMG(_alt='Woda',_src=URL('static','img_towary/
1.png')).xml()),
>
> either of which will convert the HTML helper to a string, so it won't cause
> an error with the translator.
>
Indeed, but as You can see above, the output isn't image.
> Also, note that you shouldn't need the LABEL wrapper -- in SQLFORMs, the
> labels are automatically wrapped in a LABEL().
>
I need LABEL to make label with text AND image, and it works in:
/app/default/planetysurowce/edit/gk_planety/1
but not in:
/app/default/planetysurowce
where grid is computed.
Anyway, thanks Anthony, I think (as You said) it will be quick fix,
and all the stuff will work :)
regards
brushek