src/main/webapp/WEB-INF/jsp/issue-form.jsp

changeset 124
ed2e7aef2a3e
parent 115
c27638a50c92
child 125
decc4c3854a1
--- a/src/main/webapp/WEB-INF/jsp/issue-form.jsp	Fri Oct 09 19:06:51 2020 +0200
+++ b/src/main/webapp/WEB-INF/jsp/issue-form.jsp	Fri Oct 09 19:07:05 2020 +0200
@@ -32,10 +32,10 @@
 <c:set var="issue" scope="page" value="${viewmodel.issue}" />
 
 <form action="./projects/issues/commit" method="post">
-    <table class="formtable">
+    <table class="formtable fullwidth">
         <colgroup>
             <col>
-            <col style="width: 75ch">
+            <col style="width: 100%">
         </colgroup>
         <tbody>
         <c:if test="${viewmodel.issue.id ge 0}">
@@ -169,3 +169,46 @@
         </tfoot>
     </table>
 </form>
+<hr class="comments-separator"/>
+<h2><fmt:message key="issue.comments"/></h2>
+<c:if test="${viewmodel.issue.id ge 0}">
+<form id="comment-form" action="./projects/issues/comment" method="post">
+    <table class="formtable fullwidth">
+        <tbody>
+            <tr>
+                <td><textarea rows="5" name="comment"></textarea></td>
+            </tr>
+        </tbody>
+        <tfoot>
+            <tr>
+                <td>
+                    <input type="hidden" name="issueid" value="${issue.id}"/>
+                    <button type="submit"><fmt:message key="button.comment"/></button>
+                </td>
+            </tr>
+        </tfoot>
+    </table>
+</form>
+    <c:forEach var="comment" items="${viewmodel.comments}">
+        <div class="comment">
+            <div class="caption">
+                <c:if test="${not empty comment.author}">
+                    <c:out value="${comment.author.displayname}"/>
+                </c:if>
+                <c:if test="${empty comment.author}">
+                    <fmt:message key="issue.comments.anonauthor"/>
+                </c:if>
+            </div>
+            <div class="smalltext">
+                <fmt:formatDate type="BOTH" value="${comment.created}" />
+                <c:if test="${comment.updateCount gt 0}">
+                    <!-- TODO: update count -->
+                </c:if>
+            </div>
+            <div class="medskip">
+                <c:out value="${comment.comment}"/>
+            </div>
+        </div>
+    </c:forEach>
+</c:if>
+

mercurial