diff options
Diffstat (limited to 'modules/luci-base/luasrc/dispatcher.lua')
-rw-r--r-- | modules/luci-base/luasrc/dispatcher.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua index 626a46dfd2..e8106b741d 100644 --- a/modules/luci-base/luasrc/dispatcher.lua +++ b/modules/luci-base/luasrc/dispatcher.lua @@ -857,6 +857,15 @@ function template(name) end +local _view = function(self, ...) + require "luci.template".render("view", { view = self.view }) +end + +function view(name) + return {type = "view", view = name, target = _view} +end + + local function _cbi(self, ...) local cbi = require "luci.cbi" local tpl = require "luci.template" |