<?php use yii\helpers\Html; use yii\grid\GridView; use source\LuLu; use app\modules\rbac\models\Category; /* @var $this yii\web\View */ /* @var $searchModel app\modules\rbac\models\search\CategorySearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $type = LuLu::getGetValue('type'); $this->title = Category::getTypes($type); $this->params['breadcrumbs'][] = $this->title; ?> <div class="category-index"> <p> <?php echo Html::a('新建分类', ['create', 'type' => $type], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'name', 'sort_num', ['class' => 'yii\\grid\\ActionColumn']]]); ?> </div>
<?php use yii\helpers\Html; use app\modules\rbac\models\Category; use source\LuLu; /* @var $this yii\web\View */ /* @var $model app\modules\rbac\models\Category */ $type = $model->type; $this->title = '修改分类: ' . ' ' . $model->name; $this->params['breadcrumbs'][] = ['label' => Category::getTypes($type), 'url' => ['index', 'type' => $type]]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="category-update"> <?php echo $this->render('_form', ['model' => $model]); ?> </div>