mirror of
https://github.com/dalbodeule/snap-admin.git
synced 2025-08-13 07:01:13 +00:00
WIP SQL console: foreign key resolution
This commit is contained in:
@@ -123,6 +123,10 @@ h1 a:hover {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.inner-navigation .query-tab {
|
||||
min-width: 128px;
|
||||
}
|
||||
|
||||
.inner-navigation a:first-child {
|
||||
border-top-left-radius: 5px;
|
||||
background-color: #FAFAFA;
|
||||
|
@@ -13,7 +13,7 @@
|
||||
<div class="col">
|
||||
<div class="w-100 d-flex inner-navigation">
|
||||
<a th:each="query : ${tabs}" th:href="|/${dbadmin_baseUrl}/console/run/${query.getId()}|"
|
||||
class="d-inline-block"
|
||||
class="d-inline-block query-tab"
|
||||
th:classAppend="${query.getId() == activeQuery.getId() ? 'active' : ''}">
|
||||
<div class="ui-tab ps-5 pe-5 p-3">
|
||||
<i class="bi bi-filetype-sql pe-2"></i>
|
||||
|
@@ -19,7 +19,18 @@
|
||||
</th:block>
|
||||
<th:block th:if="${!field.isBinary()}">
|
||||
|
||||
<span th:if="${object.get(field) != null}" th:text="${object.get(field)}"></span>
|
||||
<span th:if="${object.get(field) != null}">
|
||||
<th:block th:if="${field.isForeignKey()}">
|
||||
<a th:href="|/${dbadmin_baseUrl}/model/${field.getConnectedType().getName()}/show/${object.get(field)}|">
|
||||
<span th:text="${object.get(field)}"></span>
|
||||
</a>
|
||||
<p class="p-0 m-0"
|
||||
th:text="${object.traverse(field).getDisplayName()}"></p>
|
||||
</th:block>
|
||||
<th:block th:if="${!field.isForeignKey()}">
|
||||
<span th:text="${object.get(field)}"></span>
|
||||
</th:block>
|
||||
</span>
|
||||
<span th:if="${object.get(field) == null}" class="null-label font-monospace">NULL</span>
|
||||
</th:block>
|
||||
</th:block>
|
||||
|
Reference in New Issue
Block a user