Add support for hiding properties in asset overview and enhance input list handling
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
There are <span th:text="${assets.size()}"></span> <span th:text="${descriptor.pluralName}"></span> in the database.
|
||||
<table border="1" cellpadding="4">
|
||||
<tr bgcolor="#d3d3d3">
|
||||
<th th:each="p : ${properties}" th:text="${p.displayName}"></th>
|
||||
<th th:each="p : ${properties}" th:if="${!p.hideInOverview}" th:text="${p.displayName}"></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<tr th:each="a : ${assets}">
|
||||
<td th:each="p : ${properties}">
|
||||
<td th:each="p : ${properties}" th:if="${!p.hideInOverview}">
|
||||
<a th:if="${p.name == 'qr'}" th:href="'/view/'+${a.getQr()}" th:text="${p.renderValue(a)}"></a>
|
||||
<span th:if="${p.name != 'qr'}" th:text="${p.renderValue(a)}"></span>
|
||||
</td>
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
<tr th:each="p : ${d.getProperties()}">
|
||||
<td bgcolor="#d3d3d3"><b><label th:text="${p.displayName}" th:for="${d.asString(p)}"></label></b></td>
|
||||
<td th:switch="${p.type.nameOrEnum()}">
|
||||
<span th:case="STRING">
|
||||
<select th:if="${p.inputList}" th:id="${d.asString(p)+'-list'}" th:name="${d.asString(p)+'-list'}">
|
||||
<option value="__new__">New...</option>
|
||||
<option th:each="e : ${inputLists.get(d.asString(p))}" th:text="${e}" th:value="${e}"></option>
|
||||
</select>
|
||||
<span th:if="${p.inputList}"> or </span>
|
||||
<input type="text" th:id="${d.asString(p)}" th:name="${d.asString(p)}" th:value="${p.getValue(asset)}" th:placeholder="${p.displayName}" th:required="${p.required}"/>
|
||||
</span>
|
||||
<input th:case="STRING" type="text" th:id="${d.asString(p)}" th:name="${d.asString(p)}" th:value="${p.getValue(asset)}" th:placeholder="${p.displayName}" th:required="${p.required}"/>
|
||||
<input th:case="INTEGER" type="number" th:id="${d.asString(p)}" th:name="${d.asString(p)}" th:value="${p.getValue(asset)}" th:required="${p.required}"/>
|
||||
<select th:case="enum" th:id="${d.asString(p)}" th:name="${d.asString(p)}">
|
||||
|
||||
Reference in New Issue
Block a user