From 14699b5ec3992a849d1b16d54a9f971dd65cf066 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Sun, 5 May 2013 18:32:32 -0400 Subject: [PATCH] reorganized app code. removed app template from framework folder. --- {app => apps/bootstrap}/assets/.gitignore | 0 .../bootstrap}/css/bootstrap-responsive.css | 0 .../css/bootstrap-responsive.min.css | 0 {app => apps/bootstrap}/css/bootstrap.css | 0 {app => apps/bootstrap}/css/bootstrap.min.css | 0 {app => apps/bootstrap}/css/site.css | 0 .../img/glyphicons-halflings-white.png | Bin .../bootstrap}/img/glyphicons-halflings.png | Bin {app => apps/bootstrap}/index.php | 0 {app => apps/bootstrap}/js/bootstrap.js | 0 {app => apps/bootstrap}/js/bootstrap.min.js | 0 {app => apps/bootstrap}/protected/.htaccess | 0 .../bootstrap}/protected/config/assets.php | 0 .../bootstrap}/protected/config/main.php | 0 .../protected/controllers/SiteController.php | 0 .../protected/models/ContactForm.php | 0 .../bootstrap}/protected/models/LoginForm.php | 0 .../bootstrap}/protected/models/User.php | 0 .../bootstrap}/protected/runtime/.gitignore | 0 .../protected/views/layouts/main.php | 0 .../bootstrap}/protected/views/site/about.php | 0 .../protected/views/site/contact.php | 0 .../bootstrap}/protected/views/site/index.php | 0 .../bootstrap}/protected/views/site/login.php | 0 framework/console/webapp/config.php | 17 --------------- framework/console/webapp/default/index.php | 10 --------- .../webapp/default/protected/config/main.php | 20 ------------------ .../protected/controllers/SiteController.php | 15 ------------- .../default/protected/views/layouts/main.php | 17 --------------- .../default/protected/views/site/index.php | 1 - readme.md | 3 ++- 31 files changed, 2 insertions(+), 81 deletions(-) rename {app => apps/bootstrap}/assets/.gitignore (100%) rename {app => apps/bootstrap}/css/bootstrap-responsive.css (100%) rename {app => apps/bootstrap}/css/bootstrap-responsive.min.css (100%) rename {app => apps/bootstrap}/css/bootstrap.css (100%) rename {app => apps/bootstrap}/css/bootstrap.min.css (100%) rename {app => apps/bootstrap}/css/site.css (100%) rename {app => apps/bootstrap}/img/glyphicons-halflings-white.png (100%) rename {app => apps/bootstrap}/img/glyphicons-halflings.png (100%) rename {app => apps/bootstrap}/index.php (100%) rename {app => apps/bootstrap}/js/bootstrap.js (100%) rename {app => apps/bootstrap}/js/bootstrap.min.js (100%) rename {app => apps/bootstrap}/protected/.htaccess (100%) rename {app => apps/bootstrap}/protected/config/assets.php (100%) rename {app => apps/bootstrap}/protected/config/main.php (100%) rename {app => apps/bootstrap}/protected/controllers/SiteController.php (100%) rename {app => apps/bootstrap}/protected/models/ContactForm.php (100%) rename {app => apps/bootstrap}/protected/models/LoginForm.php (100%) rename {app => apps/bootstrap}/protected/models/User.php (100%) rename {app => apps/bootstrap}/protected/runtime/.gitignore (100%) rename {app => apps/bootstrap}/protected/views/layouts/main.php (100%) rename {app => apps/bootstrap}/protected/views/site/about.php (100%) rename {app => apps/bootstrap}/protected/views/site/contact.php (100%) rename {app => apps/bootstrap}/protected/views/site/index.php (100%) rename {app => apps/bootstrap}/protected/views/site/login.php (100%) delete mode 100644 framework/console/webapp/config.php delete mode 100644 framework/console/webapp/default/index.php delete mode 100644 framework/console/webapp/default/protected/config/main.php delete mode 100644 framework/console/webapp/default/protected/controllers/SiteController.php delete mode 100644 framework/console/webapp/default/protected/views/layouts/main.php delete mode 100644 framework/console/webapp/default/protected/views/site/index.php diff --git a/app/assets/.gitignore b/apps/bootstrap/assets/.gitignore similarity index 100% rename from app/assets/.gitignore rename to apps/bootstrap/assets/.gitignore diff --git a/app/css/bootstrap-responsive.css b/apps/bootstrap/css/bootstrap-responsive.css similarity index 100% rename from app/css/bootstrap-responsive.css rename to apps/bootstrap/css/bootstrap-responsive.css diff --git a/app/css/bootstrap-responsive.min.css b/apps/bootstrap/css/bootstrap-responsive.min.css similarity index 100% rename from app/css/bootstrap-responsive.min.css rename to apps/bootstrap/css/bootstrap-responsive.min.css diff --git a/app/css/bootstrap.css b/apps/bootstrap/css/bootstrap.css similarity index 100% rename from app/css/bootstrap.css rename to apps/bootstrap/css/bootstrap.css diff --git a/app/css/bootstrap.min.css b/apps/bootstrap/css/bootstrap.min.css similarity index 100% rename from app/css/bootstrap.min.css rename to apps/bootstrap/css/bootstrap.min.css diff --git a/app/css/site.css b/apps/bootstrap/css/site.css similarity index 100% rename from app/css/site.css rename to apps/bootstrap/css/site.css diff --git a/app/img/glyphicons-halflings-white.png b/apps/bootstrap/img/glyphicons-halflings-white.png similarity index 100% rename from app/img/glyphicons-halflings-white.png rename to apps/bootstrap/img/glyphicons-halflings-white.png diff --git a/app/img/glyphicons-halflings.png b/apps/bootstrap/img/glyphicons-halflings.png similarity index 100% rename from app/img/glyphicons-halflings.png rename to apps/bootstrap/img/glyphicons-halflings.png diff --git a/app/index.php b/apps/bootstrap/index.php similarity index 100% rename from app/index.php rename to apps/bootstrap/index.php diff --git a/app/js/bootstrap.js b/apps/bootstrap/js/bootstrap.js similarity index 100% rename from app/js/bootstrap.js rename to apps/bootstrap/js/bootstrap.js diff --git a/app/js/bootstrap.min.js b/apps/bootstrap/js/bootstrap.min.js similarity index 100% rename from app/js/bootstrap.min.js rename to apps/bootstrap/js/bootstrap.min.js diff --git a/app/protected/.htaccess b/apps/bootstrap/protected/.htaccess similarity index 100% rename from app/protected/.htaccess rename to apps/bootstrap/protected/.htaccess diff --git a/app/protected/config/assets.php b/apps/bootstrap/protected/config/assets.php similarity index 100% rename from app/protected/config/assets.php rename to apps/bootstrap/protected/config/assets.php diff --git a/app/protected/config/main.php b/apps/bootstrap/protected/config/main.php similarity index 100% rename from app/protected/config/main.php rename to apps/bootstrap/protected/config/main.php diff --git a/app/protected/controllers/SiteController.php b/apps/bootstrap/protected/controllers/SiteController.php similarity index 100% rename from app/protected/controllers/SiteController.php rename to apps/bootstrap/protected/controllers/SiteController.php diff --git a/app/protected/models/ContactForm.php b/apps/bootstrap/protected/models/ContactForm.php similarity index 100% rename from app/protected/models/ContactForm.php rename to apps/bootstrap/protected/models/ContactForm.php diff --git a/app/protected/models/LoginForm.php b/apps/bootstrap/protected/models/LoginForm.php similarity index 100% rename from app/protected/models/LoginForm.php rename to apps/bootstrap/protected/models/LoginForm.php diff --git a/app/protected/models/User.php b/apps/bootstrap/protected/models/User.php similarity index 100% rename from app/protected/models/User.php rename to apps/bootstrap/protected/models/User.php diff --git a/app/protected/runtime/.gitignore b/apps/bootstrap/protected/runtime/.gitignore similarity index 100% rename from app/protected/runtime/.gitignore rename to apps/bootstrap/protected/runtime/.gitignore diff --git a/app/protected/views/layouts/main.php b/apps/bootstrap/protected/views/layouts/main.php similarity index 100% rename from app/protected/views/layouts/main.php rename to apps/bootstrap/protected/views/layouts/main.php diff --git a/app/protected/views/site/about.php b/apps/bootstrap/protected/views/site/about.php similarity index 100% rename from app/protected/views/site/about.php rename to apps/bootstrap/protected/views/site/about.php diff --git a/app/protected/views/site/contact.php b/apps/bootstrap/protected/views/site/contact.php similarity index 100% rename from app/protected/views/site/contact.php rename to apps/bootstrap/protected/views/site/contact.php diff --git a/app/protected/views/site/index.php b/apps/bootstrap/protected/views/site/index.php similarity index 100% rename from app/protected/views/site/index.php rename to apps/bootstrap/protected/views/site/index.php diff --git a/app/protected/views/site/login.php b/apps/bootstrap/protected/views/site/login.php similarity index 100% rename from app/protected/views/site/login.php rename to apps/bootstrap/protected/views/site/login.php diff --git a/framework/console/webapp/config.php b/framework/console/webapp/config.php deleted file mode 100644 index 47ddcc1b24..0000000000 --- a/framework/console/webapp/config.php +++ /dev/null @@ -1,17 +0,0 @@ - array( - 'index.php' => array( - 'handler' => function($source) use ($controller) { - return $controller->replaceRelativePath($source, realpath(YII_PATH.'/yii.php'), 'yii'); - }, - 'permissions' => 0777, - ), - 'protected/runtime' => array( - 'permissions' => 0755, - ), - ), -); diff --git a/framework/console/webapp/default/index.php b/framework/console/webapp/default/index.php deleted file mode 100644 index 2aa3580e89..0000000000 --- a/framework/console/webapp/default/index.php +++ /dev/null @@ -1,10 +0,0 @@ -run(); diff --git a/framework/console/webapp/default/protected/config/main.php b/framework/console/webapp/default/protected/config/main.php deleted file mode 100644 index 581778324f..0000000000 --- a/framework/console/webapp/default/protected/config/main.php +++ /dev/null @@ -1,20 +0,0 @@ - 'webapp', - 'name' => 'My Web Application', - - 'components' => array( - // uncomment the following to use a MySQL database - /* - 'db' => array( - 'class' => 'yii\db\Connection', - 'dsn' => 'mysql:host=localhost;dbname=testdrive', - 'username' => 'root', - 'password' => '', - ), - */ - 'cache' => array( - 'class' => 'yii\caching\DummyCache', - ), - ), -); diff --git a/framework/console/webapp/default/protected/controllers/SiteController.php b/framework/console/webapp/default/protected/controllers/SiteController.php deleted file mode 100644 index ac8c1ddec6..0000000000 --- a/framework/console/webapp/default/protected/controllers/SiteController.php +++ /dev/null @@ -1,15 +0,0 @@ -render('index', array( - 'name' => 'Qiang', - )); - } -} diff --git a/framework/console/webapp/default/protected/views/layouts/main.php b/framework/console/webapp/default/protected/views/layouts/main.php deleted file mode 100644 index 98370388c5..0000000000 --- a/framework/console/webapp/default/protected/views/layouts/main.php +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - <?php echo Html::encode($this->title)?> - - -

title)?>

-
- -
- - - diff --git a/framework/console/webapp/default/protected/views/site/index.php b/framework/console/webapp/default/protected/views/site/index.php deleted file mode 100644 index 08c528860f..0000000000 --- a/framework/console/webapp/default/protected/views/site/index.php +++ /dev/null @@ -1 +0,0 @@ -Hello, ! diff --git a/readme.md b/readme.md index 62932927e0..f395e952e2 100644 --- a/readme.md +++ b/readme.md @@ -13,7 +13,8 @@ without prior notices. **Yii 2.0 is not ready for production use yet.** DIRECTORY STRUCTURE ------------------- - app/ a ready-to-use application built on Yii 2 + apps/ ready-to-use Web apps built on Yii 2 + bootstrap/ a simple app supporting user login and contact page build/ internally used build tools docs/ documentation framework/ framework source files