1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
3 py:extends="'../../../templates/master.kid'">
5 <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
10 <h1>Administración de <span py:replace="namepl">Objetos</span></h1>
12 <?python from sercom.kidutil import resume ?>
15 def minimize(text, size=15):
16 if text is not None and len(text) > size:
17 text = text[:size] + '...'
29 <th>Observaciones</th>
32 <tr py:for="record in records">
33 <td><span py:replace="record.usuario">usuario</span></td>
34 <td><span py:replace="record.nombre">nombre</span></td>
35 <td><span py:replace="record.email">email</span></td>
36 <td><span py:replace="resume(record.telefono, 10)">telefono</span></td>
37 <td><span py:replace="record.nombrado">nombrado</span></td>
38 <td><span py:replace="record.activo">activo</span></td>
39 <td><span py:replace="resume(record.observaciones, 20)">observaciones</span></td>
40 <td><a href="show/${record.id}">Ver</a>
41 <a href="edit/${record.id}">Editar</a>
42 <a href="delete/${record.id}" onclick="if (confirm('${_(u'Estás seguro? Tal vez sólo quieras desactivarlo mejor...')}')) { var f = document.createElement('form'); this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href; f.submit(); };return false;">Eliminar</a></td>
47 <a href="new">Agregar</a>
49 <div py:for="page in tg.paginate.pages">
50 <a py:if="page != tg.paginate.current_page"
51 href="${tg.paginate.get_href(page)}">${page}</a>
52 <b py:if="page == tg.paginate.current_page">${page}</b>