Refactored all template paths for #40

This commit is contained in:
Francesco 2023-11-24 16:54:18 +01:00
parent 3f7f60dd27
commit a40a9493b8
17 changed files with 63 additions and 63 deletions

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
<head th:replace="~{fragments/resources::head}">
<head th:replace="~{snapadmin/fragments/resources::head}">
</head>
<body>
<!-- Modal -->
@ -58,9 +58,9 @@
<!-- End modal -->
<div class="bg-light main-wrapper">
<nav th:replace="~{fragments/resources :: navbar}"></nav>
<nav th:replace="~{snapadmin/fragments/resources :: navbar}"></nav>
<div class="d-flex">
<div th:replace="~{fragments/resources :: sidebar('console')}"></div>
<div th:replace="~{snapadmin/fragments/resources :: sidebar('console')}"></div>
<div class="main-content bg-lighter">
<h1 class="fw-bold mb-4"><i class="align-middle bi bi-terminal"></i><span class="align-middle"> SQL console</span></h1>
<div class="row mt-4">
@ -186,7 +186,7 @@
<div th:replace="~{fragments/generic_table :: table(results=${results})}"></div>
<div th:replace="~{snapadmin/fragments/generic_table :: table(results=${results})}"></div>
@ -267,7 +267,7 @@
</div>
<div th:if="${error != null}">
<div class="separator mt-3 mb-3"></div>
<th:block th:replace="~{fragments/resources :: alerts}"></th:block>
<th:block th:replace="~{snapadmin/fragments/resources :: alerts}"></th:block>
</div>
</div>
</div>

View File

@ -24,7 +24,7 @@
<span class="font-monospace null-label">NULL</span>
</th:block>
<th:block th:if="${row.has(field)}">
<th:block th:replace="~{fragments/data_row :: data_row_field(field=${field}, object=${row})}"></th:block>
<th:block th:replace="~{snapadmin/fragments/data_row :: data_row_field(field=${field}, object=${row})}"></th:block>
</th:block>
</td>

View File

@ -90,7 +90,7 @@
<option th:value="${op}" th:each="op : ${field.getType().getCompareOperators()}"
th:text="${op.getDisplayName()}">
</select>
<input th:replace="~{fragments/search_inputs ::
<input th:replace="~{snapadmin/fragments/search_inputs ::
__${field.getFragmentName()}__(
field=${field},
create=${create},

View File

@ -5,7 +5,7 @@
<tr th:fragment="data_row(row)" class="table-data-row">
<td th:each="field : ${row.getSortedFields()}"
th:classAppend="${field.isBinary() ? 'text-center' : ''}">
<th:block th:replace="~{fragments/generic_data_row :: data_row_field(field=${field}, object=${row})}"></th:block>
<th:block th:replace="~{snapadmin/fragments/generic_data_row :: data_row_field(field=${field}, object=${row})}"></th:block>
</td>
</tr>

View File

@ -25,7 +25,7 @@
</th>
</tr>
<th:block th:each="r : ${results.getRows()}">
<tr th:replace="~{fragments/generic_data_row :: data_row(row=${r})}">
<tr th:replace="~{snapadmin/fragments/generic_data_row :: data_row(row=${r})}">
</tr>
</th:block>

View File

@ -35,7 +35,7 @@
</th>
</tr>
<th:block th:each="r : ${results}">
<tr th:replace="~{fragments/data_row :: data_row(row=${r}, selectable=${false})}">
<tr th:replace="~{snapadmin/fragments/data_row :: data_row(row=${r}, selectable=${false})}">
</tr>
</th:block>

View File

@ -28,7 +28,7 @@
<div th:if="${results.size() > 0}">
<form id="multi-delete-form" th:action="|/${snapadmin_baseUrl}/model/${schema.getClassName()}/delete|" method="POST">
</form>
<nav th:replace="~{fragments/resources :: pagination(${page})}">
<nav th:replace="~{snapadmin/fragments/resources :: pagination(${page})}">
</nav>
<table class="table table-striped align-middle mt-3">
<tr class="table-data-row">
@ -48,7 +48,7 @@
</div>
<div class="align-items-center">
<h4 class="m-0" th:if="${page}">
<th:block th:replace="~{fragments/table_selectable ::
<th:block th:replace="~{snapadmin/fragments/table_selectable ::
sort_arrow(sortKey=${sortKey},
sortOrder=${sortOrder},
fieldName=${field.getJavaName()})}">
@ -68,10 +68,10 @@
</th>
</tr>
<th:block th:each="r : ${results}">
<tr th:replace="~{fragments/data_row :: data_row(row=${r},selectable=${true})}"></tr>
<tr th:replace="~{snapadmin/fragments/data_row :: data_row(row=${r},selectable=${true})}"></tr>
</th:block>
</table>
<nav th:replace="~{fragments/resources :: pagination(${page})}">
<nav th:replace="~{snapadmin/fragments/resources :: pagination(${page})}">
</nav>
</div>
</div>

