flask_crud_app/templates/viewList.html

63 lines
1.5 KiB
HTML
Raw Normal View History

2025-01-29 05:27:19 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>View Inventory</title>
</head>
<body align="center">
<div align="center">
<a href="/create">Add</a> |
<a href="/view">View</a>
</div>
<h2>Item Inventory</h2>
<table border="1" align="center">
<tr>
2025-01-29 10:05:36 +00:00
<th>Asset Tag</th>
<th>Host Name</th>
<th>Warranty From</th>
<th>Status</th>
<th>Staff No.</th>
2025-01-29 05:27:19 +00:00
</tr>
{% for item in items %}
<tr>
<td>
2025-01-29 10:05:36 +00:00
{{item.assettag}}
2025-01-29 05:27:19 +00:00
</td>
<td>
2025-01-29 10:05:36 +00:00
{{item.hostname}}
2025-01-29 05:27:19 +00:00
</td>
<td>
2025-01-29 10:05:36 +00:00
{{item.warrantyfrom}}
2025-01-29 05:27:19 +00:00
</td>
<td>
2025-01-29 10:05:36 +00:00
${{item.status}}
2025-01-29 05:27:19 +00:00
</td>
<td>
2025-01-29 10:05:36 +00:00
{{item.staffnum}}
2025-01-29 05:27:19 +00:00
</td>
<td>
2025-01-29 10:05:36 +00:00
<form action="/update/{{item.assettag}}" method="get">
2025-01-29 05:27:19 +00:00
<button type="submit">Edit</button>
</form>
</td>
<td>
2025-01-29 10:05:36 +00:00
<form action="/delete/{{item.assettag}}" method="get">
2025-01-29 05:27:19 +00:00
<button type="submit">Delete</button>
</form>
</td>
</tr>
{% endfor %}
</table>
<br>
<form action="/create" method="get">
<button type="submit">Add new Item</button>
</form>
<form method="POST">
<button type="submit">Export Data</button>
</form>
</body>
</html>