Skip to content

Commit 37a03cb

Browse files
committed
URL PATH of Actions - Controller Methods Refactoring
1 parent a4ca54a commit 37a03cb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/main/resources/templates/project/root/add/project.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h1>
1919

2020
<div th:fragment="mytwcontent">
2121
<div>
22-
<form id="formId" th:action="@{/project/add/new/project}" th:object="${project}" method="post">
22+
<form id="formId" th:action="@{/project/root/add/project}" th:object="${project}" method="post">
2323
<div class="form-group">
2424
<label th:for="${#ids.next('name')}" class="control-label">Name</label>
2525
<input type="text" th:field="*{name}" class="form-control" />

src/main/resources/templates/project/root/add/task.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ <h1>
1818
</div>
1919

2020
<div th:fragment="mytwcontent">
21-
<form id="formId" th:action="@{/task/addtoproject/{projectId}(projectId=${thisProject.id})}" th:object="${task}" method="post">
21+
<form id="formId" th:action="@{/project/root/add/task}" th:object="${task}" method="post">
2222
<input type="hidden" th:field="*{taskState}" />
2323
<input type="hidden" th:field="*{context.id}" />
2424
<input type="hidden" th:field="*{rowCreatedAt.time}" />

src/main/resources/templates/project/root/show.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ <h1>
1616
<span th:text="#{project.show.h1}">Project</span>
1717
</h1>
1818
<div id="tw-content-title-actionbuttons">
19-
<a class="btn btn-sm btn-secondary" role="button" th:href="@{/project/add/new/project}">
19+
<a class="btn btn-sm btn-secondary" role="button" th:href="@{/project/root/add/project}">
2020
<i class="fas fa-plus-square"></i>
2121
<span th:text="#{layout.page.addProject}">Add a Project</span>
2222
</a>
23-
<a class="btn btn-sm btn-secondary" role="button" th:href="@{/task/addtorootproject/}" href="#">
23+
<a class="btn btn-sm btn-secondary" role="button" th:href="@{/project/root/add/task}" href="#">
2424
<i class="fas fa-plus-square"></i>
2525
<span th:text="#{project.show.addTask}">Add a Task</span>
2626
</a>
@@ -43,4 +43,4 @@ <h1>
4343
</div>
4444

4545
</body>
46-
</html>
46+
</html>

0 commit comments

Comments
 (0)