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-mini/luasrc/controller/mini/uci.lua | 8 +++++--- modules/admin-mini/luasrc/view/mini/uci_apply.htm | 10 ++++++++++ modules/admin-mini/luasrc/view/mini/uci_changes.htm | 19 ++++++++++++++++--- modules/admin-mini/luasrc/view/mini/uci_revert.htm | 10 ++++++++++ 4 files changed, 41 insertions(+), 6 deletions(-) (limited to 'modules/admin-mini') 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) diff --git a/modules/admin-mini/luasrc/view/mini/uci_apply.htm b/modules/admin-mini/luasrc/view/mini/uci_apply.htm index 8aa09c641..a908b6a8b 100644 --- a/modules/admin-mini/luasrc/view/mini/uci_apply.htm +++ b/modules/admin-mini/luasrc/view/mini/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-mini/luasrc/view/mini/uci_changes.htm b/modules/admin-mini/luasrc/view/mini/uci_changes.htm index 591ae6998..89df99dab 100644 --- a/modules/admin-mini/luasrc/view/mini/uci_changes.htm +++ b/modules/admin-mini/luasrc/view/mini/uci_changes.htm @@ -13,14 +13,27 @@ $Id$ -%> <%+header%> +
+"><< <%:back%> +
+
+

<%:config%>

<%:changes%>

<%=changes%>

-
+
-
+ + +
+
-<%+footer%> + +
+
+"><< <%:back%> +
+<%+footer%> \ No newline at end of file diff --git a/modules/admin-mini/luasrc/view/mini/uci_revert.htm b/modules/admin-mini/luasrc/view/mini/uci_revert.htm index 553ec7454..e8515dc41 100644 --- a/modules/admin-mini/luasrc/view/mini/uci_revert.htm +++ b/modules/admin-mini/luasrc/view/mini/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