| 173 </tfoot> |
173 </tfoot> |
| 174 </table> |
174 </table> |
| 175 </form> |
175 </form> |
| 176 <c:forEach var="comment" items="${viewmodel.comments}"> |
176 <c:forEach var="comment" items="${viewmodel.comments}"> |
| 177 <div class="comment"> |
177 <div class="comment"> |
| 178 <div class="caption"> |
178 <div class="comment-author"> |
| 179 <c:if test="${not empty comment.author}"> |
179 <c:if test="${not empty comment.author}"> |
| 180 <c:if test="${not empty comment.author.mail}"> |
180 <c:if test="${not empty comment.author.mail}"> |
| 181 <a href="mailto:${comment.author.mail}"> |
181 <a class="comment-author-name" href="mailto:${comment.author.mail}"> |
| 182 </c:if> |
182 </c:if> |
| 183 <c:out value="${comment.author.displayname}"/> |
183 <c:out value="${comment.author.displayname}"/> |
| 184 <c:if test="${not empty comment.author.mail}"> |
184 <c:if test="${not empty comment.author.mail}"> |
| 185 </a> |
185 </a> |
| 186 </c:if> |
186 </c:if> |
| |
187 <c:if test="${comment.author.username eq pageContext.request.remoteUser}"> |
| |
188 <a class="comment-edit-icon" onclick="showCommentEditor(${comment.id})">✎</a> |
| |
189 </c:if> |
| 187 </c:if> |
190 </c:if> |
| 188 <c:if test="${empty comment.author}"> |
191 <c:if test="${empty comment.author}"> |
| 189 <fmt:message key="issue.comments.anonauthor"/> |
192 <fmt:message key="issue.comments.anonauthor"/> |
| 190 </c:if> |
193 </c:if> |
| 191 </div> |
194 </div> |
| 192 <div class="smalltext"> |
195 <div class="smalltext"> |
| 193 <fmt:formatDate type="BOTH" value="${comment.created}" /> |
196 <fmt:formatDate type="BOTH" value="${comment.created}" /> |
| 194 <c:if test="${comment.updateCount gt 0}"> |
197 <c:if test="${comment.updateCount gt 0}"> |
| 195 <!-- TODO: update count --> |
198 <span class="comment-edit-info"> |
| |
199 (<fmt:message key="issue.comments.lastupdate"/> <fmt:formatDate type="BOTH" value="${comment.updated}" />, ${comment.updateCount} <fmt:message key="issue.comments.updateCount"/>) |
| |
200 </span> |
| 196 </c:if> |
201 </c:if> |
| 197 </div> |
202 </div> |
| 198 <div class="medskip markdown-styled"> |
203 <div id="comment-view-${comment.id}" class="medskip markdown-styled"> |
| 199 ${comment.comment} |
204 ${comment.commentFormatted} |
| |
205 </div> |
| |
206 <div id="comment-editor-${comment.id}" style="display: none"> |
| |
207 <form id="comment-form-${comment.id}" action="${issuesHref}${issue.id}/comment" method="post"> |
| |
208 <input type="hidden" name="commentid" value="${comment.id}"> |
| |
209 <table class="formtable fullwidth"> |
| |
210 <tbody> |
| |
211 <tr> |
| |
212 <td> |
| |
213 <textarea rows="5" name="comment" required><c:out value="${comment.comment}"/></textarea> |
| |
214 </td> |
| |
215 </tr> |
| |
216 </tbody> |
| |
217 <tfoot> |
| |
218 <tr> |
| |
219 <td> |
| |
220 <button type="submit"><fmt:message key="button.comment.edit"/></button> |
| |
221 </td> |
| |
222 </tr> |
| |
223 </tfoot> |
| |
224 </table> |
| |
225 </form> |
| 200 </div> |
226 </div> |
| 201 </div> |
227 </div> |
| 202 </c:forEach> |
228 </c:forEach> |
| 203 </c:if> |
229 </c:if> |
| 204 |
230 |