Merge branch 'master' into refactor-controller
# Conflicts: # src/main/java/mops/gruppen2/controller/WebController.java
This commit is contained in:
73
src/main/resources/templates/changeMetadata.html
Normal file
73
src/main/resources/templates/changeMetadata.html
Normal file
@ -0,0 +1,73 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en"
|
||||
th:replace="~{mopslayout :: html(name='Gruppenbildung', headcontent=~{:: headcontent}, navigation=~{:: navigation}, bodycontent=~{:: bodycontent})}"
|
||||
xmlns="http://www.w3.org/1999/html"
|
||||
xmlns:th="http://www.thymeleaf.org">
|
||||
<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 href="/" th:href="@{/gruppen2}">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 href="/findGroup" th:href="@{/gruppen2/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 action="/gruppen2/details/changeMetadata" method="post">
|
||||
<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
|
||||
th:name="title" th:value="${title}" 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>
|
||||
</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:name="groupId"
|
||||
th:value="${groupId}"
|
||||
type="submit">Speichern
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@ -6,7 +6,8 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Gruppendetails</title>
|
||||
<th:block th:fragment="headcontent">
|
||||
<!-- Links, Skripts, Styles hier einfügen! -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
|
||||
rel="stylesheet">
|
||||
</th:block>
|
||||
</head>
|
||||
<body>
|
||||
@ -31,8 +32,16 @@
|
||||
<main th:fragment="bodycontent">
|
||||
<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="shadow-sm p-4 col-8"
|
||||
style="border: 10px solid aliceblue; display: inline-block; border-radius: 5px; background: aliceblue">
|
||||
<div class="row">
|
||||
<h1 style="color: black; font-weight: bold; font-optical-sizing: auto; overflow-wrap: break-word; width: 95%"
|
||||
th:text="${group.getTitle()}"></h1>
|
||||
<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>
|
||||
</div>
|
||||
<h3>
|
||||
<span class="badge badge-pill badge-dark" style="background: darkslategray"
|
||||
th:if='${group.getVisibility() == group.getVisibility().PRIVATE }'>Private Gruppe</span>
|
||||
@ -42,6 +51,23 @@
|
||||
th:if='${group.getType() == group.getType().LECTURE}'>Veranstaltung</span>
|
||||
<span class="badge badge-pill badge-info" style="background: mediumorchid"
|
||||
th:text="${parent.getTitle()}">Parent</span>
|
||||
|
||||
<div class="input-group mb-3" style="margin-top: 10px"
|
||||
th:if="${group.getVisibility() == group.getVisibility().PRIVATE}">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="inputGroup-sizing-default"
|
||||
style="background: #52a1eb">Einladungslink:</span>
|
||||
</div>
|
||||
<input aria-describedby="basic-addon2" aria-label="Recipient's username"
|
||||
class="form-control"
|
||||
id="groupLink" readonly style="background: white" th:value="${link}"
|
||||
type="text">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-secondary" onclick="copyLink()"
|
||||
type="button">Link kopieren
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</h3>
|
||||
<br>
|
||||
<div class="shadow-sm p-4" style="background: white">
|
||||
@ -100,6 +126,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function copyLink() {
|
||||
var copyText = document.getElementById("groupLink");
|
||||
|
||||
copyText.select();
|
||||
copyText.setSelectionRange(0, 99999);
|
||||
|
||||
document.execCommand("copy");
|
||||
}
|
||||
</script>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -27,10 +27,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button style="color: #52a1eb">
|
||||
<a style="color: white" class="btn btn-primary btn-lg" href="#" onclick="window.history.back(-1);return false;" role="button">Zurück</a>
|
||||
<button class="btn btn-primary"
|
||||
style="background: #52a1eb; border-style: none;">
|
||||
<a href="#" onclick="window.history.back(-1);return false;" role="button"
|
||||
style="color: white">Zurück</a>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@ -56,8 +56,8 @@
|
||||
<th scope="col">Mitgliederanzahl</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody th:each="gruppe : ${gruppen}">
|
||||
<tr>
|
||||
<tbody>
|
||||
<tr th:each="gruppe : ${gruppen}">
|
||||
<th scope="row">
|
||||
<a th:href="@{/gruppen2/detailsSearch(id=${gruppe.getId()})}"
|
||||
th:text="${gruppe.title}">Gruppenname</a>
|
||||
|
||||
Reference in New Issue
Block a user