diff options
author | Steven Barth <steven@midlink.org> | 2008-10-10 20:59:27 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-10-10 20:59:27 +0000 |
commit | 720295d973b44cdad4cd4a0e0b0b0f7f79ff6c3a (patch) | |
tree | 19ba90091e82853047488f3c2a0842f31d47b42d /modules/admin-full/luasrc/controller/admin/uci.lua | |
parent | a957254e79a8cfaf4c79da138b6531c6ec324b36 (diff) |
OXYGEN #3: Add "back" button to UCI apply/revert/changes pages
Diffstat (limited to 'modules/admin-full/luasrc/controller/admin/uci.lua')
-rw-r--r-- | modules/admin-full/luasrc/controller/admin/uci.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/admin-full/luasrc/controller/admin/uci.lua b/modules/admin-full/luasrc/controller/admin/uci.lua index 53b3464f6..d313128ad 100644 --- a/modules/admin-full/luasrc/controller/admin/uci.lua +++ b/modules/admin-full/luasrc/controller/admin/uci.lua @@ -15,12 +15,14 @@ module("luci.controller.admin.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({"admin", "uci"}, nil, i18n("config")) - entry({"admin", "uci", "changes"}, call("action_changes"), i18n("changes"), 40) - entry({"admin", "uci", "revert"}, call("action_revert"), i18n("revert"), 30) - entry({"admin", "uci", "apply"}, call("action_apply"), i18n("apply"), 20) - entry({"admin", "uci", "saveapply"}, call("action_apply"), i18n("saveapply"), 10) + entry({"admin", "uci", "changes"}, call("action_changes"), i18n("changes"), 40).query = {redir=redir} + entry({"admin", "uci", "revert"}, call("action_revert"), i18n("revert"), 30).query = {redir=redir} + entry({"admin", "uci", "apply"}, call("action_apply"), i18n("apply"), 20).query = {redir=redir} + entry({"admin", "uci", "saveapply"}, call("action_apply"), i18n("saveapply"), 10).query = {redir=redir} end function convert_changes(changes) |