<%@ 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>
<%
    String  nextPage    =   WebUtils.getSamePageInRenderMode(request, "SignIn");
    Job     job         =   (Job) process.getAttribute("Job");
    String  id          =   request.getParameter("id");
    String  key         =   request.getParameter("key");
    
    if(id != null && key != null)
    {
        job = Job.searchJobKey(transaction, Long.parseLong(id), key);
    }
    
    if(job != null)
    {
%>
        <div class="main-position-overview">
            <div class="aust-logo"><img src="images/australia-post.png"></div>
            <div class="overview-title"><oneit:toString value="<%= job.getJobTitle() %>"    mode="EscapeHTML"/></div>
            <div class="ref-number">Ref: 002341</div>
            
            <table class="table table-responsive pos-table">
                <tbody>
                    <tr>
                        <td class="pos-tabel-td">Level: </td>        
                        <td class="pos-tabel-second"><oneit:toString value="<%= job.getLevel() %>"  mode="EscapeHTML"   nullValue="-"/></td>
                    </tr>
                    <tr>
                        <td class="pos-tabel-td">Location:</td>
                        <td class="pos-tabel-second">Perth, Western Australia</td>
                    </tr>
                    <tr>
                        <td class="pos-tabel-td">Type:</td>
                        <td class="pos-tabel-second"><oneit:toString    value="<%= job.getAssessmentType() %>"  mode="EscapeHTML"   nullValue="-"/></td>
                    </tr>
                    <tr>
                        <td class="pos-tabel-td">Apply by:</td>
                        <td class="pos-tabel-second"><oneit:toString    value="<%= job.getApplyBy() %>"         mode="MidDate"      nullValue="-"/></td>
                    </tr>
                </tbody>
            </table>

            <div class="job-detail-title">
              Job Details
            </div>

            <p class="pos-content">
                <oneit:toString value="<%= job.getJobDescription() %>"  mode="ParagraphHTML"    nullValue="-"/>
            </p>
            
            <oneit:form name="applyJob" method="post" enctype="multipart/form-data">
                <div class="apply-job-btn">
                    <oneit:button   value="Apply Now"   name="gotoPage" skin="link" 
                                    requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
                                                                    .mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
                                                                    .toMap() %>"/>
                </div>
            </oneit:form>
        </div>
<%
    }
    else
    {
%>
        <div class="main-position-overview">
            <p class="overview-title" align="center">Job is either deleted, or has expired.</p>
        </div>
<%
    }
%>
</oneit:dynIncluded>
