summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-01-16 21:33:34 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-01-16 21:40:49 +0100
commitdaee4a650eb4f0700074ee5d8e2f6b24c81d650e (patch)
treecbd80d6cd241e02aa636bb248660921841e10097
parent9d908ffd78111f2f9d660b9a063e38af72554c57 (diff)
themes: require luci.version directly
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
-rw-r--r--themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/footer.htm11
-rw-r--r--themes/luci-theme-freifunk-bno/luasrc/view/themes/freifunk-bno/footer.htm5
-rw-r--r--themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/footer.htm14
-rw-r--r--themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/footer.htm5
4 files changed, 20 insertions, 15 deletions
diff --git a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/footer.htm b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/footer.htm
index 09b497a10..6b028d7ff 100644
--- a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/footer.htm
+++ b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/footer.htm
@@ -12,20 +12,15 @@ You may obtain a copy of the License at
-%>
<%
+ local ver = require "luci.version"
local disp = require "luci.dispatcher"
-
local request = disp.context.path
-
local category = request[1]
-
local tree = disp.node()
-
local categories = disp.node_childs(tree)
%>
- <footer><a href="http://luci.subsignal.org/">Powered by <%= luci.__appname__ .. " (" .. luci.__version__ .. ")" %></a>
-
- <%=luci.version.distversion%>
-
+ <footer>
+ <a href="http://luci.subsignal.org/">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> / <%= ver.distversion %>
<% if #categories > 1 then %>
<ul class="breadcrumb pull-right" id="modemenu">
<% for i, r in ipairs(categories) do %>
diff --git a/themes/luci-theme-freifunk-bno/luasrc/view/themes/freifunk-bno/footer.htm b/themes/luci-theme-freifunk-bno/luasrc/view/themes/freifunk-bno/footer.htm
index 21d1ca68a..bc07d8dd8 100644
--- a/themes/luci-theme-freifunk-bno/luasrc/view/themes/freifunk-bno/footer.htm
+++ b/themes/luci-theme-freifunk-bno/luasrc/view/themes/freifunk-bno/footer.htm
@@ -17,7 +17,10 @@ $Id$
</div></div>
</div>
-<div class="luci separator black whitetext bold"><a href="<%=controller%>/about">Powered by <%= luci.__appname__ .. " (" .. luci.__version__ .. ")" %></a></div>
+<div class="luci separator black whitetext bold">
+ <% local ver = require "luci.version" -%>
+ <a href="<%=controller%>/about">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a>
+</div>
</div><!-- end main --><div align="center" style="padding-top:5px "></div>
<br>
</div><!-- end wrapper -->
diff --git a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/footer.htm b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/footer.htm
index e9df8cda0..9f6a19c48 100644
--- a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/footer.htm
+++ b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/footer.htm
@@ -9,10 +9,14 @@ You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
-%>
-<% local xtime
-if exectime then
- xtime = (string.format("%.2fs", os.clock() - exectime))
-end %>
+<%
+ local ver = require "luci.version"
+
+ local xtime
+ if exectime then
+ xtime = (string.format("%.2fs", os.clock() - exectime))
+ end
+%>
</div>
<div class="clear"></div>
@@ -20,7 +24,7 @@ end %>
</div>
<div class="footer">
-<p class="luci"><a href="http://luci.subsignal.org">Powered by <%= luci.__appname__ .. " (" .. luci.__version__ .. ")" %></a></p>
+<p class="luci"><a href="http://luci.subsignal.org">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a></p>
<% if xtime then %>
<p class="exectime">Script execution time: <%=xtime%></p>
<% end %>
diff --git a/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/footer.htm b/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/footer.htm
index 5830cb932..607885fd3 100644
--- a/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/footer.htm
+++ b/themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/footer.htm
@@ -16,6 +16,9 @@ $Id$
</div>
</div>
-<p class="luci">Powered by <%= luci.__appname__ .. " (" .. luci.__version__ .. ")" %></p>
+<p class="luci">
+ <% local ver = require "luci.version" -%>
+ Powered by <%= ver.luciname %> (<%= ver.luciversion %>)
+</p>
</body>
</html>