From 720295d973b44cdad4cd4a0e0b0b0f7f79ff6c3a Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 10 Oct 2008 20:59:27 +0000 Subject: OXYGEN #3: Add "back" button to UCI apply/revert/changes pages --- modules/admin-full/luasrc/controller/admin/uci.lua | 10 ++++++---- modules/admin-full/luasrc/view/admin_uci/apply.htm | 10 ++++++++++ modules/admin-full/luasrc/view/admin_uci/changes.htm | 10 ++++++++++ modules/admin-full/luasrc/view/admin_uci/revert.htm | 10 ++++++++++ 4 files changed, 36 insertions(+), 4 deletions(-) (limited to 'modules/admin-full/luasrc') 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) diff --git a/modules/admin-full/luasrc/view/admin_uci/apply.htm b/modules/admin-full/luasrc/view/admin_uci/apply.htm index 8aa09c641..a908b6a8b 100644 --- a/modules/admin-full/luasrc/view/admin_uci/apply.htm +++ b/modules/admin-full/luasrc/view/admin_uci/apply.htm @@ -13,6 +13,11 @@ $Id$ -%> <%+header%> +
+"><< <%:back%> +
+
+

<%:config%>

<%:uci_applied%>:

<%=(changes or "-")%> @@ -26,4 +31,9 @@ while line do end fp:close() %> +
+"><< <%:back%> +
+
+
<%+footer%> \ No newline at end of file diff --git a/modules/admin-full/luasrc/view/admin_uci/changes.htm b/modules/admin-full/luasrc/view/admin_uci/changes.htm index da0d9f11c..6375aaf71 100644 --- a/modules/admin-full/luasrc/view/admin_uci/changes.htm +++ b/modules/admin-full/luasrc/view/admin_uci/changes.htm @@ -13,6 +13,11 @@ $Id$ -%> <%+header%> +
+"><< <%:back%> +
+
+

<%:config%>

<%:changes%>

<%=changes%> @@ -26,4 +31,9 @@ $Id$
+ +
+
+"><< <%:back%> +
<%+footer%> diff --git a/modules/admin-full/luasrc/view/admin_uci/revert.htm b/modules/admin-full/luasrc/view/admin_uci/revert.htm index 553ec7454..e8515dc41 100644 --- a/modules/admin-full/luasrc/view/admin_uci/revert.htm +++ b/modules/admin-full/luasrc/view/admin_uci/revert.htm @@ -13,7 +13,17 @@ $Id$ -%> <%+header%> +
+"><< <%:back%> +
+
+

<%:config%>

<%:uci_reverted%>:

<%=(changes or "-")%> +
+"><< <%:back%> +
+
+
<%+footer%> \ No newline at end of file -- cgit v1.2.3