diff options
author | Manuel Munz <freifunk@somakoma.de> | 2011-01-25 21:04:57 +0000 |
---|---|---|
committer | Manuel Munz <freifunk@somakoma.de> | 2011-01-25 21:04:57 +0000 |
commit | c36fd44de2db30c08848bf326365a1e372b7879c (patch) | |
tree | aa34a63d3270b4d9ba953c5bed9000aa961de745 /themes | |
parent | 9c03a76fc28dac4efe4714f0e61bb41bf2784ef7 (diff) |
applications/ffwizard: Massive changes to the ffwizard to make it more generic. Also introduces changes to the community profiles. ffwizard replaces ffwizard-leipzig now. It is not completely finished yet, but should work in most cases.
Diffstat (limited to 'themes')
-rw-r--r-- | themes/freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/themes/freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm b/themes/freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm index 035ca16f38..496cbad792 100644 --- a/themes/freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm +++ b/themes/freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm @@ -22,19 +22,16 @@ local cattree = category and luci.dispatcher.node(category) local node = luci.dispatcher.context.dispatched local hostname = luci.sys.hostname() -local c = luci.model.uci.cursor():get_all("freifunk", "community") -if c and c.name then - community = c.name -else - community = "Freifunk" +local uci = require "luci.model.uci".cursor() +local ff = uci:get("freifunk", "community", "name") +if not ff then + ff = "" end +local co = "profile_" .. ff +local community = uci:get_first(co, "community", "name") or "Freifunk" +local hp = uci:get_first(co, "community", "homepage") or "http://www.freifunk.net" -if c and c.homepage then - homepage = c.homepage -else - homepage = "http://freifunk.net" -end local c = tree for i,r in ipairs(request) do @@ -88,8 +85,8 @@ require("luci.http").prepare_content("application/xhtml+xml") <div id="header"> <span id="header_left"> - <a href="<%=homepage%>"><img src="/luci-static/freifunk-generic/logo.jpg" alt="FF Logo" /></a> - <a href="<%=homepage%>"><%=community%></a> + <a href="<%=hp%>"><img src="/luci-static/freifunk-generic/logo.jpg" alt="FF Logo" /></a> + <a href="<%=hp%>"><%=community%></a> </span> <p> <%=luci.version.distversion%><br /> |