1

Merge pull request #103 from hhu-propra2/ui

fix styling, rename error page
This commit is contained in:
kasch309
2020-03-19 14:34:48 +01:00
committed by GitHub
8 changed files with 14 additions and 13 deletions

View File

@ -163,6 +163,7 @@ public class Gruppen2Controller {
@PostMapping("/detailsBeitreten")
public String joinGroup(KeycloakAuthenticationToken token, Model model, @RequestParam("id") Long groupId) throws EventException {
model.addAttribute("account", keyCloakService.createAccountFromPrincipal(token));
Account account = keyCloakService.createAccountFromPrincipal(token);
User user = new User(account.getName(), account.getGivenname(), account.getFamilyname(), account.getEmail());
Group group = userService.getGroupById(groupId);
@ -234,6 +235,7 @@ public class Gruppen2Controller {
@RolesAllowed({"ROLE_orga", "ROLE_studentin", "ROLE_actuator)"})
@PostMapping("/details/members/deleteUser")
public String deleteUser(KeycloakAuthenticationToken token, @RequestParam("group_id") Long groupId,
@RequestParam("user_id") String userId) throws EventException {
controllerService.deleteUser(userId, groupId);

View File

@ -34,8 +34,8 @@
<div class="col-10">
<h1>Gruppenerstellung</h1>
<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">
<label for="titel">Titel</label>
<input class="form-control" id="titel" required th:name="title"

View File

@ -31,8 +31,7 @@
<main th:fragment="bodycontent">
<div class="container-fluid">
<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>
<h3>
<span class="badge badge-pill badge-dark" style="background: darkslategray"

View File

@ -31,8 +31,7 @@
<div class="container-fluid">
<div class="row">
<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>
<h3>
<span class="badge badge-pill badge-dark" style="background: darkslategray"

View File

@ -36,7 +36,7 @@
<div class="container-fluid">
<div class="row">
<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 -->
<div class="form-group pt-4" th:if="${account.getRoles().contains('orga')}">
<form action="/gruppen2/details/members/addUsersFromCsv"
@ -67,11 +67,10 @@
<tr>
<th scope="col">Mitglied</th>
<th scope="col" style="width: 180px">Rolle</th>
<th scope="col" style="width: 270px">Optionen</th>
<th scope="col" >Optionen</th>
</tr>
</thead>
<tbody class="table-striped">
<tr th:each="member : ${group.getMembers()}">
<th th:text="${member.getId()}"></th>
<td>
@ -104,6 +103,8 @@
type="button">
<a th:href="@{/gruppen2/details(id=${group.getId()})}" style="color: white">Fertig</a>
</button>
<br>
<br>
</div>
</div>
</div>

View File

@ -10,7 +10,7 @@
<title>Seite nicht gefunden</title>
</head>
<body>
<div class="mx-auto" style="vertical-align: center; horiz-align: center; top: 50%; left: 50%;">
<div class="mx-auto" style="vertical-align: border-radius: 5px; center; horiz-align: center; top: 50%; left: 50%;">
<div class="jumbotron" style="background: aliceblue">
<div class="container">
<h1 class="display-3">UPSI</h1>

View File

@ -45,7 +45,7 @@
</h3>
<br>
<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;">
<a th:href="@{/gruppen2/details/{id}(id=${gruppe.getId()})}"
th:text="${gruppe.getTitle()}"></a>

View File

@ -33,7 +33,7 @@
<div class="col-10">
<h1>Gruppensuche</h1>
<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">
<label for="suchleiste">Suchbegriff:</label>
<input class="form-control" id="suchleiste"