echo \yii\helpers\Url::to(['teachers/view', 'id' => $val['id']]); ?> "> <span><img src="/upload/images/teachers/photo/<?php echo $val['photo']; ?> " width="71" height="99"/></span> <p> 姓名:<?php echo $val['name']; ?> <br />年龄:<?php echo $val['age']; ?> <br />职称:<?php echo app\models\Teachers::getLevelName($val['level']); ?> <br />评分:<img src="/images/user/xx.jpg" /><img src="/images/user/xx.jpg" /><img src="/images/user/xx.jpg" /><img src="/images/user/xx.jpg" /><img src="/images/user/xx.jpg" /> </p> </a> </div> </li> <?php } ?> <?php } ?> </ul> </div> <div class="hd">
<?php use yii\helpers\Html; use yii\grid\GridView; /* @var $this yii\web\View */ /* @var $searchModel app\models\UsersSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = '暂停讲师'; $this->params['breadcrumbs'][] = $this->title; ?> <div class="users-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'name', ['attribute' => 'status', 'value' => function ($searchModel) { return app\models\Teachers::getStatusName($searchModel->status); }], ['attribute' => 'level', 'value' => function ($searchModel) { return app\models\Teachers::getLevelName($searchModel->level); }], 'create_time', 'create_user', 'update_time', 'update_user', ['class' => 'yii\\grid\\ActionColumn']]]); ?> </div>