summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-mini/luasrc/controller/mini
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-10-10 20:59:27 +0000
committerSteven Barth <steven@midlink.org>2008-10-10 20:59:27 +0000
commit720295d973b44cdad4cd4a0e0b0b0f7f79ff6c3a (patch)
tree19ba90091e82853047488f3c2a0842f31d47b42d /modules/admin-mini/luasrc/controller/mini
parenta957254e79a8cfaf4c79da138b6531c6ec324b36 (diff)
OXYGEN #3: Add "back" button to UCI apply/revert/changes pages
Diffstat (limited to 'modules/admin-mini/luasrc/controller/mini')
-rw-r--r--modules/admin-mini/luasrc/controller/mini/uci.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/admin-mini/luasrc/controller/mini/uci.lua b/modules/admin-mini/luasrc/controller/mini/uci.lua
index 4e920563a..4687c839d 100644
--- a/modules/admin-mini/luasrc/controller/mini/uci.lua
+++ b/modules/admin-mini/luasrc/controller/mini/uci.lua
@@ -16,11 +16,13 @@ module("luci.controller.mini.uci", package.seeall)
function index()
local i18n = luci.i18n.translate
+ local redir = luci.http.formvalue("redir", true) or
+ luci.dispatcher.build_url(unpack(luci.dispatcher.context.request))
entry({"mini", "uci"}, nil, i18n("config"))
- entry({"mini", "uci", "changes"}, call("action_changes"), i18n("changes"), 30)
- entry({"mini", "uci", "revert"}, call("action_revert"), i18n("revert"), 20)
- entry({"mini", "uci", "saveapply"}, call("action_apply"), i18n("saveapply"), 10)
+ entry({"mini", "uci", "changes"}, call("action_changes"), i18n("changes"), 30).query = {redir=redir}
+ entry({"mini", "uci", "revert"}, call("action_revert"), i18n("revert"), 20).query = {redir=redir}
+ entry({"mini", "uci", "saveapply"}, call("action_apply"), i18n("saveapply"), 10).query = {redir=redir}
end
function convert_changes(changes)