diff --git a/classes/Xodx/Application.php b/classes/Xodx/Application.php index 29f9aa4..fff13e6 100644 --- a/classes/Xodx/Application.php +++ b/classes/Xodx/Application.php @@ -19,7 +19,7 @@ public function run() { /** * Prepare Template */ - $this->_layout->setLayout('templates/layout.phtml'); + $this->_layout->setLayout('layout.phtml'); $request = $bootstrap->getResource('request'); @@ -47,18 +47,23 @@ public function run() { $this->_layout->username = $user->getName(); $this->_layout->notifications = $userController->getNotifications($user->getUri()); - $this->_layout->addDebug($bootstrap->getResource('logger')->getLastLog()); $config = $bootstrap->getResource('config'); - if (isset($config['debug']) && $config['debug'] == false) { - $this->_layout->disableDebug(); + if (!isset($config['debug']) || $config['debug'] == true) { + $debug = new Saft_Template( + 'debug.phtml', array('log' => $bootstrap->getResource('logger')->getLastLog()) + ); + $this->_layout->setPlaceholder('debug', $debug); } } catch (Exception $e) { - $this->_layout->setLayout('templates/errorlayout.phtml'); - $this->_layout->errorType = 'Application Error'; - $this->_layout->exception = $e; - $this->_layout->back = $this->getBaseUri(); - $this->_layout->addContent('templates/error.phtml'); + $this->_layout->setLayout('errorlayout.phtml'); + $options = array( + 'errorType' => 'Application Error', + 'exception' => $e, + 'back' => $this->getBaseUri() + ); + $errorPlaceholder = new Saft_Template('error.phtml', $options); + $this->_layout->setPlaceholder('error', $errorPlaceholder); } $this->_layout->render(); } diff --git a/classes/Xodx/FeedController.php b/classes/Xodx/FeedController.php index 5b895ea..0715a46 100644 --- a/classes/Xodx/FeedController.php +++ b/classes/Xodx/FeedController.php @@ -45,7 +45,7 @@ public function getFeedAction($template, $uri = null, $format = null) $nameHelper = new Xodx_NameHelper($this->_app); - $template->setLayout('templates/feed.phtml'); + $template->setLayout('feed.phtml'); $template->updated = $updated; $template->uri = $uri; $template->feedUri = $feedUri; diff --git a/libraries/Saft b/libraries/Saft index e135046..f181420 160000 --- a/libraries/Saft +++ b/libraries/Saft @@ -1 +1 @@ -Subproject commit e135046f0e80ecc3a730bf1488cd0b2ff26c904c +Subproject commit f1814209771c9daf2d4914a2259f7067bb65f59e diff --git a/templates/activity/addactivity.phtml b/templates/activity/addactivity.phtml new file mode 100644 index 0000000..491ff92 --- /dev/null +++ b/templates/activity/addactivity.phtml @@ -0,0 +1,2 @@ +
+ = $this->log ?> ++
-= $this->_debugLog ?> -+ placeholder('error'); ?>