index.php 1.02 KB
Newer Older
Qiang Xue committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<?php
use yii\helpers\Html;

/**
 * @var $this \yii\base\View
 * @var $content string
 * @var yii\gii\Generator[] $generators
 * @var yii\gii\Generator $activeGenerator
 */
$generators = Yii::$app->controller->module->generators;
$activeGenerator = Yii::$app->controller->generator;
$this->title = 'Welcome to Gii';
?>
<div class="default-index">
	<div class="page-header">
Qiang Xue committed
16
		<h1>Welcome to Gii <small>a magic tool that can write code for you</small></h1>
Qiang Xue committed
17 18 19 20 21
	</div>

	<p class="lead">Start the fun with the following code generators:</p>

	<div class="row">
Qiang Xue committed
22
		<?php foreach ($generators as $id => $generator): ?>
Qiang Xue committed
23 24 25
		<div class="generator col-lg-4">
			<h3><?php echo Html::encode($generator->getName()); ?></h3>
			<p><?php echo $generator->getDescription(); ?></p>
Qiang Xue committed
26
			<p><?php echo Html::a('Start »', array('default/view', 'id' => $id), array('class' => 'btn btn-default')); ?></p>
Qiang Xue committed
27 28 29 30 31 32 33
		</div>
		<?php endforeach; ?>
	</div>

	<p><a class="btn btn-success" href="http://www.yiiframework.com/extensions/?tag=gii">Get More Generators</a></p>

</div>