summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2019-01-13 13:21:01 +0200
committerGitHub <noreply@github.com>2019-01-13 13:21:01 +0200
commit80ac438857ae713c6f58db64b91b196e9df5f31a (patch)
treed3ee74bc26c96f184cee4c9884bef6b1b08fa3e0 /applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm
parent47d9205fe9b82d3a434def60e479c23ef491a06d (diff)
parent29e01e0e5b4bf9a25e88de7309637b0f461ef6a9 (diff)
Merge pull request #2426 from cshoredaniel/pr-luci-app-radicale2
luci-app-radicale2: Add CalDAV/CardDAV server Radicale 2.x
Diffstat (limited to 'applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm')
-rw-r--r--applications/luci-app-radicale2/luasrc/view/cbi/raduigo.htm25
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 0000000000..2f449d7b0b
--- /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>