1

Merge remote-tracking branch 'origin/master'

This commit is contained in:
kasch309
2020-03-23 17:08:46 +01:00
4 changed files with 13 additions and 5 deletions

View File

@ -99,6 +99,9 @@ public class Gruppen2Controller {
Account account = keyCloakService.createAccountFromPrincipal(token);
List<User> userList = new ArrayList<>();
if(userMaximum == null){
userMaximum = 100000L;
}
if (!file.isEmpty()) {
try {
userList = CsvService.read(file.getInputStream());

View File

@ -1,6 +1,8 @@
package mops.gruppen2.service;
import mops.gruppen2.domain.Group;
import mops.gruppen2.domain.GroupType;
import mops.gruppen2.domain.Visibility;
import mops.gruppen2.domain.dto.EventDTO;
import mops.gruppen2.domain.event.Event;
import mops.gruppen2.domain.exception.EventException;
@ -84,6 +86,7 @@ public class GroupService {
return visibleGroups.parallelStream()
.filter(group -> group.getType() != null)
.filter(group -> !userGroupIds.contains(group.getId()))
.filter(group -> group.getVisibility() == Visibility.PUBLIC)
.collect(Collectors.toList());
}
@ -95,7 +98,8 @@ public class GroupService {
List<Group> visibleGroups = projectEventList(createEvents);
return visibleGroups.parallelStream()
.filter(group -> group.getType() != null)
.filter(group -> group.getType() == GroupType.LECTURE)
.filter(group -> group.getVisibility() == Visibility.PUBLIC)
.collect(Collectors.toList());
}

View File

@ -65,13 +65,14 @@
<div class="col-3" style="white-space: nowrap">
<div style="display: inline-block; margin: 0">
<h2>Mitglieder</h2>
<div>
<h4>
<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>

View File

@ -59,7 +59,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="button">
type="submit">
<a style="color: white">Hinzufügen</a>
</button>
</div>
@ -70,7 +70,7 @@
<form action="/gruppen2/details/members/changeMaximum" method="post">
<div class="input-group mb-3" id="userMaximum">
<input class="form-control" placeholder="Maximale Teilnehmerzahl ändern..." th:name="maximum"
type="number" min="${group.getMembers().size()}" max="10000">
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"
th:name="group_id" th:value="${group.getId()}"