1

refactor controllers

This commit is contained in:
Christoph
2020-04-09 18:18:28 +02:00
parent 65ad352e03
commit 0cb56e2391
13 changed files with 267 additions and 438 deletions

View File

@ -46,20 +46,20 @@
<div class="form-group">
<label for="title">Titel</label>
<input class="form-control" id="title" required
th:name="title" th:value="${title}" type="text">
th:name="title" th:value="${group.getTitle()}" type="text">
</div>
<div class="form-group">
<label for="description">Beschreibung</label>
<textarea class="form-control" id="description" required rows="3"
th:name="description"
th:text="${description}"></textarea>
th:text="${group.getDescription()}"></textarea>
</div>
<div class="form-group pt-4">
<button class="btn btn-primary"
style="background: #52a1eb; border-style: none;"
th:if="${roles.get(user.getId()) == admin}"
th:if="${group.getRoles().get(user.getId()) == admin}"
th:name="groupId"
th:value="${groupId}"
th:value="${group.getId()}"
type="submit">Speichern
</button>
</div>

View File

@ -43,7 +43,7 @@
<a class="fa fa-pencil"
style="font-size:30px; width: 5%;"
th:href="@{/gruppen2/details/changeMetadata/{id}(id=${group.getId()})}"
th:if="${roles.get(user.getId()) == admin}"></a>
th:if="${group.getRoles().get(user.getId()) == admin}"></a>
</div>
</div>
<h3>
@ -57,7 +57,7 @@
th:text="${parent?.getTitle()}">Parent</span>
<div class="input-group mb-3" style="margin-top: 10px;"
th:if="${roles.get(user.getId()) == admin}">
th:if="${group.getRoles().get(user.getId()) == admin}">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-default"
style="background: #52a1eb;">Einladungslink:</span>

View File

@ -44,7 +44,7 @@
<div class="form-group mt-2" th:if="${group.getMembers().size() < group.getUserLimit()}">
<h3>Möchtest du dieser privaten Gruppe beitreten?</h3>
<div class="text-right">
<form method="post" th:action="@{/gruppen2/acceptinvite}">
<form method="post" th:action="@{/gruppen2/join}">
<input name="id" th:value="${group.getId()}" type="hidden"/>
<button class="btn btn-primary"
style="background: #52a1eb; border-style: none;"

View File

@ -53,9 +53,9 @@
</form>
</div>
<br>
<table class="table">
<table class="table" th:if='${!gruppen.isEmpty()}'>
<!-- Erscheint dann, wenn man "Suchen" Button klickt und Ergebnisse angezeigt werden, aber so solls aussehen -->
<thead th:if='${!gruppen.isEmpty()}'>
<thead>
<tr>
<th scope="col">Gruppenname</th>
<th scope="col">Beschreibung</th>
@ -67,8 +67,8 @@
<th scope="row">
<span class="badge badge-pill badge-success"
style="background: lightseagreen; margin-right: 25px;"
th:if='${gruppe.getType() == gruppe.getType().LECTURE}'>Veranstaltung</span>
<a th:href="@{/gruppen2/detailsSearch(id=${gruppe.getId()})}"
th:if='${gruppe.getType() == lecture}'>Veranstaltung</span>
<a th:href="@{/gruppen2/details/{id}(id=${gruppe.getId()})}"
th:text="${#strings.abbreviate(gruppe.getTitle(), 50)}">Gruppenname</a>
</th>
<td style="" th:text="${#strings.abbreviate(gruppe.getDescription(), 50)}">