diff options
author | Christian Schoenebeck <christian.schoenebeck@gmail.com> | 2015-01-24 10:38:54 +0100 |
---|---|---|
committer | Christian Schoenebeck <christian.schoenebeck@gmail.com> | 2015-01-24 10:38:54 +0100 |
commit | 29f7cf16e56c269f45184677dfaa472499622fdb (patch) | |
tree | c947bf5cf0aa02e031ef77f22a3e1f4b6b32945e /applications/luci-app-privoxy/luasrc/model/cbi/privoxy/apperror.lua | |
parent | 40066a6799ba04cbf23c7752de6e83103a33ccad (diff) |
luci-app-privoxy: move from openwrt/packages to openwrt/luci
* move from openwrt/packages to openwrt/luci
* adaption to new LuCI subdirectory structure
* fix error handling
* modified version handling
* fixed translations
Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
Diffstat (limited to 'applications/luci-app-privoxy/luasrc/model/cbi/privoxy/apperror.lua')
-rwxr-xr-x | applications/luci-app-privoxy/luasrc/model/cbi/privoxy/apperror.lua | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/applications/luci-app-privoxy/luasrc/model/cbi/privoxy/apperror.lua b/applications/luci-app-privoxy/luasrc/model/cbi/privoxy/apperror.lua new file mode 100755 index 0000000000..fcbb88074d --- /dev/null +++ b/applications/luci-app-privoxy/luasrc/model/cbi/privoxy/apperror.lua @@ -0,0 +1,47 @@ +-- Copyright 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com> +-- Licensed under the Apache License, Version 2.0 + +local CTRL = require "luci.controller.privoxy" -- this application's controller +local DISP = require "luci.dispatcher" +local SYS = require "luci.sys" + +local HELP = [[<a href="http://www.privoxy.org/user-manual/config.html#%s" target="_blank">%s</a>]] + +-- cbi-map -- ################################################################## +local m = Map("privoxy") +m.title = [[</a><a href="javascript:alert(']] + .. translate("Version Information") + .. [[\n\nluci-app-privoxy]] + .. [[\n\t]] .. translate("Version") .. [[:\t]] + .. SYS.exec([[opkg list-installed ]] .. [[luci-app-privoxy]] .. [[ | cut -d " " -f 3 ]]) + .. [[\n\nprivoxy ]] .. translate("required") .. [[:]] + .. [[\n\t]] .. translate("Version") .. [[:\t]] .. CTRL.PRIVOXY_MIN .. [[ ]] .. translate("or higher") + .. [[\n\nprivoxy ]] .. translate("installed") .. [[:]] + .. [[\n\t]] .. translate("Version") .. [[:\t]] + .. SYS.exec([[opkg list-installed ]] .. [[privoxy]] .. [[ | cut -d " " -f 3 ]]) + .. [[\n\n]] + .. [[')">]] + .. translate("Privoxy WEB proxy") +m.description = translate("Privoxy is a non-caching web proxy with advanced filtering " + .. "capabilities for enhancing privacy, modifying web page data and HTTP headers, " + .. "controlling access, and removing ads and other obnoxious Internet junk.") + +-- cbi-section -- ############################################################## +local s = m:section(SimpleSection) +s.title = [[<font color="red">]] .. [[<strong>]] + .. translate("Software update required") + .. [[</strong>]] .. [[</font>]] + +-- old privoxy sofware version -------------------------------------------------------------- +local v = s:option(DummyValue, "_update_needed") +v.titleref = DISP.build_url("admin", "system", "packages") +v.rawhtml = true +--v.title = [[<h3>]] .. [[<font color="red">]] .. [[<strong>]] +-- .. translate("Software update required") +-- .. [[</strong>]] .. [[</font>]] .. [[</h3>]] .. [[<br />]] +v.value = [[<h3>]] .. [[<strong>]] + .. translate("The currently installed 'privoxy' package is not supported by LuCI application.") + .. [[<br />]] + .. translate("Please update to the current version!") + .. [[</strong>]] .. [[</h3>]] +return m |