<%@ 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" %>

<%
    Job     job             =   (Job) process.getAttribute("Job");
    String  pageNumber      =   (String)  getData(request, "PageNumber");
    String  firstPage       =   WebUtils.getSamePageInRenderMode(request, WebUtils.CREATE_JOB);
    String  secondPage      =   WebUtils.getSamePageInRenderMode(request, WebUtils.JOB_MATCH);
    String  thirdPage       =   WebUtils.getSamePageInRenderMode(request, WebUtils.WORKPLACE_CULTURE);
    String  fourthPage      =   WebUtils.getSamePageInRenderMode(request, WebUtils.ASSESSMENT_CRITERIA);
    String  fifthPage       =   WebUtils.getSamePageInRenderMode(request, WebUtils.JOB_REVIEW);
    boolean savedJob        =   job.getStatus() != ObjectStatus.NEW;
    boolean fromJobMatch    =   pageNumber == "2";
%>

<oneit:dynIncluded>

    <div class="main-tab-form job-main-tabs">
        <ul class="nav nav-pills nav-justified">
            <li class="<%= pageNumber == "1" ? "active" : CollectionUtils.equals(job.getCompletedDetails(), Boolean.TRUE) || savedJob ? "complate" : ""%>">
                <oneit:button   value=" "   name="processCulture" skin="link"
                                requestAttribs="<%= CollectionUtils.mapEntry("nextPage", firstPage)
                                                                .mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
                                                                .mapEntry("fromJobMatch", fromJobMatch)
                                                                .toMap() %>">
                    <span><%= CollectionUtils.equals(job.getCompletedDetails(), Boolean.TRUE) || savedJob ? "<img src=\"images/right-mark.png\" />" : "1"%></span>
                    Job Detail
                </oneit:button>
            </li>
            <li class="<%= pageNumber == "2" ? "active" :  CollectionUtils.equals(job.getCompletedAssessmentType(), Boolean.TRUE) || savedJob ? "complate" : ""%>">
                <oneit:button   value=" "   name="processCulture" skin="link"
                                requestAttribs="<%= CollectionUtils.mapEntry("nextPage", secondPage)
                                                                .mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
                                                                .mapEntry("fromJobMatch", fromJobMatch)
                                                                .toMap() %>">
                    <span><%= CollectionUtils.equals(job.getCompletedAssessmentType(), Boolean.TRUE) || savedJob ? "<img src=\"images/right-mark.png\" />" : "2"%></span>
                    Role
                </oneit:button>
            </li>
            <li class="<%= pageNumber == "3" ? "active" :  CollectionUtils.equals(job.getCompletedCulture(), Boolean.TRUE) || savedJob ? "complate" : ""%>">
                <oneit:button   value=" "   name="processCulture" skin="link"
                                requestAttribs="<%= CollectionUtils.mapEntry("nextPage", thirdPage)
                                                                .mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
                                                                .mapEntry("fromJobMatch", fromJobMatch)
                                                                .toMap() %>">
                    <span><%= CollectionUtils.equals(job.getCompletedCulture(), Boolean.TRUE) || savedJob ? "<img src=\"images/right-mark.png\" />" : "3"%></span>
                    Culture
                </oneit:button>
            </li>
            <li class="<%= pageNumber == "4" ? "active" : CollectionUtils.equals(job.getCompletedRequirements(), Boolean.TRUE) || savedJob ? "complate" : ""%>">
                <oneit:button   value=" "   name="processCulture" skin="link"
                                requestAttribs="<%= CollectionUtils.mapEntry("nextPage", fourthPage)
                                                                .mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
                                                                .mapEntry("fromJobMatch", fromJobMatch)
                                                                .toMap() %>">
                    <span><%= CollectionUtils.equals(job.getCompletedRequirements(), Boolean.TRUE) || savedJob ? "<img src=\"images/right-mark.png\" />" : "4"%></span>
                    Requirements
                </oneit:button>
            </li>
            <li class="<%= pageNumber == "5" ? "active" : ""%>">
                <oneit:button   value=" "   name="processCulture" skin="link"
                                requestAttribs="<%= CollectionUtils.mapEntry("nextPage", fifthPage)
                                                                .mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
                                                                .mapEntry("fromJobMatch", fromJobMatch)
                                                                .toMap() %>">
                    <span>5</span>
                    Review
                </oneit:button>
            </li>
        </ul>
    </div>
</oneit:dynIncluded>
