Browse Source

adjusted default application template

tags/2.0.0-beta
Alexander Makarov 12 years ago
parent
commit
f8664a38de
  1. 3
      framework/console/create/config.php
  2. 1
      framework/console/create/default/index-test.php
  3. 16
      framework/console/create/default/protected/config/main.php
  4. 15
      framework/console/create/default/protected/controllers/SiteController.php
  5. 1
      framework/console/create/default/protected/tests/bootstrap.php
  6. 16
      framework/console/create/default/protected/views/layouts/main.php
  7. 1
      framework/console/create/default/protected/views/site/index.php
  8. 1
      framework/console/create/default/protected/yiic.php

3
framework/console/create/config.php

@ -10,9 +10,6 @@ return array(
},
'permissions' => 0777,
),
'assets' => array(
'permissions' => 0777,
),
'protected/runtime' => array(
'permissions' => 0755,
),

1
framework/console/create/default/index-test.php

@ -1 +0,0 @@
<?php

16
framework/console/create/default/protected/config/main.php

@ -0,0 +1,16 @@
<?php
return array(
'name' => 'My Web Application',
'components' => array(
// uncomment the following to use a MySQL database
/*
'db' => array(
'class' => 'yii\db\dao\Connection',
'dsn' => 'mysql:host=localhost;dbname=testdrive',
'username' => 'root',
'password' => '',
),
*/
),
);

15
framework/console/create/default/protected/controllers/SiteController.php

@ -0,0 +1,15 @@
<?php
use \yii\web\Controller;
/**
* SiteController
*/
class SiteController extends Controller
{
public function actionIndex()
{
echo $this->render('index', array(
'name' => 'Qiang',
));
}
}

1
framework/console/create/default/protected/tests/bootstrap.php

@ -1 +0,0 @@
<?php

16
framework/console/create/default/protected/views/layouts/main.php

@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title><?php echo $this->context->pageTitle?></title>
</head>
<body>
<h1><?php echo $this->context->pageTitle?></h1>
<div class="content">
<?php echo $content?>
</div>
<div class="footer">
<?php echo \Yii::powered()?>
</div>
</body>
</html>

1
framework/console/create/default/protected/views/site/index.php

@ -0,0 +1 @@
Hello, <?php echo $name?>!

1
framework/console/create/default/protected/yiic.php

@ -1 +0,0 @@
<?php
Loading…
Cancel
Save