fix config, grid view fix
This commit is contained in:
parent
c3ce830284
commit
3e10a51c3a
@ -56,9 +56,20 @@ return [
|
|||||||
'enablePrettyUrl' => true,
|
'enablePrettyUrl' => true,
|
||||||
'showScriptName' => false,
|
'showScriptName' => false,
|
||||||
'rules' => [
|
'rules' => [
|
||||||
|
'' => '/card/user-card'
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
'as access' => [
|
||||||
|
'class' => 'yii\filters\AccessControl',
|
||||||
|
'except' => ['site/login', 'site/error'],
|
||||||
|
'rules' => [
|
||||||
|
[
|
||||||
|
'allow' => true,
|
||||||
|
'roles' => ['@'],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
'params' => $params,
|
'params' => $params,
|
||||||
];
|
];
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use yii\helpers\Html;
|
use yii\helpers\Html;
|
||||||
use yii\grid\GridView;
|
use yii\grid\GridView;
|
||||||
|
use yii\helpers\Url;
|
||||||
|
|
||||||
/* @var $this yii\web\View */
|
/* @var $this yii\web\View */
|
||||||
/* @var $searchModel backend\modules\card\models\UserCardSearch */
|
/* @var $searchModel backend\modules\card\models\UserCardSearch */
|
||||||
@ -22,10 +23,18 @@ $this->params['breadcrumbs'][] = $this->title;
|
|||||||
'columns' => [
|
'columns' => [
|
||||||
['class' => 'yii\grid\SerialColumn'],
|
['class' => 'yii\grid\SerialColumn'],
|
||||||
|
|
||||||
'id',
|
//'id',
|
||||||
|
[
|
||||||
|
'label' => 'photo',
|
||||||
|
'format' => 'raw',
|
||||||
|
'value' => function($model){
|
||||||
|
return Html::img(Url::to($model->photo),[
|
||||||
|
'style' => 'width:100px;'
|
||||||
|
]);
|
||||||
|
},
|
||||||
|
],
|
||||||
'fio',
|
'fio',
|
||||||
'passport',
|
'passport',
|
||||||
'photo',
|
|
||||||
'email:email',
|
'email:email',
|
||||||
//'gender',
|
//'gender',
|
||||||
//'dob',
|
//'dob',
|
||||||
|
Loading…
Reference in New Issue
Block a user