Merge remote-tracking branch 'origin/master' into error-handling
# Conflicts: # src/main/java/mops/gruppen2/controller/Gruppen2Controller.java # src/main/resources/templates/errorRenameLater.html
This commit is contained in:
@ -31,35 +31,45 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-9">
|
||||
<div class="shadow-sm p-4" style="border: 10px solid aliceblue; background: aliceblue">
|
||||
<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>
|
||||
<div class="col-9 shadow-sm p-4" style="border: 10px solid aliceblue; 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" 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">
|
||||
<form method="post" action="/gruppen2/leaveGroup">
|
||||
<button th:value="${group.getId()}" th:name="group_id" class="btn btn-danger" type="submit" style="border-style: none;">Gruppe verlassen</button>
|
||||
</form>
|
||||
</div>
|
||||
<span class="badge badge-pill badge-success" style="background: lightseagreen" th:if='${group.getType() == group.getType().LECTURE}'> Veranstaltung</span>
|
||||
</h3>
|
||||
<br>
|
||||
<div class="shadow-sm p-4" style="background: white">
|
||||
<p style="overflow-wrap: break-word" th:text="${group.getDescription()}"></p>
|
||||
</div>
|
||||
<br>
|
||||
<div class="text-right btn-toolbar" style="float: right" role="toolbar">
|
||||
<button class="btn btn-primary" style="background: dodgerblue; border: none; margin: 5px">
|
||||
<a th:href="@{/gruppen2}" style="color: white">Zurück</a>
|
||||
</button>
|
||||
<form method="post" action="/gruppen2/leaveGroup">
|
||||
<button th:value="${group.getId()}" th:name="group_id" class="btn btn-danger" type="submit" style="border-style: none; margin: 5px">Gruppe verlassen</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3" style="white-space: nowrap">
|
||||
<div>
|
||||
<h2 style="display: inline-block; margin: 0">Mitglieder</h2>
|
||||
<button class="btn btn-secondary" type="warning" style="background: slategrey; float: right" >Mitglieder bearbeiten</button>
|
||||
<p></p>
|
||||
<div style="display: inline-block; margin: 0">
|
||||
<h2>Mitglieder</h2>
|
||||
<div th:if='${group.getRoles().get(user.getUser_id()) == admin}'>
|
||||
<form method="get" th:action="@{/gruppen2/details/members/{id}(id=${group.getId()})}">
|
||||
<button class="btn btn-secondary" style="background: slategrey; float: right" >
|
||||
Mitglieder bearbeiten
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
<div>
|
||||
<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>
|
||||
<span th:if='${group.getRoles().get(member.getUser_id()) == admin}' class="badge badge-success">admin</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -32,13 +32,15 @@
|
||||
<div class="row">
|
||||
<div class="col-9">
|
||||
<div class="shadow-sm p-4" style="border: 10px solid aliceblue; background: aliceblue">
|
||||
<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>
|
||||
<h1 style="color: black; font-weight: bold" th:text="${group.getTitle()}"></h1>
|
||||
<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-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>
|
||||
<span class="badge badge-pill badge-success" style="background: lightseagreen" th:if='${group.getType() == group.getType().LECTURE}'> Veranstaltung</span>
|
||||
</h3>
|
||||
<div class="shadow-sm p-4" style="background: white">
|
||||
<p style="overflow-wrap: break-word" th:text="${group.getDescription()}"></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="text-right">
|
||||
<form method="post" action="/gruppen2/detailsBeitreten">
|
||||
|
||||
70
src/main/resources/templates/editMembers.html
Normal file
70
src/main/resources/templates/editMembers.html
Normal file
@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org"
|
||||
th:replace="~{mopslayout :: html(name='Gruppenbildung', headcontent=~{:: headcontent}, navigation=~{:: navigation}, bodycontent=~{:: bodycontent})}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Gruppendetails</title>
|
||||
<th:block th:fragment="headcontent">
|
||||
<!-- Links, Skripts, Styles hier einfügen! -->
|
||||
</th:block>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation">
|
||||
<ul>
|
||||
<li class="active">
|
||||
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
|
||||
</li>
|
||||
<li>
|
||||
<a th:href="@{/gruppen2/createGroup}" href="/createGroup">Erstellen</a>
|
||||
</li>
|
||||
<li>
|
||||
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<main th:fragment="bodycontent">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-9">
|
||||
<div class="shadow p-2" style="border: 10px solid aliceblue; background: aliceblue">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Mitglied</th>
|
||||
<th scope="col" style="width: 180px">Rolle</th>
|
||||
<th scope="col" style="width: 270px">Optionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-striped">
|
||||
|
||||
<tr th:each="member : ${group.getMembers()}">
|
||||
<th th:text="${member.getUser_id()}"></th>
|
||||
<td>
|
||||
<span th:if='${group.getRoles().get(member.getUser_id()) != admin}'>Mitglied</span>
|
||||
<span th:if='${group.getRoles().get(member.getUser_id()) == admin}'>Admin</span>
|
||||
</td>
|
||||
<td>
|
||||
<form method="post" action="/gruppen2/details/members/changeRole">
|
||||
<input type="hidden" th:name="group_id" th:value="${group.getId()}">
|
||||
<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 -->
|
||||
</form>
|
||||
<form method="post" action="/gruppen2/details/members/deleteUser">
|
||||
<input type="hidden" th:name="group_id" th:value="${group.getId()}">
|
||||
<input type="hidden" th:name="user_id" th:value="${member.getUser_id()}">
|
||||
<button class="btn btn-danger btn-sm">Mitglied entfernen</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button type="button" class="btn btn-primary" style="background: #52a1eb; border-style: none">
|
||||
<a th:href="@{/gruppen2/details(id=${group.getId()})}" style="color: white">Fertig</a>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@ -34,33 +34,27 @@
|
||||
<div class="col-10">
|
||||
<h1>Meine Gruppen</h1>
|
||||
<form action="/" method="get">
|
||||
<h3 style="color: dodgerblue; font-weight: bold;">
|
||||
<small style="font-weight: normal; color: black">Mitglied in </small>
|
||||
<small style="font-weight: bold; color: black" th:text="${gruppen.size()}"></small>
|
||||
<small style="font-weight: normal; color: black" th:if='${gruppen.size()==1}'> Gruppe.</small>
|
||||
<small style="font-weight: normal; color: black" th:if='${gruppen.size()!=1}'> Gruppen.</small>
|
||||
</h3>
|
||||
<br>
|
||||
<div th:each="gruppe: ${gruppen}">
|
||||
<div class="shadow-sm p-4" style="border: none; background: aliceblue">
|
||||
|
||||
<h3 style="color: dodgerblue; font-weight: bold;">
|
||||
<a th:href="@{/gruppen2/details(id=${gruppe.getId()})}" th:text="${gruppe.getTitle()}"></a>
|
||||
<a th:href="@{/gruppen2/details/{id}(id=${gruppe.getId()})}" th:text="${gruppe.getTitle()}"></a>
|
||||
</h3>
|
||||
<p th:text="${gruppe.getDescription()}"></p>
|
||||
<div class="shadow-sm p-4" style="background: white">
|
||||
<p style="overflow-wrap: break-word" th:text="${#strings.abbreviate(gruppe.getDescription(),300)}"></p>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="card" style="background: lightgrey">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title" th:text="${user.getUser_id()}" style="text-align: center">user_id</h2>
|
||||
<h3 class="card-text">
|
||||
<span th:text="${user.getGivenname()}">username</span>
|
||||
<span th:text="${user.getFamilyname()}">usersurname</span>
|
||||
</h3>
|
||||
<p class="card-text" th:text="${user.getEmail()}">usermail</p>
|
||||
<p>
|
||||
<small class="card-text">In Gruppen:</small>
|
||||
<small class="card-text" th:text="${gruppen.size()}"></small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@ -48,7 +48,6 @@
|
||||
<tr>
|
||||
<th scope="col">Gruppenname</th>
|
||||
<th scope="col">Beschreibung</th>
|
||||
<th scope="col">Öffentlich/Privat</th>
|
||||
<th scope="col">Mitgliederanzahl</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -57,8 +56,7 @@
|
||||
<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.getVisibility()}">Öffentlich</td>
|
||||
<td style="" th:text="${#strings.abbreviate(gruppe.getDescription(), 50)}">Beschreibung</td>
|
||||
<td th:text="${gruppe.getMembers().size()}">Mitgliederanzahl</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user