1

Merge remote-tracking branch 'origin/master' into JavaDocComments

# Conflicts:
#	src/main/java/mops/gruppen2/controller/WebController.java
#	src/main/java/mops/gruppen2/domain/dto/InviteLinkDTO.java
#	src/main/java/mops/gruppen2/repository/EventRepository.java
#	src/main/java/mops/gruppen2/service/EventService.java
#	src/main/java/mops/gruppen2/service/UserService.java
This commit is contained in:
[Mahgs]
2020-03-27 14:56:41 +01:00
32 changed files with 433 additions and 150 deletions

View File

@ -40,7 +40,7 @@
<div class="row">
<div class="col-10">
<h1>Metadaten ändern</h1>
<form action="/gruppen2/details/changeMetadata" method="post">
<form method="post" th:action="@{/gruppen2/details/changeMetadata}">
<div class="shadow-sm p-2"
style=" border: 10px solid aliceblue; background: aliceblue">
<div class="form-group">

View File

@ -38,7 +38,8 @@
<div class="row">
<div class="col-10">
<h1>Gruppenerstellung</h1>
<form method="post" action="/gruppen2/createOrga" enctype="multipart/form-data">
<form enctype="multipart/form-data" method="post"
th:action="@{/gruppen2/createOrga}">
<div class="shadow-sm p-2"
style=" border: 10px solid aliceblue; background: aliceblue">
<div class="form-group">

View File

@ -37,8 +37,9 @@
<div class="row">
<div class="col-10">
<h1>Gruppenerstellung</h1>
<form method="post" action="/gruppen2/createStudent">
<div class="shadow-sm p-2" style=" border: 10px solid aliceblue; border-radius: 5px; background: aliceblue">
<form method="post" th:action="@{/gruppen2/createStudent}">
<div class="shadow-sm p-2"
style=" border: 10px solid aliceblue; border-radius: 5px; background: aliceblue">
<div class="form-group">
<label for="titel">Titel</label>

View File

