diff options
Diffstat (limited to 'applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm')
-rw-r--r-- | applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm b/applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm new file mode 100644 index 000000000..2f449d7b0 --- /dev/null +++ b/applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm @@ -0,0 +1,25 @@ +<% +local uci = require "luci.model.uci".cursor() +local http_port = uci:get("radicale2", "server", "host") +local usessl = uci:get("radicale2", "server", "ssl") +if type(http_port) == "table" then + http_port = http_port[1] +end + + if http_port then + http_port = http_port:match("(%d+)$") + end + if not http_port then + http_port = "5232" + end +%> +<script type="text/javascript"> +<% +if usessl then +%> + var protocol = 'https' +<% else %> + var protocol = 'http' +<% end %> +document.write('<a href="' + protocol + '://' + window.location.hostname + ':' + <%=http_port%> + '/"><%=luci.i18n.translate("Go to Radicale 2.x Web UI")%></a>'); +</script> |