Merge remote-tracking branch 'origin/master' into keycloakRestApi
This commit is contained in:
@ -111,4 +111,16 @@ public class Gruppen2Controller {
|
|||||||
throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Group not found");
|
throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Group not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin", "ROLE_actuator)"})
|
||||||
|
@GetMapping("/detailsSearch")
|
||||||
|
public String showGroupDetailsNoMember (KeycloakAuthenticationToken token, Model model, @RequestParam (value="id") Long id) throws EventException {
|
||||||
|
model.addAttribute("account", keyCloakService.createAccountFromPrincipal(token));
|
||||||
|
Group group = userService.getGroupById(id);
|
||||||
|
if (group!=null) {
|
||||||
|
model.addAttribute("group", group);
|
||||||
|
return "detailsNoMember";
|
||||||
|
}
|
||||||
|
throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Group not found");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,8 +26,10 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main th:fragment="bodycontent">
|
<main th:fragment="bodycontent">
|
||||||
<h1>Gruppenerstellung</h1>
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-10">
|
||||||
|
<h1>Gruppenerstellung</h1>
|
||||||
<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">
|
||||||
@ -58,6 +60,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@ -25,7 +25,26 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main th:fragment="bodycontent">
|
<main th:fragment="bodycontent">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-9" style="border: 10px solid aliceblue; background: aliceblue">
|
||||||
|
<form action="/" method="get">
|
||||||
|
<h1 style="color: dodgerblue; font-weight: bold" th:text="${group.getTitle()}"></h1>
|
||||||
|
<p style="font-weight: bold">
|
||||||
|
<span class="badge badge-pill badge-dark" style="background: darkslategray" th:if="${group.getVisibility() == group.getVisibility().PRIVATE }">Private Gruppe</span>
|
||||||
|
<span class="badge badge-pill badge-primary" th:if="${group.getVisibility() == group.getVisibility().PUBLIC}">Öffentliche Gruppe</span>
|
||||||
|
<span class="badge badge-pill badge-success" style="background: lightseagreen" th:if="${group.getType() == group.getType().LECTURE}"> Veranstaltung</span>
|
||||||
|
</p>
|
||||||
|
<p th:text="${group.getDescription()}"></p>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="text-right">
|
||||||
|
<button class="btn btn-primary" style="border-style: none;">Gruppe beitreten</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
26
src/main/resources/templates/errorRenameLater.html
Normal file
26
src/main/resources/templates/errorRenameLater.html
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Error</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="mx-auto" style="vertical-align: center; horiz-align: center; top: 50%; left: 50%; margin-top: 200px">
|
||||||
|
<div class="text-center" style="background: aliceblue; align-items: center; margin: auto; width: 1000px; vertical-align: center; padding: 50px; display: block">
|
||||||
|
<h1 style="text-align: center">Da ist etwas schiefgelaufen!</h1>
|
||||||
|
<h2 style="text-align: center">Die Seite, nach der du suchst, scheint nicht zu existieren.</h2>
|
||||||
|
<br>
|
||||||
|
<div>
|
||||||
|
<button type="button" class="btn btn-primary" style="margin: auto">
|
||||||
|
<a style="color: white" href="#" onclick="javascript:window.history.back(-1);return false;">Zurück zur letzten Seite</a>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -31,7 +31,7 @@
|
|||||||
<h1>Meine Gruppen</h1>
|
<h1>Meine Gruppen</h1>
|
||||||
<form action="/" method="get">
|
<form action="/" method="get">
|
||||||
<div th:each="gruppe: ${gruppen}">
|
<div th:each="gruppe: ${gruppen}">
|
||||||
<div style="border: 10px solid aliceblue; background: aliceblue">
|
<div class="shadow" style="border: 10px solid aliceblue; background: aliceblue">
|
||||||
<h3>
|
<h3>
|
||||||
<a th:href="@{/gruppen2/details(id=${gruppe.getId()})}" style="color: dodgerblue; font-weight: bold" th:text="${gruppe.getTitle()}"></a>
|
<a th:href="@{/gruppen2/details(id=${gruppe.getId()})}" style="color: dodgerblue; font-weight: bold" th:text="${gruppe.getTitle()}"></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|||||||
@ -27,16 +27,14 @@
|
|||||||
<main th:fragment="bodycontent">
|
<main th:fragment="bodycontent">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col-10">
|
||||||
<h1>Gruppensuche</h1>
|
<h1>Gruppensuche</h1>
|
||||||
<div class="container-fluid">
|
|
||||||
<form action="/gruppen2/findGroup" method="get">
|
<form action="/gruppen2/findGroup" method="get">
|
||||||
<div style="border: 10px solid aliceblue; background: aliceblue">
|
<div class="shadow" style="border: 10px solid aliceblue; background: aliceblue">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="suchleiste">Suchbegriff:</label>
|
<label for="suchleiste">Suchbegriff:</label>
|
||||||
<input id="suchleiste" class="form-control" placeholder="z.B. Programmieren, Lerngruppe, ..." th:name="suchbegriff" type="text">
|
<input id="suchleiste" class="form-control" placeholder="z.B. Programmieren, Lerngruppe, ..." th:name="suchbegriff" type="text">
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary" style="background: #52a1eb; border-style: none">Suchen</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
<br>
|
<br>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
@ -51,7 +49,9 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody th:each="gruppe : ${gruppen}">
|
<tbody th:each="gruppe : ${gruppen}">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row" th:text="${gruppe.title}">Gruppenname</th>
|
<th scope="row">
|
||||||
|
<a th:href="@{/gruppen2/detailsSearch(id=${gruppe.getId()})}" th:text="${gruppe.title}">Gruppenname</a>
|
||||||
|
</th>
|
||||||
<td th:text="${gruppe.getDescription()}">Beschreibung</td>
|
<td th:text="${gruppe.getDescription()}">Beschreibung</td>
|
||||||
<td th:text="${gruppe.getVisibility()}">Öffentlich</td>
|
<td th:text="${gruppe.getVisibility()}">Öffentlich</td>
|
||||||
<td th:text="${gruppe.getMembers().size()}">Mitgliederanzahl</td>
|
<td th:text="${gruppe.getMembers().size()}">Mitgliederanzahl</td>
|
||||||
@ -59,6 +59,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
Reference in New Issue
Block a user