themes: require luci.version directly
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
9d908ffd78
commit
daee4a650e
4 changed files with 20 additions and 15 deletions
|
@ -12,20 +12,15 @@ You may obtain a copy of the License at
|
||||||
|
|
||||||
-%>
|
-%>
|
||||||
<%
|
<%
|
||||||
|
local ver = require "luci.version"
|
||||||
local disp = require "luci.dispatcher"
|
local disp = require "luci.dispatcher"
|
||||||
|
|
||||||
local request = disp.context.path
|
local request = disp.context.path
|
||||||
|
|
||||||
local category = request[1]
|
local category = request[1]
|
||||||
|
|
||||||
local tree = disp.node()
|
local tree = disp.node()
|
||||||
|
|
||||||
local categories = disp.node_childs(tree)
|
local categories = disp.node_childs(tree)
|
||||||
%>
|
%>
|
||||||
<footer><a href="http://luci.subsignal.org/">Powered by <%= luci.__appname__ .. " (" .. luci.__version__ .. ")" %></a>
|
<footer>
|
||||||
|
<a href="http://luci.subsignal.org/">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> / <%= ver.distversion %>
|
||||||
<%=luci.version.distversion%>
|
|
||||||
|
|
||||||
<% if #categories > 1 then %>
|
<% if #categories > 1 then %>
|
||||||
<ul class="breadcrumb pull-right" id="modemenu">
|
<ul class="breadcrumb pull-right" id="modemenu">
|
||||||
<% for i, r in ipairs(categories) do %>
|
<% for i, r in ipairs(categories) do %>
|
||||||
|
|
|
@ -17,7 +17,10 @@ $Id$
|
||||||
</div></div>
|
</div></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>
|
</div><!-- end main --><div align="center" style="padding-top:5px "></div>
|
||||||
<br>
|
<br>
|
||||||
</div><!-- end wrapper -->
|
</div><!-- end wrapper -->
|
||||||
|
|
|
@ -9,10 +9,14 @@ You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
-%>
|
-%>
|
||||||
<% local xtime
|
<%
|
||||||
if exectime then
|
local ver = require "luci.version"
|
||||||
xtime = (string.format("%.2fs", os.clock() - exectime))
|
|
||||||
end %>
|
local xtime
|
||||||
|
if exectime then
|
||||||
|
xtime = (string.format("%.2fs", os.clock() - exectime))
|
||||||
|
end
|
||||||
|
%>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
@ -20,7 +24,7 @@ end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer">
|
<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 %>
|
<% if xtime then %>
|
||||||
<p class="exectime">Script execution time: <%=xtime%></p>
|
<p class="exectime">Script execution time: <%=xtime%></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -16,6 +16,9 @@ $Id$
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue