Merge Erstellen and Veranstaltung into a single site
add two Erstellen sites, one for orga and one for student Co-Authored-By: andibuls <andibuls@users.noreply.github.com> Co-Authored-By: Talha Caliskan <killerber4t@users.noreply.github.com> Co-Authored-By: kasch309 <kasch309@users.noreply.github.com> Co-Authored-By: tomvahl <tomvahl@users.noreply.github.com> Co-Authored-By: Lukas Ettel <lukasettel@users.noreply.github.com>
This commit is contained in:
@ -70,18 +70,19 @@ public class Gruppen2Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_actuator)"})
|
@RolesAllowed({"ROLE_orga", "ROLE_actuator)"})
|
||||||
@GetMapping("/createLecture")
|
@GetMapping("/createOrga")
|
||||||
public String createLecture(KeycloakAuthenticationToken token, Model model) {
|
public String createOrga(KeycloakAuthenticationToken token, Model model) {
|
||||||
model.addAttribute("account", keyCloakService.createAccountFromPrincipal(token));
|
model.addAttribute("account", keyCloakService.createAccountFromPrincipal(token));
|
||||||
return "createLecture";
|
return "createOrga";
|
||||||
}
|
}
|
||||||
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_actuator)"})
|
@RolesAllowed({"ROLE_orga", "ROLE_actuator)"})
|
||||||
@PostMapping("/createLecture")
|
@PostMapping("/createOrga")
|
||||||
public String pCreateLecture(KeycloakAuthenticationToken token,
|
public String pCreateOrga(KeycloakAuthenticationToken token,
|
||||||
@RequestParam("title") String title,
|
@RequestParam("title") String title,
|
||||||
@RequestParam("beschreibung") String beschreibung,
|
@RequestParam("beschreibung") String beschreibung,
|
||||||
@RequestParam(value = "visibility", required = false) Boolean visibility,
|
@RequestParam(value = "visibility", required = false) Boolean visibility,
|
||||||
|
@RequestParam(value = "lecture", required = false) Boolean lecture,
|
||||||
@RequestParam(value = "file", required = false) MultipartFile file) throws IOException, EventException {
|
@RequestParam(value = "file", required = false) MultipartFile file) throws IOException, EventException {
|
||||||
|
|
||||||
Account account = keyCloakService.createAccountFromPrincipal(token);
|
Account account = keyCloakService.createAccountFromPrincipal(token);
|
||||||
@ -90,7 +91,30 @@ public class Gruppen2Controller {
|
|||||||
userList = CsvService.read(file.getInputStream());
|
userList = CsvService.read(file.getInputStream());
|
||||||
}
|
}
|
||||||
visibility = visibility == null;
|
visibility = visibility == null;
|
||||||
controllerService.createLecture(account, title, beschreibung, visibility, userList);
|
lecture = lecture == null;
|
||||||
|
|
||||||
|
controllerService.createOrga(account, title, beschreibung, visibility, lecture, userList);
|
||||||
|
|
||||||
|
return "redirect:/gruppen2/";
|
||||||
|
}
|
||||||
|
|
||||||
|
@RolesAllowed({"ROLE_studentin"})
|
||||||
|
@GetMapping("/createStudent")
|
||||||
|
public String createStudent(KeycloakAuthenticationToken token, Model model) {
|
||||||
|
model.addAttribute("account", keyCloakService.createAccountFromPrincipal(token));
|
||||||
|
return "createStudent";
|
||||||
|
}
|
||||||
|
|
||||||
|
@RolesAllowed({"ROLE_studentin"})
|
||||||
|
@PostMapping("/createStudent")
|
||||||
|
public String pCreateStudent(KeycloakAuthenticationToken token,
|
||||||
|
@RequestParam("title") String title,
|
||||||
|
@RequestParam("beschreibung") String beschreibung,
|
||||||
|
@RequestParam(value = "visibility", required = false) Boolean visibility) throws EventException {
|
||||||
|
|
||||||
|
Account account = keyCloakService.createAccountFromPrincipal(token);
|
||||||
|
visibility = visibility == null;
|
||||||
|
controllerService.createGroup(account, title, beschreibung, visibility);
|
||||||
|
|
||||||
return "redirect:/gruppen2/";
|
return "redirect:/gruppen2/";
|
||||||
}
|
}
|
||||||
@ -107,13 +131,6 @@ public class Gruppen2Controller {
|
|||||||
return "redirect:/gruppen2/details/members/" + groupId;
|
return "redirect:/gruppen2/details/members/" + groupId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@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"})
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin", "ROLE_actuator"})
|
||||||
@GetMapping("/findGroup")
|
@GetMapping("/findGroup")
|
||||||
public String findGroup(KeycloakAuthenticationToken token, Model model, @RequestParam(value = "suchbegriff", required = false) String search) throws EventException {
|
public String findGroup(KeycloakAuthenticationToken token, Model model, @RequestParam(value = "suchbegriff", required = false) String search) throws EventException {
|
||||||
@ -127,20 +144,6 @@ public class Gruppen2Controller {
|
|||||||
return "search";
|
return "search";
|
||||||
}
|
}
|
||||||
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_studentin", "ROLE_actuator"})
|
|
||||||
@PostMapping("/createGroup")
|
|
||||||
public String pCreateGroup(KeycloakAuthenticationToken token,
|
|
||||||
@RequestParam("title") String title,
|
|
||||||
@RequestParam("beschreibung") String beschreibung,
|
|
||||||
@RequestParam(value = "visibility", required = false) Boolean visibility) throws EventException {
|
|
||||||
|
|
||||||
Account account = keyCloakService.createAccountFromPrincipal(token);
|
|
||||||
visibility = visibility == null;
|
|
||||||
controllerService.createGroup(account, title, beschreibung, visibility);
|
|
||||||
|
|
||||||
return "redirect:/gruppen2/";
|
|
||||||
}
|
|
||||||
|
|
||||||
@RolesAllowed({"ROLE_orga", "ROLE_studentin", "ROLE_actuator)"})
|
@RolesAllowed({"ROLE_orga", "ROLE_studentin", "ROLE_actuator)"})
|
||||||
@GetMapping("/details/{id}")
|
@GetMapping("/details/{id}")
|
||||||
public String showGroupDetails(KeycloakAuthenticationToken token, Model model, @PathVariable("id") Long groupId) throws EventException {
|
public String showGroupDetails(KeycloakAuthenticationToken token, Model model, @PathVariable("id") Long groupId) throws EventException {
|
||||||
|
|||||||
@ -63,6 +63,32 @@ public class ControllerService {
|
|||||||
updateRole(account.getName(), groupId);
|
updateRole(account.getName(), groupId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void createOrga(Account account, String title, String description, Boolean visibility, Boolean lecture, List<User> users) throws EventException {
|
||||||
|
Visibility visibility1;
|
||||||
|
Long groupId = eventService.checkGroup();
|
||||||
|
|
||||||
|
if (visibility) {
|
||||||
|
visibility1 = Visibility.PUBLIC;
|
||||||
|
} else {
|
||||||
|
visibility1 = Visibility.PRIVATE;
|
||||||
|
}
|
||||||
|
|
||||||
|
GroupType groupType;
|
||||||
|
if (lecture) {
|
||||||
|
groupType = GroupType.SIMPLE;
|
||||||
|
} else {
|
||||||
|
groupType = GroupType.LECTURE;
|
||||||
|
}
|
||||||
|
CreateGroupEvent createGroupEvent = new CreateGroupEvent(groupId, account.getName(), null, groupType, visibility1);
|
||||||
|
eventService.saveEvent(createGroupEvent);
|
||||||
|
|
||||||
|
addUser(account, groupId);
|
||||||
|
updateTitle(account, groupId, title);
|
||||||
|
updateDescription(account, groupId, description);
|
||||||
|
updateRole(account.getName(), groupId);
|
||||||
|
addUserList(users, groupId);
|
||||||
|
}
|
||||||
|
|
||||||
private void createInviteLink(Long groupId) {
|
private void createInviteLink(Long groupId) {
|
||||||
inviteLinkRepositoryService.saveInvite(groupId, UUID.randomUUID());
|
inviteLinkRepositoryService.saveInvite(groupId, UUID.randomUUID());
|
||||||
}
|
}
|
||||||
@ -134,23 +160,4 @@ public class ControllerService {
|
|||||||
eventService.saveEvent(deleteGroupEvent);
|
eventService.saveEvent(deleteGroupEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createLecture(Account account, String title, String description, Boolean visibility, List<User> users) throws EventException {
|
|
||||||
Visibility visibility1;
|
|
||||||
Long groupId = eventService.checkGroup();
|
|
||||||
|
|
||||||
if (visibility) {
|
|
||||||
visibility1 = Visibility.PUBLIC;
|
|
||||||
} else {
|
|
||||||
visibility1 = Visibility.PRIVATE;
|
|
||||||
}
|
|
||||||
|
|
||||||
CreateGroupEvent createGroupEvent = new CreateGroupEvent(groupId, account.getName(), null, GroupType.LECTURE, visibility1);
|
|
||||||
eventService.saveEvent(createGroupEvent);
|
|
||||||
|
|
||||||
addUser(account, groupId);
|
|
||||||
updateTitle(account, groupId, title);
|
|
||||||
updateDescription(account, groupId, description);
|
|
||||||
updateRole(account.getName(), groupId);
|
|
||||||
addUserList(users, groupId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,20 +16,20 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation">
|
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation" th:switch="${account.getRoles().contains('orga')}">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
|
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li th:case="${true}" class="active">
|
||||||
<a th:href="@{/gruppen2/createGroup}" href="/createGroup">Erstellen</a>
|
<a href="/createOrga" th:href="@{/gruppen2/createOrga}">Erstellen</a>
|
||||||
|
</li>
|
||||||
|
<li th:case="${false}" class="active">
|
||||||
|
<a href="/createStudent" th:href="@{/gruppen2/createStudent}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
<li th:if="${account.getRoles().contains('orga')}" class="active">
|
|
||||||
<a th:href="@{/gruppen2/createLecture}" href="/createLecture">Veranstaltung</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
@ -37,11 +37,10 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-10">
|
<div class="col-10">
|
||||||
<h1>Veranstaltung erstellen</h1>
|
<h1>Gruppenerstellung</h1>
|
||||||
|
<form method="post" action="/gruppen2/createOrga" enctype="multipart/form-data">
|
||||||
<div class="shadow p-2"
|
<div class="shadow p-2"
|
||||||
style=" border: 10px solid aliceblue; background: aliceblue">
|
style=" border: 10px solid aliceblue; background: aliceblue">
|
||||||
<form action="/gruppen2/createLecture" enctype="multipart/form-data"
|
|
||||||
method="post">
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="titel">Titel</label>
|
<label for="titel">Titel</label>
|
||||||
<input class="form-control" id="titel" required th:name="title"
|
<input class="form-control" id="titel" required th:name="title"
|
||||||
@ -58,6 +57,22 @@
|
|||||||
<label class="custom-control-label" for="visibility">Private
|
<label class="custom-control-label" for="visibility">Private
|
||||||
Gruppe</label>
|
Gruppe</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="custom-control custom-checkbox">
|
||||||
|
<input class="custom-control-input" id="lecture" th:name="lecture"
|
||||||
|
type="checkbox">
|
||||||
|
<label class="custom-control-label" for="lecture">Veranstaltung</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="sel1"></label>
|
||||||
|
<select class="form-control" id="sel1">
|
||||||
|
<option disabled selected="true">--Bitte Veranstaltung auswählen--
|
||||||
|
</option>
|
||||||
|
<option>1</option>
|
||||||
|
<option>2</option>
|
||||||
|
<option>3</option>
|
||||||
|
<option>4</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<div class="form-group pt-4">
|
<div class="form-group pt-4">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
@ -76,8 +91,8 @@
|
|||||||
type="submit">Erstellen
|
type="submit">Erstellen
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -11,20 +11,20 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation">
|
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation" th:switch="${account.getRoles().contains('orga')}">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
|
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="active">
|
<li th:case="${true}" class="active">
|
||||||
<a th:href="@{/gruppen2/createGroup}" href="/createGroup">Erstellen</a>
|
<a href="/createOrga" th:href="@{/gruppen2/createOrga}">Erstellen</a>
|
||||||
|
</li>
|
||||||
|
<li th:case="${false}" class="active">
|
||||||
|
<a href="/createStudent" th:href="@{/gruppen2/createStudent}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
<li th:if="${account.getRoles().contains('orga')}">
|
|
||||||
<a th:href="@{/gruppen2/createLecture}" href="/createLecture">Veranstaltung</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
@ -33,7 +33,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-10">
|
<div class="col-10">
|
||||||
<h1>Gruppenerstellung</h1>
|
<h1>Gruppenerstellung</h1>
|
||||||
<form method="post" action="/gruppen2/createGroup">
|
<form method="post" action="/gruppen2/createStudent">
|
||||||
<div class="shadow p-2"
|
<div class="shadow p-2"
|
||||||
style=" border: 10px solid aliceblue; background: aliceblue">
|
style=" border: 10px solid aliceblue; background: aliceblue">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -11,20 +11,20 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation">
|
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation" th:switch="${account.getRoles().contains('orga')}">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a href="/" th:href="@{/gruppen2}">Gruppen</a>
|
<a href="/" th:href="@{/gruppen2}">Gruppen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li th:case="${true}">
|
||||||
<a href="/createGroup" th:href="@{/gruppen2/createGroup}">Erstellen</a>
|
<a href="/createOrga" th:href="@{/gruppen2/createOrga}">Erstellen</a>
|
||||||
|
</li>
|
||||||
|
<li th:case="${false}">
|
||||||
|
<a href="/createStudent" th:href="@{/gruppen2/createStudent}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/findGroup" th:href="@{/gruppen2/findGroup}">Suche</a>
|
<a href="/findGroup" th:href="@{/gruppen2/findGroup}">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
<li th:if="${account.getRoles().contains('orga')}">
|
|
||||||
<a href="/createLecture" th:href="@{/gruppen2/createLecture}">Veranstaltung</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@ -10,20 +10,20 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation">
|
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation" th:switch="${account.getRoles().contains('orga')}">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
|
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li th:case="${true}">
|
||||||
<a th:href="@{/gruppen2/createGroup}" href="/createGroup">Erstellen</a>
|
<a href="/createOrga" th:href="@{/gruppen2/createOrga}">Erstellen</a>
|
||||||
|
</li>
|
||||||
|
<li th:case="${false}">
|
||||||
|
<a href="/createStudent" th:href="@{/gruppen2/createStudent}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
<li th:if="${account.getRoles().contains('orga')}">
|
|
||||||
<a th:href="@{/gruppen2/createLecture}" href="/createLecture">Veranstaltung</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@ -15,20 +15,20 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation">
|
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation" th:switch="${account.getRoles().contains('orga')}">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
|
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li th:case="${true}">
|
||||||
<a th:href="@{/gruppen2/createGroup}" href="/createGroup">Erstellen</a>
|
<a href="/createOrga" th:href="@{/gruppen2/createOrga}">Erstellen</a>
|
||||||
|
</li>
|
||||||
|
<li th:case="${false}">
|
||||||
|
<a href="/createStudent" th:href="@{/gruppen2/createStudent}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
<li th:if="${account.getRoles().contains('orga')}">
|
|
||||||
<a th:href="@{/gruppen2/createLecture}" href="/createLecture">Veranstaltung</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
@ -37,7 +37,6 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-9">
|
<div class="col-9">
|
||||||
<div class="shadow p-2" style="border: 10px solid aliceblue; background: aliceblue">
|
<div class="shadow p-2" style="border: 10px solid aliceblue; background: aliceblue">
|
||||||
<!-- absichern im controller nicht vergessen -->
|
|
||||||
<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 action="/gruppen2/details/members/addUsersFromCsv"
|
<form action="/gruppen2/details/members/addUsersFromCsv"
|
||||||
enctype="multipart/form-data"
|
enctype="multipart/form-data"
|
||||||
|
|||||||
@ -10,21 +10,20 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation">
|
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation" th:switch="${account.getRoles().contains('orga')}">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a href="/" th:href="@{/gruppen2}">Gruppen</a>
|
<a href="/" th:href="@{/gruppen2}">Gruppen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li th:case="${true}">
|
||||||
<a href="/createGroup" th:href="@{/gruppen2/createGroup}">Erstellen</a>
|
<a href="/createOrga" th:href="@{/gruppen2/createOrga}">Erstellen</a>
|
||||||
|
</li>
|
||||||
|
<li th:case="${false}">
|
||||||
|
<a href="/createStudent" th:href="@{/gruppen2/createStudent}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="/findGroup" th:href="@{/gruppen2/findGroup}">Suche</a>
|
<a href="/findGroup" th:href="@{/gruppen2/findGroup}">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
<!-- Fix double point -->
|
|
||||||
<li th:if="${account.getRoles().contains('orga')}">
|
|
||||||
<a href="/createLecture" th:href="@{/gruppen2/createLecture}">Veranstaltung</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@ -10,20 +10,20 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation">
|
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation" th:switch="${account.getRoles().contains('orga')}">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
|
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li th:case="${true}">
|
||||||
<a th:href="@{/gruppen2/createGroup}" href="/createGroup">Erstellen</a>
|
<a href="/createOrga" th:href="@{/gruppen2/createOrga}">Erstellen</a>
|
||||||
|
</li>
|
||||||
|
<li th:case="${false}">
|
||||||
|
<a href="/createStudent" th:href="@{/gruppen2/createStudent}">Erstellen</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="active">
|
<li class="active">
|
||||||
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
|
||||||
</li>
|
</li>
|
||||||
<li th:if="${account.getRoles().contains('orga')}">
|
|
||||||
<a th:href="@{/gruppen2/createLecture}" href="/createLecture">Veranstaltung</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
Reference in New Issue
Block a user