View File

@ -1,12 +1,12 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
<head th:replace="~{fragments/resources::head}">
<head th:replace="~{snapadmin/fragments/resources::head}">
</head>
<body>
<div class="bg-light main-wrapper">
<nav th:replace="~{fragments/resources :: navbar}"></nav>
<nav th:replace="~{snapadmin/fragments/resources :: navbar}"></nav>
<div class="d-flex">
<div th:replace="~{fragments/resources :: sidebar('entities')}"></div>
<div th:replace="~{snapadmin/fragments/resources :: sidebar('entities')}"></div>
<div class="main-content bg-lighter">
<div class="row mt-4">
<div class="col">

View File

@ -1,12 +1,12 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
<head th:replace="~{fragments/resources::head}">
<head th:replace="~{snapadmin/fragments/resources::head}">
</head>
<body>
<div class="bg-light main-wrapper">
<nav th:replace="~{fragments/resources :: navbar}"></nav>
<nav th:replace="~{snapadmin/fragments/resources :: navbar}"></nav>
<div class="d-flex">
<div th:replace="~{fragments/resources :: sidebar('entities')}"></div>
<div th:replace="~{snapadmin/fragments/resources :: sidebar('entities')}"></div>
<div class="main-content bg-lighter">
<h1 class="fw-bold mb-4"><i class="align-middle bi bi-database"></i><span class="align-middle"> Entities</span></h1>
<th:block th:if="${!snapadmin_authenticated}">

View File

@ -1,14 +1,14 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
<head th:replace="~{fragments/resources::head}">
<head th:replace="~{snapadmin/fragments/resources::head}">
</head>
<body>
<div class="bg-light main-wrapper">
<nav th:replace="~{fragments/resources :: navbar}"></nav>
<nav th:replace="~{snapadmin/fragments/resources :: navbar}"></nav>
<div class="d-flex">
<div th:replace="~{fragments/resources :: sidebar('logs')}"></div>
<div th:replace="~{snapadmin/fragments/resources :: sidebar('logs')}"></div>
<div class="main-content bg-lighter">
<th:block th:replace="~{fragments/resources :: alerts}"></th:block>
<th:block th:replace="~{snapadmin/fragments/resources :: alerts}"></th:block>
<h1 class="fw-bold mb-4"><i class="align-middle bi bi-gear"></i>
<span class="align-middle">Logs</span>
</h1>
@ -58,7 +58,7 @@
<div class="alert alert-warning">There are no results for your filtering criteria</div>
</div>
<div class="table-responsive mt-3" th:if="${!page.isEmpty()}">
<nav th:replace="~{fragments/resources :: pagination(page=${page})}"></nav>
<nav th:replace="~{snapadmin/fragments/resources :: pagination(page=${page})}"></nav>
<table class="table table-striped mt-3">
<tr class="table-data-row">
@ -66,7 +66,7 @@
<div class="d-flex justify-content-between">
<div>Action type</div>
<h4>
<th:block th:replace="~{fragments/table_selectable ::
<th:block th:replace="~{snapadmin/fragments/table_selectable ::
sort_arrow(sortKey=${searchRequest.getSortKey()},
sortOrder=${searchRequest.getSortOrder()},
fieldName='actionType')}">
@ -77,7 +77,7 @@
<div class="d-flex justify-content-between">
<div>Table</div>
<h4>
<th:block th:replace="~{fragments/table_selectable ::
<th:block th:replace="~{snapadmin/fragments/table_selectable ::
sort_arrow(sortKey=${searchRequest.getSortKey()},
sortOrder=${searchRequest.getSortOrder()},
fieldName='onTable')}">
@ -88,7 +88,7 @@
<div class="d-flex justify-content-between">
<div>Item ID</div>
<h4>
<th:block th:replace="~{fragments/table_selectable ::
<th:block th:replace="~{snapadmin/fragments/table_selectable ::
sort_arrow(sortKey=${searchRequest.getSortKey()},
sortOrder=${searchRequest.getSortOrder()},
fieldName='primaryKey')}">
@ -99,7 +99,7 @@
<div class="d-flex justify-content-between">
<div>Time</div>
<h4>
<th:block th:replace="~{fragments/table_selectable ::
<th:block th:replace="~{snapadmin/fragments/table_selectable ::
sort_arrow(sortKey=${searchRequest.getSortKey()},
sortOrder=${searchRequest.getSortOrder()},
fieldName='createdAt')}">
@ -110,7 +110,7 @@
<div class="d-flex justify-content-between">
<div>User</div>
<h4>
<th:block th:replace="~{fragments/table_selectable ::
<th:block th:replace="~{snapadmin/fragments/table_selectable ::
sort_arrow(sortKey=${searchRequest.getSortKey()},
sortOrder=${searchRequest.getSortOrder()},
fieldName='username')}">
@ -151,7 +151,7 @@
</tr>
</table>
<nav th:replace="~{fragments/resources :: pagination(page=${page})}"></nav>
<nav th:replace="~{snapadmin/fragments/resources :: pagination(page=${page})}"></nav>
</div>

