<%@ page extends="oneit.servlets.jsp.JSPInclude" %>

<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/inc/stdcms.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>

<%
    JobApplication  jobApplication      =   (JobApplication) process.getAttribute("JobApplication");
    String          pageNumber          =   (String)  getData(request, "PageNumber");
    String          firstPage           =   WebUtils.getSamePageInRenderMode(request, "SelectionCriteria");
    String          secondPage          =   WebUtils.getSamePageInRenderMode(request, "WorkplaceCulture");
    String          thirdPage           =   WebUtils.getSamePageInRenderMode(request, "JobMatchAssessment");
    boolean         includeAssessment   =   jobApplication.isIncludeAssessmentCriteria();
%>

<oneit:dynIncluded>

    <div class="main-tab-form">
        <ul class="nav nav-pills nav-justified">
        <%
            if(includeAssessment)
            {
        %>
                <li class="<%= pageNumber == "1" ? "active" : jobApplication.selectionCompleted() ? "complate" : ""%>">
                    <oneit:button   value=" "   name="gotoPage" skin="link"
                                    requestAttribs="<%= CollectionUtils.mapEntry("nextPage", firstPage)
                                                                    .mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
                                                                    .toMap() %>">
                        <span><%= jobApplication.selectionCompleted() ? "<img src=\"images/right-mark.png\" />" : "1"%></span>
                        <div class="mobile-hide">Requirements</div>
                    </oneit:button>
                </li>
        <%
            }
        %>
            <li class="<%= pageNumber == "2" ? "active" : jobApplication.cultureCompleted() ? "complate" : ""%>">
                <oneit:button   value=" "   name="gotoPage" skin="link"
                                requestAttribs="<%= CollectionUtils.mapEntry("nextPage", secondPage)
                                                                .mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
                                                                .toMap() %>">
                    <span><%= jobApplication.cultureCompleted() ? "<img src=\"images/right-mark.png\" />" : (includeAssessment ? "2" : "1")%></span>
                    <div class="mobile-hide">Culture</div>
                </oneit:button>
            </li>
            <li class="<%= pageNumber == "3" ? "active" :  jobApplication.assessmentCompleted() ? "complate" : ""%>">
                <oneit:button   value=" "   name="gotoPage" skin="link"
                                requestAttribs="<%= CollectionUtils.mapEntry("nextPage", thirdPage)
                                                                .mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
                                                                .toMap() %>">
                    <span><%= jobApplication.assessmentCompleted() ? "<img src=\"images/right-mark.png\" />" : (includeAssessment ? "3" : "2")%></span>
                    <div class="mobile-hide">Profile Assessment</div>
                </oneit:button>
            </li>
            <li><a href="#"><span><%= includeAssessment ? "4" : "3" %></span><div class="mobile-hide">Submit Application</div></a></li>
        </ul>
    </div>
</oneit:dynIncluded>
