<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@include file="/WEB-INF/includeTemplate.inc"%>
<%@page import="com.ejie.ab39a.constantes.Constantes"%>
<%@page import="com.ejie.ab39a.seguridad.UsuarioConectado"%>
<%@page import="com.ejie.ab39a.seguridad.UtilSeguridad"%>
<%@page import="org.springframework.context.i18n.LocaleContextHolder"%>
<%@page import="java.util.Locale"%>

 <!--  URL base -->
 <c:set var="urlBase" value='<%=request.getContextPath()%>'/>
 
 <%UsuarioConectado usuarioConectado = UtilSeguridad.getUsuarioConectado();
 Locale locale = LocaleContextHolder.getLocaleContext().getLocale();%>
 
<nav class="rup-navbar navbar">
  <button type="button" class="navbar-toggler hidden-lg-up"  type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"></button>
  <div id="navbarResponsive" class="collapse navbar-toggleable-md">
    <a class="navbar-brand" href="${urlBase}">
    	<spring:message code="inicio" />
    </a>
    <ul class="nav navbar-nav">
    <%if(usuarioConectado.isRellenarDatosIncompletos()){ 
    //if(false){	//provisional%>
       <li class="nav-item dropdown">
        <!-- <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Componentes <span class="caret"></span></a> -->
        <a class="nav-link dropdown-toggle" href="#" id="responsiveNavbarDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
        	<spring:message code="administracion" />
        </a>
        <div class="dropdown-menu" aria-labelledby="responsiveNavbarDropdown">
            <a class="dropdown-item" href="${urlBase}/entidades/maint">
            	<spring:message code="administracion.institucion" />
           	</a>
        </div>
       </li>
    <%}else{ %>
	    <%if(usuarioConectado.isTecnicoHps()){ %>
	     <li class="nav-item dropdown">
	        <!-- <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Componentes <span class="caret"></span></a> -->
	        <a class="nav-link dropdown-toggle" href="#" id="responsiveNavbarDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
	        	<spring:message code="administracion" />
	        </a>
	        <div class="dropdown-menu" aria-labelledby="responsiveNavbarDropdown">
	            <a class="dropdown-item" href="${urlBase}/tecnicosentidad/maint">
	            	<spring:message code="administracion.usuarios" />
	           	</a>
	            <a class="dropdown-item" href="${urlBase}/entidades/maint">
	            	<spring:message code="administracion.institucion" />
	           	</a>
	           	<a class="dropdown-item" href="${urlBase}/planificacion/maint">
	            	<spring:message code="administracion.plangintzaldiak" />
	           	</a>
	        </div>
	     </li>
	     <%} %>
	     
	     <li class="nav-item">
				 <div  aria-labelledby="responsiveNavbarDropdown">
			        <a class="nav-link" href="${urlBase}/planesestrategicos/maint"  aria-haspopup="true" aria-expanded="false">
			        	<spring:message code="planEstrategico" />
			        </a>
			      </div>
		 </li>
	     <li class="nav-item">
				 <div  aria-labelledby="responsiveNavbarDropdown">
			        <a class="nav-link" href="${urlBase}/planesgestion/maint"  aria-haspopup="true" aria-expanded="false">
			        	<spring:message code="kudeaketaPlanak" />
			        </a>
			      </div>
		 </li>
    <%} %>
    </ul>
    <ul class="nav navbar-nav float-md-right rup-nav-tools">
      <li class="nav-item">
        <a class="nav-link rup-nav-tool-icon" href="#" id="ab39aEuskPlanakWar_language" data-toggle="dropdown"><i class="fa fa-globe" aria-hidden="true"></i><span data-rup-lang-current=""></span></a>
			<div class="dropdown-menu" aria-labelledby="ab39aEuskPlanakWar_language">
        </div>
      </li>
      <li class="nav-item">
      	 <%if(usuarioConectado.isTecnicoHps()){
      	 	if(locale.getLanguage().equalsIgnoreCase(Constantes.ES)){ %>
		     	<a class="nav-link" target="_blank" title='<spring:message code="menu.manualUsuario" />' href="${staticsUrl}/ab39a/manuales/AB39A-MAU_TecnicoHPS.pdf">
					<spring:message code="menu.manualUsuario" />
				</a>
			<%}else{ %>
				<a class="nav-link" target="_blank" title='<spring:message code="menu.manualUsuario" />' href="${staticsUrl}/ab39a/manuales/AB39A-MAU_TecnicoHPS_EU.pdf">
					<spring:message code="menu.manualUsuario" />
				</a>
			<%}
		}else{
			if(locale.getLanguage().equalsIgnoreCase(Constantes.ES)){ %>
		     	<a class="nav-link" target="_blank" title='<spring:message code="menu.manualUsuario" />' href="${staticsUrl}/ab39a/manuales/AB39A-MAU_TecnicoEntidad.pdf">
					<spring:message code="menu.manualUsuario" />
				</a>
			<%}else{ %>
				<a class="nav-link" target="_blank" title='<spring:message code="menu.manualUsuario" />' href="${staticsUrl}/ab39a/manuales/AB39A-MAU_TecnicoEntidad_EU.pdf">
					<spring:message code="menu.manualUsuario" />
				</a>
			<%}
		} %>
      </li>
      <!--<li class="nav-item">
        <a class="nav-link rup-nav-tool-icon" href="#"><i class="fa fa-cog " aria-hidden="true"></i></a>
      </li>
      <li class="nav-item">
        <a class="nav-link rup-nav-user rup-nav-tool-icon" href="#"><i class="fa fa-user-circle-o " aria-hidden="true"></i></a>
      </li>
      <li class="nav-item scrollTop">
        <a class="nav-link rup-nav-user rup-nav-tool-icon" href="#"><i class="fa fa-arrow-circle-up " aria-hidden="true"></i></a>
      </li>-->
    </ul>
  </div>
</nav>

<div id="overlay"></div>