Rev 1306 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
684 | jmachado | 1 | <%@ page import="pt.estgp.estgweb.domain.views.SurveyStructuralNodeView" %> |
2 | <% |
||
3 | String from = ""; |
||
4 | if (request.getParameter("from") != null) |
||
5 | { |
||
6 | from = "&from=" + request.getParameter("from"); |
||
7 | } |
||
8 | request.setAttribute("from", from); |
||
9 | |||
10 | long nodeToShow = 0; |
||
11 | if(request.getParameter("node") != null) |
||
12 | { |
||
13 | nodeToShow = Long.parseLong(request.getParameter("node")); |
||
14 | } |
||
15 | |||
16 | SurveyStructuralNodeView node = (SurveyStructuralNodeView) request.getAttribute("node"); |
||
17 | if(node.getNodes().size() > 0) |
||
18 | { |
||
691 | jmachado | 19 | String image = request.getContextPath() + "/imgs/"; |
20 | image += node.isRelativeParentOf(nodeToShow) ? "closedPlus.gif" : "openedMinus.gif"; |
||
21 | %> |
||
22 | |||
684 | jmachado | 23 | <a href="#"><img border="0" onclick="this.src=showOrHide('node<%=node.getId()%>','<%=request.getContextPath()%>/imgs/closedPlus.gif','<%=request.getContextPath()%>/imgs/openedMinus.gif')" |
691 | jmachado | 24 | src="<%=image%>" alt="abrir"/></a> <%=node.getMsg()%><br> |
684 | jmachado | 25 | |
26 | <% |
||
27 | if(node.isRelativeParentOf(nodeToShow)) { |
||
28 | %> |
||
29 | <div id="node<%=node.getId()%>" style="display:block" class="nodeSection"> |
||
30 | <% |
||
31 | }else{ |
||
32 | %> |
||
33 | <div id="node<%=node.getId()%>" style="display:none" class="nodeSection"> |
||
34 | <% |
||
35 | } |
||
36 | for(SurveyStructuralNodeView n : node.getNodes()) |
||
37 | { |
||
38 | request.setAttribute("node",n); |
||
39 | %> |
||
40 | <jsp:include page="listSurveyStatsRecursive.jsp"/> |
||
41 | <% |
||
42 | } |
||
43 | %> |
||
44 | </div> |
||
45 | <% |
||
46 | } |
||
47 | else |
||
48 | { |
||
49 | %> |
||
50 | <div class="nodeSection"><a href="<%=request.getContextPath()%>/user/startLoadSurveyNodeGraphs.do?id=<%=request.getAttribute("id")%>&node=<%=node.getId()%><%=from%>"><%=node.getMsg()%></a></div> |
||
51 | <% |
||
52 | } |
||
53 | %> |