X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=themes%2Fluci-theme-freifunk-generic%2Fluasrc%2Fview%2Fthemes%2Ffreifunk-generic%2Fheader.htm;h=81856552858e3108c442222a127bca1a69451dcd;hp=3eacf0a1e431aca5af3bbedd99641b30614b6386;hb=731ed77c0bbee7004a6b5645d9a8592a76748a1c;hpb=bfbc7f4bdf6b60edf9d52d995c14d156d8349757 diff --git a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm index 3eacf0a1e..818565528 100644 --- a/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm +++ b/themes/luci-theme-freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm @@ -1,21 +1,16 @@ <%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008-2011 Jo-Philipp Wich - -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 + Copyright 2008-2011 Jo-Philipp Wich + 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 } @@ -50,20 +45,20 @@ You may obtain a copy of the License at 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 @@ -110,8 +105,8 @@ You may obtain a copy of the License at <%- end -%>
- <%=luci.version.distversion%>
- <%:Load%>: <%="%.2f" % loadinfo[1] / 65535.0%> <%="%.2f" % loadinfo[2] / 65535.0%> <%="%.2f" % loadinfo[3] / 65535.0%>
+ <%=version.distversion%>
+ <%:Load%>: <%="%.2f" % (loadinfo[1] / 65535.0)%> <%="%.2f" % (loadinfo[2] / 65535.0)%> <%="%.2f" % (loadinfo[3] / 65535.0)%>
<%:Hostname%>: <%=boardinfo.hostname or "?"%>