fix styling, rename error page
This commit is contained in:
@ -157,7 +157,7 @@ public class Gruppen2Controller {
|
|||||||
Account account = keyCloakService.createAccountFromPrincipal (token);
|
Account account = keyCloakService.createAccountFromPrincipal (token);
|
||||||
User user = new User(account.getName(),account.getGivenname(),account.getFamilyname(),account.getEmail());
|
User user = new User(account.getName(),account.getGivenname(),account.getFamilyname(),account.getEmail());
|
||||||
Group group = userService.getGroupById(id);
|
Group group = userService.getGroupById(id);
|
||||||
if(group.getMembers().contains(user)) return "errorRenameLater"; //hier soll eigentlich auf die bereits beigetretene Gruppe weitergeleitet werden
|
if(group.getMembers().contains(user)) return "error"; //hier soll eigentlich auf die bereits beigetretene Gruppe weitergeleitet werden
|
||||||
controllerService.addUser(account,id);
|
controllerService.addUser(account,id);
|
||||||
return "redirect:/gruppen2/";
|
return "redirect:/gruppen2/";
|
||||||
}
|
}
|
||||||
@ -229,6 +229,6 @@ public class Gruppen2Controller {
|
|||||||
|
|
||||||
@GetMapping("*")
|
@GetMapping("*")
|
||||||
public String defaultLink() {
|
public String defaultLink() {
|
||||||
return "errorRenameLater";
|
return "error";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
<div class="col-10">
|
<div class="col-10">
|
||||||
<h1>Gruppenerstellung</h1>
|
<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; border-radius: 5px; 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>
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-10">
|
<div class="col-10">
|
||||||
<h1>Veranstaltung erstellen</h1>
|
<h1>Veranstaltung erstellen</h1>
|
||||||
<div class="shadow p-2" style=" border: 10px solid aliceblue; background: aliceblue">
|
<div class="shadow p-2" style=" border: 10px solid aliceblue; border-radius: 5px; background: aliceblue">
|
||||||
<form method="post" action="/gruppen2/createLecture" enctype="multipart/form-data">
|
<form method="post" action="/gruppen2/createLecture" enctype="multipart/form-data">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="titel">Titel</label>
|
<label for="titel">Titel</label>
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
<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-9 shadow-sm p-4" style="border: 10px solid aliceblue; background: aliceblue">
|
<div class="col-9 shadow-sm p-4" style="border: 10px solid aliceblue; border-radius: 5px; background: aliceblue">
|
||||||
<h1 style="color: black; font-weight: bold" th:text="${group.getTitle()}"></h1>
|
<h1 style="color: black; font-weight: bold" th:text="${group.getTitle()}"></h1>
|
||||||
<h3>
|
<h3>
|
||||||
<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-dark" style="background: darkslategray" th:if='${group.getVisibility() == group.getVisibility().PRIVATE }'>Private Gruppe</span>
|
||||||
@ -56,9 +56,7 @@
|
|||||||
<h2>Mitglieder</h2>
|
<h2>Mitglieder</h2>
|
||||||
<div th:if='${group.getRoles().get(user.getUser_id()) == admin}'>
|
<div th:if='${group.getRoles().get(user.getUser_id()) == admin}'>
|
||||||
<form method="get" th:action="@{/gruppen2/details/members/{id}(id=${group.getId()})}">
|
<form method="get" th:action="@{/gruppen2/details/members/{id}(id=${group.getId()})}">
|
||||||
<button class="btn btn-secondary" style="background: slategrey; float: right">
|
<button class="btn btn-secondary" style="background: slategrey; float: right">Mitglieder bearbeiten</button>
|
||||||
Mitglieder bearbeiten
|
|
||||||
</button>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-9">
|
<div class="col-9">
|
||||||
<div class="shadow-sm p-4" style="border: 10px solid aliceblue; background: aliceblue">
|
<div class="shadow-sm p-4" style="border: 10px solid aliceblue; border-radius: 5px; background: aliceblue">
|
||||||
<h1 style="color: black; font-weight: bold" th:text="${group.getTitle()}"></h1>
|
<h1 style="color: black; font-weight: bold" th:text="${group.getTitle()}"></h1>
|
||||||
<h3>
|
<h3>
|
||||||
<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-dark" style="background: darkslategray" th:if='${group.getVisibility() == group.getVisibility().PRIVATE }'>Private Gruppe</span>
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-9">
|
<div class="col-9">
|
||||||
<div class="shadow p-2" style="border: 10px solid aliceblue; background: aliceblue">
|
<div class="shadow p-2" style="border: 10px solid aliceblue; border-radius: 5px; background: aliceblue">
|
||||||
<!-- absichern im controller nicht vergessen -->
|
<!-- absichern im controller nicht vergessen -->
|
||||||
<div class="form-group pt-4" th:if="${account.getRoles().contains('orga')}">
|
<div class="form-group pt-4" th:if="${account.getRoles().contains('orga')}">
|
||||||
<form method="post" action="/gruppen2/details/members/addUsersFromCsv" enctype="multipart/form-data">
|
<form method="post" action="/gruppen2/details/members/addUsersFromCsv" enctype="multipart/form-data">
|
||||||
@ -47,7 +47,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<button th:name="group_id" th:value="${group.getId()}" class="btn btn-primary" type="submit" style="background: #52a1eb; border-style: none">Mitglieder hinzufügen</button>
|
<button th:name="group_id" th:value="${group.getId()}" class="btn btn-primary" type="submit" style="background: #52a1eb; border-style: none; float: right" >Mitglieder hinzufügen</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="col">Mitglied</th>
|
<th scope="col">Mitglied</th>
|
||||||
<th scope="col" style="width: 180px">Rolle</th>
|
<th scope="col" style="width: 180px">Rolle</th>
|
||||||
<th scope="col" style="width: 270px">Optionen</th>
|
<th scope="col" >Optionen</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="table-striped">
|
<tbody class="table-striped">
|
||||||
@ -69,23 +69,27 @@
|
|||||||
<span th:if='${group.getRoles().get(member.getUser_id()) == admin}'>Admin</span>
|
<span th:if='${group.getRoles().get(member.getUser_id()) == admin}'>Admin</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
<div class="text-right btn-toolbar" style="float: right" role="toolbar">
|
||||||
<form method="post" action="/gruppen2/details/members/changeRole">
|
<form method="post" action="/gruppen2/details/members/changeRole">
|
||||||
<input type="hidden" th:name="group_id" th:value="${group.getId()}">
|
<input type="hidden" th:name="group_id" th:value="${group.getId()}">
|
||||||
<input type="hidden" th:name="user_id" th:value="${member.getUser_id()}">
|
<input type="hidden" th:name="user_id" th:value="${member.getUser_id()}">
|
||||||
<button type="submit" class="btn btn-warning btn-sm">Rolle ändern</button><!-- th:if -->
|
<button type="submit" class="btn btn-warning btn-sm" style="margin: 5px">Rolle ändern</button><!-- th:if -->
|
||||||
</form>
|
</form>
|
||||||
<form method="post" action="/gruppen2/details/members/deleteUser">
|
<form method="post" action="/gruppen2/details/members/deleteUser">
|
||||||
<input type="hidden" th:name="group_id" th:value="${group.getId()}">
|
<input type="hidden" th:name="group_id" th:value="${group.getId()}">
|
||||||
<input type="hidden" th:name="user_id" th:value="${member.getUser_id()}">
|
<input type="hidden" th:name="user_id" th:value="${member.getUser_id()}">
|
||||||
<button class="btn btn-danger btn-sm">Mitglied entfernen</button>
|
<button class="btn btn-danger btn-sm" style="margin: 5px">Mitglied entfernen</button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<button type="button" class="btn btn-primary" style="background: #52a1eb; border-style: none">
|
<button type="button" class="btn btn-primary" style="background: #52a1eb; float: right; border-style: none">
|
||||||
<a th:href="@{/gruppen2/details(id=${group.getId()})}" style="color: white">Fertig</a>
|
<a th:href="@{/gruppen2/details(id=${group.getId()})}" style="color: white; margin: 5px">Fertig</a>
|
||||||
</button>
|
</button>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="mx-auto" style="vertical-align: center; horiz-align: center; top: 50%; left: 50%; margin-top: 200px">
|
<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">
|
<div class="text-center shadow-sm p-2" style="border-radius: 5px; 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>
|
<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>
|
<h2 style="text-align: center">Die Seite, nach der du suchst, scheint nicht zu existieren.</h2>
|
||||||
<br>
|
<br>
|
||||||
@ -42,7 +42,7 @@
|
|||||||
</h3>
|
</h3>
|
||||||
<br>
|
<br>
|
||||||
<div th:each="gruppe: ${gruppen}">
|
<div th:each="gruppe: ${gruppen}">
|
||||||
<div class="shadow-sm p-4" style="border: none; background: aliceblue">
|
<div class="shadow-sm p-4" style="border: none; border-radius: 5px; background: aliceblue">
|
||||||
<h3 style="color: dodgerblue; font-weight: bold;">
|
<h3 style="color: dodgerblue; font-weight: bold;">
|
||||||
<a th:href="@{/gruppen2/details/{id}(id=${gruppe.getId()})}" th:text="${gruppe.getTitle()}"></a>
|
<a th:href="@{/gruppen2/details/{id}(id=${gruppe.getId()})}" th:text="${gruppe.getTitle()}"></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
<div class="col-10">
|
<div class="col-10">
|
||||||
<h1>Gruppensuche</h1>
|
<h1>Gruppensuche</h1>
|
||||||
<form action="/gruppen2/findGroup" method="get">
|
<form action="/gruppen2/findGroup" method="get">
|
||||||
<div class="shadow" style="border: 10px solid aliceblue; background: aliceblue">
|
<div class="shadow" style="border: 10px solid aliceblue; border-radius: 5px; 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">
|
||||||
|
|||||||
Reference in New Issue
Block a user