Subversion Repositories bacoAlunos

Rev

Rev 1312 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
144 jmachado 1
<%@ page contentType="text/html" %>
2
<%@ page pageEncoding="UTF-8" %>
3
<%@ page import="java.util.*" %>
4
<%@ page import="jomm.web.utils.NavPlace" %>
5
<%@ page import="jomm.utils.MessageResources" %>
1 fvelez 6
<%@ page import="jomm.web.utils.NavPlaceServer" %>
7
<%@ page import="jomm.web.utils.TopNav" %>
144 jmachado 8
<div id="topnav">
9
    <ul>
10
        <%
11
            TopNav topNav = NavPlaceServer.getTopNav(request);
12
            List<NavPlace> navKeys = topNav.getNavPlaces();
1312 jmachado 13
            for(int i = 0; i < navKeys.size() ; i++)
144 jmachado 14
            {
1312 jmachado 15
                NavPlace navPlace = navKeys.get(i);
250 jmachado 16
 
144 jmachado 17
                if (navPlace.getUrl() != null)
18
                {
250 jmachado 19
                  String context = "";
20
                  if(navPlace.getUrl().startsWith("/"))
21
                    context = request.getContextPath();
1479 jmachado 22
                    %>
23
                    <li class="navPlace">
24
                        <%
25
                            if(navPlace.getIcon() != null)
26
                            {
27
                        %>
28
                            <span class="<%=navPlace.getIcon()%>"></span>
29
                        <%
30
                            }
31
                        %>
32
                        <a href="<%=context + navPlace.getUrl()%>"><%=navPlace.getMessage(request)%></a>
33
                        <%
34
                            if(i + 1 <  navKeys.size() )
35
                            {
36
                        %>
37
                        <span class="glyphicon glyphicon-menu-right"/>
38
                        <%
39
                            }
40
                        %>
41
                    </li>
42
                    <%
1312 jmachado 43
                }
1479 jmachado 44
                else
1312 jmachado 45
                {
1479 jmachado 46
                    %>
47
                    <li class="navPlace">
48
                        <%
49
                            if(navPlace.getIcon() != null)
50
                            {
51
                        %>
52
                        <span class="<%=navPlace.getIcon()%>"></span>
53
                        <%
54
                            }
55
                        %>
56
                        <%=navPlace.getMessage(request)%>
57
                        <%
58
                            if(i + 1 <  navKeys.size() )
59
                            {
60
                        %>
61
                        <span class="glyphicon glyphicon-menu-right"/>
62
                        <%
63
                            }
64
                        %>
65
                    </li>
66
                    <%
1312 jmachado 67
                }
1 fvelez 68
            }
144 jmachado 69
        %>
70
    </ul>
71
</div>