Example #1
0
<?php

use app\components\helpers\Phone;
use app\modules\user\models\User;
use yii\helpers\Html;
use yii\widgets\DetailView;
echo DetailView::widget(['model' => $model, 'attributes' => ['birthday:date', ['attribute' => 'age', 'format' => 'raw', 'value' => $model->getAge()], 'alias', ['attribute' => 'gender', 'value' => User::getGenderArray()[$model->gender]], ['attribute' => 'marital', 'value' => User::getMaritalArray()[$model->marital]], ['attribute' => 'phone_private', 'format' => 'raw', 'value' => Html::a(Phone::getFormatView($model->phone_private), 'tel:' . $model->phone_private)], ['attribute' => 'phone_home', 'format' => 'raw', 'value' => Html::a(Phone::getFormatView($model->phone_home), 'tel:' . $model->phone_home)], 'email_private:email', 'passport', 'address_home']]);
Example #2
0
            <p>
                <small><?php 
echo Yii::t('app', 'Phone work (mobil)');
?>
</small>
                <br/><?php 
echo Html::a(Phone::getFormatView($model->phone_work), 'tel:' . $model->phone_work);
?>
            </p>
            <p>
                <small><?php 
echo Yii::t('app', 'Phone private');
?>
</small>
                <br/><?php 
echo Html::a(Phone::getFormatView($model->phone_private), 'tel:' . $model->phone_private);
?>
            </p>
            <p>
                <small><?php 
echo Yii::t('app', 'Email work');
?>
</small>
                <br/><?php 
echo Html::mailto($model->email_work, $model->email_work);
?>
            </p>
            <p>
                <small><?php 
echo Yii::t('app', 'Status');
?>
Example #3
0
<?php

use app\components\helpers\Phone;
use app\models\Post;
use app\modules\department\models\Department;
use app\modules\user\models\User;
use yii\helpers\Html;
use yii\widgets\DetailView;
echo DetailView::widget(['model' => $model, 'attributes' => [['attribute' => 'post_id', 'value' => $model->post_id ? Post::findOne($model->post_id)->title : ''], ['attribute' => 'department_id', 'format' => 'raw', 'value' => $model->department_id ? Html::a(Department::findOne($model->department_id)->title, ['/department/view', 'id' => $model->department_id]) : ''], ['attribute' => 'user_id', 'format' => 'raw', 'value' => $model->user_id ? Html::a(User::findOne($model->user_id)->getName(), ['/user/view', 'id' => $model->user_id]) : ''], ['attribute' => 'phone_stationary', 'format' => 'raw', 'value' => Html::a(Phone::getFormatView($model->phone_work), 'tel:' . $model->phone_work)], ['attribute' => 'phone_work', 'format' => 'raw', 'value' => Html::a(Phone::getFormatView($model->phone_work), 'tel:' . $model->phone_work)], 'email_work:email', 'cabinet', 'worked_at:date', ['attribute' => 'experience', 'format' => 'raw', 'value' => $model->getExperience()], 'rate', ['attribute' => 'status', 'format' => 'raw', 'value' => 1]]]);