<?php
/**
 * @var $this Controller
 */
?>
<?php foreach ($this->getContacts() as $contact): ?>
<div class="consultant"
     data-image="<?php echo CHtml::encode($contact->imageBehavior->getFileUrl())?>"
     data-name="<?php echo CHtml::encode($contact->i18n->name)?>"
     data-position="<?php echo CHtml::encode($contact->i18n->position)?>"
     data-phone="<?php echo CHtml::encode($contact->phone)?>"
     data-email="<?php echo CHtml::encode($contact->email)?>"
     data-contact="<?php echo CHtml::encode($contact->id)?>">

    <div class="consultant-photo">
        <?php echo CHtml::image($contact->imageBehavior->getFileUrl('preview'))?>
    </div>
    <p class="consultant-name"><?php echo $contact->i18n->name?></p>

    <p class="consultant-speciality"><?php echo $contact->i18n->position?></p>

    <p>
        <?php echo $contact->phone?><br/>
        <?php echo CHtml::link($contact->email, 'mailto:' . $contact->email);?>
    </p>
    <a href="<?php echo 'mailto:', $contact->email?>" class="button"><?php echo Yii::t('site','Написать письмо')?></a>
</div>
<?php endforeach ?>