<%@ page import="ro.emid.common.constants.RoleConstants" %>
<%
    if (user.getIeLevel() == RoleConstants.NIVEL_SUCURSALA) {
        filiala.setShowAsLink(false);
    } else if (user.getIeLevel() == RoleConstants.NIVEL_CENTRU) {
        filiala.setShowAsLink(false);
        sucursala.setShowAsLink(false);
    } else if (user.getIeLevel() == RoleConstants.NIVEL_FORMATIE) {
        filiala.setShowAsLink(false);
        sucursala.setShowAsLink(false);
        centruExploatare.setShowAsLink(false);
    }
%>
<span class="localizare">
<span class="bold">Eşti aici:</span>
<%if (filiala != null && filiala.getId() != -1) {
    if( filiala.isShowAsLink()){%>
        <a title="Lista sucursale <%=filiala.getName()%>" class="link" href="<%=AppConstants.APP_NAME%>?action=showSucursale"><%=filiala.getName()%></a>
    <%}else{%>
        <%=filiala.getName()%>
    <%}%>

<%}%>
<%if( sucursala != null && sucursala.getId() != -1){ %>
    <span class="slash">/</span>
    <%if( sucursala.isShowAsLink()){%>
        <a title="Lista C.E. <%=sucursala.getName()%>" class="link" href="<%=AppConstants.APP_NAME%>?action=showCentre"><%=sucursala.getName()%></a>
    <%}else{%>
        <%=sucursala.getName()%>
    <%}%>
<%}%>

<%if( centruExploatare != null && centruExploatare.getId() != -1){%>
    <span class="slash">/</span>
    <%if( centruExploatare.isShowAsLink()){%>
        <a title="Lista evenimente <%=centruExploatare.getName()%>" class="link" href="<%=AppConstants.APP_NAME%>?action=showEvenimente"><%=centruExploatare.getName()%></a>
    <%}else{%>
        <%=centruExploatare.getName()%>
    <%}%>
<%}%>

<%if( formatiaDeLucru != null && formatiaDeLucru.getId() != -1){%>
    <span class="slash">/</span>
    <%if( formatiaDeLucru.isShowAsLink()){%>
        <a title="Lista evenimente <%=formatiaDeLucru.getName()%>" class="link" href="<%=AppConstants.APP_NAME%>?action=showEvenimente"><%=formatiaDeLucru.getName()%></a>
    <%}else{%>
        <%=formatiaDeLucru.getName()%>
    <%}%>
<%}%>
</span>