Can show an asset

This commit is contained in:
2025-06-08 06:47:34 +02:00
parent 257abddc15
commit d4718d15c3
10 changed files with 119 additions and 8 deletions

View File

@@ -4,7 +4,12 @@
<title>PC Inventory</title>
</head>
<body>
<h1>PC Inventory - <span th:text="${title}"></span></h1>
<h1>PC Inventory - <span th:text="${title}"></span>
</h1>
<hr>
<a href="/">Home</a>
<a href="/browse">Browse</a>
<a href="/create">Create</a>
<hr>
<div th:replace="${content}">
</div>

View File

@@ -1,6 +1,5 @@
<div th:replace="fragments :: base(title='Home', content=~{::content})">
<div th:fragment="content">
<a href="/create">Create a new device</a>
<p>This system holds <span th:text="${asset_count}">5</span> assets.</p>
</div>
</div>

View File

@@ -0,0 +1,14 @@
<body th:replace="~{fragments :: base(title='Select type to create', content=~{::content})}">
<div th:fragment="content">
View device details
<div th:each="d : ${descriptors}">
<h2 th:text="${d.displayName}"></h2>
<table border="1">
<tr th:each="p : ${d.properties}">
<td><b th:text="${p.displayName}"></b></td>
<td th:text="${p.renderValue(asset)}"></td>
</tr>
</table>
</div>
</div>
</body>