1

fix table and functionality

This commit is contained in:
kasch309
2020-03-18 14:21:05 +01:00
parent 19e8ef9c07
commit 75a4701bd0
2 changed files with 16 additions and 11 deletions

View File

@ -51,7 +51,7 @@
<h2 style="display: inline-block; margin: 0">Mitglieder</h2>
<div th:if='${group.getRoles().get(user.getUser_id()) == admin}'>
<form method="get" action="/gruppen2/details/members">
<button th:name="group_id" th:value="${group.getId()}" class="btn btn-secondary" type="submit" style="background: slategrey; float: right" >Mitglieder bearbeiten</button>
<button th:name="group_id" th:value="${group.getId()}" class="btn btn-secondary" type="submit" style="background: slategrey; margin-top: 200px; float: right" >Mitglieder bearbeiten</button>
</form>
</div>
<p></p>

View File

@ -29,22 +29,27 @@
<div class="row">
<div class="col-9">
<div class="shadow-sm p-4" style="border: 10px solid aliceblue; background: aliceblue">
<table class="table-striped">
<table class="table">
<thead>
<tr>
<th scope="col">Mitglied</th>
<th scope="col">Rolle</th>
<th scope="col">Optionen</th>
<th scope="col" style="width: 320px">Optionen</th>
</tr>
</thead>
<tbody class="table-striped">
<tr th:each="member : ${group.getMembers()}">
<th th:value="${member.getUser_id()}"></th>
<th ></th>
<th>
<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>
<button class="btn btn-warning">Rolle ändern</button> <!-- th:if -->
<button class="btn btn-danger">Mitglied entfernen</button>
</th>
</td>
</tr>
</tbody>
</table>
</div>
</div>