add more UI improvements and functionality
This commit is contained in:
@ -54,6 +54,7 @@ public class Gruppen2Controller {
|
|||||||
|
|
||||||
model.addAttribute("account", keyCloakService.createAccountFromPrincipal(token));
|
model.addAttribute("account", keyCloakService.createAccountFromPrincipal(token));
|
||||||
model.addAttribute("gruppen", userService.getUserGroups(user.getUser_id()));
|
model.addAttribute("gruppen", userService.getUserGroups(user.getUser_id()));
|
||||||
|
model.addAttribute("user",user);
|
||||||
return "index";
|
return "index";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
<h1>Gruppenerstellung</h1>
|
<h1>Gruppenerstellung</h1>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<form method="post" action="/gruppen2/createGroup">
|
<form method="post" action="/gruppen2/createGroup">
|
||||||
<div class="shadow p-2" style="border: 10px solid aliceblue; background: aliceblue">
|
<div class="shadow p-2" style=" border: 10px solid aliceblue; background: aliceblue">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="titel">Titel</label>
|
<label for="titel">Titel</label>
|
||||||
<input type="text" class="form-control" id="titel" th:name="title" required>
|
<input type="text" class="form-control" id="titel" th:name="title" required>
|
||||||
|
|||||||
@ -43,15 +43,18 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
|
<h2 style="display: inline-block">Mitglieder</h2>
|
||||||
|
<a style="float: right" th:if="${role == role.ADMIN}">
|
||||||
|
<button class="btn btn-secondary" type="warning" style="background: slategrey; align-self: end" >Mitglieder bearbeiten</button>
|
||||||
|
</a>
|
||||||
|
<p></p>
|
||||||
<ul th:each="member : ${group.getMembers()}" class="list-group-flush" style="background: slategrey">
|
<ul th:each="member : ${group.getMembers()}" class="list-group-flush" style="background: slategrey">
|
||||||
<li class="list-group-item" style="background: aliceblue">
|
<li class="list-group-item" style="background: aliceblue">
|
||||||
<span th:text="${member.getUser_id()}"></span>
|
<span th:text="${member.getUser_id()}"></span>
|
||||||
<span th:if="${role == role.ADMIN}" class="badge badge-success">admin</span>
|
<span th:if="${role == role.ADMIN}" class="badge badge-success">admin</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="text-right" th:if="${role == role.ADMIN}">
|
|
||||||
<button class="btn btn-secondary" type="warning" style="background: slategrey" >Gruppenmitglieder bearbeiten</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -25,19 +25,35 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main th:fragment="bodycontent">
|
<main th:fragment="bodycontent">
|
||||||
<h1>Meine Gruppen</h1>
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<form action="/" method="get">
|
<div class="row" >
|
||||||
<div th:each="gruppe: ${gruppen}">
|
<div class="col-9">
|
||||||
<div style="border: 10px solid aliceblue; background: aliceblue">
|
<h1>Meine Gruppen</h1>
|
||||||
<h3>
|
<form action="/" method="get">
|
||||||
<a th:href="@{/gruppen2/details(id=${gruppe.getId()})}" style="color: dodgerblue; font-weight: bold" th:text="${gruppe.getTitle()}"></a>
|
<div th:each="gruppe: ${gruppen}">
|
||||||
</h3>
|
<div style="border: 10px solid aliceblue; background: aliceblue">
|
||||||
<p th:text="${gruppe.getDescription()}"></p>
|
<h3>
|
||||||
</div>
|
<a th:href="@{/gruppen2/details(id=${gruppe.getId()})}" style="color: dodgerblue; font-weight: bold" th:text="${gruppe.getTitle()}"></a>
|
||||||
<br>
|
</h3>
|
||||||
|
<p th:text="${gruppe.getDescription()}"></p>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
<div class="col-3" >
|
||||||
|
<div class="container-fluid" style="background: aliceblue">
|
||||||
|
<div>
|
||||||
|
<h2 th:text="${user.getUser_id()}" style="text-align: center">user_id</h2>
|
||||||
|
<h3>
|
||||||
|
<span th:text="${user.getGivenname()}">username</span>
|
||||||
|
<span th:text="${user.getFamilyname()}">usersurname</span>
|
||||||
|
</h3>
|
||||||
|
<small th:text="${user.getEmail()}">usermail</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user