renaming + better use of wrappers
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
<main th:fragment="bodycontent">
|
||||
<div class="container-fluid">
|
||||
|
||||
<h1 class="def-cursor" th:text="${group.getTitle().getGroupTitle()}"></h1>
|
||||
<h1 class="def-cursor" th:text="${group.getTitle()}"></h1>
|
||||
|
||||
<div class="row">
|
||||
<!--Gruppendetails-->
|
||||
@ -27,7 +27,7 @@
|
||||
<!--Spacer-->
|
||||
<span class="col"></span>
|
||||
|
||||
<form method="post" th:action="@{/gruppen2/details/{id}/leave(id=${group.getId()})}">
|
||||
<form method="post" th:action="@{/gruppen2/details/{id}/leave(id=${group.getGroupid()})}">
|
||||
<button class="btn btn-danger btn-bar" type="submit">Gruppe verlassen
|
||||
</button>
|
||||
</form>
|
||||
@ -40,13 +40,13 @@
|
||||
<!--Anzahl Text-->
|
||||
<div class="mb-2">
|
||||
<span>Teilnehmer: </span>
|
||||
<span th:text="${group.getMembers().size() + ' von ' + group.getUserLimit().getUserLimit()}"></span>
|
||||
<span th:text="${group.getMembers().size() + ' von ' + group.getLimit().getUserLimit()}"></span>
|
||||
</div>
|
||||
|
||||
<!--Bearbeiten-Button-->
|
||||
<div class="mb-2" th:if="${group.getRoles().get(user.getId()) == admin}">
|
||||
<div class="mb-2" th:if="${group.getRoles().get(user.getUserid()) == admin}">
|
||||
<form method="get"
|
||||
th:action="@{/gruppen2/details/{id}/edit(id=${group.getId()})}">
|
||||
th:action="@{/gruppen2/details/{id}/edit(id=${group.getGroupid()})}">
|
||||
<button class="btn btn-secondary btn-block">Gruppe verwalten</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@ -10,19 +10,19 @@
|
||||
|
||||
<main th:fragment="bodycontent">
|
||||
<div class="container-fluid">
|
||||
<h1 class="def-cursor" th:text="${group.getTitle().getGroupTitle()}"></h1>
|
||||
<h1 class="def-cursor" th:text="${group.getTitle()}"></h1>
|
||||
|
||||
<!--Fertig oder löschen-->
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<form method="get" th:action="@{/gruppen2/details/{id}(id=${group.getId()})}">
|
||||
<form method="get" th:action="@{/gruppen2/details/{id}(id=${group.getGroupid()})}">
|
||||
<button class="btn btn-primary">Fertig</button>
|
||||
</form>
|
||||
|
||||
<!--Spacer-->
|
||||
<span class="col"></span>
|
||||
|
||||
<form method="post" th:action="@{/gruppen2/details/{id}/edit/destroy(id=${group.getId()})}">
|
||||
<form method="post" th:action="@{/gruppen2/details/{id}/edit/destroy(id=${group.getGroupid()})}">
|
||||
<button class="btn btn-danger btn-bar" type="submit">Gruppe löschen
|
||||
</button>
|
||||
</form>
|
||||
@ -50,7 +50,7 @@
|
||||
|
||||
<!--Beschreibung + Titel-->
|
||||
<div class="content-text">
|
||||
<form th:action="@{/gruppen2/details/{id}/edit/meta(id=${group.getId()})}"
|
||||
<form th:action="@{/gruppen2/details/{id}/edit/meta(id=${group.getGroupid()})}"
|
||||
method="post">
|
||||
|
||||
<div th:replace="~{fragments/forms :: meta}"></div>
|
||||
@ -63,7 +63,7 @@
|
||||
|
||||
<!--Userlimit-->
|
||||
<div class="content-text-in">
|
||||
<form th:action="@{/gruppen2/details/{id}/edit/userlimit(id=${group.getId()})}"
|
||||
<form th:action="@{/gruppen2/details/{id}/edit/userlimit(id=${group.getGroupid()})}"
|
||||
method="post">
|
||||
|
||||
<div th:replace="~{fragments/forms :: userlimit}"></div>
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
<!--CSV Import-->
|
||||
<div class="content-text mb-0">
|
||||
<form th:action="@{/gruppen2/details/{id}/edit/csv(id=${group.getId()})}"
|
||||
<form th:action="@{/gruppen2/details/{id}/edit/csv(id=${group.getGroupid()})}"
|
||||
th:if="${account.getRoles().contains('orga')}"
|
||||
enctype="multipart/form-data" method="post">
|
||||
|
||||
@ -103,13 +103,13 @@
|
||||
</div>
|
||||
|
||||
<div class="d-flex">
|
||||
<form th:action="@{/gruppen2/details/{id}/edit/delete/{userid}(id=${group.getId()}, userid=${member.getId()})}"
|
||||
th:unless="${member.getId() == account.getName()}"
|
||||
<form th:action="@{/gruppen2/details/{id}/edit/delete/{userid}(id=${group.getGroupid()}, userid=${member.getUserid()})}"
|
||||
th:unless="${member.getUserid() == account.getName()}"
|
||||
method="post">
|
||||
<button type="submit" class="btn btn-danger mr-2">Entfernen</button>
|
||||
</form>
|
||||
|
||||
<form th:action="@{/gruppen2/details/{id}/edit/role/{userid}(id=${group.getId()}, userid=${member.getId()})}"
|
||||
<form th:action="@{/gruppen2/details/{id}/edit/role/{userid}(id=${group.getGroupid()}, userid=${member.getUserid()})}"
|
||||
method="post">
|
||||
<button type="submit" class="btn btn-warning">Rolle ändern</button>
|
||||
</form>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<span class="input-group-text text-monospace">Gruppentitel:</span>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="groupTitle" minlength="4" maxlength="128"
|
||||
th:value="${group?.getTitle()?.getGroupTitle()}" required>
|
||||
th:value="${group?.getTitle()}" required>
|
||||
</div>
|
||||
|
||||
<!--Gruppenbeschreibung-->
|
||||
@ -50,8 +50,8 @@
|
||||
<input type="hidden" id="parentdummy" name="parent" value="00000000-0000-0000-0000-000000000000" disabled>
|
||||
<select class="custom-select" id="parentselect" name="parent">
|
||||
<option value="00000000-0000-0000-0000-000000000000" selected>Keiner</option>
|
||||
<option th:each="lecture : ${lectures}" th:value="${lecture.getId()}"
|
||||
th:text="${lecture.getTitle().getGroupTitle()}"></option>
|
||||
<option th:each="lecture : ${lectures}" th:value="${lecture.getGroupid()}"
|
||||
th:text="${lecture.getTitle()}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -62,16 +62,16 @@
|
||||
<label for="userlimit">Teilnehmeranzahl:</label>
|
||||
<div class="btn-toolbar row mx-0" id="userlimit">
|
||||
<input type="hidden" name="userLimit" id="limit" value="999999"
|
||||
th:disabled="${group != null && group.getUserLimit().getUserLimit() < 999999} ? 'disabled' : 'false'">
|
||||
th:disabled="${group != null && group.getLimit().getUserLimit() < 999999} ? 'disabled' : 'false'">
|
||||
<div class="btn-group btn-group-toggle col-sm-4 px-0" data-toggle="buttons">
|
||||
<label class="btn btn-secondary active" onclick="disable('#limitselect'); enable('#limit')">
|
||||
<input type="radio"
|
||||
th:checked="${group != null && group.getUserLimit().getUserLimit() < 999999} ? 'false' : 'checked'">
|
||||
th:checked="${group != null && group.getLimit().getUserLimit() < 999999} ? 'false' : 'checked'">
|
||||
Unbegrenzt
|
||||
</label>
|
||||
<label class="btn btn-secondary" onclick="enable('#limitselect'); disable('#limit')">
|
||||
<input type="radio"
|
||||
th:checked="${group != null && group.getUserLimit().getUserLimit() < 999999} ? 'checked' : 'false'">
|
||||
th:checked="${group != null && group.getLimit().getUserLimit() < 999999} ? 'checked' : 'false'">
|
||||
Begrenzt
|
||||
</label>
|
||||
</div>
|
||||
@ -82,9 +82,9 @@
|
||||
<span class="input-group-text text-monospace">Limit:</span>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="userLimit"
|
||||
th:value="${group != null} ? ${group.getUserLimit().getUserLimit()} : '999999'"
|
||||
th:value="${group != null} ? ${group.getLimit().getUserLimit()} : '999999'"
|
||||
min="1" max="999999" id="limitselect" required
|
||||
th:disabled="${group != null && group.getUserLimit().getUserLimit() < 999999} ? 'false' : 'disabled'">
|
||||
th:disabled="${group != null && group.getLimit().getUserLimit() < 999999} ? 'false' : 'disabled'">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text text-monospace">Teilnehmer</span>
|
||||
</div>
|
||||
|
||||
@ -15,9 +15,9 @@
|
||||
th:if='${group.getType() == lecture}'>Veranstaltung</span>
|
||||
|
||||
<span class="badge badge-pill parent"
|
||||
th:unless="${parent == null || parent?.getTitle()?.getGroupTitle() == null|| parent?.getTitle()?.getGroupTitle() == ''}"
|
||||
th:title="${'Die Gruppe gehört zur Veranstaltung ' + parent.getTitle().getGroupTitle() + '.'}"
|
||||
th:text="${parent.getTitle().getGroupTitle()}">Parent</span>
|
||||
th:unless="${parent == null || parent?.getTitle() == null|| parent?.getTitle() == ''}"
|
||||
th:title="${'Die Gruppe gehört zur Veranstaltung ' + parent.getTitle() + '.'}"
|
||||
th:text="${parent.getTitle()}">Parent</span>
|
||||
|
||||
<!--Needs completly projected (cached) groups-->
|
||||
<!--<span class="badge badge-success float-right"
|
||||
@ -28,7 +28,7 @@
|
||||
<!--User Badges-->
|
||||
<th:block th:fragment="userbadges">
|
||||
<span class="badge badge-success align-self-start ml-2"
|
||||
th:if="${group.getRoles().get(member.getId()) == admin}">Admin</span>
|
||||
th:if="${group.getRoles().get(member.getUserid()) == admin}">Admin</span>
|
||||
</th:block>
|
||||
|
||||
<th:block th:fragment="groupcontent">
|
||||
@ -48,21 +48,21 @@
|
||||
<!--Buttonbar zum Gruppe beitreten-->
|
||||
<th:block th:fragment="joingroup">
|
||||
<div class="content-heading">
|
||||
<span th:if="${group.getMembers().size() < group.getUserLimit().getUserLimit()}">
|
||||
<span th:if="${group.getMembers().size() < group.getLimit().getUserLimit()}">
|
||||
Möchtest du dieser Gruppe beitreten?
|
||||
</span>
|
||||
<span th:unless="${group.getMembers().size() < group.getUserLimit().getUserLimit()}">
|
||||
<span th:unless="${group.getMembers().size() < group.getLimit().getUserLimit()}">
|
||||
Diese Gruppe hat ihre maximale Teilnehmeranzahl erreicht.
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<form method="post" th:action="@{/gruppen2/details/{id}/join(id = ${group.getId()})}"
|
||||
th:if="${group.getMembers().size() < group.getUserLimit().getUserLimit()}">
|
||||
<form method="post" th:action="@{/gruppen2/details/{id}/join(id = ${group.getGroupId()})}"
|
||||
th:if="${group.getMembers().size() < group.getLimit().getUserLimit()}">
|
||||
<button class="btn btn-success" type="submit">Gruppe beitreten.</button>
|
||||
</form>
|
||||
|
||||
<div class="col" th:if="${group.getMembers().size() < group.getUserLimit().getUserLimit()}"></div>
|
||||
<div class="col" th:if="${group.getMembers().size() < group.getLimit().getUserLimit()}"></div>
|
||||
|
||||
<a class="btn btn-primary" href="/gruppen2"
|
||||
type="submit">Startseite.</a>
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
<!--Gruppenliste belegte Gruppen-->
|
||||
<div class="content" th:each="group: ${groups}">
|
||||
<div class="content-heading row">
|
||||
<a class="link col" th:href="@{/gruppen2/details/{id}(id=${group.getId()})}"
|
||||
th:text="${group.getTitle().getGroupTitle()}"></a>
|
||||
<a class="link col" th:href="@{/gruppen2/details/{id}(id=${group.getGroupid()})}"
|
||||
th:text="${group.getTitle()}"></a>
|
||||
|
||||
<span th:replace="~{fragments/groups :: badges}"></span>
|
||||
</div>
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
<main th:fragment="bodycontent">
|
||||
<div class="container-fluid">
|
||||
<h1 class="def-cursor" th:text="${group.getTitle().getGroupTitle()}"></h1>
|
||||
<h1 class="def-cursor" th:text="${group.getTitle()}"></h1>
|
||||
|
||||
<div class="content" th:insert="~{fragments/groups :: groupcontent}"></div>
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
<main th:fragment="bodycontent">
|
||||
<div class="container-fluid">
|
||||
<h1 class="def-cursor" th:text="${group.getTitle().getGroupTitle()}"></h1>
|
||||
<h1 class="def-cursor" th:text="${group.getTitle()}"></h1>
|
||||
|
||||
<div class="content" th:insert="~{fragments/groups :: groupcontent}"></div>
|
||||
|
||||
|
||||
@ -31,8 +31,8 @@
|
||||
<div class="content-heading row">
|
||||
<span th:replace="~{fragments/groups :: badges}"></span>
|
||||
|
||||
<a class="link col" th:href="@{/gruppen2/details/{id}(id=${group.getId()})}"
|
||||
th:text="${group.getTitle().getGroupTitle()}"></a>
|
||||
<a class="link col" th:href="@{/gruppen2/details/{id}(id=${group.getGroupid()})}"
|
||||
th:text="${group.getTitle()}"></a>
|
||||
</div>
|
||||
<div class="content-text-in">
|
||||
<span th:text="${group.getDescription().getGroupDescription()}"></span>
|
||||
|
||||
Reference in New Issue
Block a user