src/main/webapp/WEB-INF/jsp/projects.jsp

changeset 86
0a658e53177c
parent 82
4ec7f2600c83
child 99
a369fb1b3aa2
equal deleted inserted replaced
85:3d16ad54b3dc 86:0a658e53177c
23 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 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 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. 25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 --%> 26 --%>
27 <%@page pageEncoding="UTF-8" %> 27 <%@page pageEncoding="UTF-8" %>
28 <%@page import="de.uapcore.lightpit.modules.ProjectsModule" %>
29 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 28 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
30 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 29 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
31 30
32 <c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/> 31 <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.ProjectIndexView" scope="request"/>
33 32
34 <jsp:useBean id="projects" type="java.util.List<de.uapcore.lightpit.entities.Project>" scope="request"/> 33 <c:if test="${empty viewmodel.projects}">
35
36 <c:if test="${empty projects}">
37 <div class="info-box"> 34 <div class="info-box">
38 <fmt:message key="no-projects"/> 35 <fmt:message key="no-projects"/>
39 </div> 36 </div>
40 </c:if> 37 </c:if>
41 38
42 <div id="tool-area"> 39 <div id="tool-area">
43 <a href="./projects/edit" class="button"><fmt:message key="button.create"/></a> 40 <a href="./projects/edit" class="button"><fmt:message key="button.create"/></a>
44 </div> 41 </div>
45 42
46 <c:if test="${not empty projects}"> 43 <c:if test="${not empty viewmodel.projects}">
47 <table id="project-list" class="datatable medskip"> 44 <table id="project-list" class="datatable medskip">
48 <colgroup> 45 <colgroup>
49 <col> 46 <col>
50 <col width="20%"> 47 <col width="20%">
51 <col width="50%"> 48 <col width="50%">
52 <col width="10%"> 49 <col width="6%">
53 <col width="10%"> 50 <col width="6%">
54 <col width="10%"> 51 <col width="6%">
52 <col width="6%">
53 <col width="6%">
55 </colgroup> 54 </colgroup>
56 <thead> 55 <thead>
57 <tr> 56 <tr>
58 <th></th> 57 <th></th>
59 <th><fmt:message key="name"/></th> 58 <th><fmt:message key="name"/></th>
60 <th><fmt:message key="repoUrl"/></th> 59 <th><fmt:message key="repoUrl"/></th>
61 <th><fmt:message key="issues.open"/></th> 60 <th class="hcenter"><fmt:message key="version.latest"/></th>
62 <th><fmt:message key="issues.active"/></th> 61 <th class="hcenter"><fmt:message key="version.next"/></th>
63 <th><fmt:message key="issues.done"/></th> 62 <th class="hcenter"><fmt:message key="issues.open"/></th>
63 <th class="hcenter"><fmt:message key="issues.active"/></th>
64 <th class="hcenter"><fmt:message key="issues.done"/></th>
64 </tr> 65 </tr>
65 </thead> 66 </thead>
66 <tbody> 67 <tbody>
67 <c:forEach var="project" items="${projects}"> 68 <c:forEach var="projectInfo" items="${viewmodel.projects}">
69 <c:set var="project" scope="page" value="${projectInfo.project}"/>
68 <tr class="nowrap"> 70 <tr class="nowrap">
69 <td style="width: 2em;"><a href="./projects/edit?id=${project.id}">&#x270e;</a></td> 71 <td style="width: 2em;"><a href="./projects/edit?pid=${project.id}">&#x270e;</a></td>
70 <td><a href="./projects/view?pid=${project.id}"><c:out value="${project.name}"/></a> 72 <td><a href="./projects/view?pid=${project.id}"><c:out value="${project.name}"/></a>
71 </td> 73 </td>
72 <td> 74 <td>
73 <c:if test="${not empty project.repoUrl}"> 75 <c:if test="${not empty project.repoUrl}">
74 <a target="_blank" href="<c:out value="${project.repoUrl}"/>"><c:out 76 <a target="_blank" href="<c:out value="${project.repoUrl}"/>"><c:out
75 value="${project.repoUrl}"/></a> 77 value="${project.repoUrl}"/></a>
76 </c:if> 78 </c:if>
77 </td> 79 </td>
78 <td>${project.openIssues}</td> 80 <td class="hright">
79 <td>${project.activeIssues}</td> 81 <c:if test="${not empty projectInfo.latestVersion}">
80 <td>${project.doneIssues}</td> 82 <a href="./projects/versions/view?vid=${projectInfo.latestVersion.id}"><c:out value="${projectInfo.latestVersion.name}"/></a>
83 </c:if>
84 </td>
85 <td class="hright">
86 <c:if test="${not empty projectInfo.nextVersion}">
87 <a href="./projects/versions/view?vid=${projectInfo.nextVersion.id}"><c:out value="${projectInfo.nextVersion.name}"/></a>
88 </c:if>
89 </td>
90 <td class="hright">${projectInfo.issueSummary.open}</td>
91 <td class="hright">${projectInfo.issueSummary.active}</td>
92 <td class="hright">${projectInfo.issueSummary.done}</td>
81 </tr> 93 </tr>
82 </c:forEach> 94 </c:forEach>
83 </tbody> 95 </tbody>
84 </table> 96 </table>
85 </c:if> 97 </c:if>

mercurial