<%@ include file="inc/dynamic_content_core_top.jsp"  %>
<%@ page extends="oneit.servlets.jsp.FormJSP" %>

<%@ include file="/inc/stdimports50.jsp" %>
<%@ include file="/extensions/jobportal/inc/stdimports.jsp" %>

<%
    ORMProcessState     process             = (ORMProcessState)(ProcessDecorator.getDefaultProcess(request));
    ObjectTransaction   objTran             = (process == null ? ObjectTransaction.getTransaction () : process.getTransaction ());
    Article             clientArticle       = PerformaArticleUtil.getArticleByShortCut(objTran, PerformaArticleUtil.CLIENT_PORTAL);
    Article             jobArticle          = PerformaArticleUtil.getArticleByShortCut(objTran, PerformaArticleUtil.JOB_PORTAL);
    SecUser             loggedInUser        = SecUser.getTXUser(objTran);
    OAuthUserExtension  userEx              = (loggedInUser != null ? loggedInUser.getExtension(OAuthUserExtension.REFERENCE_OAuthUserExtension) : null);
    String              portalName          = PerformaArticleUtil.getPortalName(objTran, article, clientArticle, jobArticle);
%>

<%@ include file="setuprequest.jsp" %>

<%
    if(CollectionUtils.equals(portalName, PerformaArticleUtil.JOB_PORTAL))
    {
%>
        <%@ include file="extensions/jobportal/inc/htmlheader.jsp" %>
        <%@ include file="extensions/jobportal/inc/menuinclude.jsp" %>
<%
    }
    else
    {
%>
        <%@ include file="inc/htmlheader.jsp" %>
        <%@ include file="inc/menuinclude.jsp" %>
<%
    }

    String renderMode = CMSArticleTagDecorator.getRenderMode (request, "Page");

    Map m = CollectionUtils.mapEntry(NavigationBarDF.NAV_BAR, navbar.getChildNavBarFor (article))
                           .mapEntry("StartLevel", new Integer (0))
                           .mapEntry("EndLevel", new Integer (0))
                           .mapEntry("RenderMode", renderMode).toMap();
%>
    <oneit:dynInclude page="descendPageContent.jsp" data="<%= m %>"/> 
<%
    if(CollectionUtils.equals(portalName, PerformaArticleUtil.CLIENT_PORTAL))
    {
        
    }
    else if(CollectionUtils.equals(portalName, PerformaArticleUtil.JOB_PORTAL))
    {
        %><%@ include file="extensions/jobportal/inc/htmlfooter.jsp" %><%
    }
    else
    {
        %><%@ include file="inc/htmlfooter.jsp" %><%
    }
%>
