add employee module
This commit is contained in:
35
backend/modules/employee/views/manager/index.php
Normal file
35
backend/modules/employee/views/manager/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use common\models\User;
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel backend\modules\employee\models\ManagerSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = 'Менеджеры';
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="manager-index">
|
||||
|
||||
<p>
|
||||
<?= Html::a('Назначить менеджера', ['create'], ['class' => 'btn btn-success']) ?>
|
||||
</p>
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'filterModel' => $searchModel,
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
[
|
||||
'attribute' => 'user_id',
|
||||
'filter' => User::find()->select(['username', 'id'])->indexBy('id')->column(),
|
||||
'value' => 'user.username',
|
||||
|
||||
],
|
||||
|
||||
['class' => 'yii\grid\ActionColumn'],
|
||||
],
|
||||
]); ?>
|
||||
</div>
|
Reference in New Issue
Block a user