From c36fd44de2db30c08848bf326365a1e372b7879c Mon Sep 17 00:00:00 2001 From: Manuel Munz Date: Tue, 25 Jan 2011 21:04:57 +0000 Subject: 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. --- .../luasrc/view/themes/freifunk-generic/header.htm | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'themes') 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")