 <?php

 Yii::app()->setLanguage(isset(Yii::app()->session['lang']) ? Yii::app()->session['lang'] : 'ar'); 
 $lang=Yii::app()->getLanguage();
 
?>
  
               <div class="col-xs-12 col-md-4 col-sm-12 con4">
               <div class="head-text text-center">
               <?php //echo Yii::t('currencySection','currencyRate');?>
               <?php
                if($lang=='ar')
                { echo '
                   أسعار العملات
                   ';
                }else{
                        echo'Exchange Rates';
                }
                ?>
               </div>
               <div class="col-xs-12 currency-container">
               <div class="row">
			   <?php 
				$currencies=Currency::model()->findAll(array('limit' => 6));
				foreach($currencies as $currency){
			   ?>
               <div class="exchange-rate">
                   <div class="col-sm-6 col-sm-offset-0 col-xs-offset-1 col-xs-4"> 
                       <div class="col-xs-3">
                           <div class="row text-center">
                               <span class="currency-sympole"><?php echo $currency->symbol_code ?></span>
                           </div>
                       </div>
                       <div class="col-xs-9">
                           <div class="row">
                               <span class="currency-name">
                               <?php echo ($lang=='en'?$currency->en_title:$currency->title) ?>
                               </span>
                           </div>
                       </div>
                   </div>
                   <div class="col-sm-6 col-xs-7">
                       <span class="price">&nbsp; <?php echo $currency->Buy_rate ?></span> | <span class="price"><?php echo $currency->Sell_rate ?> &nbsp;</span>
                       <span class="average">
					   <?php echo $currency->up_down=="up"?' <span class="fa fa-caret-up"></span>':'<span class="fa fa-caret-down"></span>'; ?> 
                       </span>
                   </div>
               </div>
			   <?php }?>
               <a class="btn btn-see-more" href="<?php echo Yii::app()->request->baseUrl ?>/site/exchangeRate"> 
               <?php //echo Yii::t('currencySection','showMore');?>
               <?php 
                    if($lang=='ar')
                    { echo'
                    عرض المزيد
                        ';
                        }else{
                            echo'Show more';
                        }
                ?> </a>
               </div>
               </div>
           </div>  