new mappings
This commit is contained in:
@ -42,7 +42,6 @@ public class GroupDetailsController {
|
|||||||
this.projectionService = projectionService;
|
this.projectionService = projectionService;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: /details/{id}
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
||||||
@GetMapping("/details/{id}")
|
@GetMapping("/details/{id}")
|
||||||
public String getDetailsPage(KeycloakAuthenticationToken token,
|
public String getDetailsPage(KeycloakAuthenticationToken token,
|
||||||
@ -74,12 +73,11 @@ public class GroupDetailsController {
|
|||||||
return "detailsMember";
|
return "detailsMember";
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: /details/{id}/join
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
||||||
@PostMapping("/join")
|
@PostMapping("/details/{id}/join")
|
||||||
@CacheEvict(value = "groups", allEntries = true)
|
@CacheEvict(value = "groups", allEntries = true)
|
||||||
public String postDetailsJoin(KeycloakAuthenticationToken token,
|
public String postDetailsJoin(KeycloakAuthenticationToken token,
|
||||||
@RequestParam("id") String groupId) {
|
@PathVariable("id") String groupId) {
|
||||||
|
|
||||||
User user = new User(token);
|
User user = new User(token);
|
||||||
Group group = projectionService.projectSingleGroup(UUID.fromString(groupId));
|
Group group = projectionService.projectSingleGroup(UUID.fromString(groupId));
|
||||||
@ -89,12 +87,11 @@ public class GroupDetailsController {
|
|||||||
return "redirect:/gruppen2/details/" + groupId;
|
return "redirect:/gruppen2/details/" + groupId;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: /details/{id}/leave
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
||||||
@PostMapping("/leave")
|
@PostMapping("/details/{id}/leave")
|
||||||
@CacheEvict(value = "groups", allEntries = true)
|
@CacheEvict(value = "groups", allEntries = true)
|
||||||
public String postDetailsLeave(KeycloakAuthenticationToken token,
|
public String postDetailsLeave(KeycloakAuthenticationToken token,
|
||||||
@RequestParam("group_id") String groupId) {
|
@PathVariable("id") String groupId) {
|
||||||
|
|
||||||
User user = new User(token);
|
User user = new User(token);
|
||||||
Group group = projectionService.projectSingleGroup(UUID.fromString(groupId));
|
Group group = projectionService.projectSingleGroup(UUID.fromString(groupId));
|
||||||
@ -104,12 +101,11 @@ public class GroupDetailsController {
|
|||||||
return "redirect:/gruppen2";
|
return "redirect:/gruppen2";
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: /details/{id}/destroy
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
||||||
@PostMapping("/delete")
|
@PostMapping("/details/{id}/destroy")
|
||||||
@CacheEvict(value = "groups", allEntries = true)
|
@CacheEvict(value = "groups", allEntries = true)
|
||||||
public String postDetailsDestroy(KeycloakAuthenticationToken token,
|
public String postDetailsDestroy(KeycloakAuthenticationToken token,
|
||||||
@RequestParam("group_id") String groupId) {
|
@PathVariable("id") String groupId) {
|
||||||
|
|
||||||
User user = new User(token);
|
User user = new User(token);
|
||||||
Group group = projectionService.projectSingleGroup(UUID.fromString(groupId));
|
Group group = projectionService.projectSingleGroup(UUID.fromString(groupId));
|
||||||
@ -119,9 +115,8 @@ public class GroupDetailsController {
|
|||||||
return "redirect:/gruppen2";
|
return "redirect:/gruppen2";
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: /details/{id}/meta
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
||||||
@GetMapping("/details/meta/{id}")
|
@GetMapping("/details/{id}/meta")
|
||||||
public String getDetailsMeta(KeycloakAuthenticationToken token,
|
public String getDetailsMeta(KeycloakAuthenticationToken token,
|
||||||
Model model,
|
Model model,
|
||||||
@PathVariable("id") String groupId) {
|
@PathVariable("id") String groupId) {
|
||||||
@ -136,14 +131,13 @@ public class GroupDetailsController {
|
|||||||
return "changeMetadata";
|
return "changeMetadata";
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: /details/{id}/meta/update
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
||||||
@PostMapping("/details/meta")
|
@PostMapping("/details/{id}/meta/update")
|
||||||
@CacheEvict(value = "groups", allEntries = true)
|
@CacheEvict(value = "groups", allEntries = true)
|
||||||
public String postDetailsMetaUpdate(KeycloakAuthenticationToken token,
|
public String postDetailsMetaUpdate(KeycloakAuthenticationToken token,
|
||||||
|
@PathVariable("id") String groupId,
|
||||||
@RequestParam("title") String title,
|
@RequestParam("title") String title,
|
||||||
@RequestParam("description") String description,
|
@RequestParam("description") String description) {
|
||||||
@RequestParam("groupId") String groupId) {
|
|
||||||
|
|
||||||
User user = new User(token);
|
User user = new User(token);
|
||||||
Group group = projectionService.projectSingleGroup(UUID.fromString(groupId));
|
Group group = projectionService.projectSingleGroup(UUID.fromString(groupId));
|
||||||
@ -154,9 +148,8 @@ public class GroupDetailsController {
|
|||||||
return "redirect:/gruppen2/details/" + groupId;
|
return "redirect:/gruppen2/details/" + groupId;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: /details/{id}/members
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
||||||
@GetMapping("/details/members/{id}")
|
@GetMapping("/details/{id}/members")
|
||||||
public String getDetailsMembers(KeycloakAuthenticationToken token,
|
public String getDetailsMembers(KeycloakAuthenticationToken token,
|
||||||
Model model,
|
Model model,
|
||||||
@PathVariable("id") String groupId) {
|
@PathVariable("id") String groupId) {
|
||||||
@ -171,28 +164,26 @@ public class GroupDetailsController {
|
|||||||
return "editMembers";
|
return "editMembers";
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: /details/{id}/members/update/userlimit
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
||||||
@PostMapping("/details/members/setuserlimit")
|
@PostMapping("/details/{id}/members/update/userlimit")
|
||||||
@CacheEvict(value = "groups", allEntries = true)
|
@CacheEvict(value = "groups", allEntries = true)
|
||||||
public String postDetailsMembersUpdateUserLimit(KeycloakAuthenticationToken token,
|
public String postDetailsMembersUpdateUserLimit(KeycloakAuthenticationToken token,
|
||||||
@RequestParam("maximum") long userLimit,
|
@PathVariable("id") String groupId,
|
||||||
@RequestParam("group_id") String groupId) {
|
@RequestParam("maximum") long userLimit) {
|
||||||
|
|
||||||
User user = new User(token);
|
User user = new User(token);
|
||||||
Group group = projectionService.projectSingleGroup(UUID.fromString(groupId));
|
Group group = projectionService.projectSingleGroup(UUID.fromString(groupId));
|
||||||
|
|
||||||
groupService.updateUserLimit(user, group, userLimit);
|
groupService.updateUserLimit(user, group, userLimit);
|
||||||
|
|
||||||
return "redirect:/gruppen2/details/members/" + groupId;
|
return "redirect:/gruppen2/details/" + groupId + "/members";
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: /details/{id}/members/update/csv
|
|
||||||
@RolesAllowed("ROLE_orga")
|
@RolesAllowed("ROLE_orga")
|
||||||
@PostMapping("/details/members/csv")
|
@PostMapping("/details/{id}/members/update/csv")
|
||||||
@CacheEvict(value = "groups", allEntries = true)
|
@CacheEvict(value = "groups", allEntries = true)
|
||||||
public String postDetailsMembersUpdateCsv(KeycloakAuthenticationToken token,
|
public String postDetailsMembersUpdateCsv(KeycloakAuthenticationToken token,
|
||||||
@RequestParam("group_id") String groupId,
|
@PathVariable("id") String groupId,
|
||||||
@RequestParam(value = "file", required = false) MultipartFile file) {
|
@RequestParam(value = "file", required = false) MultipartFile file) {
|
||||||
|
|
||||||
User user = new User(token);
|
User user = new User(token);
|
||||||
@ -200,18 +191,17 @@ public class GroupDetailsController {
|
|||||||
|
|
||||||
groupService.addUsersToGroup(CsvService.readCsvFile(file), group, user);
|
groupService.addUsersToGroup(CsvService.readCsvFile(file), group, user);
|
||||||
|
|
||||||
return "redirect:/gruppen2/details/members/" + groupId;
|
return "redirect:/gruppen2/details/" + groupId + "/members";
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Method + view for /details/{id}/members/{id}
|
//TODO: Method + view for /details/{id}/members/{id}
|
||||||
|
|
||||||
//TODO: /details/{id}/members/{id}/update/role
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
||||||
@PostMapping("/details/members/togglerole")
|
@PostMapping("/details/{id}/members/{userid}/update/role")
|
||||||
@CacheEvict(value = "groups", allEntries = true)
|
@CacheEvict(value = "groups", allEntries = true)
|
||||||
public String postDetailsMembersUpdateRole(KeycloakAuthenticationToken token,
|
public String postDetailsMembersUpdateRole(KeycloakAuthenticationToken token,
|
||||||
@RequestParam("group_id") String groupId,
|
@PathVariable("id") String groupId,
|
||||||
@RequestParam("user_id") String userId) {
|
@PathVariable("userid") String userId) {
|
||||||
|
|
||||||
User user = new User(token);
|
User user = new User(token);
|
||||||
Group group = projectionService.projectSingleGroup(UUID.fromString(groupId));
|
Group group = projectionService.projectSingleGroup(UUID.fromString(groupId));
|
||||||
@ -225,16 +215,15 @@ public class GroupDetailsController {
|
|||||||
return "redirect:/gruppen2/details/" + groupId;
|
return "redirect:/gruppen2/details/" + groupId;
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:/gruppen2/details/members/" + groupId;
|
return "redirect:/gruppen2/details/" + groupId + "/members";
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: /details/{id}/members/{id}/delete
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
||||||
@PostMapping("/details/members/deleteuser")
|
@PostMapping("/details/{id}/members/{userid}/delete")
|
||||||
@CacheEvict(value = "groups", allEntries = true)
|
@CacheEvict(value = "groups", allEntries = true)
|
||||||
public String postDetailsMembersDelete(KeycloakAuthenticationToken token,
|
public String postDetailsMembersDelete(KeycloakAuthenticationToken token,
|
||||||
@RequestParam("group_id") String groupId,
|
@PathVariable("id") String groupId,
|
||||||
@RequestParam("user_id") String userId) {
|
@PathVariable("userid") String userId) {
|
||||||
|
|
||||||
User user = new User(token);
|
User user = new User(token);
|
||||||
Group group = projectionService.projectSingleGroup(UUID.fromString(groupId));
|
Group group = projectionService.projectSingleGroup(UUID.fromString(groupId));
|
||||||
@ -246,6 +235,6 @@ public class GroupDetailsController {
|
|||||||
groupService.deleteUser(new User(userId), group);
|
groupService.deleteUser(new User(userId), group);
|
||||||
}
|
}
|
||||||
|
|
||||||
return "redirect:/gruppen2/details/members/" + groupId;
|
return "redirect:/gruppen2/details/" + groupId + "/members";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import org.springframework.stereotype.Controller;
|
|||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
@ -38,22 +39,20 @@ public class SearchAndInviteController {
|
|||||||
this.searchService = searchService;
|
this.searchService = searchService;
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: /search
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
||||||
@GetMapping("/searchPage")
|
@GetMapping("/search")
|
||||||
public String getSearchPage(Model model) {
|
public String getSearch(Model model) {
|
||||||
// Noch keine Suche gestartet: leeres Suchergebnis
|
// Noch keine Suche gestartet: leeres Suchergebnis
|
||||||
model.addAttribute("gruppen", Collections.emptyList());
|
model.addAttribute("gruppen", Collections.emptyList());
|
||||||
|
|
||||||
return "search";
|
return "search";
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: /search/{string}
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin"})
|
||||||
@GetMapping("/search")
|
@PostMapping("/search")
|
||||||
public String getSearch(KeycloakAuthenticationToken token,
|
public String postSearch(KeycloakAuthenticationToken token,
|
||||||
Model model,
|
Model model,
|
||||||
@RequestParam("suchbegriff") String search) {
|
@RequestParam("string") String search) {
|
||||||
|
|
||||||
User user = new User(token);
|
User user = new User(token);
|
||||||
List<Group> groups = searchService.searchPublicGroups(search, user);
|
List<Group> groups = searchService.searchPublicGroups(search, user);
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/searchPage" th:href="@{/gruppen2/searchPage}">Suche</a>
|
<a href="/search" th:href="@{/gruppen2/search}">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
@ -40,7 +40,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-10">
|
<div class="col-10">
|
||||||
<h1>Metadaten ändern</h1>
|
<h1>Metadaten ändern</h1>
|
||||||
<form method="post" th:action="@{/gruppen2/details/changeMetadata}">
|
<form method="post" th:action="@{/gruppen2/details/{id}/meta/update(id=${group.getId()})}">
|
||||||
<div class="shadow-sm p-2"
|
<div class="shadow-sm p-2"
|
||||||
style=" border: 10px solid aliceblue; background: aliceblue;">
|
style=" border: 10px solid aliceblue; background: aliceblue;">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -58,8 +58,6 @@
|
|||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary"
|
||||||
style="background: #52a1eb; border-style: none;"
|
style="background: #52a1eb; border-style: none;"
|
||||||
th:if="${group.getRoles().get(user.getId()) == admin}"
|
th:if="${group.getRoles().get(user.getId()) == admin}"
|
||||||
th:name="groupId"
|
|
||||||
th:value="${group.getId()}"
|
|
||||||
type="submit">Speichern
|
type="submit">Speichern
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/gruppen2/searchPage}" href="/searchPage">Suche</a>
|
<a th:href="@{/gruppen2/search}" href="/search">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/gruppen2/searchPage}" href="/searchPage">Suche</a>
|
<a th:href="@{/gruppen2/search}" href="/search">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/searchPage" th:href="@{/gruppen2/searchPage}">Suche</a>
|
<a href="/search" th:href="@{/gruppen2/search}">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
@ -42,7 +42,7 @@
|
|||||||
<div class="col-1">
|
<div class="col-1">
|
||||||
<a class="fa fa-pencil"
|
<a class="fa fa-pencil"
|
||||||
style="font-size:30px; width: 5%;"
|
style="font-size:30px; width: 5%;"
|
||||||
th:href="@{/gruppen2/details/changeMetadata/{id}(id=${group.getId()})}"
|
th:href="@{/gruppen2/details/{id}/meta(id=${group.getId()})}"
|
||||||
th:if="${group.getRoles().get(user.getId()) == admin}"></a>
|
th:if="${group.getRoles().get(user.getId()) == admin}"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -83,15 +83,14 @@
|
|||||||
style="background: #52a1eb; border: none; margin: 5px;">
|
style="background: #52a1eb; border: none; margin: 5px;">
|
||||||
<a style="color: white;" th:href="@{/gruppen2}">Zurück</a>
|
<a style="color: white;" th:href="@{/gruppen2}">Zurück</a>
|
||||||
</button>
|
</button>
|
||||||
<form method="post" th:action="@{/gruppen2/leaveGroup}">
|
<form method="post" th:action="@{/gruppen2/details/{id}/leave(id=${group.getId()})}">
|
||||||
<button class="btn btn-danger" style="border-style: none; margin: 5px;"
|
<button class="btn btn-danger" style="border-style: none; margin: 5px;"
|
||||||
th:name="group_id" th:value="${group.getId()}"
|
th:name="group_id"
|
||||||
type="submit">Gruppe verlassen
|
type="submit">Gruppe verlassen
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
<form method="post" th:action="@{/gruppen2/deleteGroup}">
|
<form method="post" th:action="@{/gruppen2/details/{id}/destroy(id=${group.getId()})}">
|
||||||
<button class="btn btn-danger" style="border-style: none; margin: 5px;"
|
<button class="btn btn-danger" style="border-style: none; margin: 5px;" th:name="group_id"
|
||||||
th:name="group_id" th:value="${group.getId()}"
|
|
||||||
th:if="${group.getRoles().get(user.getId()) == admin}"
|
th:if="${group.getRoles().get(user.getId()) == admin}"
|
||||||
type="submit">Gruppe löschen
|
type="submit">Gruppe löschen
|
||||||
</button>
|
</button>
|
||||||
@ -111,7 +110,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div th:if="${group.getRoles().get(user.getId()) == admin}">
|
<div th:if="${group.getRoles().get(user.getId()) == admin}">
|
||||||
<form method="get"
|
<form method="get"
|
||||||
th:action="@{/gruppen2/details/members/{id}(id=${group.getId()})}">
|
th:action="@{/gruppen2/details/{id}/members(id=${group.getId()})}">
|
||||||
<button class="btn btn-secondary" style="background: slategrey; float: left;">
|
<button class="btn btn-secondary" style="background: slategrey; float: left;">
|
||||||
Mitglieder bearbeiten
|
Mitglieder bearbeiten
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a th:href="@{/gruppen2/searchPage}" href="/searchPage">Suche</a>
|
<a th:href="@{/gruppen2/search}" href="/search">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
@ -46,6 +46,10 @@
|
|||||||
<p style="overflow-wrap: break-word; font-optical-sizing: auto;"
|
<p style="overflow-wrap: break-word; font-optical-sizing: auto;"
|
||||||
th:text="${group.getDescription()}"></p>
|
th:text="${group.getDescription()}"></p>
|
||||||
</div>
|
</div>
|
||||||
|
<form class="mt-3" th:if="${group.getVisibility() == public}" method="post"
|
||||||
|
th:action="@{/gruppen2/details/{id}/join(id=${group.getId()})}">
|
||||||
|
<button class="btn btn-primary" type="submit">Beitreten!</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/gruppen2/searchPage}" href="/searchPage">Suche</a>
|
<a th:href="@{/gruppen2/search}" href="/search">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
@ -49,9 +49,8 @@
|
|||||||
</div>
|
</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;">
|
||||||
<div class="form-group pt-4" th:if="${account.getRoles().contains('orga')}">
|
<div class="form-group pt-4" th:if="${account.getRoles().contains('orga')}">
|
||||||
<form th:action="@{/gruppen2/details/members/addUsersFromCsv}"
|
<form th:action="@{/gruppen2/details/{id}/members/update/csv(id=${group.getId()})}"
|
||||||
enctype="multipart/form-data"
|
enctype="multipart/form-data" method="post">
|
||||||
method="post">
|
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<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"
|
||||||
@ -63,8 +62,7 @@
|
|||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button class="btn btn-outline-secondary"
|
<button class="btn btn-outline-secondary"
|
||||||
style="background: #52a1eb; border-style: none;"
|
style="background: #52a1eb; border-style: none;"
|
||||||
th:name="group_id" th:value="${group.getId()}"
|
th:name="group_id" type="submit">
|
||||||
type="submit">
|
|
||||||
<a style="color: white;">Hinzufügen</a>
|
<a style="color: white;">Hinzufügen</a>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -72,7 +70,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group pt-4">
|
<div class="form-group pt-4">
|
||||||
<form method="post" th:action="@{/gruppen2/details/members/changeMaximum}">
|
<form method="post" th:action="@{/gruppen2/details/{id}/members/update/userlimit(id=${group.getId()})}">
|
||||||
<div class="input-group mb-3" id="userMaximum">
|
<div class="input-group mb-3" id="userMaximum">
|
||||||
<label for="teilnehmerzahl"></label>
|
<label for="teilnehmerzahl"></label>
|
||||||
<input class="form-control"
|
<input class="form-control"
|
||||||
@ -84,8 +82,7 @@
|
|||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button class="btn btn-outline-secondary"
|
<button class="btn btn-outline-secondary"
|
||||||
style="background: #52a1eb; border-style: none;"
|
style="background: #52a1eb; border-style: none;"
|
||||||
th:name="group_id" th:value="${group.getId()}"
|
th:name="group_id" type="submit">
|
||||||
type="submit">
|
|
||||||
<a style="color: white;">Speichern</a>
|
<a style="color: white;">Speichern</a>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -111,21 +108,13 @@
|
|||||||
<td>
|
<td>
|
||||||
<div class="text-right btn-toolbar" style="float: right;" role="toolbar">
|
<div class="text-right btn-toolbar" style="float: right;" role="toolbar">
|
||||||
<form method="post"
|
<form method="post"
|
||||||
th:action="@{/gruppen2/details/members/changeRole}">
|
th:action="@{/gruppen2/details/{id}/members/{userid}/update/role(id=${group.getId()}, userid=${member.getId()})}">
|
||||||
<input th:name="group_id" th:value="${group.getId()}"
|
|
||||||
type="hidden">
|
|
||||||
<input th:name="user_id" th:value="${member.getId()}"
|
|
||||||
type="hidden">
|
|
||||||
<button class="btn btn-warning btn-sm" type="submit"
|
<button class="btn btn-warning btn-sm" type="submit"
|
||||||
style="margin: 5px;">Rolle ändern
|
style="margin: 5px;">Rolle ändern
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
<form method="post"
|
<form method="post"
|
||||||
th:action="@{/gruppen2/details/members/deleteUser}">
|
th:action="@{/gruppen2/details/{id}/members/{userid}/delete(id=${group.getId()}, userid=${member.getId()})}">
|
||||||
<input th:name="group_id" th:value="${group.getId()}"
|
|
||||||
type="hidden">
|
|
||||||
<input th:name="user_id" th:value="${member.getId()}"
|
|
||||||
type="hidden">
|
|
||||||
<button class="btn btn-danger btn-sm" style="margin: 5px;"
|
<button class="btn btn-danger btn-sm" style="margin: 5px;"
|
||||||
th:if='!${account.getName().equals(member.getId())}'>
|
th:if='!${account.getName().equals(member.getId())}'>
|
||||||
Mitglied entfernen
|
Mitglied entfernen
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/searchPage" th:href="@{/gruppen2/searchPage}">Suche</a>
|
<a href="/search" th:href="@{/gruppen2/search}">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a href="/searchPage" th:href="@{/gruppen2/searchPage}">Suche</a>
|
<a href="/search" th:href="@{/gruppen2/search}">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
<div class="form-group mt-2" th:if="${group.getMembers().size() < group.getUserLimit()}">
|
<div class="form-group mt-2" th:if="${group.getMembers().size() < group.getUserLimit()}">
|
||||||
<h3>Möchtest du dieser privaten Gruppe beitreten?</h3>
|
<h3>Möchtest du dieser privaten Gruppe beitreten?</h3>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<form method="post" th:action="@{/gruppen2/join}">
|
<form method="post" th:action="@{/gruppen2/details/{id}/join(id = ${group.getId()})}">
|
||||||
<input name="id" th:value="${group.getId()}" type="hidden"/>
|
<input name="id" th:value="${group.getId()}" type="hidden"/>
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary"
|
||||||
style="background: #52a1eb; border-style: none;"
|
style="background: #52a1eb; border-style: none;"
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
<a href="/create/student" th:href="@{/gruppen2/create/student}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a th:href="@{/gruppen2/searchPage}" href="/searchPage">Suche</a>
|
<a th:href="@{/gruppen2/search}" href="/search">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
@ -35,20 +35,15 @@
|
|||||||
<h1>Gruppensuche</h1>
|
<h1>Gruppensuche</h1>
|
||||||
<div class="shadow-sm p-2"
|
<div class="shadow-sm p-2"
|
||||||
style="border: 10px solid aliceblue; border-radius: 5px; background: aliceblue;">
|
style="border: 10px solid aliceblue; border-radius: 5px; background: aliceblue;">
|
||||||
<form method="get" th:action="@{/gruppen2/search}">
|
<form method="post" th:action="@{/gruppen2/search}">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="suchleiste">Suchbegriff:</label>
|
<label for="suchleiste">Suchbegriff:</label>
|
||||||
<input class="form-control" id="suchleiste"
|
<input class="form-control" id="suchleiste"
|
||||||
placeholder="z.B. Programmieren, Lerngruppe, ..."
|
placeholder="z.B. Programmieren, Lerngruppe, ..."
|
||||||
th:name="suchbegriff" type="text">
|
th:name="string" type="text">
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary" style="background: #52a1eb; border-style: none;" type="submit">
|
||||||
style="background: #52a1eb; border-style: none;"
|
Suchen
|
||||||
type="submit">Suchen
|
|
||||||
</button>
|
|
||||||
<button class="btn btn-primary" style="background: deepskyblue; border-style: none;" type="submit">
|
|
||||||
<a href="/gruppen2/search?suchbegriff=" style="color: white;">Alle
|
|
||||||
anzeigen</a>
|
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user