<?php 
/********************************************************************************* 
 *  This file is part of Sentrifugo.
 *  Copyright (C) 2015 Sapplica
 *   
 *  Sentrifugo is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Sentrifugo is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Sentrifugo.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  Sentrifugo Support <support@sentrifugo.com>
 ********************************************************************************/

if($this->ermsg == '')  
{
	/* Start Performance Header Conditions */
	if(isset($this->data['id']) && $this->data['id']!='')
	{
		$appraisalid = $this->data['id'];
	    $step1status = 'Completed';
	}    
	else
	{
		$step1status = 'In Progress';
		$appraisalid = '';
	}
	if(isset($this->data['manager_level_type']) && $this->data['manager_level_type']!='')	
		$step2status = 'Completed';
	else
		$step2status = 'In Progress';	    
	if(isset($this->data['initialize_status']) && $this->data['initialize_status'] == 1) 
		$step3status = 'Completed';
	else
		$step3status = 'In Progress';
	$currentpage = 'initstep_1';	
	$context = 'view';
	$ratingsflag = $this->ratingsflag;		
	$perf_array = array('appraisalid'=>$appraisalid,'step1status'=>$step1status,'step2status'=>$step2status,'step3status'=>$step3status,'currentpage'=>$currentpage,'context'=>$context,'ratingsflag'=>$ratingsflag);
	$this->performancesteps($perf_array);
	/*End Performance Steps */
	
    $init_id = $this->init_id;
    $counter = 0;
 ?>
    <div class="requisitions-block_ appri_view_step_1">
        <div class="total-form-controller cancel-set data-view-details" style="padding-top: 0px;">
            
			<div class="cofig_title" style="margin-left: 0px; padding-top: 0px;">Appraisal Details
				<div class="new-form-ui-submit "  style="margin-top: 0px; float: right; width: auto;">
					<!--<div class="back-to-page" style="position: relative; float: right; top: 0px;">
						<input type="button" onclick="window.location.href='<?php //echo BASE_URL; ?>appraisalinit';" name="Back" value="Back" style="margin-right: 0px;">
					</div>-->
					<?php
					if($this->data['status']=='Open')
					{
						if($this->previ_data == 'Yes')
						{
						?>
						 <?php 
						$msgtitle = $this->controllername.'_delete';
						sapp_Helper::editdeleteForView(APPRAISAL_MANAGER,$this->controllername,$this->id,$msgtitle); 
						?>
							<!--<input type="button" class="fltright" onclick="changeeditscreen('<?php //echo $this->controllername;?>',<?php //echo $this->id;?>);" value="Edit" />  --> 
						<?php 
						}
					}
					?>						
	            </div></div>
	            <?php 
sapp_Helper::viewHeader();
sapp_Helper::viewBody('alt','Business Unit ',(!empty($this->data['unitname']))?$this->data['unitname']:"...",'Department',(!empty($this->data['deptname']))?$this->data['deptname']:"...");
sapp_Helper::viewBody('nor','Appraisal Mode',(!empty($this->data['appraisal_mode']))?$this->data['appraisal_mode']:"...",'From Year',(!empty($this->data['from_year']))?$this->data['from_year']:"...");
sapp_Helper::viewBody('alt','To Year ',(!empty($this->data['to_year']))?$this->data['to_year']:"...",'Period ',(!empty($this->data['appraisal_period']))?$this->data['appraisal_period']:"...");
sapp_Helper::viewBody('nor','Eligibility ',(!empty($this->data['eligibility_names']))?$this->data['eligibility_names']:"...",'Parameters',(!empty($this->data['category_names']))?$this->data['category_names']:"..."); 
sapp_Helper::viewBody('alt','Appraisal Status',(!empty($this->data['status']))?$this->data['status']:"...",'Process Status ',(!empty($this->data['process_status']))?$this->data['process_status']:"...");
sapp_Helper::viewBody('nor','Managers Due Date',(!empty($this->data['managers_due_date']))?$this->data['managers_due_date']:"...",'Employees Due Date',(!empty($this->data['employees_due_date']))?$this->data['employees_due_date']:"...");
sapp_Helper::viewBody('alt','Appraisal Ratings ',(!empty($this->data['appraisal_ratings']))?$this->data['appraisal_ratings']:"...",'','');
sapp_Helper::viewFooter();
?>
			
        </div>
    </div>

<?php }
else
{
?>
<div class="ml-alert-1-info m1-info-set-2">
    <div class="style-1-icon info"></div>
       No data found.
</div>
<?php     
}
?>

</div><!-- end of steps -->