add and remove work times
This commit is contained in:
		
							
								
								
									
										72
									
								
								src/main/resources/templates/done/item.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								src/main/resources/templates/done/item.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,72 @@ | ||||
| <!DOCTYPE html> | ||||
| <html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" | ||||
| 	xmlns:sec="http://www.thymeleaf.org/extras/spring-security" layout:decorate="~{layout/main.html}"> | ||||
| <head> | ||||
| <title>Arbeitszeit aktualisieren</title> | ||||
| </head> | ||||
| <body> | ||||
| 	<ul layout:fragment="menu"> | ||||
| 	</ul> | ||||
| 	<main layout:fragment="content"> | ||||
| 		<div class="container formpane"> | ||||
| 			<form th:action="@{/done/upsert}" th:object="${doneBean}" method="post"> | ||||
| 				<div class="row mb-3"> | ||||
| 					<label for="inputPk" class="col-sm-2 col-form-label">Inhalt von Eintrag</label> | ||||
| 					<div class="col-sm-10"> | ||||
| 						<input id="inputPk" type="text" th:field="*{pk}" class="form-control" readonly="readonly" /> | ||||
| 					</div> | ||||
| 				</div> | ||||
| 				<div class="row mb-3"> | ||||
| 					<label for="inputTimefrom" class="col-sm-2 col-form-label">von</label> | ||||
| 					<div class="col-sm-10"> | ||||
| 						<input id="inputTimefrom" type="text" th:field="*{timeFromString}" class="form-control" /> | ||||
| 					</div> | ||||
| 				</div> | ||||
| 				<div class="row mb-3"> | ||||
| 					<label for="inputTimeuntil" class="col-sm-2 col-form-label">bis</label> | ||||
| 					<div class="col-sm-10"> | ||||
| 						<input id="inputTimeuntil" type="text" th:field="*{timeUntilString}" class="form-control" /> | ||||
| 					</div> | ||||
| 				</div> | ||||
| 				<div class="row mb-3"> | ||||
| 					<label for="inputProject" class="col-sm-2 col-form-label">Projekt</label> | ||||
| 					<select id="inputProject" class="form-control select2-single" th:field="*{fkProject}"> | ||||
| 						<option th:each="i : ${projectList}" th:value="${i.pk}" th:text="${i.name}"></option> | ||||
| 					</select> | ||||
| 				</div> | ||||
| 				<div class="row mb-3"> | ||||
| 					<label for="inputModule" class="col-sm-2 col-form-label">Modul</label> | ||||
| 					<select id="inputModule" class="form-control select2-single" th:field="*{fkModule}"> | ||||
| 						<option th:each="i : ${moduleList}" th:value="${i.pk}" th:text="${i.name}"></option> | ||||
| 					</select> | ||||
| 				</div> | ||||
| 				<div class="row mb-3"> | ||||
| 					<label for="inputJob" class="col-sm-2 col-form-label">Aufgabe</label> | ||||
| 					<select id="inputJob" class="form-control select2-single" th:field="*{fkJob}"> | ||||
| 						<option th:each="i : ${jobList}" th:value="${i.pk}" th:text="${i.name}"></option> | ||||
| 					</select> | ||||
| 				</div> | ||||
| 				<div class="row mb-3"> | ||||
| 					<label for="inputBilling" class="col-sm-2 col-form-label">Abrechnung</label> | ||||
| 					<select id="inputBilling" class="form-control select2-single" th:field="*{fkBilling}"> | ||||
| 						<option th:each="i : ${billingList}" th:value="${i.pk}" th:text="${i.name}"></option> | ||||
| 					</select> | ||||
| 				</div> | ||||
| 				<div class="row mb-3"> | ||||
| 					<div class="col-sm-2">Änderung</div> | ||||
| 					<div class="col-sm-10"> | ||||
| 						<button type="submit" class="btn btn-success">speichern</button> | ||||
| 						<button type="submit" class="btn btn-secondary" th:formaction="@{/done/list}">abbrechen</button> | ||||
| 						<div class="dropdown float-right" th:if="${doneBean.pk != null}" sec:authorize="hasRole('timetrack_user')"> | ||||
| 							<button class="btn btn-danger dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">Eintrag löschen</button> | ||||
| 							<ul class="dropdown-menu"> | ||||
| 								<li><a class="dropdown-item" th:href="@{/done/delete/{id}(id=${doneBean.pk})}">endgültig löschen</a></li> | ||||
| 							</ul> | ||||
| 						</div> | ||||
| 					</div> | ||||
| 				</div> | ||||
| 			</form> | ||||
| 		</div> | ||||
| 	</main> | ||||
| </body> | ||||
| </html> | ||||
| @@ -48,11 +48,11 @@ | ||||
| 					</thead> | ||||
| 					<tbody> | ||||
| 						<tr th:each="done : ${doneList}"> | ||||
| 							<td><span th:text="${#temporals.format(done.timeFrom, 'HH:mm')}"></span></td> | ||||
| 							<td><span th:text="${#temporals.format(done.timeUntil, 'HH:mm')}"></span></td> | ||||
| 							<td><span th:text="${done.project.name}"></span></td> | ||||
| 							<td><span th:text="${done.module.name}"></span></td> | ||||
| 							<td><span th:text="${done.activity.name}"></span></td> | ||||
| 							<td><a th:href="@{/done/edit/{id}(id=${done.pk})}"><span th:text="${#temporals.format(done.timeFrom, 'HH:mm')}"></span></a></td> | ||||
| 							<td><a th:href="@{/done/edit/{id}(id=${done.pk})}"><span th:text="${#temporals.format(done.timeUntil, 'HH:mm')}"></span></a></td> | ||||
| 							<td><a th:href="@{/done/edit/{id}(id=${done.pk})}"><span th:text="${done.project.name}"></span></a></td> | ||||
| 							<td><a th:href="@{/done/edit/{id}(id=${done.pk})}"><span th:text="${done.module.name}"></span></a></td> | ||||
| 							<td><a th:href="@{/done/edit/{id}(id=${done.pk})}"><span th:text="${done.activity.name}"></span></a></td> | ||||
| 							<td><span th:text="${done.billing.shortcut}" th:class="'billing ' + ${done.billing.csskey}" | ||||
| 								th:if="${done.billing != null}"></span></td> | ||||
| 						</tr> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user