Rev 1737 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1737 | Rev 1771 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
3 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
4 | <%@ page import="java.util.List" %> |
4 | <%@ page import="java.util.List" %> |
5 | <%@ page import="pt.estgp.estgweb.domain.UserSession" %> |
5 | <%@ page import="pt.estgp.estgweb.domain.UserSession" %> |
6 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
6 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
7 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
7 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
- | 8 | <%@ taglib prefix="baco" uri="/WEB-INF/tlds/baco.tld" %> |
|
8 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSessionImpl" scope="request"/> |
9 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSessionImpl" scope="request"/> |
9 | 10 | ||
- | 11 | <baco:isAuthenticated> |
|
10 | <% |
12 | <% |
11 | List<ConfigurationSeparatorImpl> configSeparators = |
13 | List<ConfigurationSeparatorImpl> configSeparators = |
12 | (List<ConfigurationSeparatorImpl>) request.getAttribute("configSeparators"); |
14 | (List<ConfigurationSeparatorImpl>) request.getAttribute("configSeparators"); |
13 | 15 | ||
14 | String separatorKey = request.getParameter("separatorKey"); |
16 | String separatorKey = request.getParameter("separatorKey"); |
15 | 17 | ||
16 | - | ||
17 | for(ConfigurationSeparatorImpl configSeparator: configSeparators) |
18 | if(configSeparators != null && UserSession.getUser() != null) |
18 | { |
19 | { |
19 | if(UserSession.getUser().hasRole(configSeparator.getAllowedRoles())) |
20 | for(ConfigurationSeparatorImpl configSeparator: configSeparators) |
20 | { |
21 | { |
- | 22 | if(UserSession.getUser().hasRole(configSeparator.getAllowedRoles())) |
|
- | 23 | { |
|
21 | String active = separatorKey != null && separatorKey.equals(configSeparator.getSeparatorKey()) ? |
24 | String active = separatorKey != null && separatorKey.equals(configSeparator.getSeparatorKey()) ? |
22 | "class=\"active\"" : ""; |
25 | "class=\"active\"" : ""; |
23 | 26 | ||
24 | %> |
27 | %> |
25 | <li <%=active%>> |
28 | <li <%=active%>> |
26 | <a href="<%=request.getContextPath()%>/user/configSeparatorsEescola.do?sepId=<%=configSeparator.getId()%>&separatorKey=<%=configSeparator.getSeparatorKey()%>"> |
29 | <a href="<%=request.getContextPath()%>/user/configSeparatorsEescola.do?sepId=<%=configSeparator.getId()%>&separatorKey=<%=configSeparator.getSeparatorKey()%>"> |
27 | <span class="glyphicon glyphicon-folder-open"></span> <%=configSeparator.getName()%> |
30 | <span class="glyphicon glyphicon-folder-open"></span> <%=configSeparator.getName()%> |
28 | </a> |
31 | </a> |
29 | </li> |
32 | </li> |
30 | <% |
33 | <% |
- | 34 | } |
|
31 | } |
35 | } |
32 | } |
36 | } |
33 | %> |
- | |
34 | 37 | %> |
|
- | 38 | </baco:isAuthenticated> |
|
- | 39 | ||
35 | Generated by GNU Enscript 1.6.5.2. |
40 | Generated by GNU Enscript 1.6.5.2. |