show customer photo on reception

This commit is contained in:
Schneider Roland 2015-12-30 12:12:52 +01:00
parent eb989d5f80
commit bb70546af4

View File

@ -4,6 +4,8 @@ use frontend\model\ReceptionForm;
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\DetailView; use yii\widgets\DetailView;
use yii\base\Widget; use yii\base\Widget;
use common\components\Image;
use yii\helpers\Url;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model frontend\model\ReceptionForm */ /* @var $model frontend\model\ReceptionForm */
@ -34,6 +36,12 @@ if ( $model->isCardWithCustomer() ){
'label' => 'Telefon', 'label' => 'Telefon',
'value' => $model->customer->phone 'value' => $model->customer->phone
], ],
[
'label' => 'Fénykép',
'value' => $model->customer->image1 ? Html::img( Url::base( ) . Image::thumb( $model->customer->image1->path,160,120 )) : 'Nincs kép',
'format' => 'raw'
],
] ]
]) ])