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

changeset 377
f6e409c17fab
parent 375
cbbadb493f22
child 378
ee605da75f78
equal deleted inserted replaced
376:52193577339c 377:f6e409c17fab
295 <fmt:message key="issue.comments"/> 295 <fmt:message key="issue.comments"/>
296 <c:if test="${not empty viewmodel.comments}"> 296 <c:if test="${not empty viewmodel.comments}">
297 (${fn:length(viewmodel.comments)}) 297 (${fn:length(viewmodel.comments)})
298 </c:if> 298 </c:if>
299 </h2> 299 </h2>
300 <c:if test="${viewmodel.issue.id ge 0}">
301 <form id="comment-form" action="${issuesHref}${issue.id}/comment" method="post"> 300 <form id="comment-form" action="${issuesHref}${issue.id}/comment" method="post">
302 <table class="formtable fullwidth"> 301 <table class="formtable fullwidth">
303 <tbody> 302 <tbody>
304 <tr> 303 <tr>
305 <td><textarea rows="3" name="comment" required></textarea></td> 304 <td><textarea rows="3" name="comment" required></textarea></td>
312 </td> 311 </td>
313 </tr> 312 </tr>
314 </tfoot> 313 </tfoot>
315 </table> 314 </table>
316 </form> 315 </form>
317 <c:forEach var="comment" items="${viewmodel.comments}"> 316 <c:forEach var="comment" items="${viewmodel.comments}">
318 <div class="comment"> 317 <div class="comment">
319 <div class="comment-author"> 318 <div class="comment-author">
320 <c:if test="${not empty comment.author}"> 319 <c:if test="${not empty comment.author}">
321 <c:if test="${not empty comment.author.mail}"> 320 <c:if test="${not empty comment.author.mail}">
322 <a class="comment-author-name" href="mailto:${comment.author.mail}"> 321 <a class="comment-author-name" href="mailto:${comment.author.mail}">
323 </c:if> 322 </c:if>
324 <c:out value="${comment.author.displayname}"/> 323 <c:out value="${comment.author.displayname}"/>
325 <c:if test="${not empty comment.author.mail}"> 324 <c:if test="${not empty comment.author.mail}">
326 </a> 325 </a>
327 </c:if> 326 </c:if>
328 <c:if test="${comment.author.username eq pageContext.request.remoteUser}"> 327 <c:if test="${comment.author.username eq pageContext.request.remoteUser}">
329 <a class="comment-edit-icon" onclick="showCommentEditor(${comment.id})">&#x270e;</a> 328 <a class="comment-edit-icon" onclick="showCommentEditor(${comment.id})">&#x270e;</a>
330 </c:if> 329 </c:if>
331 </c:if> 330 </c:if>
332 <c:if test="${empty comment.author}"> 331 <c:if test="${empty comment.author}">
333 <fmt:message key="issue.comments.anonauthor"/> 332 <fmt:message key="issue.comments.anonauthor"/>
334 </c:if> 333 </c:if>
335 </div>
336 <div class="smalltext">
337 <fmt:formatDate type="BOTH" value="${comment.created}" timeZone="${timezone}" />
338 <c:if test="${comment.updateCount gt 0}">
339 <span class="comment-edit-info">
340 (<fmt:message key="issue.comments.lastupdate"/> <fmt:formatDate type="BOTH" value="${comment.updated}" timeZone="${timezone}" />, ${comment.updateCount} <fmt:message key="issue.comments.updateCount"/>)
341 </span>
342 </c:if>
343 </div>
344 <div id="comment-view-${comment.id}" class="medskip markdown-styled">
345 ${comment.commentFormatted}
346 </div>
347 <div id="comment-editor-${comment.id}" style="display: none">
348 <form id="comment-form-${comment.id}" action="${issuesHref}${issue.id}/comment" method="post">
349 <input type="hidden" name="commentid" value="${comment.id}">
350 <table class="formtable fullwidth">
351 <tbody>
352 <tr>
353 <td>
354 <textarea rows="5" name="comment" required><c:out value="${comment.comment}"/></textarea>
355 </td>
356 </tr>
357 </tbody>
358 <tfoot>
359 <tr>
360 <td>
361 <button type="reset" onclick="cancelCommentEditor(${comment.id})"><fmt:message key="button.cancel"/></button>
362 <button type="submit"><fmt:message key="button.comment.edit"/></button>
363 </td>
364 </tr>
365 </tfoot>
366 </table>
367 </form>
368 </div>
369 </div> 334 </div>
370 </c:forEach> 335 <div class="smalltext">
371 </c:if> 336 <fmt:formatDate type="BOTH" value="${comment.created}" timeZone="${timezone}" />
372 337 <c:if test="${comment.updateCount gt 0}">
338 <span class="comment-edit-info">
339 (<fmt:message key="issue.comments.lastupdate"/> <fmt:formatDate type="BOTH" value="${comment.updated}" timeZone="${timezone}" />, ${comment.updateCount} <fmt:message key="issue.comments.updateCount"/>)
340 </span>
341 </c:if>
342 </div>
343 <div id="comment-view-${comment.id}" class="medskip markdown-styled">
344 ${comment.commentFormatted}
345 </div>
346 <div id="comment-editor-${comment.id}" style="display: none">
347 <form id="comment-form-${comment.id}" action="${issuesHref}${issue.id}/comment" method="post">
348 <input type="hidden" name="commentid" value="${comment.id}">
349 <table class="formtable fullwidth">
350 <tbody>
351 <tr>
352 <td>
353 <textarea rows="5" name="comment" required><c:out value="${comment.comment}"/></textarea>
354 </td>
355 </tr>
356 </tbody>
357 <tfoot>
358 <tr>
359 <td>
360 <button type="reset" onclick="cancelCommentEditor(${comment.id})"><fmt:message key="button.cancel"/></button>
361 <button type="submit"><fmt:message key="button.comment.edit"/></button>
362 </td>
363 </tr>
364 </tfoot>
365 </table>
366 </form>
367 </div>
368 </div>
369 </c:forEach>
370

mercurial