View File

@ -1,15 +1,15 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
<head th:replace="~{fragments/resources::head}">
<head th:replace="~{snapadmin/fragments/resources::head}">
</head>
<body>
<div class="bg-light main-wrapper">
<nav th:replace="~{fragments/resources :: navbar}"></nav>
<nav th:replace="~{snapadmin/fragments/resources :: navbar}"></nav>
<div class="d-flex">
<div th:replace="~{fragments/resources :: sidebar('entities')}"></div>
<div th:replace="~{snapadmin/fragments/resources :: sidebar('entities')}"></div>
<div class="main-content bg-lighter">
<th:block th:replace="~{fragments/resources :: alerts}"></th:block>
<th:block th:replace="~{snapadmin/fragments/resources :: alerts}"></th:block>
<h1 class="fw-bold mb-4">
<i class="align-middle bi bi-database"></i>
@ -41,14 +41,14 @@
</label>
<th:block th:if="${field.isForeignKey()}">
<div th:replace="~{fragments/forms :: input_autocomplete(field=${field}, value=${
<div th:replace="~{snapadmin/fragments/forms :: input_autocomplete(field=${field}, value=${
create ? (params != null ? params.getOrDefault(field.getName(), '') : '')
: (object != null ? object.traverse(field).getPrimaryKeyValue() : '' )
})}">
</div>
</th:block>
<th:block th:unless="${field.isForeignKey()}">
<th:block th:replace="~{fragments/inputs ::
<th:block th:replace="~{snapadmin/fragments/inputs ::
__${field.getFragmentName()}__(
field=${field},
create=${create},
@ -68,7 +68,7 @@
<div th:each="field : ${schema.getManyToManyOwnedFields()}" class="mt-3">
<h2><span th:title="|${field.getType()} relationship|"><i class="bi bi-share"></i> [[ ${field.getJavaName()} ]]</span></h2>
<div th:replace="~{fragments/forms :: input_autocomplete_multi(field=${field},
<div th:replace="~{snapadmin/fragments/forms :: input_autocomplete_multi(field=${field},
values=${object != null ? object.traverseMany(field) : null } )}">
</div>
</div>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
<head th:replace="~{fragments/resources::head}">
<head th:replace="~{snapadmin/fragments/resources::head}">
</head>
<body>
<!-- Modal -->
@ -96,11 +96,11 @@
<div class="bg-light main-wrapper">
<nav th:replace="~{fragments/resources :: navbar}"></nav>
<nav th:replace="~{snapadmin/fragments/resources :: navbar}"></nav>
<div class="d-flex">
<div th:replace="~{fragments/resources :: sidebar('entities')}"></div>
<div th:replace="~{snapadmin/fragments/resources :: sidebar('entities')}"></div>
<div class="main-content bg-lighter">
<th:block th:replace="~{fragments/resources :: alerts}"></th:block>
<th:block th:replace="~{snapadmin/fragments/resources :: alerts}"></th:block>
<h1 class="fw-bold mb-4"><i class="align-middle bi bi-database"></i>
<span class="align-middle"><a th:href="|/${snapadmin_baseUrl}|">Entities</a></span>
<i class="align-middle bi bi-chevron-double-right"></i>
@ -165,7 +165,7 @@
</div>
<th:block th:if="${page}">
<div th:replace="~{fragments/table_selectable :: table(results=${page.getResults()}, schema=${schema})}">
<div th:replace="~{snapadmin/fragments/table_selectable :: table(results=${page.getResults()}, schema=${schema})}">
</div>
</th:block>
</div>
@ -202,7 +202,7 @@
</div>
<th:block th:each="field : ${schema.getFilterableFields()}">
<div th:replace="~{fragments/forms :: filter_field(field=${field})}"></div>
<div th:replace="~{snapadmin/fragments/forms :: filter_field(field=${field})}"></div>
</th:block>
</div>

View File

