<%@ 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");
    int     tabNumber       =   (int)  getData(request, "TabNumber");
    String  applicantsPage  =   WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICANTS);
//    String  secondTab       =   WebUtils.getSamePageInRenderMode(request, WebUtils.APPLICANTS_SHORTLIST);
//    String  thirdTab        =   WebUtils.getSamePageInRenderMode(request, WebUtils.UNSUITABLE_APPS);
    int     noOfIncomplete  =   job.getNoOfCandidatesFor(ApplicationStatus.DRAFT); 
    int     noOfUnsuitable  =   job.getNoOfCandidatesFor(ApplicationStatus.UNSUITABLE); 
%>
<oneit:dynIncluded>

    <oneit:dynInclude   page="/extensions/applicantportal/inc/multifieldtext.jsp"   data="<%= CollectionUtils.EMPTY_MAP%>"/>
    
    <div class="first-part">
        
        <oneit:dynInclude   page="/extensions/adminportal/inc/job_title_bar.jsp"   data="<%= CollectionUtils.EMPTY_MAP%>"/>
        
        <div class="int-timeline">
            <li class="<%= noOfIncomplete > 0 ? "has-applicant" : "no-applicant" %> <%= tabNumber == 1 ? "active" : "inactive" %>">
                <oneit:button   id="unsuitableBtn"   value=" "   name="gotoPage" skin="link" disabled="<%= noOfUnsuitable > 0 ? "false" : "false" %>"
                                requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
                                                                .mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("TabNumber", 1).toMap())
                                                                .toMap() %>">
                    <span>
                        <oneit:toString value="<%= noOfIncomplete %>"   mode="Integer" />
                    </span>
                    <%= job.getFirstWorkFlow().getName() %>
                </oneit:button>
            </li>
            <ul>
                <%
                    for (WorkFlow workflow : job.getSortedMiddleWorkFlows())
                    {
                        int noOfCandidates  =   job.getNoOfCandidatesFor(workflow.getApplicationStatus());
                %>
                        <li class="<%= noOfCandidates > 0 ? "has-applicant" : "" %> <%= (tabNumber == workflow.getSortOrder()) ? "active" : "inactive" %>">
                            <oneit:button   value=" "   name="gotoPage" skin="link"
                                            requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
                                                                            .mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("TabNumber", workflow.getSortOrder()).toMap())
                                                                            .toMap() %>">
                                <span>
                                    <oneit:toString value="<%= noOfCandidates %>"   mode="Integer" />
                                </span>
                                <%= workflow.getName() %>
                            </oneit:button>
                        </li>
                <%
                    }
                %>
            </ul>
        </div>      
        <div class="unsutable <%= noOfUnsuitable > 0 ? "has-applicant" : "no-applicant" %> <%= tabNumber == 9 ? "active" : "inactive" %>">
            <oneit:button   id="unsuitableBtn"   value=" "   name="gotoPage" skin="link" disabled="<%= noOfUnsuitable > 0 ? "false" : "false" %>"
                            requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicantsPage)
                                                            .mapEntry("procParams", CollectionUtils.mapEntry("Job", job).mapEntry("TabNumber", 9).toMap())
                                                            .toMap() %>">
                <span>
                    <oneit:toString value="<%= noOfUnsuitable %>"   mode="Integer" />
                </span>
                <%= job.getFirstWorkFlow().getName() %>
            </oneit:button>
        </div>      
    </div>
                            
</oneit:dynIncluded>

