From 99a1d525a7994ac12d11e5501c265f7b8683ce31 Mon Sep 17 00:00:00 2001 From: coderkun Date: Fri, 17 Jan 2014 13:12:02 +0100 Subject: [PATCH] add MenuAgent --- agents/bottomlevel/MenuAgent.inc | 35 ++++++++++++++++++++++++++++++++ agents/bottomlevel/epmty | 0 agents/toplevel/HtmlAgent.inc | 2 ++ controllers/MenuController.inc | 35 ++++++++++++++++++++++++++++++++ views/html/html.tpl | 5 ++++- views/html/menu/index.tpl | 2 ++ 6 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 agents/bottomlevel/MenuAgent.inc delete mode 100644 agents/bottomlevel/epmty create mode 100644 controllers/MenuController.inc create mode 100644 views/html/menu/index.tpl diff --git a/agents/bottomlevel/MenuAgent.inc b/agents/bottomlevel/MenuAgent.inc new file mode 100644 index 00000000..835a8831 --- /dev/null +++ b/agents/bottomlevel/MenuAgent.inc @@ -0,0 +1,35 @@ + + * @copyright 2014 Heinrich-Heine-Universität Düsseldorf + * @license http://www.gnu.org/licenses/gpl.html + * @link https://bitbucket.org/coderkun/the-legend-of-z + */ + + namespace hhu\z\agents\bottomlevel; + + + /** + * Agent to display a menu. + * + * @author Oliver Hanraths + */ + class MenuAgent extends \nre\agents\BottomlevelAgent + { + + + + + /** + * Action: index. + */ + public function index() + { + } + + } + +?> diff --git a/agents/bottomlevel/epmty b/agents/bottomlevel/epmty deleted file mode 100644 index e69de29b..00000000 diff --git a/agents/toplevel/HtmlAgent.inc b/agents/toplevel/HtmlAgent.inc index e6bc8d61..43090112 100644 --- a/agents/toplevel/HtmlAgent.inc +++ b/agents/toplevel/HtmlAgent.inc @@ -28,6 +28,8 @@ */ public function index() { + // Add menu + $this->addSubAgent('Menu'); } } diff --git a/controllers/MenuController.inc b/controllers/MenuController.inc new file mode 100644 index 00000000..51aedd25 --- /dev/null +++ b/controllers/MenuController.inc @@ -0,0 +1,35 @@ + + * @copyright 2014 Heinrich-Heine-Universität Düsseldorf + * @license http://www.gnu.org/licenses/gpl.html + * @link https://bitbucket.org/coderkun/the-legend-of-z + */ + + namespace hhu\z\controllers; + + + /** + * Controller of the Agent to display a menu. + * + * @author Oliver Hanraths + */ + class MenuController extends \hhu\z\Controller + { + + + + + /** + * Action: index. + */ + public function index() + { + } + + } + +?> diff --git a/views/html/html.tpl b/views/html/html.tpl index 6adf05e5..63c9e041 100644 --- a/views/html/html.tpl +++ b/views/html/html.tpl @@ -9,7 +9,10 @@ -

The Legend of Z

+
+

The Legend of Z

+ +
diff --git a/views/html/menu/index.tpl b/views/html/menu/index.tpl new file mode 100644 index 00000000..88d03d48 --- /dev/null +++ b/views/html/menu/index.tpl @@ -0,0 +1,2 @@ +