-
-
Save parzibyte/53c8376f66165b60fa6b39f7d0b179a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%- 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