1

add cases for different roles and visibility

This commit is contained in:
kasch309
2020-03-13 16:07:12 +01:00
parent 68fcc06a17
commit 86622b4a0c
2 changed files with 20 additions and 18 deletions

View File

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
th:replace="~{mopslayout :: html(name='Gruppenbildung', headcontent=~{:: headcontent}, navigation=~{:: navigation}, bodycontent=~{:: bodycontent})}">
<head>
<meta charset="utf-8">
<title>Name des Subsystems</title>
<th:block th:fragment="headcontent">
<!-- Links, Skripts, Styles hier einfügen! -->
</th:block>
</head>
<body>
<header>
<nav class="navigation navigation-secondary" is="mops-navigation" th:fragment="navigation">
<ul>
<li>
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
</li>
<li class="active">
<a th:href="@{/gruppen2/createGroup}" href="/createGroup">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">
<form action="/" method="get">
<div style="border: 10px solid aliceblue; background: aliceblue">
<h1 style="color: dodgerblue; font-weight: bold" th:text="${group.getTitle()}"></h1>
<!--
<p style="font-weight: bold" th:switch="${group.getVisibility()}">
<a th:case="${group.getVisibility().PRIVATE}">Private Gruppe</a>
<a th:case="${group.getVisibility().PUBLIC}">Öffentliche Gruppe</a>
</p>
<p th:text="${group.getDescription()}"></p>
<div class="form-group">
<div th:switch="${role.name()}">
<div th:case="'ADMIN'">
<button class="btn btn-primary" type="warning">Gruppenmitglieder bearbeiten</button>
<button class="btn btn-primary" type="danger" style="background: #52a1eb; border-style: none">Gruppe verlassen</button>
</div>
<div th:case="'MEMBER'">
<button class="btn btn-primary" type="danger" style="background: #52a1eb; border-style: none">Gruppe verlassen</button>
</div>
</div>
</div>
<-->
</div>
</form>
</div>
</main>
</body>
</html>