No Description

apperror.lua 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. --[[
  2. LuCI - Lua Configuration Interface
  3. Copyright 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. $Id$
  9. ]]--
  10. local CTRL = require "luci.controller.privoxy" -- privoxy multiused functions
  11. local DISP = require "luci.dispatcher"
  12. -- Build javascript string to be displayed as version information
  13. local VERSION = translate("Version Information")
  14. .. [[\n\nluci-app-privoxy]]
  15. .. [[\n\t]] .. translate("Version") .. [[:\t]] .. CTRL.version_luci_app
  16. .. [[\n\t]] .. translate("Build") .. [[:\t]] .. CTRL.ipkg_version("luci-app-privoxy").version
  17. .. [[\n\nprivoxy ]] .. translate("required") .. [[:]]
  18. .. [[\n\t]] .. translate("Version") .. [[:\t]] .. CTRL.version_required .. [[ ]] .. translate("or higher")
  19. .. [[\n\nprivoxy ]] .. translate("installed") .. [[:]]
  20. .. [[\n\t]] .. translate("Version") .. [[:\t]] .. CTRL.ipkg_version("privoxy").version
  21. .. [[\n\n]]
  22. local HELP = [[<a href="http://www.privoxy.org/user-manual/config.html#%s" target="_blank">%s</a>]]
  23. -- cbi-map -- ##################################################################
  24. local m = Map("privoxy")
  25. m.title = [[</a><a href="javascript:alert(']]
  26. .. VERSION
  27. .. [[')">]]
  28. .. translate("Privoxy WEB proxy")
  29. m.description = translate("Privoxy is a non-caching web proxy with advanced filtering "
  30. .. "capabilities for enhancing privacy, modifying web page data and HTTP headers, "
  31. .. "controlling access, and removing ads and other obnoxious Internet junk.")
  32. -- cbi-section -- ##############################################################
  33. local s = m:section(SimpleSection)
  34. s.title = [[<font color="red">]] .. [[<strong>]]
  35. .. translate("Software update required")
  36. .. [[</strong>]] .. [[</font>]]
  37. -- old privoxy sofware version --------------------------------------------------------------
  38. local v = s:option(DummyValue, "_update_needed")
  39. v.titleref = DISP.build_url("admin", "system", "packages")
  40. v.rawhtml = true
  41. --v.title = [[<h3>]] .. [[<font color="red">]] .. [[<strong>]]
  42. -- .. translate("Software update required")
  43. -- .. [[</strong>]] .. [[</font>]] .. [[</h3>]] .. [[<br />]]
  44. v.value = [[<h3>]] .. [[<strong>]]
  45. .. translate("The currently installed 'privoxy' package is not supported by LuCI application.")
  46. .. [[<br />]]
  47. .. translate("Please update to the current version!")
  48. .. [[</strong>]] .. [[</h3>]]
  49. return m