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

changeset 146
b0e83cab0bde
parent 142
c0549bcdf2ab
child 150
822b7e3d064d
equal deleted inserted replaced
145:6d2d69fd1c12 146:b0e83cab0bde
1 <%--
2 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
4 Copyright 2018 Mike Becker. All rights reserved.
5
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are met:
8
9 1. Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
11
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 --%>
27 <%@page pageEncoding="UTF-8" %>
28 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
29 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
30
31 <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.IssueDetailView" scope="request"/>
32 <c:set var="issue" scope="page" value="${viewmodel.issue}" />
33
34 <table class="formtable fullwidth">
35 <colgroup>
36 <col>
37 <col style="width: 100%">
38 </colgroup>
39 <tbody>
40 <c:if test="${viewmodel.issue.id ge 0}">
41 <tr>
42 <th><fmt:message key="issue.id"/></th>
43 <td>${issue.id}</td>
44 </tr>
45 </c:if>
46 <tr>
47 <th><fmt:message key="issue.project"/></th>
48 <td>
49 <c:out value="${issue.project.name}" />
50 </td>
51 </tr>
52 <tr>
53 <th><fmt:message key="issue.created"/></th>
54 <td><fmt:formatDate value="${issue.created}" /></td>
55 </tr>
56 <tr>
57 <th><fmt:message key="issue.updated"/></th>
58 <td><fmt:formatDate value="${issue.updated}" /></td>
59 </tr>
60 <tr>
61 <th><fmt:message key="issue.component"/></th>
62 <td>
63 <c:if test="${not empty issue.component}">
64 <c:out value="${issue.component.name}"/>
65 </c:if>
66 <c:if test="${empty issue.component}">
67 <fmt:message key="placeholder.null-component"/>
68 </c:if>
69 </td>
70 </tr>
71 <tr>
72 <th><fmt:message key="issue.category"/></th>
73 <td>
74 <div class="issue-tag ${issue.category}" style="width: auto">
75 <fmt:message key="issue.category.${issue.category}" />
76 </div>
77 </td>
78 </tr>
79 <tr>
80 <th><fmt:message key="issue.status"/></th>
81 <td>
82 <div class="issue-tag phase-${issue.status.phase}" style="width: auto">
83 <fmt:message key="issue.status.${issue.status}" />
84 </div>
85 </td>
86 </tr>
87 <tr>
88 <th><fmt:message key="issue.subject"/></th>
89 <td><c:out value="${issue.subject}"/></td>
90 </tr>
91 <tr>
92 <th class="vtop"><fmt:message key="issue.description"/></th>
93 <td>
94 <textarea readonly rows="10"><c:out value="${issue.description}"/></textarea>
95 </td>
96 </tr>
97 <tr>
98 <th><fmt:message key="issue.assignee"/></th>
99 <td>
100 <c:if test="${not empty issue.assignee}">
101 <c:out value="${issue.assignee.displayname}"/>
102 </c:if>
103 <c:if test="${empty issue.assignee}">
104 <fmt:message key="placeholder.null-assignee" />
105 </c:if>
106 </td>
107 </tr>
108 <tr>
109 <th class="vtop"><fmt:message key="issue.affected-versions"/></th>
110 <td>
111 <c:forEach var="version" items="${issue.affectedVersions}">
112 <c:out value="${version.name}"/>
113 </c:forEach>
114 </td>
115 </tr>
116 <tr>
117 <th class="vtop"><fmt:message key="issue.resolved-versions"/></th>
118 <td>
119 <c:forEach var="version" items="${issue.resolvedVersions}">
120 <c:out value="${version.name}"/>
121 </c:forEach>
122 </td>
123 </tr>
124 <tr>
125 <th><fmt:message key="issue.eta"/></th>
126 <td><fmt:formatDate value="${issue.eta}" /></td>
127 </tr>
128 </tbody>
129 <tfoot>
130 <tr>
131 <td colspan="2">
132 <%-- TODO: fix #14 --%>
133 <a href="./projects/${issue.project.node}/all-components/all-versions/issues/" class="button">
134 <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/>
135 </a>
136 <a href="./projects/${issue.project.node}/issues/${issue.id}/edit" class="button submit">
137 <fmt:message key="button.issue.edit"/>
138 </a>
139 </td>
140 </tr>
141 </tfoot>
142 </table>
143
144 <hr class="comments-separator"/>
145 <h2><fmt:message key="issue.comments"/></h2>
146 <c:if test="${viewmodel.issue.id ge 0}">
147 <form id="comment-form" action="./projects/commit-issue-comment" method="post">
148 <table class="formtable fullwidth">
149 <tbody>
150 <tr>
151 <td><textarea rows="5" name="comment" required></textarea></td>
152 </tr>
153 </tbody>
154 <tfoot>
155 <tr>
156 <td>
157 <input type="hidden" name="issueid" value="${issue.id}"/>
158 <button type="submit"><fmt:message key="button.comment"/></button>
159 </td>
160 </tr>
161 </tfoot>
162 </table>
163 </form>
164 <c:forEach var="comment" items="${viewmodel.comments}">
165 <div class="comment">
166 <div class="caption">
167 <c:if test="${not empty comment.author}">
168 <c:out value="${comment.author.displayname}"/>
169 </c:if>
170 <c:if test="${empty comment.author}">
171 <fmt:message key="issue.comments.anonauthor"/>
172 </c:if>
173 </div>
174 <div class="smalltext">
175 <fmt:formatDate type="BOTH" value="${comment.created}" />
176 <c:if test="${comment.updateCount gt 0}">
177 <!-- TODO: update count -->
178 </c:if>
179 </div>
180 <div class="medskip">
181 <c:out value="${comment.comment}"/>
182 </div>
183 </div>
184 </c:forEach>
185 </c:if>
186

mercurial