diff options
Diffstat (limited to 'interfaces-controller.lua')
-rw-r--r-- | interfaces-controller.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/interfaces-controller.lua b/interfaces-controller.lua index 4c8c2dd..d2866db 100644 --- a/interfaces-controller.lua +++ b/interfaces-controller.lua @@ -12,7 +12,7 @@ read = function (self ) -- the "script" "prefix" "controller" "action" as separate fields, -- since the view could be a cli, not a web interface. the VIEW -- should make a uri from these these elements. - local actions = { link = ENV["SCRIPT_NAME"] .. self.conf.prefix .. + local actions = { link = self.conf.script .. self.conf.prefix .. self.conf.controller .. "/", action = { "create", "read", "update", "delete" } } return ( { actions = actions, iface = iface, status=status } ) @@ -81,7 +81,7 @@ update = function(self) data.cmddelete = cfe({type="action", value="Delete", name="cmddelete", label="Delete this record"}) return ( cfe ({type="form", - option={ script=ENV["SCRIPT_NAME"], + option={ script=self.conf.script, prefix=self.conf.prefix, controller = self.conf.controller, action = "update", @@ -120,7 +120,7 @@ delete = function(self) me.action2 = cfe({name="cmd", type="action", value="cancel", label="action"}) return ( cfe ({type="form", - option={ script=ENV["SCRIPT_NAME"], + option={ script=self.conf.script, prefix=self.conf.prefix, controller = self.conf.controller, action = "delete", @@ -158,7 +158,7 @@ create = function(self) data.cmd = cfe({type="action", value="save", label="action"}) return ( cfe ({type="form", - option={ script=ENV["SCRIPT_NAME"], + option={ script=self.conf.script, prefix=self.conf.prefix, controller = self.conf.controller, action = "create", |