@ -1,13 +1,13 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
<head th:replace="~{fragments/resources::head}">
<head th:replace="~{snapadmin/fragments/resources::head}">
</head>
<body>
<div class="bg-light main-wrapper">
<nav th:replace="~{fragments/resources :: navbar}"></nav>
<nav th:replace="~{snapadmin/fragments/resources :: navbar}"></nav>
<div class="d-flex">
<div th:replace="~{fragments/resources :: sidebar('entities')}"></div>
<div th:replace="~{snapadmin/fragments/resources :: sidebar('entities')}"></div>
<div class="main-content bg-lighter">
<h1 class="fw-bold mb-4"><i class="bi bi-database"></i>
<a class="align-middle" th:href="|/${snapadmin_baseUrl}|">Entities</a>

View File

@ -1,13 +1,13 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
<head th:replace="~{fragments/resources::head}">
<head th:replace="~{snapadmin/fragments/resources::head}">
</head>
<body>
<div class="bg-light main-wrapper">
<nav th:replace="~{fragments/resources :: navbar}"></nav>
<nav th:replace="~{snapadmin/fragments/resources :: navbar}"></nav>
<div class="d-flex">
<div th:replace="~{fragments/resources :: sidebar('entities')}"></div>
<div th:replace="~{snapadmin/fragments/resources :: sidebar('entities')}"></div>
<div class="main-content bg-lighter">
<h1 class="fw-bold mb-4"><i class="align-middle bi bi-database"></i>
<a class="align-middle" th:href="|/${snapadmin_baseUrl}|">Entities</a>
@ -63,7 +63,7 @@
<span class="font-monospace null-label">NULL</span>
</th:block>
<th:block th:if="${object.has(field)}">
<th:block th:replace="~{fragments/data_row :: data_row_field(field=${field}, object=${object})}"></th:block>
<th:block th:replace="~{snapadmin/fragments/data_row :: data_row_field(field=${field}, object=${object})}"></th:block>
</th:block>
</td>
<td class="dbfieldtype" th:text="${field.getType()}">
@ -90,7 +90,7 @@
<span class="align-middle">[[ ${field.getJavaName()} ]]</span>
</span>
</h2>
<div th:replace="~{fragments/table :: table(schema=${field.getConnectedSchema()},
<div th:replace="~{snapadmin/fragments/table :: table(schema=${field.getConnectedSchema()},
results=${object.getValues(field)})}">
</div>
</div>

View File

@ -1,13 +1,13 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
<head th:replace="~{fragments/resources::head}">
<head th:replace="~{snapadmin/fragments/resources::head}">
</head>
<body>
<div class="bg-light main-wrapper">
<nav th:replace="~{fragments/resources :: navbar}"></nav>
<nav th:replace="~{snapadmin/fragments/resources :: navbar}"></nav>
<div class="d-flex">
<div th:replace="~{fragments/resources :: sidebar('entities')}"></div>
<div th:replace="~{snapadmin/fragments/resources :: sidebar('entities')}"></div>
<div class="main-content bg-lighter">
<h1 class="fw-bold mb-4"><i class="align-middle bi bi-exclamation-octagon"></i>
<span class="align-middle">Error</span>

View File

@ -1,14 +1,14 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
<head th:replace="~{fragments/resources::head}">
<head th:replace="~{snapadmin/fragments/resources::head}">
</head>
<body>
<div class="bg-light main-wrapper">
<nav th:replace="~{fragments/resources :: navbar}"></nav>
<nav th:replace="~{snapadmin/fragments/resources :: navbar}"></nav>
<div class="d-flex">
<div th:replace="~{fragments/resources :: sidebar('entities')}"></div>
<div th:replace="~{snapadmin/fragments/resources :: sidebar('entities')}"></div>
<div class="main-content bg-lighter">
<th:block th:replace="~{fragments/resources :: alerts}"></th:block>
<th:block th:replace="~{snapadmin/fragments/resources :: alerts}"></th:block>
<h1 class="fw-bold mb-4"><i class="align-middle bi bi-gear"></i>
<span class="align-middle"><a th:href="|/${snapadmin_baseUrl}|">Settings</a></span>
</h1>

View File

@ -1,14 +1,14 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
<head th:replace="~{fragments/resources::head}">
<head th:replace="~{snapadmin/fragments/resources::head}">
</head>
<body>
<div class="bg-light main-wrapper">
<nav th:replace="~{fragments/resources :: navbar}"></nav>
<nav th:replace="~{snapadmin/fragments/resources :: navbar}"></nav>
<div class="d-flex">
<div th:replace="~{fragments/resources :: sidebar('entities')}"></div>
<div th:replace="~{snapadmin/fragments/resources :: sidebar('entities')}"></div>
<div class="main-content bg-lighter">
<th:block th:replace="~{fragments/resources :: alerts}"></th:block>
<th:block th:replace="~{snapadmin/fragments/resources :: alerts}"></th:block>
<h1 class="fw-bold mb-4"><i class="align-middle bi bi-gear"></i>
<span class="align-middle"><a th:href="|/${snapadmin_baseUrl}|">Settings</a></span>
</h1>