Exemplo n.º 1
0
        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">
Exemplo n.º 2
0
echo Html::encode($this->title);
?>
</h1>
    <?php 
echo $this->render('_search', ['model' => $searchModel]);
?>

    <p>
        <?php 
echo Html::a('新建讲师', ['create'], ['class' => 'btn btn-success']);
?>
    </p>
    <?php 
$form = ActiveForm::begin(['action' => \yii\helpers\Url::to('/Admin/teachers/del')]);
?>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\CheckboxColumn', 'header' => Html::checkBox('selection_all', false, ['class' => 'select-on-check-all'])], 'name', ['attribute' => 'sex', 'value' => function ($searchModel) {
    return app\models\Teachers::getSexName($searchModel->sex);
}], 'age', ['attribute' => 'level', 'value' => function ($searchModel) {
    return app\models\TeachersLevel::getNameById($searchModel->level);
}], ['attribute' => 'status', 'value' => function ($searchModel) {
    return app\models\Teachers::getStatusName($searchModel->status);
}], ['class' => 'yii\\grid\\ActionColumn']]]);
?>
    <input name="update_status" type="submit" value="删除">
    <?php 
ActiveForm::end();
?>
</div>
Exemplo n.º 3
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel app\models\TrainTeachersSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = '培训讲师管理';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="train-teachers-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', ['attribute' => 'train_id', 'value' => function ($searchModel) {
    return app\models\Train::getOneTrainNameById($searchModel->train_id);
}], ['attribute' => 'teachers_id', 'value' => function ($searchModel) {
    return app\models\Teachers::getOneTeacherNameById($searchModel->teachers_id);
}], 'create_time', 'create_user', ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
Exemplo n.º 4
0
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model app\models\Teachers */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => '讲师管理', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="teachers-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('更新讲师', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('删除讲师', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => '确认删除吗?', 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'name', ['attribute' => 'sex', 'label' => '性别', 'value' => app\models\Teachers::getSexName($model->sex)], 'age', ['attribute' => 'level', 'label' => '级别', 'value' => app\models\TeachersLevel::getNameById($model->level)], ['attribute' => 'status', 'value' => app\models\Users::getStatusName($model->status)], 'phone', 'email', 'lesson', ['attribute' => 'photo', 'format' => 'html', 'value' => $model->photo ? '<img src="/upload/images/teachers/photo/' . $model->photo . '">' : '无'], 'score', 'register_district', 'certificate_number', 'create_time', 'create_user', 'update_time', 'update_user']]);
?>

</div>
Exemplo n.º 5
0
<?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>