PageRenderTime 23ms CodeModel.GetById 16ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/src/main/webapp/WEB-INF/includes/navigation.jsp

http://thoughtsite.googlecode.com/
JavaServer Pages | 58 lines | 55 code | 2 blank | 1 comment | 2 complexity | fe00ea5cbdd5b54677b3601ce627d753 MD5 | raw file
 1<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
 2<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
 3<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
 4  <decorator:usePage id="thePage" />
 5  <% 
 6    // TODO: Sachneet "Change to JSTL tags"
 7    String pageName = thePage.getProperty("meta.currentPage");
 8    if(null != pageName) {
 9  %>
10  
11    <div id="top-menu"> 
12      <div class="ie-top-menu-main"><decorator:getProperty property='meta.menu' />
13        <div><a class="<%if (pageName.equals("home")) {%>ie-menu-items-selected<% } else {%>ie-menu-items<%} %>" href="/">Home</a></div>
14        <div><a class="<%if (pageName.equals("idea")) {%>ie-menu-items-selected<% } else {%>ie-menu-items<%} %>" href="/ideas/list">Idea</a></div>
15        <div><a class="<%if (pageName.equals("save")) {%>ie-menu-items-selected<% } else {%>ie-menu-items<%} %>" href="/ideas/showForm">Submit My Idea</a></div>
16        <div><a class="<%if (pageName.equals("tag")) {%>ie-menu-items-selected<% } else {%>ie-menu-items<%} %>" href="/tags/list">Tags</a></div>
17        <div><a class="<%if (pageName.equals("project")) {%>ie-menu-items-selected<% } else {%>ie-menu-items<%} %>" href="/projects/list">Projects</a></div>
18        <div id='userProfile' style='display:none'><a class="<%if (pageName.equals("user")) {%>ie-menu-items-selected<% } else {%>ie-menu-items<%} %>" href="/users/ideas">User Profile</a></div>
19        <%if (pageName.equals("search")) {%>
20        <div class="ie-menu-items-selected">Search Result</div>
21        <% } %>
22        <div id='admin' <c:if test="${'admin' != user.roleName}">style='display:none'</c:if>><a class="<%if (pageName.equals("admin")) {%>ie-menu-items-selected<% } else {%>ie-menu-items<%} %>" href="/admin/action">Admin</a></div>
23      </div> 
24      
25      <%if (pageName.equals("user")) {%>
26        <div id="tab-menu">
27          <ul>
28            <li><a href="#user-profile"> My Profile</a></li>
29            <li><a href="#user-ideas"> My Ideas</a></li>
30            <li><a href="#user-projects"> My Projects</a></li>
31          </ul>
32        </div>
33      <% } %>
34      <%if (pageName.equals("search")) {%>
35        <div id="tab-menu">
36          <ul>
37            <li><a href="#search-ideas">Ideas</a></li>
38            <li><a href="#search-projects">Projects</a></li>
39          </ul>
40        </div>
41      <% } %>
42          <%if (pageName.equals("admin")) {%>
43      <div id="ie-adm-tab-menu">
44        <div style="width:20px; height: 10px; float:left; background-color:#fff; background-image:url(<%=request.getContextPath()%>/images/tab-bg.gif)" > &nbsp;</div> 
45        <div class="ie-adm-tabmenu-spacer"> &nbsp;</div>
46        <div class="ie-adm-tabmenu-items-selected"> Action Items</div> 
47        <div class="ie-adm-tabmenu-spacer"> &nbsp;</div> 
48        <div><a class="ie-adm-tabmenu-items" href="<%=request.getContextPath()%>/ideas/list"> Ideas</a></div>
49        <div class="ie-adm-tabmenu-spacer"> &nbsp;</div>
50        <div><a class="ie-adm-tabmenu-items" href="<%=request.getContextPath()%>/users/list"> Users</a></div>  
51        <div class="ie-adm-tabmenu-spacer"> &nbsp; </div>
52        <div><a class="ie-adm-tabmenu-items" href="<%=request.getContextPath()%>/projects/list"> Projects</a></div> 
53        <div class="ie-adm-tabmenu-spacer"> &nbsp; </div>
54        <div class="ie-adm-tabmenu-items"> Add Custom Gadget</div> 
55      </div>
56      <% } %>
57    <% } %>
58    </div>