PageRenderTime 57ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/grails-app/views/producto/lista.gsp

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