From d866624024289a9e2b6c9c1edd3297b511a346b3 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Wed, 31 Jan 2007 18:28:14 +0000 Subject: [PATCH] =?utf8?q?Activa=20y=20desactiva=20docentes=20de=20forma?= =?utf8?q?=20m=C3=A1s=20amistosa.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- sercom/subcontrollers/docente/__init__.py | 7 +++++++ .../subcontrollers/docente/templates/list.kid | 17 +++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/sercom/subcontrollers/docente/__init__.py b/sercom/subcontrollers/docente/__init__.py index c410e4d..e407081 100644 --- a/sercom/subcontrollers/docente/__init__.py +++ b/sercom/subcontrollers/docente/__init__.py @@ -60,6 +60,13 @@ class DocenteController(controllers.Controller, identity.SecureResource): return dict(records=r, name=name, namepl=namepl, tg_flash=f) + @expose() + def activate(self, id, activo): + """Save or create record to model""" + cls.get(int(id)).activo = int(activo) + + raise redirect('../list') + @expose(template='kid:sercom.subcontrollers.%s.templates.new' % name) def new(self, **kw): """Create new records in model""" diff --git a/sercom/subcontrollers/docente/templates/list.kid b/sercom/subcontrollers/docente/templates/list.kid index 3ae06da..c606949 100644 --- a/sercom/subcontrollers/docente/templates/list.kid +++ b/sercom/subcontrollers/docente/templates/list.kid @@ -11,25 +11,24 @@ + - - + + - - + + - - - +
A Usuario Nombre E-Mail Teléfono NombradoActivo Observaciones Operaciones
usuariousuario nombreemailtelefonoemailtelefono nombradoactivoobservacionesVer - Editar + observacionesEditar Eliminar
@@ -45,3 +44,5 @@ + + -- 2.43.0