diff --git a/apps/advanced/backend/views/layouts/main.php b/apps/advanced/backend/views/layouts/main.php index 6d958cb..1c003e5 100644 --- a/apps/advanced/backend/views/layouts/main.php +++ b/apps/advanced/backend/views/layouts/main.php @@ -15,8 +15,8 @@ AppAsset::register($this);
- -diff --git a/apps/advanced/backend/views/site/login.php b/apps/advanced/backend/views/site/login.php index bcb673d..d52eaa1 100644 --- a/apps/advanced/backend/views/site/login.php +++ b/apps/advanced/backend/views/site/login.php @@ -11,18 +11,18 @@ $this->title = 'Login'; $this->params['breadcrumbs'][] = $this->title; ?>
Please fill out the following fields to login:
This is the About page. You may modify the following file to customize its content:
-
+ =__FILE__; ?>
If you have business inquiries or other questions, please fill out the following form to contact us. Thank you. @@ -21,16 +21,16 @@ $this->params['breadcrumbs'][] = $this->title;
diff --git a/apps/advanced/frontend/views/site/login.php b/apps/advanced/frontend/views/site/login.php index 22b5db5..df758a8 100644 --- a/apps/advanced/frontend/views/site/login.php +++ b/apps/advanced/frontend/views/site/login.php @@ -11,21 +11,21 @@ $this->title = 'Login'; $this->params['breadcrumbs'][] = $this->title; ?>
Please fill out the following fields to login:
Please fill out your email. A link to reset password will be sent there.
Please choose your new password:
Please fill out the following fields to signup:
This is the About page. You may modify the following file to customize its content:
-
+ =__FILE__; ?>
diff --git a/apps/basic/views/site/login.php b/apps/basic/views/site/login.php index 7efb8b7..34936af 100644 --- a/apps/basic/views/site/login.php +++ b/apps/basic/views/site/login.php @@ -11,7 +11,7 @@ $this->title = 'Login'; $this->params['breadcrumbs'][] = $this->title; ?>
Please fill out the following fields to login:
@@ -24,17 +24,17 @@ $this->params['breadcrumbs'][] = $this->title; ], ]); ?> - field($model, 'username'); ?> + =$form->field($model, 'username'); ?> - field($model, 'password')->passwordInput(); ?> + =$form->field($model, 'password')->passwordInput(); ?> - field($model, 'rememberMe', [ + =$form->field($model, 'rememberMe', [ 'template' => "Hello, !
+Hello, =$username?>!
``` Instead of just scalar values you can pass anything else such as arrays or objects. @@ -78,7 +78,7 @@ use yii\helpers\Html; ?>=Html::encode($tagline); ?>
You may change the content of this page by modifying
- the file echo __FILE__; ?>
.
+ the file =' echo __FILE__; ?>
.
- echo Html::a('Create modelClass); ?>', array('create'), array('class' => 'btn btn-success')); ?> + =' echo Html::a('Create =StringHelper::basename($generator->modelClass); ?>', array('create'), array('class' => 'btn btn-success')); ?>
indexWidgetType === 'grid'): ?> - echo GridView::widget(array( + =" echo GridView::widget(array( 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => array( @@ -59,13 +59,13 @@ foreach ($generator->getTableSchema()->columns as $column) { ), )); ?> - echo ListView::widget(array( + =" echo ListView::widget(array( 'dataProvider' => $dataProvider, 'itemOptions' => array( 'class' => 'item', ), 'itemView' => function ($model, $key, $index, $widget) { - return Html::a(Html::encode($model->), array('view', )); + return Html::a(Html::encode($model->=$nameAttribute; ?>), array('view', =$urlParams; ?>)); }, )); ?> diff --git a/framework/yii/gii/generators/crud/templates/views/update.php b/framework/yii/gii/generators/crud/templates/views/update.php index cb892c2..8518490 100644 --- a/framework/yii/gii/generators/crud/templates/views/update.php +++ b/framework/yii/gii/generators/crud/templates/views/update.php @@ -17,19 +17,19 @@ use yii\helpers\Html; /** * @var yii\base\View $this - * @var modelClass, '\\'); ?> $model + * @var =ltrim($generator->modelClass, '\\'); ?> $model */ -$this->title = 'Update modelClass)); ?>: ' . $model->getNameAttribute(); ?>; -$this->params['breadcrumbs'][] = array('label' => 'modelClass))); ?>', 'url' => array('index')); -$this->params['breadcrumbs'][] = array('label' => $model->getNameAttribute(); ?>, 'url' => array('view', )); +$this->title = 'Update =Inflector::camel2words(StringHelper::basename($generator->modelClass)); ?>: ' . $model->=$generator->getNameAttribute(); ?>; +$this->params['breadcrumbs'][] = array('label' => '=Inflector::pluralize(Inflector::camel2words(StringHelper::basename($generator->modelClass))); ?>', 'url' => array('index')); +$this->params['breadcrumbs'][] = array('label' => $model->=$generator->getNameAttribute(); ?>, 'url' => array('view', =$urlParams; ?>)); $this->params['breadcrumbs'][] = 'Update'; ?> -- echo Html::a('Update', array('update', ), array('class' => 'btn btn-primary')); ?> - echo Html::a('Delete', array('delete', ), array( + =' echo Html::a('Update', array('update', =$urlParams; ?>), array('class' => 'btn btn-primary')); ?> + =' echo Html::a('Delete', array('delete', =$urlParams; ?>), array( 'class' => 'btn btn-danger', 'data-confirm' => Yii::t('app', 'Are you sure to delete this item?'), 'data-method' => 'post', )); ?>
- echo DetailView::widget(array( + =' echo DetailView::widget(array( 'model' => $model, 'attributes' => array( -public function actionviewName), '_')); ?>() +public function action=Inflector::id2camel(trim(basename($generator->viewName), '_')); ?>() { - $model = new modelClass; ?>scenarioName) ? '' : "(array('scenario' => '{$generator->scenarioName}'))"; ?>; + $model = new =$generator->modelClass; ?>=empty($generator->scenarioName) ? '' : "(array('scenario' => '{$generator->scenarioName}'))"; ?>; if ($model->load($_POST)) { if($model->validate()) { @@ -22,7 +22,7 @@ public function actionv return; } } - return $this->render('viewName; ?>', array( + return $this->render('=$generator->viewName; ?>', array( 'model' => $model, )); } diff --git a/framework/yii/gii/generators/form/templates/form.php b/framework/yii/gii/generators/form/templates/form.php index ad52fe9..7569fc0 100644 --- a/framework/yii/gii/generators/form/templates/form.php +++ b/framework/yii/gii/generators/form/templates/form.php @@ -14,22 +14,22 @@ use yii\widgets\ActiveForm; /** * @var yii\base\View $this - * @var modelClass; ?> $model + * @var =$generator->modelClass; ?> $model * @var ActiveForm $form */ -"; ?> +="?>"; ?> -- This is the view content for action " echo $this->context->action->id; ?>". - The action belongs to the controller " echo get_class($this->context); ?>" - in the " echo $this->context->module->id; ?>" module. + This is the view content for action "=" echo $this->context->action->id; ?>". + The action belongs to the controller "=" echo get_class($this->context); ?>" + in the "=" echo $this->context->module->id; ?>" module.
You may customize this page by editing the following file:
- echo __FILE__; ?>
+ =" echo __FILE__; ?>
getDescription(); ?>
-$id), array('class' => 'btn btn-default')); ?>
+=$generator->getDescription(); ?>
+=Html::a('Start »', array('default/view', 'id' => $id), array('class' => 'btn btn-default')); ?>
getDescription(); ?>
+=$generator->getDescription(); ?>
"$id-generator", @@ -35,20 +35,20 @@ foreach ($generator->templates as $name => $path) { )); ?>=nl2br($results); ?>diff --git a/framework/yii/gii/views/layouts/generator.php b/framework/yii/gii/views/layouts/generator.php index fcf9fbc..7ec6905 100644 --- a/framework/yii/gii/views/layouts/generator.php +++ b/framework/yii/gii/views/layouts/generator.php @@ -25,7 +25,7 @@ $activeGenerator = Yii::$app->controller->generator;
Name | Result | Required By | Memo |
---|---|---|---|
- + =$requirement['name']; ?> | - + =$requirement['condition'] ? 'Passed' : ($requirement['mandatory'] ? 'Failed' : 'Warning'); ?> | - + =$requirement['by']; ?> | - + =$requirement['memo']; ?> |