Commit 9f2151e4 by dianc

Category Layout Menu added

parent 31be3fa5
...@@ -63,6 +63,8 @@ class CategoryController extends Controller ...@@ -63,6 +63,8 @@ class CategoryController extends Controller
public function actionCreate() public function actionCreate()
{ {
$model = new Category(); $model = new Category();
$this->layout = '@backend/modules/theme/views/category/layout.php';
// $model->scenario =
$model->status = $model::STATUS_ACTIVE; $model->status = $model::STATUS_ACTIVE;
......
...@@ -12,18 +12,18 @@ use trntv\filekit\widget\Upload; ...@@ -12,18 +12,18 @@ use trntv\filekit\widget\Upload;
<div class="category-form"> <div class="category-form">
<?php $form = ActiveForm::begin(); ?> <?php $form = ActiveForm::begin(); ?>
<ul id="myTab" class="nav nav-tabs"> <!-- <ul id="myTab" class="nav nav-tabs">-->
<li class="active"> <!-- <li class="active">-->
<a href="#info" data-toggle="tab"> <!-- <a href="#info" data-toggle="tab">-->
Info <!-- Info-->
</a> <!-- </a>-->
</li> <!-- </li>-->
<li> <!-- <li>-->
<a href="#files" data-toggle="tab"> <!-- <a href="#files" data-toggle="tab">-->
Files <!-- Files-->
</a> <!-- </a>-->
</li> <!-- </li>-->
</ul> <!-- </ul>-->
<div id="myTabContent" class="tab-content"> <div id="myTabContent" class="tab-content">
<div class="tab-pane fade in active" id="info"> <div class="tab-pane fade in active" id="info">
...@@ -83,4 +83,4 @@ use trntv\filekit\widget\Upload; ...@@ -83,4 +83,4 @@ use trntv\filekit\widget\Upload;
<?php ActiveForm::end(); ?> <?php ActiveForm::end(); ?>
</div> </div>
</div> </div>
<?php
use yii\widgets\Menu;
use common\models\Category;
/* @var $this yii\web\View */
?>
<?php $this->beginContent('@backend/views/layouts/main.php'); ?>
<?=
Menu::widget([
'items' => [
['label' => 'Info', 'url' => ['category/create']],
['label' => 'Files', 'url' => ['category/update', 'id' =>'' ]],
],
'options' => [
'class' => 'nav nav-tabs',
'role' => 'tablist',
'id' => 'category-form-tab',
],
]);
?>
<div id="myTabContent" class="tab-content">
<?php echo $content ?>
</div>
<?php $this->endContent(); ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment