1

new mappings

This commit is contained in:
Christoph
2020-04-09 21:08:57 +02:00
parent a964dbb8b6
commit 93cbbaab9c
11 changed files with 65 additions and 92 deletions

View File

@ -30,7 +30,7 @@
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
</li>
<li>
<a href="/searchPage" th:href="@{/gruppen2/searchPage}">Suche</a>
<a href="/search" th:href="@{/gruppen2/search}">Suche</a>
</li>
</ul>
</nav>
@ -40,7 +40,7 @@
<div class="row">
<div class="col-10">
<h1>Metadaten ändern</h1>
<form method="post" th:action="@{/gruppen2/details/changeMetadata}">
<form method="post" th:action="@{/gruppen2/details/{id}/meta/update(id=${group.getId()})}">
<div class="shadow-sm p-2"
style=" border: 10px solid aliceblue; background: aliceblue;">
<div class="form-group">
@ -58,8 +58,6 @@
<button class="btn btn-primary"
style="background: #52a1eb; border-style: none;"
th:if="${group.getRoles().get(user.getId()) == admin}"
th:name="groupId"
th:value="${group.getId()}"
type="submit">Speichern
</button>
</div>

View File

@ -31,7 +31,7 @@
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
</li>
<li>
<a th:href="@{/gruppen2/searchPage}" href="/searchPage">Suche</a>
<a th:href="@{/gruppen2/search}" href="/search">Suche</a>
</li>
</ul>
</nav>

View File

@ -27,7 +27,7 @@
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
</li>
<li>
<a th:href="@{/gruppen2/searchPage}" href="/searchPage">Suche</a>
<a th:href="@{/gruppen2/search}" href="/search">Suche</a>
</li>
</ul>
</nav>

View File

@ -24,7 +24,7 @@
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
</li>
<li>
<a href="/searchPage" th:href="@{/gruppen2/searchPage}">Suche</a>
<a href="/search" th:href="@{/gruppen2/search}">Suche</a>
</li>
</ul>
</nav>
@ -42,7 +42,7 @@
<div class="col-1">
<a class="fa fa-pencil"
style="font-size:30px; width: 5%;"
th:href="@{/gruppen2/details/changeMetadata/{id}(id=${group.getId()})}"
th:href="@{/gruppen2/details/{id}/meta(id=${group.getId()})}"
th:if="${group.getRoles().get(user.getId()) == admin}"></a>
</div>
</div>
@ -83,15 +83,14 @@
style="background: #52a1eb; border: none; margin: 5px;">
<a style="color: white;" th:href="@{/gruppen2}">Zurück</a>
</button>
<form method="post" th:action="@{/gruppen2/leaveGroup}">
<form method="post" th:action="@{/gruppen2/details/{id}/leave(id=${group.getId()})}">
<button class="btn btn-danger" style="border-style: none; margin: 5px;"
th:name="group_id" th:value="${group.getId()}"
th:name="group_id"
type="submit">Gruppe verlassen
</button>
</form>
<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()}"
<form method="post" th:action="@{/gruppen2/details/{id}/destroy(id=${group.getId()})}">
<button class="btn btn-danger" style="border-style: none; margin: 5px;" th:name="group_id"
th:if="${group.getRoles().get(user.getId()) == admin}"
type="submit">Gruppe löschen
</button>
@ -111,7 +110,7 @@
</div>
<div th:if="${group.getRoles().get(user.getId()) == admin}">
<form method="get"
th:action="@{/gruppen2/details/members/{id}(id=${group.getId()})}">
th:action="@{/gruppen2/details/{id}/members(id=${group.getId()})}">
<button class="btn btn-secondary" style="background: slategrey; float: left;">
Mitglieder bearbeiten
</button>

View File

@ -22,7 +22,7 @@
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
</li>
<li class="active">
<a th:href="@{/gruppen2/searchPage}" href="/searchPage">Suche</a>
<a th:href="@{/gruppen2/search}" href="/search">Suche</a>
</li>
</ul>
</nav>
@ -46,6 +46,10 @@
<p style="overflow-wrap: break-word; font-optical-sizing: auto;"
th:text="${group.getDescription()}"></p>
</div>
<form class="mt-3" th:if="${group.getVisibility() == public}" method="post"
th:action="@{/gruppen2/details/{id}/join(id=${group.getId()})}">
<button class="btn btn-primary" type="submit">Beitreten!</button>
</form>
</div>
</div>
</main>

View File

