<?php

 Yii::app()->setLanguage(isset(Yii::app()->session['lang']) ? Yii::app()->session['lang'] : 'ar'); 
 $lang=Yii::app()->getLanguage();
 

?>

<?php
$person=Person::model()->findByAttributes(
    array('type'=>0),
    array(
    'order' => 'id desc',
    'limit' => 1,));

?>
<div class="month-employee">
	<div class="employee-img-card col-xs-5">
		<div class="row">
			<img class="employee-img img-responsive" src="<?php echo $person->image==null?Yii::app()->request->baseUrl.'/images/avatar.jpg':Yii::app()->request->baseUrl.'/uploads/Person/'.$person->image ?>" alt="employeeImg">
		</div>
	</div>

	<div class="employee-card col-xs-7">

		<div class="employee-main-info">
			<h2 class="head-text">
				<?php //echo Yii::t('employee','employee_of_the_month');?>
				<?php echo ($lang=='en'?'Employee of the month':'موظف الشهر')?>

			</h2>
			<h3 class="main-text">
				<?php echo($lang=='ar'?'الاسم':'Name') ?>:
				<?php echo($lang=='en'?$person->name_en:$person->name_ar)?><br>
				<?php echo($lang=='ar'?'المسمى الوظيفي':'Position')  ?>:
				<?php echo ($lang=='en'?$person->job_title_en:$person->job_title_ar)?><br>
			</h3><br>


		</div>
		<div class="employee-description">
			<div class="employee-description-text">
				<h2 class="h2-description-text">
					<?php echo($lang=='en'?$person->name_en:$person->name_ar)?>
					<span id="monthly-employee-back" class="glyphicon <?= ($lang=='en'? "glyphicon-chevron-right" : "glyphicon-chevron-left") ?>"></span>
				</h2>


				<?php  echo ($lang=='ar'?$person->description_ar:$person->description_en); ?>
			</div>
		</div>

	</div>
	<div class="readmore-employee">
		<button class="read-more">
			<?php echo ($lang=='en'?'Read more':'اقرأ المزيد')?>
		</button>

	</div>

</div>
