<%@ 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" %>
 
<oneit:dynIncluded>
<%
    //TODO: filter with Client;
    ObjectTransaction   objTran     =   process.getTransaction ();
    Job[]               jobs        =   Job.SearchByAll().andJobStatus(new EqualsFilter<>(JobStatus.OPEN)).search(transaction);
    Article             jobsArticle =   WebUtils.getArticleByShortCut(objTran, WebUtils.JOBS);
    String              nextPage    =   jobsArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.VIEW_APPLICANTS).toMap());
    String              homePage    =   WebUtils.getSamePageInRenderMode(request, "Page");

%>
    <oneit:form name="editJob" method="post"    enctype="multipart/form-data">
        <div class="dashboard-content-area first-part">
            <div class="welcome-box">
                <div class="dashboard-welcome">
                    <div class="welcome-text"> Welcome <br/> back Maria! </div>
                    <a class="d-create-job-btn" href="<%= WebUtils.getArticleLink(request, objTran, WebUtils.CREATE_JOB, "Page") %>">Create New Job</a>
                </div>
                <div class="col-sm-3 col-xs-12 d-three-box green-light">
                    <div class="d-fl-left eq-height">
                        <div class="dash-count c-green"><oneit:toString value="<%= jobs.length %>"  mode="EscapeHTML"   nullValue="0"/></div>
                        <div class="d-box-title">Open Jobs</div>
                        <a href="#" class="arrow-btn">2 closing soon </a>
                    </div>
                </div>
                <div class="col-sm-3 col-xs-12 d-three-box gray-light">
                    <div class="d-fl-left eq-height">
                        <div class="dash-count c-gray">2</div>
                        <div class="d-box-title">Jobs complete</div>
                        <a href="#" class="arrow-btn">Review applicants</a>
                    </div>
                </div>
                <div class="col-sm-3 col-xs-12 d-three-box blue-light">
                    <div class="d-fl-left eq-height">
                        <div class="dash-count c-blue">2</div>
                        <div class="d-box-title">Applicants</div>
                        <div class="ending-time-states">Week ending May 12, 2017</div>
                        <div class="week-states">13 last week <span>(+5)</span></div>
                    </div>
                </div>        
            </div>
        </div>
        <div class="dashboard-content-area second-part">
            <div class="d-job-title">Active Jobs</div>
            
            <oneit:dynInclude   page="/extensions/adminportal/inc/job_list.jsp"   data="<%= CollectionUtils.EMPTY_MAP%>"
                                NextPage="<%= nextPage%>"    HomePage="<%= homePage%>"    Jobs="<%= jobs %>"/>
        </div> 
    </oneit:form>
</oneit:dynIncluded>