mirror of
https://github.com/dalbodeule/snap-admin.git
synced 2025-06-08 21:38:21 +00:00
52 lines
1.7 KiB
HTML
52 lines
1.7 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
|
|
<head></head>
|
|
<body>
|
|
<div th:fragment="table(results, schema)">
|
|
<div th:if="${results == null || results.isEmpty()}">
|
|
<p class="alert alert-warning">This table contains no data.</p>
|
|
</div>
|
|
<div th:if="${results != null && results.size() > 0}">
|
|
<table class="table table-striped align-middle mt-3">
|
|
<tr class="table-data-row">
|
|
<th class="row-icons"></th>
|
|
<th th:each="field : ${schema.getSortedFields()}">
|
|
<div class="m-0 p-0 d-flex justify-content-between">
|
|
<div class="column-title">
|
|
<span th:if="${field.isPrimaryKey()}">
|
|
<i title="Primary Key" class="bi bi-key"></i>
|
|
</span>
|
|
<span th:if="${field.isForeignKey()}">
|
|
<i title="Foreign Key" class="bi bi-link"></i>
|
|
</span>
|
|
<span class="m-0 p-0" th:text="${field.getName()}"></span>
|
|
</div>
|
|
</div>
|
|
<p class="m-0 p-0 dbfieldtype"><small th:text="${field.getType()}"></small></p>
|
|
</th>
|
|
<th class="table-data-row" th:each="colName : ${schema.getComputedColumnNames()}">
|
|
<div class="m-0 p-0 d-flex justify-content-between">
|
|
<div class="column-title">
|
|
<i title="Primary Key" class="bi bi-cpu"></i>
|
|
<span class="m-0 p-0" th:text="${colName}"></span>
|
|
</div>
|
|
</div>
|
|
<p class="m-0 p-0 dbfieldtype"><small>COMPUTED</small></p>
|
|
</th>
|
|
</tr>
|
|
<th:block th:each="r : ${results}">
|
|
<tr th:replace="~{fragments/data_row :: data_row(row=${r}, selectable=${false})}">
|
|
</tr>
|
|
</th:block>
|
|
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|