Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created June 28, 2019 02:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/e10a4f62352dde3c5fd3b1d7e0305af6 to your computer and use it in GitHub Desktop.
Save parzibyte/e10a4f62352dde3c5fd3b1d7e0305af6 to your computer and use it in GitHub Desktop.
<%- include("../header"); %>
<div class="col-12">
<h1>Productos</h1>
<a href="/productos/agregar" class="btn btn-primary mb-2">Agregar</a>
<table class="table table-bordered">
<thead>
<tr>
<th>Nombre</th>
<th>Precio</th>
<th>Editar</th>
<th>Eliminar</th>
</tr>
</thead>
<tbody>
<% productos.forEach(producto => { %>
<tr>
<td><%= producto.nombre %></td>
<td><%= producto.precio %></td>
<td>
<a href="/productos/editar/<%= producto.id %>" class="btn btn-warning">
Editar
</a>
</td>
<td>
<a href="/productos/eliminar/<%= producto.id %>" class="btn btn-danger">
Eliminar
</a>
</td>
</tr>
<% })%>
</tbody>
</table>
</div>
<%- include("../footer"); %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment