This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "quickfw".
The branch, master has been updated
via 665668c2e8458e82d493f7eecae0102b3573ff82 (commit)
from 9628ca3cd173626bae58c3dba5d3711750ef68cc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 665668c2e8458e82d493f7eecae0102b3573ff82
Author: Ivan1986 <iva...@li...>
Date: Wed Oct 6 16:58:37 2010 +0400
Преведены в порядок шаблоны из default
diff --git a/application/default/controllers/IndexController.php b/application/default/controllers/IndexController.php
index 75cc6dd..f087d4a 100644
--- a/application/default/controllers/IndexController.php
+++ b/application/default/controllers/IndexController.php
@@ -6,33 +6,14 @@ class IndexController extends QuickFW_Auth
{
public function __construct()
{
- echo QFW::$router->module.'.'.QFW::$router->controller.'.'.QFW::$router->action."<br>\n";
+ //echo QFW::$router->module.'.'.QFW::$router->controller.'.'.QFW::$router->action."<br>\n";
}
public function indexAction()
{
- /*print_r($_POST);
- require_once LIBPATH.'/HTML/MetaFormAction.php';
- require_once LIBPATH.'/HTML/MetaForm.php';
- require_once LIBPATH.'/HTML/FormPersister.php';
- $SemiParser = new HTML_SemiParser();
- ob_start(array(&$SemiParser, 'process'));
-
- $MetaForm = new HTML_MetaForm('secret_secret');
- $SemiParser->addObject($MetaForm);
-
- $FormPersister = new HTML_FormPersister();
- $SemiParser->addObject($FormPersister);
-
- $metaFormAction = new HTML_MetaFormAction($MetaForm);
- print_r($metaFormAction->process());
- print_r($metaFormAction->getErrors());
- print_r($MetaForm->getFormMeta());*/
-
- //$x = Cache::slot('Test',1);
+ QFW::$view->assign('title', 'Основная страница');
+ return QFW::$view->fetch('index.html');
return QFW::$view->fetch('b.html');
-
- return 'Корневое действие сайта, показывается на /, на /default, на /index и т.п.<br/>';
}
public function testBlock()
diff --git a/application/default/controllers/TestController.php b/application/default/controllers/TestController.php
index 452a5fd..73ea03d 100644
--- a/application/default/controllers/TestController.php
+++ b/application/default/controllers/TestController.php
@@ -6,6 +6,11 @@ class TestController
{
}
+ public function indexAction()
+ {
+ return QFW::$view->render('a.html');
+ }
+
public function indexBlock()
{
return "<pre>".QFW::$view->render('b.html')
@@ -21,8 +26,8 @@ class TestController
public function bBlock()
{
- return QFW::$view->render('b.html')."\nБлок B - ".
- QFW::$router->UriPath.' '.QFW::$router->CurPath.' '.QFW::$router->ParentPath;
+ return QFW::$view->render('b.html')
+ ."\nБлок B - ".QFW::$router->UriPath.' '.QFW::$router->CurPath.' '.QFW::$router->ParentPath;
}
}
diff --git a/application/default/templates/main.html b/application/default/templates/a.html
similarity index 68%
copy from application/default/templates/main.html
copy to application/default/templates/a.html
index 6e88a2d..d42016b 100644
--- a/application/default/templates/main.html
+++ b/application/default/templates/a.html
@@ -1,19 +1,5 @@
-<html>
-<head><title>Main.tpl</title></head>
-<body>
-<?php echo $P->outHead('h','1','2'); ?>
-Это файл Main.tpl<br />
-Это урл <?php echo Url::site('test'); ?>
-
-<br />
-<?php echo $content; ?>
-<br />
-
-<form method="post">
-<input type="text" name="test" default="ttt" label="test: ^" id="wdf" meta:validator="!filled" />
-<input type="submit" name="aaa" />
-</form>
-
+<?php echo $P->outHead('h','1','2'); ?><br>
+Это урл <?php echo Url::site('test'); ?><br>
<?php echo $P->addJS('file.js'); ?>
<?php echo $P->addJS('file.js'); ?>
<?php echo $P->addCSS('file.css'); ?>
@@ -31,5 +17,3 @@ zzzzzzzzzzzzzzzzzzz
<?php echo $this->block('test');?><br />
А вот тут он закончился
<?php echo $P->getHead(false,'h');?>HEAD<?php echo $P->getHead(true,'h');?>
-</body>
-</html>
diff --git a/application/default/templates/index.html b/application/default/templates/index.html
new file mode 100644
index 0000000..5a2aa47
--- /dev/null
+++ b/application/default/templates/index.html
@@ -0,0 +1,7 @@
+<h2>Добро пожаловать</h2>
+
+<ul>
+ <li><a href="<?php echo Url::M('doc') ?>">Документация</a>
+ <p><small>Для генерации нужен установленный a2x, xetex и вообще только unix - с виндой трахайтесь как хотите</small></p>
+ </li>
+</ul>
diff --git a/application/default/templates/index.tpl b/application/default/templates/index.tpl
deleted file mode 100644
index 625e9d5..0000000
--- a/application/default/templates/index.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{include file="block:test.a()"}
\ No newline at end of file
diff --git a/application/default/templates/index2.tpl b/application/default/templates/index2.tpl
deleted file mode 100644
index d063241..0000000
--- a/application/default/templates/index2.tpl
+++ /dev/null
@@ -1 +0,0 @@
-{include file="block:test.b()"}
\ No newline at end of file
diff --git a/application/default/templates/main.html b/application/default/templates/main.html
index 6e88a2d..1e4fc8e 100644
--- a/application/default/templates/main.html
+++ b/application/default/templates/main.html
@@ -1,35 +1,11 @@
+<!DOCTYPE html>
<html>
-<head><title>Main.tpl</title></head>
+<head>
+ <meta charset="utf-8">
+ <title><?php echo isset($title)?'QFW::'.$title:'QFW' ?></title>
+</head>
<body>
-<?php echo $P->outHead('h','1','2'); ?>
-Это файл Main.tpl<br />
-Это урл <?php echo Url::site('test'); ?>
-
-<br />
+<h1>QFW - <small>оно таки у вас завелось</small></h1>
<?php echo $content; ?>
-<br />
-
-<form method="post">
-<input type="text" name="test" default="ttt" label="test: ^" id="wdf" meta:validator="!filled" />
-<input type="submit" name="aaa" />
-</form>
-
-<?php echo $P->addJS('file.js'); ?>
-<?php echo $P->addJS('file.js'); ?>
-<?php echo $P->addCSS('file.css'); ?>
-<?php echo $P->addCSS('file.css'); ?>
-<?php $this->begin()->strtoupper(); ?>
-zzzzzzzzzzzzzzzzzzz
-<?php $this->end(); ?>
-
-<?php echo $P->getHead(false,'h');?>HEAD<?php echo $P->getHead(true,'h');?>
-А сюда у нас подключен блок test/index<br />
-<?php echo $this->block('default.test', 11, 34, 'sdfsf');?><br />
-<?php echo $this->block('default.test.index(1,2,3,4)');?><br />
-<?php echo $this->block('test(\'34\\\'23\',342,\'sfsdf,sfs\'\'df\',"234545\"fdsgdf")');?><br />
-<?php echo $this->block("test(lsfdjhskjhg sjskh ,'jks'dfkjhsdf',jsh,kjs sdhf)");?><br />
-<?php echo $this->block('test');?><br />
-А вот тут он закончился
-<?php echo $P->getHead(false,'h');?>HEAD<?php echo $P->getHead(true,'h');?>
</body>
</html>
diff --git a/application/default/templates/main.tpl b/application/default/templates/main.tpl
deleted file mode 100644
index d6bdf7b..0000000
--- a/application/default/templates/main.tpl
+++ /dev/null
@@ -1,28 +0,0 @@
-<html>
-<head><title>Main.tpl</title></head>
-<body>
-{outHead name='h'}
-Это файл Main.tpl</br>
-Это урл {siteUrl url='test'}
-<br />
-{$content}
-<br />
-{getHead name='h'}HEAD{/getHead}
-{outHead name='h'}
-
-{addJS file='file.js'}
-{addJS file='file.js'}
-{addJS file='file2.js'}
-{addJS file='file1.js'}
-{addCSS file='file.css'}
-{addCSS file='file1.css'}
-
-А сюда у нас подключен блок test</br>
-{include file="block:test"}<br />
-{*include file="block:test/index//a/1/b/2"}<br />
-{include file="block:test(123,55,'1\'1','1,1','$ttt')"}<br />
-{include file="block:test.index()"*}<br />
-А вот тут он закончился
-{getHead name='123'}<script></script>{/getHead}
-</body>
-</html>
\ No newline at end of file
-----------------------------------------------------------------------
Summary of changes:
.../default/controllers/IndexController.php | 25 ++------------
application/default/controllers/TestController.php | 9 ++++-
.../default/templates/{main.html => a.html} | 20 +----------
application/default/templates/index.html | 7 ++++
application/default/templates/index.tpl | 1 -
application/default/templates/index2.tpl | 1 -
application/default/templates/main.html | 36 +++----------------
application/default/templates/main.tpl | 28 ---------------
8 files changed, 25 insertions(+), 102 deletions(-)
copy application/default/templates/{main.html => a.html} (68%)
create mode 100644 application/default/templates/index.html
delete mode 100644 application/default/templates/index.tpl
delete mode 100644 application/default/templates/index2.tpl
delete mode 100644 application/default/templates/main.tpl
hooks/post-receive
--
quickfw
|