Browse Source

添加yii执行脚本

wechat_public_accounts
blobt 5 years ago
parent
commit
0cf0bf9c92
  1. 1
      .gitignore
  2. 9
      kcadmin/views/category/_form.php
  3. 2
      kcadmin/views/category/index.php
  4. 24
      yii

1
.gitignore

@ -1,5 +1,4 @@
# yii console commands # yii console commands
/yii
/yii_test /yii_test
/yii_test.bat /yii_test.bat
/img /img

9
kcadmin/views/category/_form.php

@ -3,6 +3,8 @@
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
use blobt\widgets\DatePicker; use blobt\widgets\DatePicker;
use blobt\widgets\Select2;
use blobt\widgets\DatetimePicker;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model common\models\Category */ /* @var $model common\models\Category */
@ -14,18 +16,19 @@ use blobt\widgets\DatePicker;
<div class="box-body"> <div class="box-body">
<?= $form->field($model, 'cat_name')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'cat_name')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'icon')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'icon')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'icon_type')->textInput() ?>
<?= $form->field($model, 'icon_type')->widget(Select2::className(), ["data" => $model::$iconType]) ?>
<?= $form->field($model, 'icon_type')->checkbox(["a" => "A", "b" => "B"]) ?>
<?= $form->field($model, 'description')->textarea(['rows' => 6]) ?> <?= $form->field($model, 'description')->textarea(['rows' => 6]) ?>
<?= $form->field($model, 'sort_order')->textInput() ?> <?= $form->field($model, 'sort_order')->textInput() ?>
<?= $form->field($model, 'created_at')->widget(DatePicker::className()) ?>
<?= $form->field($model, 'created_at')->widget(DatetimePicker::className()) ?>
</div> </div>
<div class="box-footer"> <div class="box-footer">

2
kcadmin/views/category/index.php

@ -61,7 +61,7 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute' => 'description', 'attribute' => 'description',
'enableSorting' => false, 'enableSorting' => false,
'format' => 'ntext', 'format' => 'ntext',
'width' => '50%',
'width' => '49%',
], ],
[ [
'class' => 'blobt\grid\ActionColumn', 'class' => 'blobt\grid\ActionColumn',

24
yii

@ -0,0 +1,24 @@
#!/usr/bin/env php
<?php
/**
* Yii console bootstrap file.
*/
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/vendor/yiisoft/yii2/Yii.php';
require __DIR__ . '/common/config/bootstrap.php';
require __DIR__ . '/console/config/bootstrap.php';
$config = yii\helpers\ArrayHelper::merge(
require __DIR__ . '/common/config/main.php',
require __DIR__ . '/common/config/main-local.php',
require __DIR__ . '/console/config/main.php',
require __DIR__ . '/console/config/main-local.php'
);
$application = new yii\console\Application($config);
$exitCode = $application->run();
exit($exitCode);
Loading…
Cancel
Save