Changeset 4377

Show
Ignore:
Timestamp:
03/27/09 02:10:17 (4 years ago)
Author:
Cyrus
Message:

Introduce noheader and nofooter CBI-Dispatcher config

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/libs/web/luasrc/dispatcher.lua

    r4330 r4377  
    673673    local pageaction = true 
    674674    http.header("X-CBI-State", state or 0) 
    675     tpl.render("cbi/header", {state = state}) 
     675    if not config.noheader then 
     676        tpl.render("cbi/header", {state = state}) 
     677    end 
    676678    for i, res in ipairs(maps) do 
    677679        res:render() 
     
    680682        end 
    681683    end 
    682     tpl.render("cbi/footer", {pageaction=pageaction, state = state, autoapply = config.autoapply}) 
     684    if not config.nofooter then 
     685        tpl.render("cbi/footer", {pageaction=pageaction, state = state, autoapply = config.autoapply}) 
     686    end 
    683687end 
    684688