Rev 1320 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1312 | jmachado | 1 | <%@ page import="pt.estgp.estgweb.Globals" %> |
2 | <%@ page import="pt.estgp.estgweb.domain.UserSession" %> |
||
3 | <%@ page import="pt.estgp.estgweb.web.UserSessionProxy" %> |
||
4 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
||
5 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
6 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
7 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
8 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
9 | |||
10 | <tiles:useAttribute name="separator" id="separator" classname="org.apache.struts.tiles.DirectStringAttribute"/> |
||
11 | |||
12 | <% |
||
13 | UserSession userSession = UserSessionProxy.loadUserSessionFromRequest(request); |
||
14 | int sep = 1; |
||
15 | try |
||
16 | { |
||
17 | sep = Integer.parseInt(separator.toString()); |
||
18 | } |
||
19 | catch(NumberFormatException e) |
||
20 | {} |
||
21 | catch(NullPointerException e) |
||
22 | {} |
||
23 | |||
24 | String sep0 = ""; |
||
25 | String sep1 = ""; |
||
26 | String sep2 = ""; |
||
27 | String sep3 = ""; |
||
28 | String sep4 = ""; |
||
29 | String sep5 = ""; |
||
30 | String sep6 = ""; |
||
31 | String sep7 = ""; |
||
32 | String sep8 = ""; |
||
33 | |||
34 | |||
35 | |||
36 | String link0 = "href=\"" + request.getContextPath() + Globals.SYSTEM_PUBLIC_URL + "\""; |
||
37 | String link1 = "href=\"" + request.getContextPath() + "/user/startHome.do\""; |
||
38 | String link2 = "href=\"" + request.getContextPath() + "/user/startCourseUnits.do\""; |
||
39 | String link3 = "href=\"" + request.getContextPath() + "/user/startProfile.do\""; |
||
40 | String link4 = "href=\"" + request.getContextPath() + "/user/startServiceZone.do\""; |
||
41 | String link5 = "href=\"" + request.getContextPath() + "/proxy/layoutIOnline/ionline/\""; |
||
42 | String link6 = "href=\"" + request.getContextPath() + "/dir/utilsIntranet/utils/intranet/escola/utils.html\""; |
||
43 | String link7 = "href=\"" + request.getContextPath() + "/proxy/layoutIntranetContacts/estgp/intranet/contactos/servicos.html\""; |
||
44 | String link8 = "href=\"" + request.getContextPath() + "/user/loapPageSeparatorDocuments.do?pageCode=documents\""; |
||
45 | |||
46 | if(sep == 0) |
||
47 | { |
||
48 | sep0 ="class=\"active\""; |
||
49 | // link0 = ""; |
||
50 | } |
||
51 | else if(sep == 1) |
||
52 | { |
||
53 | sep1 ="class=\"active\""; |
||
54 | // link1 = ""; |
||
55 | } |
||
56 | else if(sep == 2) |
||
57 | { |
||
58 | sep2 ="class=\"active\""; |
||
59 | // link2 = ""; |
||
60 | } |
||
61 | else if(sep == 3) |
||
62 | { |
||
63 | // link3 = ""; |
||
64 | sep3 ="class=\"active\""; |
||
65 | } |
||
66 | else if(sep == 4) |
||
67 | { |
||
68 | // link4 = ""; |
||
69 | sep4 ="class=\"active\""; |
||
70 | } |
||
71 | else if(sep == 5) |
||
72 | { |
||
73 | link5 = ""; |
||
74 | sep5 ="class=\"active\""; |
||
75 | } |
||
76 | else if(sep == 6) |
||
77 | { |
||
78 | // link6 = ""; |
||
79 | sep6 ="class=\"active\""; |
||
80 | } |
||
81 | else if(sep == 7) |
||
82 | { |
||
83 | // link7 = ""; |
||
84 | sep7 ="class=\"active\""; |
||
85 | } |
||
86 | else if(sep == 8) |
||
87 | { |
||
88 | // link8 = ""; |
||
89 | sep8 ="class=\"active\""; |
||
90 | } |
||
91 | |||
92 | |||
93 | |||
94 | %> |
||
95 | <nav class="navbar navbar-default" style="margin-bottom: 0px"> |
||
96 | <div class="container-fluid"> |
||
97 | <div class="navbar-header"> |
||
98 | <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> |
||
99 | <span class="sr-only">Toggle navigation</span> |
||
100 | <span class="icon-bar"></span> |
||
101 | <span class="icon-bar"></span> |
||
102 | <span class="icon-bar"></span> |
||
103 | </button> |
||
104 | <a class="navbar-brand" href="#"> BACO v3</a> |
||
105 | </div> |
||
106 | <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> |
||
107 | <ul class="nav navbar-nav"> |
||
108 | <li <%=sep0%>><a <%=link0%>><span class="glyphicon glyphicon-globe"></span> <span class="glyphicon glyphicon-menu-left"></span> <bean:message key="intranet.separator.welcome.home"/></a></li> |
||
109 | <li <%=sep1%>><a <%=link1%>><span class="glyphicon glyphicon-home"></span> <bean:message key="intranet.separator.home"/></a></li> |
||
110 | <li <%=sep3%>><a <%=link3%>><span class="glyphicon glyphicon-user"></span> <bean:message key="intranet.separator.profile"/></a></li> |
||
111 | <baco:hasNotRole role="student,invited"> |
||
112 | <li <%=sep4%>><a <%=link4%>><span class="glyphicon glyphicon-wrench"></span> <bean:message key="intranet.separator.service.zone"/></a></li> |
||
113 | </baco:hasNotRole> |
||
114 | <li <%=sep5%>><a <%=link5%>><span class="glyphicon glyphicon-folder-open"></span> <bean:message key="intranet.separator.ionline"/></a></li> |
||
115 | <li <%=sep7%>><a <%=link7%>><span class="glyphicon glyphicon-list-alt"></span> <bean:message key="intranet.separator.contacts"/></a></li> |
||
116 | <li <%=sep6%>><a <%=link6%>><span class="glyphicon glyphicon-random"></span> <bean:message key="intranet.separator.utils"/></a></li> |
||
117 | <li <%=sep8%>><a <%=link8%>><span class="glyphicon glyphicon-random"></span> <bean:message key="intranet.separator.utils"/></a></li> |
||
118 | </ul> |
||
119 | |||
120 | |||
121 | <ul class="nav navbar-nav navbar-right"> |
||
122 | <baco:isAdmin> |
||
123 | <li> |
||
124 | <html:link action="/user/homePae"> |
||
125 | <span class="glyphicon glyphicon-log-out"></span> MODO PAE |
||
126 | </html:link> |
||
127 | </li> |
||
128 | </baco:isAdmin> |
||
129 | <li> |
||
130 | <html:link action="/Logout"> |
||
131 | <span class="glyphicon glyphicon-log-out"></span> <bean:message key="logout"/> |
||
132 | </html:link> |
||
133 | </li> |
||
134 | </ul> |
||
135 | </div> |
||
136 | |||
137 | </div> |
||
138 | </nav> |
||
139 | |||
140 | |||
141 | <%-- |
||
142 | <nav class="navbar navbar-default"> |
||
143 | <div class="container-fluid"> |
||
144 | <!-- Brand and toggle get grouped for better mobile display --> |
||
145 | <div class="navbar-header"> |
||
146 | <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> |
||
147 | <span class="sr-only">Toggle navigation</span> |
||
148 | <span class="icon-bar"></span> |
||
149 | <span class="icon-bar"></span> |
||
150 | <span class="icon-bar"></span> |
||
151 | </button> |
||
152 | <a class="navbar-brand" href="#">Brand</a> |
||
153 | </div> |
||
154 | |||
155 | <!-- Collect the nav links, forms, and other content for toggling --> |
||
156 | <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> |
||
157 | <ul class="nav navbar-nav"> |
||
158 | <li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li> |
||
159 | <li><a href="#">Link</a></li> |
||
160 | <li class="dropdown"> |
||
161 | <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a> |
||
162 | <ul class="dropdown-menu"> |
||
163 | <li><a href="#">Action</a></li> |
||
164 | <li><a href="#">Another action</a></li> |
||
165 | <li><a href="#">Something else here</a></li> |
||
166 | <li role="separator" class="divider"></li> |
||
167 | <li><a href="#">Separated link</a></li> |
||
168 | <li role="separator" class="divider"></li> |
||
169 | <li><a href="#">One more separated link</a></li> |
||
170 | </ul> |
||
171 | </li> |
||
172 | </ul> |
||
173 | <!-- |
||
174 | <form class="navbar-form navbar-left" role="search"> |
||
175 | <div class="form-group"> |
||
176 | <input type="text" class="form-control" placeholder="Search"> |
||
177 | </div> |
||
178 | <button type="submit" class="btn btn-default">Submit</button> |
||
179 | </form> |
||
180 | --> |
||
181 | <ul class="nav navbar-nav navbar-right"> |
||
182 | <li><a href="#">Link</a></li> |
||
183 | <li class="dropdown"> |
||
184 | <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a> |
||
185 | <ul class="dropdown-menu"> |
||
186 | <li><a href="#">Action</a></li> |
||
187 | <li><a href="#">Another action</a></li> |
||
188 | <li><a href="#">Something else here</a></li> |
||
189 | <li role="separator" class="divider"></li> |
||
190 | <li><a href="#">Separated link</a></li> |
||
191 | </ul> |
||
192 | </li> |
||
193 | </ul> |
||
194 | </div><!-- /.navbar-collapse --> |
||
195 | </div><!-- /.container-fluid --> |
||
196 | </nav>--%> |