list of all accesses
This commit is contained in:
parent
38069c57d4
commit
99380c6ae3
@ -61,6 +61,21 @@ class AccessesController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Accesses models.
|
||||
* @return mixed
|
||||
*/
|
||||
public function actionAll()
|
||||
{
|
||||
$searchModel = new AccessesSearch();
|
||||
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
|
||||
|
||||
return $this->render('all', [
|
||||
'searchModel' => $searchModel,
|
||||
'dataProvider' => $dataProvider,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a single Accesses model.
|
||||
* @param integer $id
|
||||
|
38
backend/modules/accesses/views/accesses/all.php
Normal file
38
backend/modules/accesses/views/accesses/all.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use app\modules\accesses\models\AccessesSearch;
|
||||
use kartik\grid\GridView;
|
||||
use yii\helpers\Html;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel app\modules\accesses\models\AccessesSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = 'Доступы';
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="accesses-index">
|
||||
|
||||
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
|
||||
<p>
|
||||
<?= Html::a('Добавить доступ', ['create'], ['class' => 'btn btn-success']) ?>
|
||||
<?= Html::a('Сгруппированный вид', ['index'], ['class' => 'btn btn-success']) ?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
echo GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'filterModel' => $searchModel,
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
'name',
|
||||
'login',
|
||||
'password',
|
||||
'link',
|
||||
'project',
|
||||
'info'
|
||||
],
|
||||
]);
|
||||
?>
|
||||
</div>
|
@ -17,6 +17,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
<p>
|
||||
<?= Html::a('Добавить доступ', ['create'], ['class' => 'btn btn-success']) ?>
|
||||
<?= Html::a('Все доступы', ['all'], ['class' => 'btn btn-success']) ?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
|
Loading…
Reference in New Issue
Block a user