53 lines
2.7 KiB
HTML
53 lines
2.7 KiB
HTML
<body th:replace="~{fragments :: base(title='View asset information', content=~{::content})}">
|
|
<div th:fragment="content">
|
|
<h2 th:if="${action == 'view'}">Details of <span th:text="${descriptor.displayName}">Hard Disk Drive</span> <span th:text="${asset.getQr()}">21</span></h2>
|
|
<h2 th:if="${action == 'delete'}">Are you sure you want to delete <span th:text="${descriptor.displayName}">Hard Disk Drive</span> <span th:text="${asset.getQr()}">21</span></h2>
|
|
<div th:each="d : ${descriptors}">
|
|
<h2 th:text="${d.displayName}"></h2>
|
|
<table border="1" cellpadding="4">
|
|
<tr th:each="p : ${d.properties}">
|
|
<th bgcolor="lightgray"><b th:text="${p.displayName}"></b></th>
|
|
<td th:if="${p.name == 'build'}">
|
|
<a th:if="${asset.getAsset().getBuild() != null}" th:href="'/build/' + ${asset.getAsset().getBuild().id}" th:text="${p.renderValue(asset)}"></a>
|
|
<span th:if="${asset.getAsset().getBuild() == null}" th:text="${p.renderValue(asset)}"></span>
|
|
</td>
|
|
<td th:if="${p.name != 'build'}" th:text="${p.renderValue(asset)}"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<p>
|
|
<ul th:if="${action == 'view'}">
|
|
<li><a th:href="'/edit/'+${asset.getQr()}">Edit</a></li>
|
|
<li><a th:href="'/delete/'+${asset.getQr()}">Delete</a></li>
|
|
<li><a th:href="'/create/'+${asset.getAsset().type}">Create another <span th:text="${descriptor.displayName}">Hard Drive</span></a></li>
|
|
<li><a th:href="'/duplicate/'+${asset.getQr()}">Duplicate this <span th:text="${descriptor.displayName}">Hard Drive</span></a></li>
|
|
<li><a th:href="'/browse/'+${descriptor.type}">Browse all <span th:text="${descriptor.pluralName}">Hard Drives</span></a></li>
|
|
</ul>
|
|
<ul th:if="${action == 'delete'}">
|
|
<li><a th:href="'/view/'+${asset.getQr()}">No</a></li>
|
|
<li><a th:href="'/delete/'+${asset.getQr()}+'?confirm=true'">Yes, delete it</a></li>
|
|
</ul>
|
|
</p>
|
|
<p th:if="${action == 'view'}">
|
|
<h2>Work Log</h2>
|
|
<form th:action="'/view/'+${asset.getQr()}" method="post">
|
|
<input type="hidden" th:value="${worklog.size()}" name="worklog_size">
|
|
<table border="1" cellpadding="4">
|
|
<tr>
|
|
<th bgcolor="lightgray"><b>Date</b></th>
|
|
<th bgcolor="lightgray"><b>Comment</b></th>
|
|
</tr>
|
|
<tr>
|
|
<td align="center"><input type="submit" value="Post Entry"></td>
|
|
<td><input type="text" name="comment" placeholder="Comment"></td>
|
|
</tr>
|
|
<tr th:each="w : ${worklog}">
|
|
<td th:text="${#temporals.format(w.date, 'dd/MM/yyyy')} + ' at ' + ${#temporals.format(w.date, 'HH:mm')}"></td>
|
|
<td th:text="${w.comment}"></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</p>
|
|
</div>
|
|
</body>
|