Made the transition of data between possibleCandidates and Candidates easier

CHANGED VotingController:
    - changed: candidateRepositorys get now only created if empty and 'candidatesAdded == true'

CHANGED PossibleCandidate:
    - added: new getter getCategoryID

CHANGED PossibleCandidateRepository
    - removed: unnecessary public declaration of methods

CHANGED TableAction:
    - changed: 'setupCandiates' adds the top 5 (votes) of every category in possibleCandidates (Manual preselection necessary)
    - added: helper method 'getLimit
    - removed: 'addCandidate' and 'addPossibleCandidate' due to no usage

CHANGED voting.css:
    - added: font-size to 'h1', 'h2.categoryHeader' and 'button' to enhance readability

CHANGED addingCandidates.html:
    - changed: language used in html tag from 'en' to 'de'

ADDED alreadysubmittedcandidates.html:
    - added: error page if voter already submitted possibleCandidates
This commit is contained in:
2020-12-07 23:42:29 +01:00
parent 32894e5469
commit 1ee5174207
7 changed files with 56 additions and 122 deletions

View File

@@ -21,17 +21,19 @@ body {
h1 {
color: #FFF;
font-size: 75px;
}
h2.categoryHeader {
color: #FFF;
font-size: 50px;
}
button {
background: transparent;
border: none;
color: #FFF;
font-size: .875rem;
font-size: 35px;
font-weight: normal;
letter-spacing: .125rem;
text-transform: uppercase;

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org/">
<html lang="de" xmlns:th="https://www.thymeleaf.org/">
<head>
<meta charset="UTF-8">
@@ -43,7 +43,7 @@
<div id="candidateAdding">
<div class="group" th:each="category, itemStat : ${categories}">
<h2 class="categoryHeader" th:text="${category.name}"></h2>
<input th:field="*{possibleCandidates[__${itemStat.index}__].name}" />
<input th:field="*{possibleCandidates[__${itemStat.index}__].name}"/>
</div>
</div>
<button class="submitButton" id="btnNext" type="submit">Nächste Frage</button>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="de" xmlns:th="https://www.thymeleaf.org/">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>