diff options
author | Natanael Copa <natanael.copa@gmail.com> | 2007-07-27 12:53:38 +0000 |
---|---|---|
committer | Natanael Copa <natanael.copa@gmail.com> | 2007-07-27 12:53:38 +0000 |
commit | dc53423183a0c459284ebd139022b707f01af006 (patch) | |
tree | 8a67a2904ec991028bddd429d57eec114b05baab /app/dummy | |
parent | 275c80281ba2e84b8d810bdb1c2b7f8c9a4333d9 (diff) | |
download | acf-core-2.0_alpha1.tar.bz2 acf-core-2.0_alpha1.tar.xz |
moved core files to new dir structurev2.0_alpha1
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@219 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'app/dummy')
-rw-r--r-- | app/dummy/bar-controller.lua | 35 | ||||
-rw-r--r-- | app/dummy/bar-html.lsp | 3 | ||||
-rw-r--r-- | app/dummy/bar.menu | 3 |
3 files changed, 41 insertions, 0 deletions
diff --git a/app/dummy/bar-controller.lua b/app/dummy/bar-controller.lua new file mode 100644 index 0000000..e0b9999 --- /dev/null +++ b/app/dummy/bar-controller.lua @@ -0,0 +1,35 @@ +-- A standin controller for testing + +module (..., package.seeall) + +-- Cause an http redirect to our "read" action +-- We use the self.conf table because it already has prefix,controller,etc +-- The redir code is defined in the application error handler (acf-controller) +local list_redir = function (self) + self.conf.action = "read" + self.conf.type = "redir" + error (self.conf) +end + + +--init ( init by definition is a public method) +init = function(self, parent) + -- If they specify an invalid action or try to run init, then redirect + -- to the read function. + if ( self.conf.action == nil or self.conf.action == "init" ) then + list_redir(self) + end + -- Make a function by the action name + self.worker[self.conf.action] = function () + return cfe ( {name=self.conf.action, value=self.conf.action} ) + + end + +end + + +read = function (self ) + return ( { } ) +end + + diff --git a/app/dummy/bar-html.lsp b/app/dummy/bar-html.lsp new file mode 100644 index 0000000..708e1ad --- /dev/null +++ b/app/dummy/bar-html.lsp @@ -0,0 +1,3 @@ +<? view = ... ?> +<h1>Action <?= view.name ?></h1> +<p>This is a null controller for menu and authorization testing.</p> diff --git a/app/dummy/bar.menu b/app/dummy/bar.menu new file mode 100644 index 0000000..1fb42b8 --- /dev/null +++ b/app/dummy/bar.menu @@ -0,0 +1,3 @@ +# Prefix and controller are already known at this point +# Cat Group Tab Action +Test Bar_controller bar read |