1

Merge pull request #134 from hhu-propra2/fix-group-search-number-of-users

Fix group search number of users
This commit is contained in:
Christoph
2020-03-25 14:48:26 +01:00
committed by GitHub
6 changed files with 53 additions and 29 deletions

View File

@ -12,7 +12,7 @@
<header>
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation" th:switch="${account.getRoles().contains('orga')}">
<ul>
<li class="active">
<li>
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
</li>
<li th:case="${true}">
@ -21,7 +21,7 @@
<li th:case="${false}">
<a href="/createStudent" th:href="@{/gruppen2/createStudent}">Erstellen</a>
</li>
<li>
<li class="active">
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
</li>
</ul>
@ -53,8 +53,8 @@
<form method="post" action="/gruppen2/detailsBeitreten">
<button class="btn btn-primary"
style="background: #52a1eb; border-style: none;"
th:href="@{/gruppen2/detailsBeitreten(id=${group.getId()})}"
th:name="id" th:value="${group.id}"
th:href="@{/gruppen2/detailsBeitreten}"
th:name="id" th:value="${group.getId()}"
type="submit">Gruppe beitreten
</button>
</form>

View File

@ -49,23 +49,26 @@
<br>
<table class="table">
<!-- Erscheint dann, wenn man "Suchen" Button klickt und Ergebnisse angezeigt werden, aber so solls aussehen -->
<thead th:if="${!gruppen.isEmpty()}">
<thead th:if='${!gruppen.isEmpty()}'>
<tr>
<th scope="col">Gruppenname</th>
<th scope="col">Beschreibung</th>
<th scope="col">Mitgliederanzahl</th>
<th scope="col">Max. Mitgliederanzahl</th>
</tr>
</thead>
<tbody>
<tr th:each="gruppe : ${gruppen}">
<tr th:each="gruppe : ${gruppen}" th:switch="${gruppe.getUserMaximum() != 100000}">
<th scope="row">
<a th:href="@{/gruppen2/detailsSearch(id=${gruppe.getId()})}"
th:text="${gruppe.title}">Gruppenname</a>
th:text="${gruppe.getTitle()}">Gruppenname</a>
</th>
<td style="" th:text="${#strings.abbreviate(gruppe.getDescription(), 50)}">
Beschreibung
</td>
<td th:text="${gruppe.getMembers().size()}">Mitgliederanzahl</td>
<td th:case="${true}">
<a th:text="${gruppe.getUserMaximum()}"></a>
</td>
<td th:case="${false}">unbegrenzt</td>
</tr>
</tbody>
</table>