add Mapping for search.html and create.html in Controller
This commit is contained in:
@ -31,4 +31,20 @@ public class Gruppen2Controller {
|
|||||||
model.addAttribute("account", keyCloakService.createAccountFromPrincipal(token));
|
model.addAttribute("account", keyCloakService.createAccountFromPrincipal(token));
|
||||||
return "index";
|
return "index";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin", "ROLE_actuator)"})
|
||||||
|
@GetMapping("/createGroup")
|
||||||
|
public String createGroup(KeycloakAuthenticationToken token, Model model) {
|
||||||
|
model.addAttribute("account", keyCloakService.createAccountFromPrincipal(token));
|
||||||
|
return "create";
|
||||||
|
}
|
||||||
|
|
||||||
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin", "ROLE_actuator)"})
|
||||||
|
@GetMapping("/findGroup")
|
||||||
|
public String findGroup(KeycloakAuthenticationToken token, Model model) {
|
||||||
|
model.addAttribute("account", keyCloakService.createAccountFromPrincipal(token));
|
||||||
|
return "search";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,19 +13,38 @@
|
|||||||
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation">
|
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/}" href="/">Gruppen</a>
|
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a th:href="@{/createGroup}" href="/createGroup">Erstellen</a>
|
<a th:href="@{/gruppen2/createGroup}" href="/createGroup">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/findGroup}" href="/findGroup">Suche</a>
|
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main th:fragment="bodycontent">
|
<main th:fragment="bodycontent">
|
||||||
|
<h1>Gruppenerstellung</h1>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<form method="post" action="/">
|
||||||
|
<div style="border: 10px solid aliceblue; background: aliceblue">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="titel">Name der Gruppe</label>
|
||||||
|
<input type="text" class="form-control" id="titel" th:value="${titel}">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="beschreibung">Beschreibung der Gruppe</label>
|
||||||
|
<textarea type="text" class="form-control" id="beschreibung" th:value="${beschreibung}">
|
||||||
|
|
||||||
|
</textarea>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@ -13,13 +13,13 @@
|
|||||||
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation">
|
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a th:href="@{/}" href="/">Gruppen</a>
|
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/createGroup}" href="/createGroup">Erstellen</a>
|
<a th:href="@{/gruppen2/createGroup}" href="/createGroup">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/findGroup}" href="/findGroup">Suche</a>
|
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
@ -28,10 +28,9 @@
|
|||||||
<h1>Meine Gruppen</h1>
|
<h1>Meine Gruppen</h1>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<form action="/" method="get">
|
<form action="/" method="get">
|
||||||
<div style="border: 10px solid ghostwhite; background: ghostwhite">
|
<div style="border: 10px solid aliceblue; background: aliceblue">
|
||||||
<h4 style="color: royalblue; font-weight: bold">Titel der Gruppe</h4>
|
<h4 style="color: dodgerblue; font-weight: bold">Titel der Gruppe</h4>
|
||||||
<p>Beschreibung der Gruppe ...</p>
|
<p>Beschreibung der Gruppe ...</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -13,38 +13,19 @@
|
|||||||
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation">
|
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/}" href="/">Gruppen</a>
|
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/createGroup}" href="/createGroup">Erstellen</a>
|
<a th:href="@{/gruppen2/createGroup}" href="/createGroup">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a th:href="@{/findGroup}" href="/findGroup">Suche</a>
|
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<main th:fragment="bodycontent">
|
<main th:fragment="bodycontent">
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-sm-8 ">
|
|
||||||
<h1>Gruppenerstellung</h1>
|
|
||||||
<form method="post" action="/">
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Titel der Gruppe</label>
|
|
||||||
<input class="form-control" type="text" th:value="${titel}" name="titel" placeholder="Titel der Gruppe">
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Beschreibung der Gruppe</label>
|
|
||||||
<input class="form-control" type="text" th:value="${beschreibung}" name="beschreibung" placeholder="Beschreibung der Gruppe">
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<button type="submit" class="btn btn-outline-dark">weiter</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user