|
5 | 5 | xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
|
6 | 6 | xmlns:sd="http://www.thymeleaf.org/spring-data">
|
7 | 7 | <head th:replace="layout/page :: tw-page-head(headtitle=~{::title},links=~{},refreshMessages=true)">
|
8 |
| - <title th:text="'SimpleWorklist | ' + #{pages.chatMessages.h1}">Title</title> |
| 8 | + <title th:text="'SimpleWorklist | ' + #{pages.chatMessages.h1}">Title</title> |
9 | 9 | </head>
|
10 | 10 | <body th:replace="layout/page :: tw-page-body(twcontent=~{::mytwcontent},twtitle=~{::mytwtitle},scripts=~{})">
|
11 | 11 |
|
12 |
| - <div th:fragment="mytwtitle"> |
13 |
| - <h1> |
14 |
| - <span th:utext="#{pages.chatMessages.h1}">Your Dialog with</span> |
15 |
| - <small th:text="${otherUser.userFullname}">otherUser.userFullname</small> |
16 |
| - </h1> |
17 |
| - </div> |
| 12 | +<div th:fragment="mytwtitle"> |
| 13 | + <h1> |
| 14 | + <span th:utext="#{pages.chatMessages.h1}">Your Dialog with</span> |
| 15 | + <small th:text="${otherUser.userFullname}">otherUser.userFullname</small> |
| 16 | + </h1> |
| 17 | +</div> |
18 | 18 |
|
19 |
| - <div th:fragment="mytwcontent"> |
| 19 | +<div th:fragment="mytwcontent"> |
20 | 20 |
|
21 |
| - <div class="row"> |
22 |
| - <div class="col"> |
23 |
| - <div th:each="m : ${user2UserMessagePage}"> |
24 |
| - <div class="alert alert-primary" role="alert" |
25 |
| - th:if="${m.sender.id != otherUser.id}" style="width: 66%; float:left"> |
26 |
| - <span th:text="${m.messageText}" ></span> |
27 |
| - <span style="float:right"> |
28 |
| - <small> |
29 |
| - <span th:text="${#dates.format(m.rowCreatedAt,'dd.MM.yyyy HH:mm:ss')}"></span> |
30 |
| - <i th:if="${m.readByReceiver}" class="fas fa-check"></i> |
31 |
| - </small> |
32 |
| - </span> |
33 |
| - </div> |
34 |
| - <div class="alert alert-warning" role="alert" |
35 |
| - th:if="${m.sender.id == otherUser.id}" style="width: 66%; float:right"> |
36 |
| - <span th:text="${m.messageText}" ></span> |
37 |
| - <span style="float:right"> |
38 |
| - <small> |
39 |
| - <span th:text="${#dates.format(m.rowCreatedAt,'dd.MM.yyyy HH:mm:ss')}"></span> |
40 |
| - <i th:if="${m.readByReceiver}" class="fas fa-check"></i> |
41 |
| - </small> |
42 |
| - </span> |
| 21 | + <form id="formId" th:action="@{/user2user/{userId}/messages/(userId=${otherUser.id})}" |
| 22 | + th:object="${newUser2UserMessage}" method="post"> |
| 23 | + <div class="row"> |
| 24 | + <div class="col"> |
| 25 | + <div class="card card-body" id="newUser2UserMessageForm"> |
| 26 | + <div class="form-group col-12"> |
| 27 | + <label for="messageTextEditor" class="control-label my-2" th:utext="#{pages.chatMessages.newMessage}">New Message:</label> |
| 28 | + <textarea id="messageTextEditor" rows="3" cols="50" |
| 29 | + th:field="*{messageText}" class="form-control form-control-lg"/> |
| 30 | + <div> |
| 31 | + <div th:each="err : ${#fields.errors('messageText')}" |
| 32 | + th:text="${err}" class="invalid-feedback"/> |
43 | 33 | </div>
|
44 |
| - |
45 |
| - |
| 34 | + </div> |
| 35 | + <div class="my-3"> |
| 36 | + <button id="newUserMessageButton" type="submit" class="btn btn-primary"> |
| 37 | + <i class="fas fa-envelope"></i> |
| 38 | + <span th:utext="#{pages.chatMessages.newUserMessageButton}">Send Message</span> |
| 39 | + </button> |
46 | 40 | </div>
|
47 | 41 | </div>
|
48 | 42 | </div>
|
49 |
| - |
50 |
| - <form id="formId" th:action="@{/user2user/{userId}/messages/(userId=${otherUser.id})}" |
51 |
| - th:object="${newUser2UserMessage}" method="post"> |
52 |
| - <div class="row"> |
53 |
| - <div class="col"> |
54 |
| - <div class="card card-body" id="newUser2UserMessageForm"> |
55 |
| - <div class="form-group col-12"> |
56 |
| - <label for="messageTextEditor" class="control-label"> |
57 |
| - <span th:utext="#{pages.chatMessages.newMessage}">New Message:</span> |
58 |
| - </label> |
59 |
| - <textarea id="messageTextEditor" rows="3" cols="50" |
60 |
| - th:field="*{messageText}" class="form-control form-control-lg" /> |
61 |
| - <div> |
62 |
| - <div th:each="err : ${#fields.errors('messageText')}" |
63 |
| - th:text="${err}" class="invalid-feedback" /> |
64 |
| - </div> |
65 |
| - </div> |
66 |
| - <div class="my-3"> |
67 |
| - <button id="newUserMessageButton" type="submit" class="btn btn-primary"> |
68 |
| - <i class="fas fa-envelope"></i> |
69 |
| - <span th:utext="#{pages.chatMessages.newUserMessageButton}">Send Message</span> |
70 |
| - </button> |
71 |
| - </div> |
72 |
| - </div> |
73 |
| - </div> |
74 |
| - </div> |
75 |
| - </form> |
76 |
| - <div th:replace="layout/tasks :: tw-tasks-pagination(page=${user2UserMessagePage})"> |
77 | 43 | </div>
|
| 44 | + </form> |
| 45 | + |
| 46 | + <div class="row"> |
| 47 | + <div class="col"> |
| 48 | + <div th:each="m : ${user2UserMessagePage}"> |
| 49 | + <div class="alert alert-primary" role="alert" |
| 50 | + th:if="${m.sender.id != otherUser.id}" style="width: 66%; float:left"> |
| 51 | + <span th:text="${m.messageText}"></span> |
| 52 | + <span style="float:right"> |
| 53 | + <small> |
| 54 | + <span th:text="${#dates.format(m.rowCreatedAt,'dd.MM.yyyy HH:mm:ss')}"></span> |
| 55 | + <i th:if="${m.readByReceiver}" class="fas fa-check"></i> |
| 56 | + </small> |
| 57 | + </span> |
| 58 | + </div> |
| 59 | + <div class="alert alert-warning" role="alert" |
| 60 | + th:if="${m.sender.id == otherUser.id}" style="width: 66%; float:right"> |
| 61 | + <span th:text="${m.messageText}"></span> |
| 62 | + <span style="float:right"> |
| 63 | + <small> |
| 64 | + <span th:text="${#dates.format(m.rowCreatedAt,'dd.MM.yyyy HH:mm:ss')}"></span> |
| 65 | + <i th:if="${m.readByReceiver}" class="fas fa-check"></i> |
| 66 | + </small> |
| 67 | + </span> |
| 68 | + </div> |
| 69 | + </div> |
78 | 70 | </div>
|
| 71 | + </div> |
| 72 | + |
| 73 | + <div th:replace="layout/tasks :: tw-tasks-pagination(page=${user2UserMessagePage})"> |
| 74 | + </div> |
| 75 | +</div> |
79 | 76 | </body>
|
80 | 77 | </html>
|
0 commit comments