index.php 1011 Bytes
Newer Older
Qiang Xue committed
1 2 3 4
<?php
use yii\helpers\Html;

/**
slavcodev committed
5 6 7 8
 * @var \yii\web\View $this
 * @var \yii\gii\Generator[] $generators
 * @var \yii\gii\Generator $activeGenerator
 * @var string $content
Qiang Xue committed
9 10 11 12 13 14 15
 */
$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
		<div class="generator col-lg-4">
Alexander Makarov committed
24 25 26
			<h3><?= Html::encode($generator->getName()) ?></h3>
			<p><?= $generator->getDescription() ?></p>
			<p><?= Html::a('Start »', ['default/view', 'id' => $id], ['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>