basic contact overview
This commit is contained in:
21
src/main/resources/application.properties
Normal file
21
src/main/resources/application.properties
Normal file
@ -0,0 +1,21 @@
|
||||
# jooq
|
||||
spring.datasource.driver-class-name=org.postgresql.Driver
|
||||
spring.datasource.url=jdbc:postgresql://localhost:5432/timetrack
|
||||
spring.datasource.username=timetrack
|
||||
spring.datasource.password=timetrack
|
||||
|
||||
# application
|
||||
server.port = 8083
|
||||
|
||||
server.servlet.context-path=/timetrack
|
||||
|
||||
# keycloak
|
||||
keycloak.auth-server-url = http://localhost:8080/
|
||||
keycloak.realm = jottyfan
|
||||
keycloak.resource = timetrack
|
||||
keycloak.public-client = true
|
||||
keycloak.security-constraints[0].authRoles[0] = timetrack_user
|
||||
keycloak.security-constraints[0].securityCollections[0].patterns[0] = /*
|
||||
#keycloak.credentia
|
||||
keycloak.use-resource-role-mappings=true
|
||||
#keycloak.bearer-only=true
|
109
src/main/resources/static/css/style.css
Normal file
109
src/main/resources/static/css/style.css
Normal file
@ -0,0 +1,109 @@
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #eee;
|
||||
height: calc(100% - 76px);
|
||||
}
|
||||
|
||||
.body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.page {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding-bottom: 12px;
|
||||
background-image: linear-gradient(to bottom, #eee, #777)
|
||||
!important;
|
||||
}
|
||||
|
||||
.emph {
|
||||
border-radius: 3px !important;
|
||||
border: 1px solid #3070b0 !important;
|
||||
color: #ffffff !important;
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%)
|
||||
!important;
|
||||
}
|
||||
|
||||
.doneoverviewtext {
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
.doneoverviewtextemph {
|
||||
font-size: 120%;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.loginpanel {
|
||||
margin-top: 100px !important;
|
||||
margin: 0 auto;
|
||||
max-width: 400px !important;
|
||||
width: 400px !important;
|
||||
}
|
||||
|
||||
.successWell {
|
||||
background-image: linear-gradient(to bottom, #ceeaca 0%, #f7fff7 100%)
|
||||
!important;
|
||||
}
|
||||
|
||||
.dangerWell {
|
||||
background-image: linear-gradient(to bottom, #eacaca 0%, #fff7f7 100%)
|
||||
!important;
|
||||
}
|
||||
|
||||
.WP2 {
|
||||
color: black !important;
|
||||
background: radial-gradient(#ffff00, #ffe169) !important;
|
||||
border: 1px solid darkgray;
|
||||
padding-top: 8px !important;
|
||||
}
|
||||
|
||||
.WP4 {
|
||||
color: black !important;
|
||||
background: radial-gradient(#00ffff, #69c3ff) !important;
|
||||
border: 1px solid darkgray;
|
||||
padding-top: 8px !important;
|
||||
}
|
||||
|
||||
.WP5 {
|
||||
color: black !important;
|
||||
background: radial-gradient(#ff0000, #e396ff) !important;
|
||||
border: 1px solid darkgray;
|
||||
padding-top: 8px !important;
|
||||
}
|
||||
|
||||
.TA3 {
|
||||
color: black !important;
|
||||
background: radial-gradient(#99ff99, #ccffcc) !important;
|
||||
border: 1px solid darkgray;
|
||||
padding-top: 8px !important;
|
||||
}
|
||||
|
||||
.left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.prompt {
|
||||
margin: 4px;
|
||||
padding: 4px !important;
|
||||
padding-bottom: 2px !important;
|
||||
font-size: medium !important;
|
||||
background-color: #005782 !important;
|
||||
}
|
||||
|
||||
.version {
|
||||
font-size: small;
|
||||
color: silver;
|
||||
}
|
||||
|
||||
.fc-content {
|
||||
cursor: pointer;
|
||||
}
|
31
src/main/resources/templates/contact/contacts.html
Normal file
31
src/main/resources/templates/contact/contacts.html
Normal file
@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:sec="http://www.thymeleaf.org/extras/spring-security" layout:decorate="~{layout/main.html}">
|
||||
<head>
|
||||
<title>Kontakte</title>
|
||||
</head>
|
||||
<body>
|
||||
<ul layout:fragment="menu">
|
||||
<li class="nav-item" sec:authorize="hasRole('timetrack_user')"><a class="nav-link" th:href="@{/contact/add}">Neuen
|
||||
Kontakt anlegen</a></li>
|
||||
</ul>
|
||||
<main layout:fragment="content">
|
||||
<div class="row row-cols-12 ro-cols-lg-4 ro-cols-md-3 ro-cols-sd-2 g-4" style="margin: 8px">
|
||||
<div class="col" th:each="contact : ${contactList}">
|
||||
<div class="card text-dark bg-light shadow" style="width: 18rem">
|
||||
<div class="card-header text-center">
|
||||
<font th:text="${contact.forename} + ' ' + ${contact.surname}" style="font-size: larger"></font>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<span th:text="${contact.type} + ': ' + ${contact.contact}"></span> <a th:href="@{/contact/edit/{id}(id=${contact.pk})}"
|
||||
sec:authorize="hasRole('timetrack_user')" style="margin-left: 8px;"> <i class="fa fa-edit"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
34
src/main/resources/templates/contact/item.html
Normal file
34
src/main/resources/templates/contact/item.html
Normal file
@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:sec="http://www.thymeleaf.org/extras/spring-security" layout:decorate="~{layout/main.html}">
|
||||
<head>
|
||||
<title>Kontakt aktualisieren</title>
|
||||
</head>
|
||||
<body>
|
||||
<ul layout:fragment="menu">
|
||||
<li class="nav-item" sec:authorize="hasRole('timetrack_user')"><a class="nav-link" th:href="@{/contact/contacts}">abbrechen</a></li>
|
||||
</ul>
|
||||
<main layout:fragment="content">
|
||||
<div class="container">
|
||||
<form th:action="@{/contact/insert}" th:object="${contactBean}" method="post">
|
||||
<p>
|
||||
Inhalt von Eintrag <span th:text="*{pk}"></span>:
|
||||
</p>
|
||||
<input type="hidden" th:field="*{pk}" />
|
||||
<div class="form-group">
|
||||
<label>Vorname</label> <input type="text" th:field="*{forename}" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Nachname</label> <input type="text" th:field="*{surname}" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Kontakt</label> <input type="text" th:field="*{contact}" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Typ</label> <input type="text" th:field="*{type}" class="form-control" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
20
src/main/resources/templates/error.html
Normal file
20
src/main/resources/templates/error.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:sec="http://www.thymeleaf.org/extras/spring-security" layout:decorate="~{layout/main.html}">
|
||||
<head>
|
||||
<title>Timetrack</title>
|
||||
</head>
|
||||
<body>
|
||||
<ul layout:fragment="menu">
|
||||
</ul>
|
||||
<main layout:fragment="content">
|
||||
<div style="margin: 10vh">
|
||||
<div class="alert alert-danger" role="alert" style="vertical-align: middle; align: center">
|
||||
<p>Es ist ein Fehler aufgetreten.</p>
|
||||
<a th:href="@{/}" class="alert-link">Ach, Mist...</a>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
46
src/main/resources/templates/layout/main.html
Normal file
46
src/main/resources/templates/layout/main.html
Normal file
@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/webjars/bootstrap/5.1.3/css/bootstrap.min.css}" />
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/webjars/datatables/1.11.3/css/dataTables.bootstrap5.min.css}" />
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/webjars/font-awesome/5.15.4/css/all.min.css}">
|
||||
<link rel="stylesheet" type="text/css" th:href="@{/css/style.css}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" th:href="@{/png/favicon/favicon-32x32.png}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" th:href="@{/png/favicon/favicon-16x16.png}">
|
||||
|
||||
<script th:src="@{/webjars/jquery/3.6.0/jquery.min.js}"></script>
|
||||
<script th:src="@{/webjars/bootstrap/5.1.3/js/bootstrap.bundle.min.js}"></script>
|
||||
<script th:src="@{/webjars/datatables/1.11.3/js/jquery.dataTables.min.js}"></script>
|
||||
<script th:src="@{/webjars/datatables/1.11.3/js/dataTables.bootstrap5.min.js}"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light static-top">
|
||||
<div class="container-fluid" style="width: 98%">
|
||||
<a class="navbar-brand" th:href="@{/}"> <i class="fa fa-calendar-alt"></i> Timetrack
|
||||
<div class="version" th:text="${@manifestBean.getVersion()}"></div>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive"
|
||||
aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown"><a class="nav-link dropdown-toggle" href="#" id="navbarScrollingDropdown" role="button"
|
||||
data-bs-toggle="dropdown" aria-expanded="false"> Module </a>
|
||||
<ul class="dropdown-menu dropdown-menu-light" aria-labelledby="navbarScrollingDropdown">
|
||||
<li><a class="dropdown-item" th:href="@{/contact/contacts}">Kontakte</a></li>
|
||||
<li><hr /></li>
|
||||
<li><a class="dropdown-item" th:href="@{/logout}">[[${currentUser}]] abmelden</a></li>
|
||||
</ul></li>
|
||||
<li layout:fragment="menu" style="list-style-type: none"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<main layout:fragment="content" class="page body"></main>
|
||||
</body>
|
||||
</html>
|
12
src/main/resources/templates/public/index.html
Normal file
12
src/main/resources/templates/public/index.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:sec="http://www.thymeleaf.org/extras/spring-security" layout:decorate="~{layout/main.html}">
|
||||
<head>
|
||||
<title>Timetrack</title>
|
||||
</head>
|
||||
<body>
|
||||
<ul layout:fragment="menu">
|
||||
</ul>
|
||||
<main layout:fragment="content"></main>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user