1

Merge pull request #109 from hhu-propra2/max_userNumber

Max user number
This commit is contained in:
XXNitram
2020-03-19 17:34:01 +01:00
committed by GitHub

View File

@ -35,7 +35,16 @@
<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"> <div class="col-10">
<h1>Mitglieder bearbeiten</h1>
<div>
<h5>
<a th:text="${group.getMembers().size()}"></a>
<a>von maximal</a>
<a th:text="${group.getUserMaximum()}"></a>
<a>Benutzern.</a>
</h5>
</div>
<div class="shadow p-2" style="border: 10px solid aliceblue; background: aliceblue"> <div class="shadow p-2" style="border: 10px solid aliceblue; 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')}">
@ -43,17 +52,15 @@
enctype="multipart/form-data" enctype="multipart/form-data"
method="post"> method="post">
<div class="row"> <div class="row">
<div class="col-9"> <div class="col-10">
<div class="custom-file"> <div class="custom-file">
<input class="custom-file-input" id="file" th:name="file" <input class="custom-file-input" id="file" th:name="file" type="file">
type="file"> <label class="custom-file-label" for="file">CSV Datei von Mitgliedern hochladen</label>
<label class="custom-file-label" for="file">CSV Datei von
Mitgliedern hochladen</label>
</div> </div>
</div> </div>
<div class="col-3"> <div class="col-2">
<button class="btn btn-primary" <button class="btn btn-primary"
style="background: #52a1eb; border-style: none" style="background: #52a1eb; border-style: none; float: right"
th:name="group_id" th:value="${group.getId()}" th:name="group_id" th:value="${group.getId()}"
type="submit"> type="submit">
Mitglieder hinzufügen Mitglieder hinzufügen
@ -62,12 +69,12 @@
</div> </div>
</form> </form>
</div> </div>
<table class="table"> <table class="table" style="table-layout: fixed">
<thead> <thead>
<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" >Optionen</th> <th scope="col" style="width: 280px">Optionen</th>
</tr> </tr>
</thead> </thead>
<tbody class="table-striped"> <tbody class="table-striped">
@ -78,23 +85,24 @@
<span th:if='${group.getRoles().get(member.getId()) == admin}'>Admin</span> <span th:if='${group.getRoles().get(member.getId()) == admin}'>Admin</span>
</td> </td>
<td> <td>
<form action="/gruppen2/details/members/changeRole" method="post"> <div class="text-right btn-toolbar" style="float: right;" role="toolbar">
<input th:name="group_id" th:value="${group.getId()}" <form action="/gruppen2/details/members/changeRole" method="post">
type="hidden"> <input th:name="group_id" th:value="${group.getId()}"
<input th:name="user_id" th:value="${member.getId()}" type="hidden">
type="hidden"> <input th:name="user_id" th:value="${member.getId()}"
<button class="btn btn-warning btn-sm" type="submit">Rolle type="hidden">
ändern <button class="btn btn-warning btn-sm" type="submit" style="margin: 5px">Rolle
</button><!-- th:if --> ändern
</form> </button><!-- th:if -->
<form action="/gruppen2/details/members/deleteUser" method="post"> </form>
<input th:name="group_id" th:value="${group.getId()}" <form action="/gruppen2/details/members/deleteUser" method="post">
type="hidden"> <input th:name="group_id" th:value="${group.getId()}"
<input th:name="user_id" th:value="${member.getId()}" type="hidden">
type="hidden"> <input th:name="user_id" th:value="${member.getId()}"
<button th:if='${member.getId() != account.getName()}' class="btn btn-danger btn-sm">Mitglied entfernen type="hidden">
</button> <button class="btn btn-danger btn-sm" style="margin: 5px">Mitglied entfernen</button>
</form> </form>
</div>
</td> </td>
</tr> </tr>
</tbody> </tbody>