luci-app-ddns: fix errors in global.lua
[project/luci.git] / applications / luci-app-ddns / luasrc / model / cbi / ddns / overview.lua
index 2944ec5..9e8df2d 100644 (file)
@@ -14,7 +14,8 @@ show_hints = not (DDNS.check_ipv6()           -- IPv6 support
                and DDNS.check_proxy()          -- Proxy support
                and DDNS.check_bind_host()      -- DNS TCP support
                )
-need_update = CTRL.update_needed()             -- correct ddns-scripts version
+-- correct ddns-scripts version
+need_update = DDNS.ipkg_ver_compare(DDNS.ipkg_ver_installed("ddns-scripts"), "<<", CTRL.DDNS_MIN)
 
 -- html constants
 font_red = [[<font color="red">]]
@@ -26,10 +27,17 @@ bold_off = [[</strong>]]
 m = Map("ddns")
 
 -- first need to close <a> from cbi map template our <a> closed by template
---m.title = [[</a><a href="javascript:alert(']] .. CTRL.show_versions() ..[[')">]] ..
---             translate("Dynamic DNS")
-m.title = [[</a><a href="#" onclick="onclick_maptitle();">]] ..
-               translate("Dynamic DNS")
+m.title        = [[</a><a href="javascript:alert(']]
+               .. translate("Version Information")
+               .. [[\n\nluci-app-ddns]]
+               .. [[\n\t]] .. translate("Version") .. [[:\t]] .. DDNS.ipkg_ver_installed("luci-app-ddns")
+               .. [[\n\nddns-scripts ]] .. translate("required") .. [[:]]
+               .. [[\n\t]] .. translate("Version") .. [[:\t]] .. CTRL.DDNS_MIN .. [[ ]] .. translate("or higher")
+               .. [[\n\nddns-scripts ]] .. translate("installed") .. [[:]]
+               .. [[\n\t]] .. translate("Version") .. [[:\t]] .. DDNS.ipkg_ver_installed("ddns-scripts")
+               .. [[\n\n]]
+       .. [[')">]]
+       .. translate("Dynamic DNS")
 
 m.description = translate("Dynamic DNS allows that your router can be reached with " ..
                        "a fixed hostname while having a dynamically changing " ..
@@ -99,9 +107,13 @@ end
 -- TableSection definition -- ##################################################
 ts = m:section( TypedSection, "service",
        translate("Overview"),
-       translate("Below is a list of configured DDNS configurations and their current state." .. "<br />" ..
-               "If you want to send updates for IPv4 and IPv6 you need to define two separate Configurations " ..
-               "i.e. 'myddns_ipv4' and 'myddns_ipv6'") )
+       translate("Below is a list of configured DDNS configurations and their current state.") 
+       .. "<br />" 
+       .. translate("If you want to send updates for IPv4 and IPv6 you need to define two separate Configurations " 
+               .. "i.e. 'myddns_ipv4' and 'myddns_ipv6'") 
+       .. "<br />" 
+       .. [[<a href="]] .. DISP.build_url("admin", "services", "ddns", "global") .. [[">]]
+       .. translate("To change global settings click here") .. [[</a>]] )
 ts.sectionhead = translate("Configuration")
 ts.template = "cbi/tblsection"
 ts.addremove = true