<?php 
/********************************************************************************* 
 *  This file is part of Sentrifugo.
 *  Copyright (C) 2014 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>
 ********************************************************************************/
?>

<?php // Start :Condition to check whether organisation is created or not
    if($this->orgdata !='' && $this->orgdata == 'noorgdata'){?>
    <div class="ml-alert-1-info m1-info-set"><div class="style-1-icon info"></div>	
	Organization information is not added yet.
			
</div>

<?php 
}else
{
	?>
	
	
		<div class="new-form-ui-submit">
					<?php if($this->popup && $this->unitid) { ?>
					
					<?php } else {?>
					   <?php if($this->editpermission == 'Yes') { ?>
					<?php   
					$msgtitle = $this->controllername.'_delete';
							sapp_Helper::editdeleteForView(DEPARTMENTS,$this->controllername,$this->id,$msgtitle); ?>
						<!-- <input type="submit" onclick="changeeditscreen('<?php //echo $this->controllername;?>',<?php //echo $this->id;?>);" value="Edit" />
						 <button onclick="window.location.href='<?php //echo BASE_URL; ?>departments';" type="button" value="cancel">Cancel</button>-->
					   <?php }?>
					<?php } ?>						
				</div>
	
	 <?php
		 if($this->ermsg == 'nodata') { ?>
		<div class="ml-alert-1-info m1-info-set"><div class="style-1-icon info"></div>No data found.</div>
		<?php }else{ ?>
		<?php 
		$baseUrl = $this->serverUrl().$this->baseUrl();
		echo $this->form->id; ?>	
				<?php if($this->popup && $this->unitid) { $class2=' cancel-set'; } else $class2='';?>
<?php 
$startDate = $this->form->start_date->getValue();
sapp_Helper::viewHeader();
sapp_Helper::viewBody('nor','Department Name',(!empty($this->data['deptname']))?$this->data['deptname']:"...",'Business Unit',(!empty($this->data['unitid']))?$this->data['unitid']:"...");
sapp_Helper::viewBody('alt','Department code',(!empty($this->data['deptcode']))?$this->data['deptcode']:"...",'Department Head',(!empty($this->data['depthead']))?$this->data['depthead']:"...");
sapp_Helper::viewBody('nor','Started On',(!empty($startDate))?$this->form->start_date->getValue():"...",'Time Zone',(!empty($this->data['timezone']))?$this->data['timezone']:"...");
sapp_Helper::viewBody('alt','Country',(!empty($this->data['country']))?$this->data['country']:"...",'State',(!empty($this->data['state']))?$this->data['state']:"...");
sapp_Helper::viewBody('nor','City',(!empty($this->data['city']))?$this->data['city']:"...",'Street Address 1',(!empty($this->data['address1']))?$this->data['address1']:"...");
sapp_Helper::viewBody('alt','Street Address 2',(!empty($this->data['address2']))?$this->data['address2']:"...",'Street Address 3',(!empty($this->data['address3']))?$this->data['address3']:"...");
sapp_Helper::viewBody('nor','Description',(!empty($this->data['description']))?$this->data['description']:"...",'','');
sapp_Helper::viewFooter();
?>
<div class="new-form-ui-submit">
					<?php if($this->popup && $this->unitid) { ?>
					<input onclick="closeiframepopup('<?php echo $this->controllername; ?>','cancel');" type="button" value="Close" />
					<?php }?>
					   					
				</div>
	
				
		</div>
<?php } 
} // End :Condition to check whether organisation is created or not
?>