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("gruppen", userService.getUserGroups(user.getUser_id()));
|
||||
model.addAttribute("user",user);
|
||||
return "index";
|
||||
}
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
<h1>Gruppenerstellung</h1>
|
||||
<div class="container-fluid">
|
||||
<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">
|
||||
<label for="titel">Titel</label>
|
||||
<input type="text" class="form-control" id="titel" th:name="title" required>
|
||||
|
||||
@ -43,15 +43,18 @@
|
||||
</form>
|
||||
</div>
|
||||
<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">
|
||||
<li class="list-group-item" style="background: aliceblue">
|
||||
<span th:text="${member.getUser_id()}"></span>
|
||||
<span th:if="${role == role.ADMIN}" class="badge badge-success">admin</span>
|
||||
</li>
|
||||
</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>
|
||||
|
||||
@ -25,19 +25,35 @@
|
||||
</nav>
|
||||
</header>
|
||||
<main th:fragment="bodycontent">
|
||||
<h1>Meine Gruppen</h1>
|
||||
<div class="container-fluid">
|
||||
<form action="/" method="get">
|
||||
<div th:each="gruppe: ${gruppen}">
|
||||
<div style="border: 10px solid aliceblue; background: aliceblue">
|
||||
<h3>
|
||||
<a th:href="@{/gruppen2/details(id=${gruppe.getId()})}" style="color: dodgerblue; font-weight: bold" th:text="${gruppe.getTitle()}"></a>
|
||||
</h3>
|
||||
<p th:text="${gruppe.getDescription()}"></p>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row" >
|
||||
<div class="col-9">
|
||||
<h1>Meine Gruppen</h1>
|
||||
<form action="/" method="get">
|
||||
<div th:each="gruppe: ${gruppen}">
|
||||
<div style="border: 10px solid aliceblue; background: aliceblue">
|
||||
<h3>
|
||||
<a th:href="@{/gruppen2/details(id=${gruppe.getId()})}" style="color: dodgerblue; font-weight: bold" th:text="${gruppe.getTitle()}"></a>
|
||||
</h3>
|
||||
<p th:text="${gruppe.getDescription()}"></p>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</form>
|
||||
</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>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user