From b741adfb35bd0505215170720dd21ed40897e17f Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Mon, 8 Mar 2021 10:48:46 +0000 Subject: [PATCH] luci-app-vpn-policy-routing: bugfix: template layout on theme-openwrt-2020 Signed-off-by: Stan Grishin --- .../luasrc/model/cbi/vpn-policy-routing.lua | 4 ++-- .../luasrc/view/vpn-policy-routing/buttons.htm | 4 ++-- .../luasrc/view/vpn-policy-routing/status-gateways.htm | 8 ++++---- .../luasrc/view/vpn-policy-routing/status.htm | 4 +++- .../po/templates/vpn-policy-routing.pot | 4 ++++ 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua b/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua index 8be8df7b96..82d90e9bf8 100644 --- a/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua +++ b/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua @@ -132,7 +132,7 @@ m = Map("vpn-policy-routing", translate("VPN and WAN Policy-Based Routing")) h = m:section(NamedSection, "config", packageName, translatef("Service Status [%s %s]", packageName, packageVersion)) status = h:option(DummyValue, "_dummy", translate("Service Status")) -status.template = "vpn-policy-routing/status-service" +status.template = "vpn-policy-routing/status" status.value = statusText if serviceRunning and serviceGateways and serviceGateways ~= "" then gateways = h:option(DummyValue, "_dummy", translate("Service Gateways")) @@ -150,7 +150,7 @@ if serviceWarnings and serviceWarnings ~= "" then warnings.value = serviceWarnings end if packageVersion ~= "" then - buttons = h:option(DummyValue, "_dummy") + buttons = h:option(DummyValue, "_dummy", translate("Service Control")) buttons.template = packageName .. "/buttons" end diff --git a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm index b1ec6fbf97..8a64698b6c 100644 --- a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm +++ b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/buttons.htm @@ -38,7 +38,7 @@ end -%> -
+<%+cbi/valueheader%>
@@ -60,7 +60,7 @@ onclick="button_action(this)" />
-
+<%+cbi/valuefooter%> <%-if not btn_start_status then%> diff --git a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm index 65f3e5d7c6..377cfeeaac 100644 --- a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm +++ b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status-gateways.htm @@ -5,10 +5,10 @@ This is free software, licensed under the Apache License, Version 2.0 <%+cbi/valueheader%> - +
+ <%=self:cfgvalue(section):gsub('\n', '
' )%> +
+
<%- local readmeURL = "https://docs.openwrt.melmac.net/vpn-policy-routing/" -%> diff --git a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status.htm b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status.htm index e74206853a..4a93564614 100644 --- a/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status.htm +++ b/applications/luci-app-vpn-policy-routing/luasrc/view/vpn-policy-routing/status.htm @@ -5,6 +5,8 @@ This is free software, licensed under the Apache License, Version 2.0 <%+cbi/valueheader%> -<%=self:cfgvalue(section):gsub('\n', '
' )%> +
+ <%=self:cfgvalue(section):gsub('\n', '
' )%> +
<%+cbi/valuefooter%> diff --git a/applications/luci-app-vpn-policy-routing/po/templates/vpn-policy-routing.pot b/applications/luci-app-vpn-policy-routing/po/templates/vpn-policy-routing.pot index d2deb037f2..27ba9e278c 100644 --- a/applications/luci-app-vpn-policy-routing/po/templates/vpn-policy-routing.pot +++ b/applications/luci-app-vpn-policy-routing/po/templates/vpn-policy-routing.pot @@ -253,6 +253,10 @@ msgstr "" msgid "Select Append for -A and Insert for -I." msgstr "" +#: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:153 +msgid "Service Control" +msgstr "" + #: applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua:143 msgid "Service Errors" msgstr "" -- 2.30.2