Skip to content

Commit bd81988

Browse files
committed
work in progres
1 parent 569402a commit bd81988

File tree

3 files changed

+249
-1
lines changed

3 files changed

+249
-1
lines changed
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<!DOCTYPE html>
2+
<html th:lang="${#locale.language}"
3+
xmlns="http://www.w3.org/1999/xhtml"
4+
xmlns:th="http://www.thymeleaf.org"
5+
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
6+
xmlns:sd="http://www.thymeleaf.org/spring-data">
7+
<head th:replace="layout/page :: tw-page-head(headtitle=~{::title},links=~{},refreshMessages=false)">
8+
<title th:text="'SimpleWorklist | ' + #{task.add.h1}">Title</title>
9+
</head>
10+
<body th:replace="layout/page :: tw-page-body(twcontent=~{::mytwcontent},twtitle=~{::mytwtitle},,scripts=~{::script})">
11+
12+
<div th:fragment="mytwtitle">
13+
<!-- New Task Form -->
14+
<h1>
15+
<i class="fas fa-plus-square"></i> &nbsp;
16+
<span th:utext="#{task.add.h1}">Add Task</span>
17+
</h1>
18+
</div>
19+
20+
<div th:fragment="mytwcontent">
21+
<form id="formId" th:action="@{/taskstate/task/add}" th:object="${task}" method="post">
22+
<input type="hidden" th:field="*{taskState}" />
23+
<input type="hidden" th:field="*{context.id}" />
24+
<input type="hidden" th:field="*{rowCreatedAt.time}" />
25+
<div class="form-group">
26+
<label th:for="${#ids.next('title')}" class="control-label">
27+
<span th:utext="#{task.show.title}">Title</span>
28+
</label>
29+
<input type="text" th:field="*{title}" class="form-control" />
30+
<div>
31+
<div th:each="err : ${#fields.errors('title')}" th:text="${err}" class="alert alert-danger" >
32+
</div>
33+
</div>
34+
</div>
35+
<div class="form-group">
36+
<label for="taskDueDate" class="control-label">
37+
<span th:utext="#{task.show.dueDate}">Due Date</span>
38+
</label>
39+
<input id="taskDueDate" type="text" th:field="*{dueDate}" class="form-control" />
40+
<div>
41+
<div th:each="err : ${#fields.errors('dueDate')}" th:text="${err}" class="alert alert-danger">
42+
</div>
43+
</div>
44+
</div>
45+
<div class="form-group">
46+
<label th:for="textEditor" class="control-label">
47+
<span th:utext="#{task.show.text}">Text</span>
48+
</label>
49+
<textarea id="textEditor" name="textEditor" rows="10" cols="50" th:field="*{text}" class="form-control" ></textarea>
50+
<div>
51+
<div th:each="err : ${#fields.errors('text')}" th:text="${err}" class="alert alert-danger">
52+
</div>
53+
</div>
54+
</div>
55+
<div>
56+
<span class="form-group">
57+
<label th:for="${#ids.next('taskEnergy')}" class="control-label">
58+
<span th:utext="#{task.show.taskEnergy}">Energy</span>
59+
</label>
60+
<select th:field="*{taskEnergy}">
61+
<option th:each="taskEnergyItem : ${listTaskEnergy}"
62+
th:value="${taskEnergyItem.value}"
63+
th:text="${#messages.msgOrNull(taskEnergyItem.code)}">Wireframe</option>
64+
</select>
65+
<div>
66+
<div th:each="err : ${#fields.errors('taskEnergy')}" th:text="${err}" class="alert alert-danger">
67+
</div>
68+
</div>
69+
</span>&nbsp;
70+
<span class="form-group">
71+
<label th:for="${#ids.next('taskTime')}" class="control-label">
72+
<span th:utext="#{task.show.taskTime}">Time</span>
73+
</label>
74+
<select th:field="*{taskTime}">
75+
<option th:each="taskTimeItem : ${listTaskTime}"
76+
th:value="${taskTimeItem.value}"
77+
th:text="${#messages.msgOrNull(taskTimeItem.code)}">Wireframe</option>
78+
</select>
79+
<div>
80+
<div th:each="err : ${#fields.errors('taskTime')}" th:text="${err}" class="alert alert-danger">
81+
</div>
82+
</div>
83+
</span>&nbsp;
84+
<span class="form-group">
85+
<label th:for="${#ids.next('context.id')}" class="control-label">
86+
<span th:utext="#{task.show.context}">Area</span>
87+
</label>
88+
<select th:field="*{context.id}">
89+
<option th:each="areaOption : ${contexts}"
90+
th:value="${areaOption.id}"
91+
th:text="${locale == 'de' ? areaOption.nameDe : areaOption.nameEn}">Wireframe</option>
92+
</select>
93+
<div>
94+
<div th:each="err : ${#fields.errors('context.id')}" th:text="${err}" class="alert alert-danger">
95+
</div>
96+
</div>
97+
</span>
98+
</div>
99+
<input type="hidden"
100+
name="${_csrf.parameterName}"
101+
value="${_csrf.token}"/>
102+
<button id="createNewTask" type="submit" class="btn btn-primary">
103+
<i class="fas fa-save"></i>
104+
<span th:utext="#{task.add.button}">Add Task</span>
105+
</button>
106+
</form>
107+
</div>
108+
109+
<script th:src="@{/webjars/ckeditor/4.11.3/full/ckeditor.js}"></script>
110+
<script th:inline="javascript">
111+
CKEDITOR.replace( 'textEditor' );
112+
</script>
113+
</body>
114+
</html>
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
<!DOCTYPE html>
2+
<html th:lang="${#locale.language}"
3+
xmlns="http://www.w3.org/1999/xhtml"
4+
xmlns:th="http://www.thymeleaf.org"
5+
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
6+
xmlns:sd="http://www.thymeleaf.org/spring-data">
7+
<head th:replace="layout/page :: tw-page-head(headtitle=~{::title},links=~{},refreshMessages=false)">
8+
<title th:text="'SimpleWorklist | ' + #{task.show.h1}">Title</title>
9+
</head>
10+
<body th:replace="layout/page :: tw-page-body(twcontent=~{::mytwcontent},twtitle=~{::mytwtitle},scripts=~{::script})">
11+
12+
<div th:fragment="mytwtitle">
13+
<!-- Document Window -->
14+
<h1>
15+
<i class="fas fa-edit"></i>&nbsp;
16+
<span th:utext="#{task.show.h1}">Edit Task</span>
17+
</h1>
18+
</div>
19+
20+
<div th:fragment="mytwcontent">
21+
<div>
22+
<form id="formId" th:action="@{/project/root/task/{taskId}/edit(taskId=${task.id})}" th:object="${task}" method="post">
23+
<input type="hidden" th:field="*{id}" />
24+
<input type="hidden" th:field="*{uuid}" />
25+
<input type="hidden" th:field="*{rowCreatedAt.time}" />
26+
<div class="form-group">
27+
<label th:for="${#ids.next('title')}" class="control-label">
28+
<span th:utext="#{task.show.title}">Title</span>
29+
</label>
30+
<input type="text" th:field="*{title}" class="form-control" />
31+
<div>
32+
<div th:each="err : ${#fields.errors('title')}" th:text="${err}" class="alert alert-danger" >
33+
</div>
34+
</div>
35+
</div>
36+
<span class="form-group">
37+
<label th:for="${#ids.next('listTaskState')}" class="control-label">
38+
<span th:utext="#{tasks.col.taskState}">taskState</span>
39+
</label>
40+
<select th:field="*{taskState}">
41+
<option th:each="taskStateItem : ${listTaskState}"
42+
th:value="${taskStateItem.value}"
43+
th:text="${#messages.msgOrNull(taskStateItem.code)}">taskStateItemCode</option>
44+
</select>
45+
<div>
46+
<div th:each="err : ${#fields.errors('taskState')}" th:text="${err}" class="alert alert-danger">
47+
</div>
48+
</div>
49+
</span>
50+
<div class="form-group">
51+
<label for="taskDueDate" class="control-label">
52+
<span th:utext="#{task.show.dueDate}">Due Date</span>
53+
</label>
54+
<input id="taskDueDate" type="text" th:field="*{dueDate}" class="form-control" />
55+
<div>
56+
<div th:each="err : ${#fields.errors('dueDate')}" th:text="${err}" class="alert alert-danger">
57+
</div>
58+
</div>
59+
</div>
60+
<div class="form-group">
61+
<label th:for="textEditor" class="control-label">
62+
<span th:utext="#{task.show.text}">Text</span>
63+
</label>
64+
<textarea id="textEditor" name="textEditor" rows="10" cols="50" th:field="*{text}" class="form-control" ></textarea>
65+
<div>
66+
<div th:each="err : ${#fields.errors('text')}" th:text="${err}" class="alert alert-danger">
67+
</div>
68+
</div>
69+
</div>
70+
<div>
71+
<span class="form-group">
72+
<label th:for="${#ids.next('taskEnergy')}" class="control-label">
73+
<span th:utext="#{task.show.taskEnergy}">Energy</span>
74+
</label>
75+
<select th:field="*{taskEnergy}">
76+
<option th:each="taskEnergyItem : ${listTaskEnergy}"
77+
th:value="${taskEnergyItem.value}"
78+
th:text="${#messages.msgOrNull(taskEnergyItem.code)}">Wireframe</option>
79+
</select>
80+
<div>
81+
<div th:each="err : ${#fields.errors('taskEnergy')}" th:text="${err}" class="alert alert-danger">
82+
</div>
83+
</div>
84+
</span>&nbsp;
85+
<span class="form-group">
86+
<label th:for="${#ids.next('taskTime')}" class="control-label">
87+
<span th:utext="#{task.show.taskTime}">Time</span>
88+
</label>
89+
<select th:field="*{taskTime}">
90+
<option th:each="taskTimeItem : ${listTaskTime}"
91+
th:value="${taskTimeItem.value}"
92+
th:text="${#messages.msgOrNull(taskTimeItem.code)}">Wireframe</option>
93+
</select>
94+
<div>
95+
<div th:each="err : ${#fields.errors('taskTime')}" th:text="${err}" class="alert alert-danger">
96+
</div>
97+
</div>
98+
</span>&nbsp;
99+
<span class="form-group">
100+
<label th:for="${#ids.next('context.id')}" class="control-label">
101+
<span th:utext="#{task.show.context}">Area</span>
102+
</label>
103+
<select th:field="*{context.id}">
104+
<option th:each="areaOption : ${contexts}"
105+
th:value="${areaOption.id}"
106+
th:text="${locale == 'de' ? areaOption.nameDe : areaOption.nameEn}">Wireframe</option>
107+
</select>
108+
<div>
109+
<div th:each="err : ${#fields.errors('context.id')}" th:text="${err}" class="alert alert-danger">
110+
</div>
111+
</div>
112+
</span>
113+
</div>
114+
<input type="hidden"
115+
name="${_csrf.parameterName}"
116+
value="${_csrf.token}"/>
117+
<button id="editDataLeaf" type="submit" class="btn btn-primary">
118+
<i class="fas fa-save"></i>
119+
<span th:utext="#{task.show.button}">Save Task</span>
120+
</button>
121+
<a th:href="@{/task/transform/{id}(id=${task.id})}" class="btn btn-secondary" role="button">
122+
<i class="fas fa-project-diagram"></i>
123+
<span th:utext="#{task.show.transform}">Transform into Project</span>
124+
</a>
125+
</form>
126+
</div>
127+
</div>
128+
129+
<script th:src="@{/webjars/ckeditor/4.14.0/full/ckeditor.js}"></script>
130+
<script th:inline="javascript">
131+
CKEDITOR.replace( 'textEditor' );
132+
</script>
133+
</body>
134+
</html>

src/main/resources/templates/taskstate/task/edit.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ <h1>
126126
</div>
127127
</div>
128128

129-
<script th:src="@{/webjars/ckeditor/4.11.3/full/ckeditor.js}"></script>
129+
<script th:src="@{/webjars/ckeditor/4.14.0/full/ckeditor.js}"></script>
130130
<script th:inline="javascript">
131131
CKEDITOR.replace( 'textEditor' );
132132
</script>

0 commit comments

Comments
 (0)