
<%
	 /**
	 * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
	 *
	 * Permission is hereby granted, free of charge, to any person obtaining a copy
	 * of this software and associated documentation files (the "Software"), to deal
	 * in the Software without restriction, including without limitation the rights
	 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
	 * copies of the Software, and to permit persons to whom the Software is
	 * furnished to do so, subject to the following conditions:
	 *
	 * The above copyright notice and this permission notice shall be included in
	 * all copies or substantial portions of the Software.
	 *
	 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
	 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
	 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
	 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
	 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
	 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
	 * SOFTWARE.
	 */
%>
<!-- ********************** -->
<!-- beginning with top.jsp -->
<!-- ********************** -->

<!-- beginning layout-outer-side-decoration -->

<div id="layout-outer-side-decoration">
	<!-- beginning layout-inner-side-decoration -->
	<div id="layout-inner-side-decoration"> 
		<!-- beginning layout-box -->
		<div id="proveo_layout-box">
			<!-- beginning layout-top-banner -->
			<div id="proveo_layout-top-banner">
				<img src="/html/themes/silver/images/base_layout/proveo_logo.gif" alt="" title="" style="position:absolute"/>
				<img src="/html/themes/silver/images/base_layout/efm_lite.png" alt="" title="" style="position: absolute; left: 50px;"/>
					
					<c:if test="<%= themeDisplay.isSignedIn() %>">
					
					 
					<ul id="SettingNavTop">
					<%
					Layout prefLayout = LiferayPortalUtil.getPreferencesLayout();
					String prefTabHREF = PortalUtil.getLayoutURL(prefLayout,themeDisplay);
					String prefTarget = PortalUtil.getLayoutTarget(prefLayout);
					%>
					<li><%=LiferayPortalUtil.createLoggedInUserInfo(user)%></span>&nbsp;|&nbsp;</li>
                        <% if (request.isUserInRole("section.preferences")) { %>
						  <li><a href="<%= prefTabHREF %>" <%= prefTarget %>><%= LanguageUtil.get(pageContext, "preferences") %></a>&nbsp;|&nbsp;</li>
                        <% } %>
						<%if(plid.startsWith("PRI."))
							{
						%>
						<li><a id="addPortletsButton" href="#" onclick="<%= themeDisplay.getURLAddContent() %>; return false;"><%= LanguageUtil.get(pageContext, "addContent") %></a>&nbsp;|&nbsp;</li>
						<li><a href="#" onclick="showLayoutTemplates(); return false;"><%= LanguageUtil.get(pageContext, "pageLayout") %></a>&nbsp;|&nbsp;</li>
						<%}
						%>
						<li><a href="javascript:window.location='<%= themeDisplay.getURLSignOut() %>'"><%= LanguageUtil.get(pageContext, "singOut") %></a></li>
					</ul>
					
					<ul id="proveo_mainNav">
						<%
							List publicLayouts = LiferayPortalUtil.getRtsCommunity(user);
								
								//System.out.println("PublicLayouts size: " + publicLayouts.size());
						
								if (publicLayouts != null) {
									for (int i = 0; i < publicLayouts.size(); i++) {
										Layout curLayout = (Layout) publicLayouts.get(i);
										
										String tabName = curLayout.getName(locale);
										
										//System.out.println("Required role: " + tabName);
										//System.out.println(request.isUserInRole(tabName));
										
										if(request.isUserInRole(tabName) && !tabName.equals("section.preferences"))
										{
											String tabHREF = PortalUtil.getLayoutURL(curLayout,themeDisplay);
											String target = PortalUtil.getLayoutTarget(curLayout);
										
						%>
							<li><a href="<%= tabHREF %>" <%= target %>><bean:message key="<%=tabName%>"/></a></li>
						<%
									}
								}
							}
						%>
					</ul>
					
					</c:if>

<!-- ********************** -->
<!--   ending with top.jsp  -->
<!-- ********************** -->