projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce noheader and nofooter CBI-Dispatcher config
[project/luci.git]
/
libs
/
web
/
luasrc
/
dispatcher.lua
diff --git
a/libs/web/luasrc/dispatcher.lua
b/libs/web/luasrc/dispatcher.lua
index
0d48acd
..
89fa0d2
100644
(file)
--- a/
libs/web/luasrc/dispatcher.lua
+++ b/
libs/web/luasrc/dispatcher.lua
@@
-672,14
+672,18
@@
local function _cbi(self, ...)
local pageaction = true
http.header("X-CBI-State", state or 0)
local pageaction = true
http.header("X-CBI-State", state or 0)
- tpl.render("cbi/header", {state = state})
+ 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
for i, res in ipairs(maps) do
res:render()
if res.pageaction == false then
pageaction = false
end
end
- tpl.render("cbi/footer", {pageaction=pageaction, state = state, autoapply = config.autoapply})
+ if not config.nofooter then
+ tpl.render("cbi/footer", {pageaction=pageaction, state = state, autoapply = config.autoapply})
+ end
end
--- Create a CBI model dispatching target.
end
--- Create a CBI model dispatching target.