@ -57,7 +57,7 @@
th:text="${parent.getTitle()}">Parent</span>
<div class="input-group mb-3" style="margin-top: 10px"
th:if="${group.getVisibility() == group.getVisibility().PRIVATE}">
th:if="${roles.get(user.getId()) == admin}">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-default"
style="background: #52a1eb">Einladungslink:</span>
@ -83,15 +83,16 @@
style="background: #52a1eb; border: none; margin: 5px">
<a style="color: white" th:href="@{/gruppen2}">Zurück</a>
</button>
<form action="/gruppen2/leaveGroup" method="post">
<form method="post" th:action="@{/gruppen2/leaveGroup}">
<button class="btn btn-danger" style="border-style: none; margin: 5px"
th:name="group_id" th:value="${group.getId()}"
type="submit">Gruppe verlassen
</button>
</form>
<form action="/gruppen2/deleteGroup" method="post">
<form method="post" th:action="@{/gruppen2/deleteGroup}">
<button class="btn btn-danger" style="border-style: none; margin: 5px"
th:name="group_id" th:value="${group.getId()}" th:if="${group.getRoles().get(user.getId()) == admin}"
th:name="group_id" th:value="${group.getId()}"
th:if="${group.getRoles().get(user.getId()) == admin}"
type="submit">Gruppe löschen
</button>
</form>
@ -132,7 +133,7 @@
</div>
<script>
function copyLink() {
var copyText = document.getElementById("groupLink");
const copyText = document.getElementById("groupLink");
copyText.select();
copyText.setSelectionRange(0, 99999);

View File

@ -50,7 +50,7 @@
</div>
<div class="form-group mt-2">
<div class="text-right">
<form method="post" action="/gruppen2/detailsBeitreten">
<form method="post" th:action="@{/gruppen2/detailsBeitreten}">
<button class="btn btn-primary"
style="background: #52a1eb; border-style: none;"
th:href="@{/gruppen2/detailsBeitreten}"

View File

@ -48,16 +48,19 @@
</div>
<div class="shadow p-2" style="border: 10px solid aliceblue; background: aliceblue">
<div class="form-group pt-4" th:if="${account.getRoles().contains('orga')}">
<form action="/gruppen2/details/members/addUsersFromCsv"
<form th:action="@{/gruppen2/details/members/addUsersFromCsv}"
enctype="multipart/form-data"
method="post">
<div class="input-group mb-3">
<div class="custom-file">
<input class="custom-file-input" id="file" th:name="file" type="file">
<label class="custom-file-label" for="file">CSV Datei von Mitgliedern hochladen</label>
<input class="custom-file-input" id="file" th:name="file"
type="file">
<label class="custom-file-label" for="file">CSV Datei von
Mitgliedern hochladen</label>
</div>
<div class="input-group-append">
<button class="btn btn-outline-secondary" style="background: #52a1eb; border-style: none"
<button class="btn btn-outline-secondary"
style="background: #52a1eb; border-style: none"
th:name="group_id" th:value="${group.getId()}"
type="submit">
<a style="color: white">Hinzufügen</a>
@ -67,12 +70,16 @@
</form>
</div>
<div class="form-group pt-4">
<form action="/gruppen2/details/members/changeMaximum" method="post">
<form method="post" th:action="@{/gruppen2/details/members/changeMaximum}">
<div class="input-group mb-3" id="userMaximum">
<input class="form-control" placeholder="Maximale Teilnehmerzahl ändern..." th:name="maximum"
type="number" th:min="${group.getMembers().size()}" max="10000">
<input class="form-control"
placeholder="Maximale Teilnehmerzahl ändern..."
th:name="maximum"
type="number" th:min="${group.getMembers().size()}"
max="10000">
<div class="input-group-append">
<button class="btn btn-outline-secondary" style="background: #52a1eb; border-style: none"
<button class="btn btn-outline-secondary"
style="background: #52a1eb; border-style: none"
th:name="group_id" th:value="${group.getId()}"
type="submit">
<a style="color: white">Speichern</a>
@ -99,21 +106,27 @@
</td>
<td>
<div class="text-right btn-toolbar" style="float: right;" role="toolbar">
<form action="/gruppen2/details/members/changeRole" method="post">
<form method="post"
th:action="@{/gruppen2/details/members/changeRole}">
<input th:name="group_id" th:value="${group.getId()}"
type="hidden">
<input th:name="user_id" th:value="${member.getId()}"
type="hidden">
<button class="btn btn-warning btn-sm" type="submit" style="margin: 5px">Rolle
<button class="btn btn-warning btn-sm" type="submit"
style="margin: 5px">Rolle
ändern
</button>
</form>
<form action="/gruppen2/details/members/deleteUser" method="post">
<form method="post"
th:action="@{/gruppen2/details/members/deleteUser}">
<input th:name="group_id" th:value="${group.getId()}"
type="hidden">
<input th:name="user_id" th:value="${member.getId()}"
type="hidden">
<button class="btn btn-danger btn-sm" style="margin: 5px" th:if='!${account.getName().equals(member.getId())}'>Mitglied entfernen</button>
<button class="btn btn-danger btn-sm" style="margin: 5px"
th:if='!${account.getName().equals(member.getId())}'>
Mitglied entfernen
</button>
</form>
</div>
</td>

View File

@ -33,7 +33,7 @@
<div class="row">
<div class="col-10">
<h1>Meine Gruppen</h1>
<form action="/" method="get">
<form method="get" th:action="@{/}">
<h3 style="color: dodgerblue; font-weight: bold; font-optical-sizing: auto">
<small style="font-weight: normal; color: black">Mitglied in </small>
<small style="font-weight: bold; color: black"

View File

@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="en"
th:replace="~{mopslayout :: html(name='Gruppenbildung', headcontent=~{:: headcontent}, navigation=~{:: navigation}, bodycontent=~{:: bodycontent})}"
xmlns:th="http://www.thymeleaf.org">
<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"
th:switch="${account.getRoles().contains('orga')}">
<ul>
<li>
<a href="/" th:href="@{/gruppen2}">Gruppen</a>
</li>
<li th:case="${true}">
<a href="/createOrga" th:href="@{/gruppen2/createOrga}">Erstellen</a>
</li>
<li th:case="${false}">
<a href="/createStudent" th:href="@{/gruppen2/createStudent}">Erstellen</a>
</li>
<li class="active">
<a href="/findGroup" th:href="@{/gruppen2/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-sm p-4"
style="border: 1px solid aliceblue; border-radius: 5px; background: aliceblue">
<h1 style="color: black; font-weight: bold; font-optical-sizing: auto; overflow-wrap: break-word"
th:text="${group.getTitle()}"></h1>
<h3>Möchtest du dieser privaten Gruppe beitreten?</h3>
<div class="shadow-sm p-4" style="background: white">
<p style="overflow-wrap: break-word; font-optical-sizing: auto"
th:text="${group.getDescription()}"></p>
</div>
<div class="form-group mt-2">
<div class="text-right">
<form method="post" th:action="@{/gruppen2/acceptinvite}">
<input name="id" th:value="${group.getId()}" type="hidden"/>
<button class="btn btn-primary"
style="background: #52a1eb; border-style: none;"
type="submit">Ja, Gruppe beitreten
</button>
<a class="btn btn-primary"
href="/gruppen2"
style="background: #52a1eb; border-style: none;"
type="submit">Ich will das nicht.
</a>
</form>
</div>
</div>
</div>
</div>
<div class="col-3" style="white-space: nowrap">
<div style="display: inline-block; margin: 0">
<h2>Mitglieder</h2>
<div th:switch="${group.getUserMaximum() != 100000}">
<h4 th:case="${true}">
<a th:text="${group.getMembers().size()}"></a>
<a>von maximal</a>
<a th:text="${group.getUserMaximum()}"></a>
<a>Benutzern.</a>
</h4>
<h4 th:case="false">unbegrenzte Teilnehmeranzahl</h4>
</div>
</div>
</div>
</div>
</div>
</main>
</body>
</html>

View File

@ -35,7 +35,7 @@
<h1>Gruppensuche</h1>
<div class="shadow-sm p-2"
style="border: 10px solid aliceblue; border-radius: 5px; background: aliceblue">
<form action="/gruppen2/findGroup" method="get">
<form method="get" th:action="@{/gruppen2/findGroup}">
<div class="form-group">
<label for="suchleiste">Suchbegriff:</label>
<input class="form-control" id="suchleiste"