<%@ 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();
    String          samePage        =   WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION);

%>

<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:form name="jobApplication" method="post"    enctype="multipart/form-data">
        
    <div class="dashboard-content-area first-part">
        <oneit:dynInclude   page="/extensions/adminportal/inc/job_title_bar.jsp"   data="<%= CollectionUtils.EMPTY_MAP%>"/>
    </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 %>">
                        <oneit:button   value=" "   name="gotoPage" skin="link"
                                        requestAttribs="<%= CollectionUtils.mapEntry("nextPage", samePage )
                                                                        .mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jA).toMap())
                                                                        .toMap() %>">
                            <%= jA.getCandidate() %>
                            <span   class="<%= ratingClass %>">
                                <oneit:toString value="<%= jA.getOverallSuitability() %>"   mode="PercentageWholeNumber" />
                            </span>
                        </oneit:button>
                    </li>
                <%
                    }
                %>
            </ul>
        </div>
        
        <oneit:dynInclude   page="/extensions/adminportal/inc/view_application_tab_applicant.jsp"   data="<%= CollectionUtils.EMPTY_MAP %>"/>
    </div>
</oneit:form>

</oneit:dynIncluded>