guild/backend/modules/settings/views/skill/index.php

42 lines
1.2 KiB
PHP
Raw Normal View History

2018-10-11 11:15:09 +03:00
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
2018-10-12 14:52:08 +03:00
/* @var $searchModel backend\modules\settings\models\SkillSearch */
2018-10-11 11:15:09 +03:00
/* @var $dataProvider yii\data\ActiveDataProvider */
2018-10-12 14:52:08 +03:00
$this->title = 'Навыки';
2018-10-11 11:15:09 +03:00
$this->params['breadcrumbs'][] = $this->title;
?>
2018-10-12 14:52:08 +03:00
<div class="skill-index">
2018-10-11 11:15:09 +03:00
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Добавить', ['create'], ['class' => 'btn btn-success']) ?>
2021-06-08 17:05:54 +03:00
<?= Html::a('Категории', ['/settings/skill-category'], ['class' => 'btn btn-success']) ?>
2021-06-09 18:06:13 +03:00
<?= Html::a('Навыки на главной', ['/settings/skill/skills-on-main-page'], ['class' => 'btn btn-success']) ?>
2018-10-11 11:15:09 +03:00
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'id',
'name',
2021-06-08 17:05:54 +03:00
[
'attribute' => 'category_id',
'value' => function ($model) {
return $model->category ? $model->category->name : '-';
}
],
2018-10-11 11:15:09 +03:00
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>