1

Add changeMetadata feature

Co-Authored-By: andibuls <andibuls@users.noreply.github.com>
Co-Authored-By: Max Oerter <mahgs@users.noreply.github.com>
Co-Authored-By: Christoph <churl@users.noreply.github.com>
This commit is contained in:
XXNitram
2020-03-24 14:34:52 +01:00
parent 491aeb1b66
commit 59bea22d8e
3 changed files with 119 additions and 1 deletions

View File

@ -0,0 +1,71 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
th:replace="~{mopslayout :: html(name='Gruppenbildung', headcontent=~{:: headcontent}, navigation=~{:: navigation}, bodycontent=~{:: bodycontent})}"
xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="utf-8">
<title>Gruppenerstellung</title>
<th:block th:fragment="headcontent">
<!-- Links, Skripts, Styles hier einfügen! -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
</th:block>
</head>
<body>
<header>
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation" th:switch="${account.getRoles().contains('orga')}">
<ul>
<li class="active">
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
</li>
<li th:case="${true}">
<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>
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
</li>
</ul>
</nav>
</header>
<main th:fragment="bodycontent">
<div class="container-fluid">
<div class="row">
<div class="col-10">
<h1>Metadaten ändern</h1>
<form method="post" action="/gruppen2/details/changeMetadata">
<div class="shadow-sm p-2"
style=" border: 10px solid aliceblue; background: aliceblue">
<div class="form-group">
<label for="title">Titel</label>
<input class="form-control" id="title" required
type="text" th:name="title" th:value="${title}">
</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>
</div>
<div class="form-group pt-4">
<button class="btn btn-primary"
style="background: #52a1eb; border-style: none"
th:name="groupId"
th:value="${groupId}"
th:if="${roles.get(user.getId()) == admin}"
type="submit">Speichern
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</main>
</body>
</html>

View File

@ -32,7 +32,12 @@
<div class="container-fluid">
<div>
<div class="shadow-sm p-4 col-8" style="border: 10px solid aliceblue; display: inline-block; border-radius: 5px; background: aliceblue">
<h1 style="color: black; font-weight: bold; font-optical-sizing: auto; overflow-wrap: break-word" th:text="${group.getTitle()}"></h1>
<div class="row">
<h1 style="color: black; font-weight: bold; font-optical-sizing: auto; overflow-wrap: break-word" th:text="${group.getTitle()}"></h1>
<a th:href="@{/gruppen2/details/changeMetadata/{id}(id=${group.getId()})}"
class="btn btn-info btn-lg" th:if="${roles.get(user.getId()) == admin}">Ändern
</a>
</div>
<h3>
<span class="badge badge-pill badge-dark" style="background: darkslategray"
th:if='${group.getVisibility() == group.getVisibility().PRIVATE }'>Private Gruppe</span>