/grails-app/views/producto/lista.gsp
text | 71 lines | 54 code | 17 blank | 0 comment | 0 complexity | 478b39143f5aeef1cf36df27bf3d5321 MD5 | raw file
1 2<%@ page import="inventario.Producto" %> 3<!doctype html> 4<html> 5 <head> 6 <meta name="layout" content="main"> 7 <g:set var="entityName" value="${message(code: 'producto.label', default: 'Producto')}" /> 8 <title><g:message code="default.list.label" args="[entityName]" /></title> 9 </head> 10 <body> 11 <a href="#list-producto" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content…"/></a> 12 <div class="nav" role="navigation"> 13 <ul> 14 <li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/> ></a></li> 15 <li><g:link class="list" controller="inventario"><g:message code="inventario.label" default="Inventario" /> ></g:link></li> 16 <li><g:link class="create" action="nuevo"><g:message code="default.new.label" args="[entityName]" /></g:link></li> 17 </ul> 18 </div> 19 <div id="list-producto" class="content scaffold-list" role="main"> 20 <h1><g:message code="default.list.label" args="[entityName]" /></h1> 21 <g:if test="${flash.message}"> 22 <div class="message" role="status">${flash.message}</div> 23 </g:if> 24 <table> 25 <thead> 26 <tr> 27 28 <g:sortableColumn property="codigo" title="${message(code: 'producto.codigo.label', default: 'Codigo')}" /> 29 30 <g:sortableColumn property="sku" title="${message(code: 'producto.sku.label', default: 'Sku')}" /> 31 32 <g:sortableColumn property="nombre" title="${message(code: 'producto.nombre.label', default: 'Nombre')}" /> 33 34 <g:sortableColumn property="descripcion" title="${message(code: 'producto.descripcion.label', default: 'Descripcion')}" /> 35 36 <g:sortableColumn property="marca" title="${message(code: 'producto.marca.label', default: 'Marca')}" /> 37 38 <g:sortableColumn property="modelo" title="${message(code: 'producto.modelo.label', default: 'Modelo')}" /> 39 40 <g:sortableColumn property="unidadMedida" title="${message(code: 'producto.unidadMedida.label', default: 'Unidad de Medida')}" /> 41 42 </tr> 43 </thead> 44 <tbody> 45 <g:each in="${productos}" status="i" var="producto"> 46 <tr class="${(i % 2) == 0 ? 'even' : 'odd'}"> 47 48 <td><g:link action="ver" id="${producto.id}">${fieldValue(bean: producto, field: "codigo")}</g:link></td> 49 50 <td>${fieldValue(bean: producto, field: "sku")}</td> 51 52 <td>${fieldValue(bean: producto, field: "nombre")}</td> 53 54 <td>${fieldValue(bean: producto, field: "descripcion")}</td> 55 56 <td>${fieldValue(bean: producto, field: "marca")}</td> 57 58 <td>${fieldValue(bean: producto, field: "modelo")}</td> 59 60 <td>${fieldValue(bean: producto, field: "unidadMedida")}</td> 61 62 </tr> 63 </g:each> 64 </tbody> 65 </table> 66 <div class="pagination"> 67 <g:paginate total="${totalDeProductos}" /> 68 </div> 69 </div> 70 </body> 71</html>