Introduce noheader and nofooter CBI-Dispatcher config
This commit is contained in:
parent
8368432a63
commit
8fdb12c4d1
1 changed files with 6 additions and 2 deletions
|
@ -672,15 +672,19 @@ local function _cbi(self, ...)
|
|||
|
||||
local pageaction = true
|
||||
http.header("X-CBI-State", state or 0)
|
||||
if not config.noheader then
|
||||
tpl.render("cbi/header", {state = state})
|
||||
end
|
||||
for i, res in ipairs(maps) do
|
||||
res:render()
|
||||
if res.pageaction == false then
|
||||
pageaction = false
|
||||
end
|
||||
end
|
||||
if not config.nofooter then
|
||||
tpl.render("cbi/footer", {pageaction=pageaction, state = state, autoapply = config.autoapply})
|
||||
end
|
||||
end
|
||||
|
||||
--- Create a CBI model dispatching target.
|
||||
-- @param model CBI model to be rendered
|
||||
|
|
Loading…
Reference in a new issue