src/main/webapp/WEB-INF/jsp/project-navmenu.jsp

changeset 134
f47e82cd6077
parent 131
67df332e3146
child 140
ac35e58efa44
equal deleted inserted replaced
133:ef075cd7ce55 134:f47e82cd6077
22 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 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, 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" import="de.uapcore.lightpit.viewmodel.ProjectView" %>
28 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 28 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
29 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 29 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
30 30
31 <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.ProjectView" scope="request"/> 31 <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.ProjectView" scope="request"/>
32 32
33 <c:forEach var="projectInfo" items="${viewmodel.projectList}"> 33 <c:forEach var="projectInfo" items="${viewmodel.projectList}">
34 <c:set var="isActive" value="${viewmodel.projectInfo.project eq projectInfo.project}" /> 34 <c:set var="isActive" value="${viewmodel.projectInfo.project eq projectInfo.project}" />
35 <div class="menuEntry level-0" <c:if test="${isActive}">data-active</c:if> > 35 <div class="menuEntry level-0" <c:if test="${isActive}">data-active</c:if> >
36 <a href="projects/${projectInfo.project.id}/versions/"> 36 <a href="projects/${projectInfo.project.node}/versions/">
37 <c:out value="${projectInfo.project.name}"/> 37 <c:out value="${projectInfo.project.name}"/>
38 </a> 38 </a>
39 </div> 39 </div>
40 <c:if test="${isActive}"> 40 <c:if test="${isActive}">
41 <!-- VERSIONS --> 41 <!-- VERSIONS -->
42 <div class="menuEntry level-1"> 42 <c:set var="componentNode" value="${not empty viewmodel.componentFilter ? viewmodel.componentFilter.node : 'all-components'}"/>
43 <a href="projects/${projectInfo.project.id}/versions/"> 43 <div class="menuEntry level-1" <c:if test="${viewmodel.selectedPage eq ProjectView.SELECTED_PAGE_VERSIONS}">data-active</c:if> >
44 <a href="projects/${projectInfo.project.node}/versions/">
44 <fmt:message key="navmenu.versions"/> 45 <fmt:message key="navmenu.versions"/>
45 </a> 46 </a>
46 </div> 47 </div>
47 <div class="menuEntry level-2"> 48 <div class="menuEntry level-2" <c:if test="${viewmodel.versionFilter eq ProjectView.ALL_VERSIONS}">data-active</c:if>>
48 <div class="navmenu-icon" style="background: black"></div> 49 <div class="navmenu-icon" style="background: black"></div>
49 <a href="projects/${projectInfo.project.id}/versions/unassigned"> 50 <a href="projects/${projectInfo.project.node}/${componentNode}/all-versions/issues/">
51 <fmt:message key="navmenu.all" />
52 </a>
53 </div>
54 <div class="menuEntry level-2" <c:if test="${viewmodel.versionFilter eq ProjectView.NO_VERSION}">data-active</c:if>>
55 <div class="navmenu-icon" style="background: black"></div>
56 <a href="projects/${projectInfo.project.node}/${componentNode}/no-version/issues/">
50 <fmt:message key="navmenu.unassigned" /> 57 <fmt:message key="navmenu.unassigned" />
51 </a> 58 </a>
52 </div> 59 </div>
53 <c:forEach var="version" items="${viewmodel.projectInfo.versions}"> 60 <c:forEach var="version" items="${viewmodel.projectInfo.versions}">
54 <c:set var="isVersionActive" value="${viewmodel.versionFilter eq version}" /> 61 <c:set var="isVersionActive" value="${viewmodel.versionFilter eq version}" />
55 <div class="menuEntry level-2" <c:if test="${isVersionActive}">data-active</c:if> 62 <div class="menuEntry level-2" <c:if test="${isVersionActive}">data-active</c:if>
56 title="<fmt:message key="version.status.${version.status}" />"> 63 title="<fmt:message key="version.status.${version.status}" />">
57 <div class="navmenu-icon version-${version.status}"></div> 64 <div class="navmenu-icon version-${version.status}"></div>
58 <a href="projects/${projectInfo.project.id}/versions/${version.id}"> 65 <a href="projects/${projectInfo.project.node}/${componentNode}/${version.node}/issues/">
59 <c:out value="${version.name}"/> 66 <c:out value="${version.name}"/>
60 </a> 67 </a>
61 </div> 68 </div>
62 </c:forEach> 69 </c:forEach>
63 <%-- COMPONENTS 70 <!-- COMPONENTS -->
64 TODO: find a way to combine version and component into one URL 71 <c:set var="versionNode" value="${not empty viewmodel.versionFilter ? viewmodel.versionFilter.node : 'all-versions'}"/>
65 <div class="menuEntry level-1"> 72 <div class="menuEntry level-1" <c:if test="${viewmodel.selectedPage eq ProjectView.SELECTED_PAGE_COMPONENTS}">data-active</c:if>>
66 <a href="projects/${projectInfo.project.id}/components/"> 73 <a href="projects/${projectInfo.project.node}/components/">
67 <fmt:message key="navmenu.components"/> 74 <fmt:message key="navmenu.components"/>
68 </a> 75 </a>
69 </div> 76 </div>
70 <div class="menuEntry level-2"> 77 <div class="menuEntry level-2" <c:if test="${viewmodel.componentFilter eq ProjectView.ALL_COMPONENTS}">data-active</c:if>>
71 <div class="navmenu-icon" style="background: black"></div> 78 <div class="navmenu-icon" style="background: black"></div>
72 <a href="projects/${projectInfo.project.id}/components/"> 79 <a href="projects/${projectInfo.project.node}/all-components/${versionNode}/issues/">
73 <fmt:message key="navmenu.all" /> 80 <fmt:message key="navmenu.all" />
74 </a> 81 </a>
75 </div> 82 </div>
76 <div class="menuEntry level-2"> 83 <div class="menuEntry level-2" <c:if test="${viewmodel.componentFilter eq ProjectView.NO_COMPONENT}">data-active</c:if>>
77 <div class="navmenu-icon" style="background: black"></div> 84 <div class="navmenu-icon" style="background: black"></div>
78 <a href="projects/${projectInfo.project.id}/components/unassigned"> 85 <a href="projects/${projectInfo.project.node}/no-component/${versionNode}/issues/">
79 <fmt:message key="navmenu.unassigned" /> 86 <fmt:message key="navmenu.unassigned" />
80 </a> 87 </a>
81 </div> 88 </div>
82 <c:forEach var="component" items="${viewmodel.projectInfo.components}"> 89 <c:forEach var="component" items="${viewmodel.projectInfo.components}">
83 <c:set var="isComponentActive" value="${viewmodel.componentFilter eq component}" /> 90 <c:set var="isComponentActive" value="${viewmodel.componentFilter eq component}" />
84 <div class="menuEntry level-2" <c:if test="${isVersionActive}">data-active</c:if> > 91 <div class="menuEntry level-2" <c:if test="${isComponentActive}">data-active</c:if> >
85 <div class="navmenu-icon" style="background-color: ${component.color}"></div> 92 <div class="navmenu-icon" style="background-color: ${component.color}"></div>
86 <a href="projects/view?pid=${projectInfo.project.id}&cid=${component.id}"> 93 <a href="projects/${projectInfo.project.node}/${component.node}/${versionNode}/issues/">
87 <c:out value="${component.name}"/> 94 <c:out value="${component.name}"/>
88 </a> 95 </a>
89 </div> 96 </div>
90 </c:forEach> 97 </c:forEach>
91 --%>
92 </c:if> 98 </c:if>
93 </c:forEach> 99 </c:forEach>

mercurial