<%@ 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" %>
<%@page import="oneit.utils.text.FormatUtils"%>

<oneit:dynIncluded>
<%
    JobApplication  jobApplication  =   (JobApplication) process.getAttribute("JobApplication");

    Debug.assertion(jobApplication != null, "JobApplication is null in admin portal view applicants");
    
    Job             job             =    jobApplication.getJob();
%>

<script type="text/javascript">
    $(document).ready(function(){
        $('.percent-green').percentageLoader({
            valElement: 'p',
            strokeWidth: 20,
            bgColor: '#e5e8eb',
            ringColor: '#67b413',
            textColor: '#67b413',
            fontSize: '30px',
            fontWeight: 'normal'
        });
        $('.percent-blue').percentageLoader({
            valElement: 'p',
            strokeWidth: 20,
            bgColor: '#e5e8eb',
            ringColor: '#03a0e7',
            textColor: '#03a0e7',
            fontSize: '30px',
            fontWeight: 'normal'
        });
  });
</script>

<oneit:script>
    <oneit:script src="/scripts/raphael-min.js"/>
    <oneit:script src="/scripts/select2.min.js"/>
</oneit:script>

<oneit:form name="jobApplication" method="post"    enctype="multipart/form-data">
        
    <div class="dashboard-content-area first-part">
        <div class="officer-box">
            <div class="officer-name">
                <div class="chief-officer"><img src="images/post-p.png" /><oneit:toString   value="<%= job.getJobTitle() %>"    mode="EscapeHTML"/></div>
                <div class="off-name"><span class="austr-post">Australia Post</span> by Dan Moore <span class="ex-management">?  Executive Management</span></div>
            </div>
            <div class="applicant-right-status">
                <span class="light-calendar"><oneit:toString    value="<%= job.getClosingInText() %>"   mode="EscapeHTML"/></span>
                <span class="job-status-appli">
                    <span class="<%= job.getJobStatus()==JobStatus.OPEN ? "active-status-icon" : "complete-status-icon" %>"></span>
                    <oneit:toString  value="<%= job.getJobStatusText() %>"    mode="EscapeHTML"/>
                </span>
                <span class="edit-btn-dropdown"><a href="#">edit <img src="images/edit-dropdown-arrow.png" /></a></span>
            </div>
        </div>
    </div>
    <div class="dashboard-content-area second-part v-applicant-area">
        <div class="applicant-sidebar">
            <ul>
                <%
                    for(JobApplication  jA: job.getJobApplicationsSet())
                    {
                        String  activeClass =   CollectionUtils.equals(jA, jobApplication) ? "active" : "";
                        String  ratingClass =   "green"; //TODO:  green, blue, gray
                %>
                 
                    <li class="<%= activeClass %>">
                        <a href="#">
                            <%= jA.getCandidate().getToString() %>
                            <span   class="<%= ratingClass %>"><oneit:toString value="<%= jA.getOverallSuitability() %>"   mode="PercentageWholeNumber" /></span>
                        </a>
                    </li>
                <%
                    }
                %>
            </ul>
        </div>
        
        <oneit:dynInclude   pages="/extensions/adminportal/inc/view_application_tab_applicant.jsp"  page="ignore"   data="<%= CollectionUtils.EMPTY_MAP %>"/>
    </div>
</oneit:form>

</oneit:dynIncluded>