Compare commits

...

5 Commits

Author SHA1 Message Date
Josha von Gizycki d4ef00260d preparations for deleting label fields 1 month ago
Josha von Gizycki cadd6e8721 nice autofocus 1 month ago
Josha von Gizycki 8c525e4e73 select fields explicitly 1 month ago
Josha von Gizycki 2a04b5e081 update spring 1 month ago
Josha von Gizycki b646368bf4 nicer table colours 1 month ago

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>3.5.3</version> <version>3.5.8</version>
<relativePath/> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from repository -->
</parent> </parent>
<groupId>wanijo</groupId> <groupId>wanijo</groupId>

@ -46,7 +46,11 @@ interface DocumentDao : Repository<Document, DocumentId> {
@Query( @Query(
""" """
SELECT doc.* SELECT doc.id,
doc.name,
doc.description,
doc.updated_at,
doc.created_at
FROM t_document doc FROM t_document doc
JOIN t_document_tagging tagging JOIN t_document_tagging tagging
ON tagging.document_id = doc.id ON tagging.document_id = doc.id

@ -0,0 +1,7 @@
package wanijo.wanijo2.http.controller
import org.springframework.stereotype.Controller
@Controller
class RemoveLabelFieldController {
}

@ -2,6 +2,8 @@ body {
--dark-grey: #717171; --dark-grey: #717171;
--light-grey: #858585; --light-grey: #858585;
--warning: #ce0000; --warning: #ce0000;
--table-header: #c0c0c0;
--table-highlight: #e5e4e4;
margin: 0 3%; margin: 0 3%;
font-family: sans-serif; font-family: sans-serif;
@ -87,6 +89,10 @@ main {
h2 .low-key-hint { h2 .low-key-hint {
color: var(--light-grey); color: var(--light-grey);
} }
button {
padding: .3rem;
}
} }
table { table {
@ -97,12 +103,12 @@ table {
} }
thead { thead {
background-color: ButtonFace; background-color: var(--table-header);
} }
tbody { tbody {
tr:hover { tr:hover {
background-color: ButtonBorder; background-color: var(--table-highlight);
} }
} }
} }
@ -124,10 +130,6 @@ form {
textarea { textarea {
min-height: 20rem; min-height: 20rem;
} }
[type=submit] {
padding: .3rem;
}
} }
.form-link { .form-link {
@ -146,6 +148,10 @@ form {
} }
} }
.form-inline { .form-single {
display: block; display: block;
} }
.form-inline {
display: inline;
}

@ -20,7 +20,7 @@
<input type="hidden" th:field="*{documentId}"> <input type="hidden" th:field="*{documentId}">
<label for="labelName">name</label> <label for="labelName">name</label>
<input id="labelName" type="text" th:field="*{labelName}" required> <input id="labelName" type="text" th:field="*{labelName}" required autofocus>
<label for="labelValue">wert</label> <label for="labelValue">wert</label>
<input id="labelValue" th:field="*{labelValue}" type="text" required> <input id="labelValue" th:field="*{labelValue}" type="text" required>

@ -56,11 +56,21 @@
<h2 class="low-key-hint">felder</h2> <h2 class="low-key-hint">felder</h2>
<h3 class="low-key-hint"> <h3 class="low-key-hint">
label label
<a th:href="@{/document/{id}/field/label/add(id=${document.id})}">(+)</a> <a th:href="@{/document/{id}/field/label/add(id=${document.id})}">
<button>
neu
</button>
</a>
</h3> </h3>
<dl> <dl>
<th:block th:each="field : ${document.labelFields}"> <th:block th:each="field : ${document.labelFields}">
<dt th:text="${field.name}"></dt> <dt>
<th:block th:text="${field.name}" />
<form class="form-inline" th:action="@{/document/{id}/field/label/delete(id=${document.id})}" method="post">
<input type="hidden" name="labelId" th:value="${field.id}">
<button type="submit" class="warning">weg</button>
</form>
</dt>
<dd th:text="${field.value}"></dd> <dd th:text="${field.value}"></dd>
</th:block> </th:block>
</dl> </dl>
@ -88,7 +98,7 @@
</ul> </ul>
<h2 class="warning">gefahr</h2> <h2 class="warning">gefahr</h2>
<form class="form-inline" th:action="@{/document/delete}" method="post"> <form class="form-single" th:action="@{/document/delete}" method="post">
<input type="hidden" name="documentId" th:value="${document.id}"> <input type="hidden" name="documentId" th:value="${document.id}">
<button type="submit" class="warning"> <button type="submit" class="warning">
LÖSCHEN LÖSCHEN

Loading…
Cancel
Save