diff --git a/application/controller/controllerController.php b/application/controller/controllerController.php new file mode 100644 index 0000000..5fe43e9 --- /dev/null +++ b/application/controller/controllerController.php @@ -0,0 +1,23 @@ + 'rapid prototyping framework', + 'title' => 'Nibiru Controller Example', + 'css' => Config::getInstance()->getConfig()[View::NIBIRU_SETTINGS]["smarty.css"], + 'js' => Config::getInstance()->getConfig()[View::NIBIRU_SETTINGS]["smarty.js"] + ]); + } + + public function navigationAction() + { + JsonNavigation::getInstance()->loadJsonNavigationArray(); + } + +} \ No newline at end of file diff --git a/application/controller/formsController.php b/application/controller/formsController.php new file mode 100644 index 0000000..4280196 --- /dev/null +++ b/application/controller/formsController.php @@ -0,0 +1,88 @@ + 'Full Name', + 'for' => 'full-name', + 'class' => 'contacts-label' + ) + ); + + Form::addInputTypeText( + array( + 'name' => 'full-name', + 'required' => 'required', + 'id' => 'full-name', + 'class' => 'contacts-input form-control' + ), + array( + 'class' => 'input-text' + ) + ); + + Form::addTypeLabel( + array( + 'value' => 'Email', + 'for' => 'email', + 'class' => 'contacts-label' + ) + ); + + Form::addInputTypeText( + array( + 'name' => 'email', + 'required' => 'required', + 'id' => 'email', + 'class' => 'contacts-input form-control' + ), + array( + 'class' => 'input-email' + ) + ); + + Form::addTypeButton( + array( + 'class' => 'btn-block btn-info', + 'name' => 'Send Message' + ) + ); + + $this->form = Form::addForm( + array( + 'name' => 'newregister', + 'method' => 'post', + 'action' => 'YOURPOSTURL', + 'target' => '_self' + ) + ); + } + + public function pageAction() + { + View::assign([ + 'name' => 'rapid prototyping framework', + 'title' => 'Nibiru Forms Example', + 'formdata' => $this->form, + 'css' => Config::getInstance()->getConfig()[View::NIBIRU_SETTINGS]["smarty.css"], + 'js' => Config::getInstance()->getConfig()[View::NIBIRU_SETTINGS]["smarty.js"] + ]); + } + + public function navigationAction() + { + JsonNavigation::getInstance()->loadJsonNavigationArray(); + } + +} \ No newline at end of file diff --git a/application/controller/indexController.php b/application/controller/indexController.php index 54c12f7..5a0814e 100644 --- a/application/controller/indexController.php +++ b/application/controller/indexController.php @@ -1,6 +1,5 @@ assign( - array( - 'name' => 'Beispielseite', - 'title' => 'Stephan Kasdorf - Nibiru Example', + View::assign([ + 'name' => 'rapid prototyping framework', + 'title' => 'Nibiru Example Startpage', 'css' => Config::getInstance()->getConfig()[View::NIBIRU_SETTINGS]["smarty.css"], 'js' => Config::getInstance()->getConfig()[View::NIBIRU_SETTINGS]["smarty.js"] - ) - ); + ]); } public function navigationAction() diff --git a/application/settings/config/navigation.json b/application/settings/config/navigation.json index 0115bb2..681021a 100644 --- a/application/settings/config/navigation.json +++ b/application/settings/config/navigation.json @@ -1,6 +1,8 @@ { "navigation" : { - "Home": { "link": "/", "tooltip": "Home", "icon": "icon icon-home", "footer": "false" } + "Home": { "link": "/", "tooltip": "Home", "icon": "icon icon-home", "footer": "false" }, + "Controller": { "link": "/controller", "tooltip": "Controller", "icon": "icon icon-pencil", "footer": "false" }, + "Forms": { "link": "/forms", "tooltip": "Forms", "icon": "icon icon-clipboard", "footer": "false" } } } \ No newline at end of file diff --git a/application/settings/config/settings.development.ini b/application/settings/config/settings.development.ini index 8b31dc9..435b689 100644 --- a/application/settings/config/settings.development.ini +++ b/application/settings/config/settings.development.ini @@ -1,13 +1,10 @@ [ENGINE] -;;name = "Dwoo" -name = "Smarty" -;;name = "Twig" cache = "/../../application/view/cache/" templates = "/../../application/view/templates/" templates_c = "/../../application/view/templates_c/" config_dir = "/../../application/view/configs/" -class_file = "core/l/Smarty/Smarty.class.php" -debugbar = false +debug_template = "/../../application/view/templates/shared/debug.tpl" +debugbar = true [AUTOLOADER] class.pos[] = "users" @@ -39,7 +36,7 @@ smarty.css[] = "public/css/v3/toolkit-inverse.css" smarty.css[] = "public/css/v3/application.css" smarty.css[] = "public/css/v3/jquery-ui.css" smarty.css[] = "public/css/v3/nibiru-debug.css" -smarty.css[] = "public/css/v3/tiamat-form.css" +;;smarty.css[] = "public/css/v3/tiamat-form.css" smarty.js[] = "public/js/v3/jquery.min.js" smarty.js[] = "public/js/v3/tether.min.js" smarty.js[] = "public/js/v3/jquery-ui.js" @@ -51,7 +48,8 @@ smarty.js[] = "public/js/v3/nibiru-debug.js" [ROUTING] route[index] = "/" -route[example] = "/example" +route[controller] = "/controller" +route[forms] = "/forms" [DATABASE] username = "YOURUSER" diff --git a/application/view/templates/controller.tpl b/application/view/templates/controller.tpl new file mode 100644 index 0000000..df98acd --- /dev/null +++ b/application/view/templates/controller.tpl @@ -0,0 +1,31 @@ +{include 'shared/header.tpl'} +
+