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

<oneit:dynIncluded>

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