1
Files
lecture-professional-softwa…/src/main/resources/templates/detailsMember.html
2020-03-19 14:22:39 +01:00

78 lines
4.0 KiB
HTML

<!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>Gruppendetails</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 class="active">
<a th:href="@{/gruppen2}" href="/">Gruppen</a>
</li>
<li>
<a th:href="@{/gruppen2/createGroup}" href="/createGroup">Erstellen</a>
</li>
<li>
<a th:href="@{/gruppen2/findGroup}" href="/findGroup">Suche</a>
</li>
<li th:if="${account.getRoles().contains('orga')}">
<a th:href="@{/gruppen2/createLecture}" href="/createLecture">Veranstaltung</a>
</li>
</ul>
</nav>
</header>
<main th:fragment="bodycontent">
<div class="container-fluid">
<div class="row">
<div class="col-9 shadow-sm p-4" style="border: 10px solid aliceblue; border-radius: 5px; background: aliceblue">
<h1 style="color: black; font-weight: bold" th:text="${group.getTitle()}"></h1>
<h3>
<span class="badge badge-pill badge-dark" style="background: darkslategray" th:if='${group.getVisibility() == group.getVisibility().PRIVATE }'>Private Gruppe</span>
<span class="badge badge-pill badge-primary" th:if="${group.getVisibility() == group.getVisibility().PUBLIC}">Öffentliche Gruppe</span>
<span class="badge badge-pill badge-success" style="background: lightseagreen" th:if='${group.getType() == group.getType().LECTURE}'> Veranstaltung</span>
</h3>
<br>
<div class="shadow-sm p-4" style="background: white">
<p style="overflow-wrap: break-word" th:text="${group.getDescription()}"></p>
</div>
<br>
<div class="text-right btn-toolbar" style="float: right" role="toolbar">
<button class="btn btn-primary" style="background: dodgerblue; border: none; margin: 5px">
<a th:href="@{/gruppen2}" style="color: white">Zurück</a>
</button>
<form method="post" action="/gruppen2/leaveGroup">
<button th:value="${group.getId()}" th:name="group_id" class="btn btn-danger" type="submit" style="border-style: none; margin: 5px">Gruppe verlassen</button>
</form>
</div>
</div>
<div class="col-3" style="white-space: nowrap">
<div style="display: inline-block; margin: 0">
<h2>Mitglieder</h2>
<div th:if='${group.getRoles().get(user.getUser_id()) == admin}'>
<form method="get" th:action="@{/gruppen2/details/members/{id}(id=${group.getId()})}">
<button class="btn btn-secondary" style="background: slategrey; float: right">Mitglieder bearbeiten</button>
</form>
</div>
<br>
<br>
</div>
<div>
<ul th:each="member : ${group.getMembers()}" class="list-group-flush" style="background: slategrey">
<li class="list-group-item" style="background: aliceblue">
<span th:text="${member.getUser_id()}"></span>
<span th:if='${group.getRoles().get(member.getUser_id()) == admin}' class="badge badge-success">admin</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</main>
</body>
</html>