<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008-2011 Jo-Philipp Wich <xm@subsignal.org>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
+ Copyright 2008 Steven Barth <steven@midlink.org>
+ Copyright 2008-2011 Jo-Philipp Wich <jow@openwrt.org>
+ Licensed to the public under the Apache License 2.0.
-%>
<%
- local fs = require "luci.fs"
+ local fs = require "nixio.fs"
local sys = require "luci.sys"
local util = require "luci.util"
local http = require "luci.http"
local disp = require "luci.dispatcher"
+ local version = require "luci.version"
local sysinfo = util.ubus("system", "info") or { }
local loadinfo = sysinfo.load or { 0, 0, 0 }
local banner = false
local show_comm = true
- local lo = fs.glob("/www/luci-static/resources/custom_logo.*")
- if lo[1] then
- logo = string.gsub(lo[1], "/www", "")
+ local file
+ for file in fs.glob("/www/luci-static/resources/custom_logo.*") do
+ logo = string.gsub(file, "/www", "")
+ break
end
- local lon = fs.glob("/www/luci-static/resources/custom_logo_only.*")
- if lon[1] then
- logo = string.gsub(lon[1], "/www", "")
+ for file in fs.glob("/www/luci-static/resources/custom_logo_only.*") do
+ logo = string.gsub(file, "/www", "")
show_comm = false
+ break
end
- local hea = fs.glob("/www/luci-static/resources/custom_header.*")
- if hea[1] then
- logo = string.gsub(hea[1], "/www", "")
+ for file in fs.glob("/www/luci-static/resources/custom_header.*") do
+ logo = string.gsub(file, "/www", "")
show_comm = false
banner = true
end
<%- end -%>
<p class="skiplink">
-<span id="skiplink1"><a href="#navigation"><%:skiplink1 Skip to navigation%></a></span>
-<span id="skiplink2"><a href="#content"><%:skiplink2 Skip to content%></a></span>
+<span id="skiplink1"><a href="#navigation"><%:Skip to navigation%></a></span>
+<span id="skiplink2"><a href="#content"><%:Skip to content%></a></span>
</p>
<div id="header">
<%end%>
</div>
<div class="header_right">
- <%=luci.version.distversion%><br />
- <%:Load%>: <%="%.2f" % loadinfo[1] / 65535.0%> <%="%.2f" % loadinfo[2] / 65535.0%> <%="%.2f" % loadinfo[3] / 65535.0%><br />
+ <%=version.distversion%><br />
+ <%:Load%>: <%="%.2f" % (loadinfo[1] / 65535.0)%> <%="%.2f" % (loadinfo[2] / 65535.0)%> <%="%.2f" % (loadinfo[3] / 65535.0)%><br />
<%:Hostname%>: <%=boardinfo.hostname or "?"%><br />
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
<%:Auto Refresh%>:
%>
<div id="menubar">
-<h2 class="navigation"><a id="navigation" name="navigation"><%:navigation Navigation%></a></h2>
+<h2 class="navigation"><a id="navigation" name="navigation"><%:Navigation%></a></h2>
<ul id="mainmenu" class="dropdowns">
<%
local childs = disp.node_childs(cattree)
-%>
<div id="savemenu">
<% if ucic > 0 then %>
- <a class="warning" href="<%=controller%>/<%=category%>/uci/changes/?redir=<%=http.urlencode(http.formvalue("redir") or REQUEST_URI)%>"><%:Unsaved Changes%>: <%=ucic%></a>
+ <a class="warning" href="<%=controller%>/<%=category%>/uci/changes/?redir=<%=http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/"))%>"><%:Unsaved Changes%>: <%=ucic%></a>
<% end -%>
</div>
<% end %>
<% if category ~= "freifunk" and category ~= "splash" then %>
<noscript>
<div class="errorbox">
- <strong><%:Java Script required!%></strong><br />
- <%:You must enable Java Script in your browser or LuCI will not work properly.%>
+ <strong><%:JavaScript required!%></strong><br />
+ <%:You must enable JavaScript in your browser or LuCI will not work properly.%>
</div>
</noscript>
<% end %>