@ -27,7 +27,7 @@
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
</li>
<li>
<a th:href="@{/gruppen2/searchPage}" href="/searchPage">Suche</a>
<a th:href="@{/gruppen2/search}" href="/search">Suche</a>
</li>
</ul>
</nav>
@ -49,9 +49,8 @@
</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 th:action="@{/gruppen2/details/members/addUsersFromCsv}"
enctype="multipart/form-data"
method="post">
<form th:action="@{/gruppen2/details/{id}/members/update/csv(id=${group.getId()})}"
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"
@ -63,8 +62,7 @@
<div class="input-group-append">
<button class="btn btn-outline-secondary"
style="background: #52a1eb; border-style: none;"
th:name="group_id" th:value="${group.getId()}"
type="submit">
th:name="group_id" type="submit">
<a style="color: white;">Hinzufügen</a>
</button>
</div>
@ -72,7 +70,7 @@
</form>
</div>
<div class="form-group pt-4">
<form method="post" th:action="@{/gruppen2/details/members/changeMaximum}">
<form method="post" th:action="@{/gruppen2/details/{id}/members/update/userlimit(id=${group.getId()})}">
<div class="input-group mb-3" id="userMaximum">
<label for="teilnehmerzahl"></label>
<input class="form-control"
@ -84,8 +82,7 @@
<div class="input-group-append">
<button class="btn btn-outline-secondary"
style="background: #52a1eb; border-style: none;"
th:name="group_id" th:value="${group.getId()}"
type="submit">
th:name="group_id" type="submit">
<a style="color: white;">Speichern</a>
</button>
</div>
@ -111,21 +108,13 @@
<td>
<div class="text-right btn-toolbar" style="float: right;" role="toolbar">
<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">
th:action="@{/gruppen2/details/{id}/members/{userid}/update/role(id=${group.getId()}, userid=${member.getId()})}">
<button class="btn btn-warning btn-sm" type="submit"
style="margin: 5px;">Rolle ändern
</button>
</form>
<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">
th:action="@{/gruppen2/details/{id}/members/{userid}/delete(id=${group.getId()}, userid=${member.getId()})}">
<button class="btn btn-danger btn-sm" style="margin: 5px;"
th:if='!${account.getName().equals(member.getId())}'>
Mitglied entfernen

View File

@ -23,7 +23,7 @@
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
</li>
<li>
<a href="/searchPage" th:href="@{/gruppen2/searchPage}">Suche</a>
<a href="/search" th:href="@{/gruppen2/search}">Suche</a>
</li>
</ul>
</nav>

View File

@ -25,7 +25,7 @@
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
</li>
<li class="active">
<a href="/searchPage" th:href="@{/gruppen2/searchPage}">Suche</a>
<a href="/search" th:href="@{/gruppen2/search}">Suche</a>
</li>
</ul>
</nav>
@ -44,7 +44,7 @@
<div class="form-group mt-2" th:if="${group.getMembers().size() < group.getUserLimit()}">
<h3>Möchtest du dieser privaten Gruppe beitreten?</h3>
<div class="text-right">
<form method="post" th:action="@{/gruppen2/join}">
<form method="post" th:action="@{/gruppen2/details/{id}/join(id = ${group.getId()})}">
<input name="id" th:value="${group.getId()}" type="hidden"/>
<button class="btn btn-primary"
style="background: #52a1eb; border-style: none;"

View File

@ -23,7 +23,7 @@
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
</li>
<li class="active">
<a th:href="@{/gruppen2/searchPage}" href="/searchPage">Suche</a>
<a th:href="@{/gruppen2/search}" href="/search">Suche</a>
</li>
</ul>
</nav>
@ -35,20 +35,15 @@
<h1>Gruppensuche</h1>
<div class="shadow-sm p-2"
style="border: 10px solid aliceblue; border-radius: 5px; background: aliceblue;">
<form method="get" th:action="@{/gruppen2/search}">
<form method="post" th:action="@{/gruppen2/search}">
<div class="form-group">
<label for="suchleiste">Suchbegriff:</label>
<input class="form-control" id="suchleiste"
placeholder="z.B. Programmieren, Lerngruppe, ..."
th:name="suchbegriff" type="text">
th:name="string" type="text">
</div>
<button class="btn btn-primary"
style="background: #52a1eb; border-style: none;"
type="submit">Suchen
</button>
<button class="btn btn-primary" style="background: deepskyblue; border-style: none;" type="submit">
<a href="/gruppen2/search?suchbegriff=" style="color: white;">Alle
anzeigen</a>
<button class="btn btn-primary" style="background: #52a1eb; border-style: none;" type="submit">
Suchen
</button>
</form>
</div>