flask_crud_app/templates/viewList.html

66 lines
1.6 KiB
HTML

<!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>
<th>Asset Tag</th>
<th>Host Name</th>
<th>Warranty From</th>
<th>Status</th>
<th>Staff No.</th>
</tr>
{% for item in items %}
<tr>
<td>
{{item.assettag}}
</td>
<td>
{{item.hostname}}
</td>
<td>
{{item.warrantyfrom}}
</td>
<td>
{{item.status}}
</td>
<td>
{{item.staffnum}}
</td>
<td>
<form action="/update/{{item.assettag}}" method="get">
<button type="submit">Edit</button>
</form>
</td>
<td>
<form action="/delete/{{item.assettag}}" method="get">
<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 action="/uploadcsv" method="get">
<button type="submit">Import from CSV</button>
</form>
<form method="POST">
<button type="submit">Export Data</button>
</form>
</body>
</html>