improvements
This commit is contained in:
@ -41,8 +41,7 @@ public class GroupCreationController {
|
||||
|
||||
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
||||
@GetMapping("/create")
|
||||
public String getCreate(KeycloakAuthenticationToken token,
|
||||
Model model) {
|
||||
public String getCreate(Model model) {
|
||||
|
||||
model.addAttribute("lectures", projectionService.projectLectures());
|
||||
|
||||
|
||||
@ -139,7 +139,7 @@ public class GroupDetailsController {
|
||||
@CacheEvict(value = "groups", allEntries = true)
|
||||
public String postDetailsMembersUpdateUserLimit(KeycloakAuthenticationToken token,
|
||||
@PathVariable("id") String groupId,
|
||||
@RequestParam("maximum") long userLimit) {
|
||||
@RequestParam("userlimit") long userLimit) {
|
||||
|
||||
User user = new User(token);
|
||||
Group group = projectionService.projectSingleGroup(UUID.fromString(groupId));
|
||||
|
||||
@ -2,7 +2,6 @@ package mops.gruppen2.service;
|
||||
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import mops.gruppen2.domain.GroupType;
|
||||
import net.bytebuddy.description.modifier.Visibility;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.UUID;
|
||||
@ -14,10 +13,6 @@ public final class ControllerService {
|
||||
|
||||
private ControllerService() {}
|
||||
|
||||
public static Visibility getVisibility(boolean isPrivate) {
|
||||
return isPrivate ? Visibility.PRIVATE : Visibility.PUBLIC;
|
||||
}
|
||||
|
||||
public static GroupType getGroupType(String type) {
|
||||
return GroupType.valueOf(type);
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
<!--Anzahl Text-->
|
||||
<div class="mb-2">
|
||||
<span>Teilnehmer: </span>
|
||||
<span th:if="${group.getUserLimit() <= 10000}"
|
||||
<span th:if="${group.getUserLimit() <= 100000}"
|
||||
th:text="${group.getMembers().size() + ' von ' + group.getUserLimit()}"></span>
|
||||
<span th:unless="${group.getUserLimit() <= 100000}"
|
||||
th:text="${group.getMembers().size()}"></span>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<!--Spacer-->
|
||||
<span class="col"></span>
|
||||
|
||||
<form method="post" th:action="@{/gruppen2/details/{id}/destroy(id=${group.getId()})}">
|
||||
<form method="post" th:action="@{/gruppen2/details/{id}/edit/destroy(id=${group.getId()})}">
|
||||
<button class="btn btn-danger btn-bar" type="submit">Gruppe löschen
|
||||
</button>
|
||||
</form>
|
||||
|
||||
@ -86,7 +86,8 @@
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text text-monospace">Limit:</span>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="userlimit" value="1"
|
||||
<input type="number" class="form-control" name="userlimit"
|
||||
th:value="${group != null} ? ${#numbers.formatInteger(group.getUserLimit(), 5)} : '1'"
|
||||
min="1" max="100000" id="limitselect" required disabled>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text text-monospace">Teilnehmer</span>
|
||||
@ -101,7 +102,8 @@
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text text-monospace">Gruppentitel:</span>
|
||||
</div>
|
||||
<input type="text" class="form-control" th:name="title" required>
|
||||
<input type="text" class="form-control" th:name="title" th:value="${group?.getTitle()}"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<!--Gruppenbeschreibung-->
|
||||
@ -109,6 +111,7 @@
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text text-monospace">Beschreibung:</span>
|
||||
</div>
|
||||
<textarea class="form-control" th:name="description" required></textarea>
|
||||
<textarea class="form-control" th:name="description" th:text="${group?.getDescription()}"
|
||||
required></textarea>
|
||||
</div>
|
||||
</th:block>
|
||||
|
||||
Reference in New Issue
Block a user