Do with links. I add a new column with links to edit and delete records.

The example:

 @virtualsettings(label=T('Acciones'))
        def editar(self):
            id = 1
            link_editar = URL(request.application,'default',
'editar_tipo_nomina/')
            link_icono_editar = IMG(_src=URL(r=request,c='static',
f='images/edit-icon24.png'), _alt='Editar')
            link_eliminar= URL(r =request,f='eliminar_registro',
                                args=[self.tipo_nomina.id
,'eliminar','tipo_nomina'])
            link_icono_eliminar= IMG(_src=URL(r=request,c='static',
                                     f='images/delete-icon24.png'),

                                     _alt='Eliminar',
_onclick="ajax('"+link_eliminar+"',[],'');"
                                    )
            return (A(link_icono_editar, _href= link_editar + str(
self.tipo_nomina.id)), ' | ' ,A(link_icono_eliminar))

2011/7/12 DenesL <denes1...@yahoo.ca>

> Hi Kenneth,
>
> it really depend more on what you want the links to look like than
> anything else.
> You could have them one after the other:
>
> return SPAN(A('Edit', _href=URL('receipt', 'create_receipt',
> args=[self.t_receipt.id])),
>            XML('&nbsp;'),
>            A('another link', _href=...))
>
> or you could use DIVs, TABLE, UL/OL or CSS to have them stacked.
>
> Denes.
>
> On Jul 12, 9:47 am, Kenneth Lundström <kenneth.t.lundst...@gmail.com>
> wrote:
> > Hello list,
> >
> > I m using Powertable to show a list of records. With virtual columns I
> > create links to modify, copy and so on. To save space I d like to add
> > more links into one column.
> >
> > I m using:
> >          @virtualsettings(label=T('Edit'))
> >          def edit(self):
> >              return A('Edit', _href=URL('receipt', 'create_receipt',
> > args=[self.t_receipt.id]))
> >
> > to declare a new column, is it possible somehow to return 2 or more
> links?
> >
> > Kenneth
>

Reply via email to