From 55240d05acebef208ac4bea7a5e44d5b31cbef66 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 13 Jan 2011 22:40:27 +0000 Subject: [PATCH] luci-0.10: merge r6709-r6717 --- .../luasrc/model/cbi/ffwizard.lua | 150 +++++++++++------- .../luci-radvd/luasrc/model/cbi/radvd.lua | 50 ++++++ .../luasrc/model/cbi/radvd/interface.lua | 13 ++ .../luasrc/model/cbi/radvd/prefix.lua | 13 ++ .../luasrc/model/cbi/radvd/rdnss.lua | 13 ++ .../luasrc/model/cbi/radvd/route.lua | 13 ++ build/mkbasepot.sh | 16 ++ contrib/package/luci/Makefile | 2 +- libs/web/luasrc/view/cbi/lvalue.htm | 2 +- libs/web/luasrc/view/cbi/tblsection.htm | 16 +- modules/freifunk/root/etc/config/freifunk | 1 + 11 files changed, 231 insertions(+), 58 deletions(-) create mode 100755 build/mkbasepot.sh diff --git a/applications/luci-ffwizard/luasrc/model/cbi/ffwizard.lua b/applications/luci-ffwizard/luasrc/model/cbi/ffwizard.lua index d2a051d3d..d290d93aa 100644 --- a/applications/luci-ffwizard/luasrc/model/cbi/ffwizard.lua +++ b/applications/luci-ffwizard/luasrc/model/cbi/ffwizard.lua @@ -24,7 +24,6 @@ local sys = require "luci.sys" local ip = require "luci.ip" local fs = require "nixio.fs" - local has_pptp = fs.access("/usr/sbin/pptp") local has_pppoe = fs.glob("/usr/lib/pppd/*/rp-pppoe.so")() local has_l2gvpn = fs.access("/usr/sbin/node") @@ -32,6 +31,8 @@ local has_radvd = fs.access("/etc/config/radvd") local has_rom = fs.access("/rom/etc") local has_autoipv6 = fs.access("/usr/bin/auto-ipv6") local has_qos = fs.access("/etc/init.d/qos") +local has_ipv6 = fs.access("/proc/sys/net/ipv6") +local has_hb = fs.access("/sbin/heartbeat") luci.i18n.loadc("freifunk") @@ -108,6 +109,7 @@ net_lat = f:field(ListValue, "net_lat", "", "") net_lat:depends("net", "0") net_lon = f:field(ListValue, "net_lon", "", "") net_lon:depends("net", "0") + uci:foreach("freifunk", "community", function(s) if s.latitude then net_lat:value(s[".name"], "%s" % {s.latitude or "?"}) @@ -219,12 +221,15 @@ uci:foreach("wireless", "wifi-device", uci:save("freifunk") end end - local meship6 = f:field(Value, "meship6_" .. device, device:upper() .. " Mesh IPv6 Adresse einrichten", "Ihre Mesh IP Adresse wird automatisch berechnet") + if has_ipv6 then + local meship6 = f:field(Value, "meship6_" .. device, device:upper() .. " Mesh IPv6 Adresse einrichten", "Ihre Mesh IP Adresse wird automatisch berechnet") meship6:depends("device_" .. device, "1") meship6.rmempty = true function meship6.cfgvalue(self, section) return get_ula(get_mac(device)) end + end + local client = f:field(Flag, "client_" .. device, device:upper() .. " DHCP anbieten", "DHCP weist verbundenen Benutzern automatisch eine Adresse zu. Diese Option sollten Sie unbedingt aktivieren, wenn Sie Nutzer an der drahtlosen Schnittstelle erwarten.") client:depends("device_" .. device, "1") client.rmempty = false @@ -292,12 +297,15 @@ uci:foreach("network", "interface", function meship.write(self, sec, value) uci:set("freifunk", "wizard", "meship_" .. device, value) end - meship6 = f:field(Value, "meship6_" .. device, device:upper() .. " Mesh IPv6 Adresse einrichten", "Ihre Mesh IP Adresse wird automatisch berechnet") + if has_ipv6 then + meship6 = f:field(Value, "meship6_" .. device, device:upper() .. " Mesh IPv6 Adresse einrichten", "Ihre Mesh IP Adresse wird automatisch berechnet") meship6:depends("device_" .. device, "1") meship6.rmempty = true function meship6.cfgvalue(self, section) return get_ula(get_mac(ifname)) end + end + client = f:field(Flag, "client_" .. device, device:upper() .. " DHCP anbieten","DHCP weist verbundenen Benutzern automatisch eine Adresse zu. Diese Option sollten Sie unbedingt aktivieren, wenn Sie Nutzer an der drahtlosen Schnittstelle erwarten.") client:depends("device_" .. device, "1") client.rmempty = false @@ -550,15 +558,17 @@ if has_l2gvpn then end end -hb = f:field(Flag, "hb", "Heartbeat aktivieren","Dem Gerät erlauben anonyme Statistiken zu übertragen. (empfohlen)") -hb.rmempty = false -hb:depends("netconfig", "1") -function hb.cfgvalue(self, section) - return uci:get("freifunk", "wizard", "hb") -end -function hb.write(self, section, value) - uci:set("freifunk", "wizard", "hb", value) - uci:save("freifunk") +if has_hb then + hb = f:field(Flag, "hb", "Heartbeat aktivieren","Dem Gerät erlauben anonyme Statistiken zu übertragen. (empfohlen)") + hb.rmempty = false + hb:depends("netconfig", "1") + function hb.cfgvalue(self, section) + return uci:get("freifunk", "wizard", "hb") + end + function hb.write(self, section, value) + uci:set("freifunk", "wizard", "hb", value) + uci:save("freifunk") + end end -------------------- Control -------------------- @@ -609,7 +619,9 @@ function f.handle(self, state, data) if has_radvd then uci:commit("radvd") end - luci.http.redirect(luci.dispatcher.build_url(unpack(luci.dispatcher.context.requested.path), "system", "reboot") .. "?reboot=1") +-- the following line didn't work without admin-mini, for now i just replaced it with sys.exec... soma +-- luci.http.redirect(luci.dispatcher.build_url(unpack(luci.dispatcher.context.requested.path), "system", "reboot") .. "?reboot=1") + sys.exec("reboot") end return false elseif state == FORM_INVALID then @@ -636,6 +648,7 @@ function main.write(self, section, value) end -- Collect IP-Address local community = net:formvalue(section) + suffix = uci:get("freifunk", community, "suffix") or "olsr" -- Invalidate fields if not community then @@ -684,14 +697,20 @@ function main.write(self, section, value) end) end uci:save("firewall") - uci:delete("manager", "heartbeat", "interface") - uci:save("manager") + if has_hb then + uci:delete("manager", "heartbeat", "interface") + uci:save("manager") + end -- Delete olsrdv4 uci:delete_all("olsrd", "olsrd") local olsrbase olsrbase = uci:get_all("freifunk", "olsrd") or {} util.update(olsrbase, uci:get_all(external, "olsrd") or {}) - olsrbase.IpVersion='6and4' + if has_ipv6 then + olsrbase.IpVersion='6and4' + else + olsrbase.IpVersion='4' + end uci:section("olsrd", "olsrd", nil, olsrbase) -- Delete olsrdv4 old p2pd settings uci:delete_all("olsrd", "LoadPlugin", {library="olsrd_mdns.so.1.0.0"}) @@ -717,7 +736,9 @@ function main.write(self, section, value) return end node_ip = luci.http.formvalue("cbid.ffwizward.1.meship_" .. device) and ip.IPv4(luci.http.formvalue("cbid.ffwizward.1.meship_" .. device)) - node_ip6 = luci.http.formvalue("cbid.ffwizward.1.meship6_" .. device) and ip.IPv6(luci.http.formvalue("cbid.ffwizward.1.meship6_" .. device)) + if has_ipv6 then + node_ip6 = luci.http.formvalue("cbid.ffwizward.1.meship6_" .. device) and ip.IPv6(luci.http.formvalue("cbid.ffwizward.1.meship6_" .. device)) + end if not node_ip or not network or not network:contains(node_ip) then meship.tag_missing[section] = true node_ip = nil @@ -826,7 +847,9 @@ function main.write(self, section, value) util.update(netconfig, uci:get_all(external, "interface") or {}) netconfig.proto = "static" netconfig.ipaddr = node_ip:string() - netconfig.ip6addr = node_ip6:string() + if has_ipv6 then + netconfig.ip6addr = node_ip6:string() + end uci:section("network", "interface", nif, netconfig) if has_radvd then uci:section("radvd", "interface", nil, { @@ -860,10 +883,12 @@ function main.write(self, section, value) local client = luci.http.formvalue("cbid.ffwizward.1.client_" .. device) if client then local dhcpmeshnet = luci.http.formvalue("cbid.ffwizward.1.dhcpmesh_" .. device) and ip.IPv4(luci.http.formvalue("cbid.ffwizward.1.dhcpmesh_" .. device)) - local ifacelist = uci:get_list("manager", "heartbeat", "interface") or {} - table.insert(ifacelist,nif .. "dhcp") - uci:set_list("manager", "heartbeat", "interface", ifacelist) - uci:save("manager") + if has_hb then + local ifacelist = uci:get_list("manager", "heartbeat", "interface") or {} + table.insert(ifacelist,nif .. "dhcp") + uci:set_list("manager", "heartbeat", "interface", ifacelist) + uci:save("manager") + end if dhcpmeshnet then if not dhcpmeshnet:minhost() or not dhcpmeshnet:mask() then dhcpmesh.tag_missing[section] = true @@ -1021,7 +1046,9 @@ function main.write(self, section, value) if device ~= "loopback" and not string.find(device, "wifi") and not string.find(device, "wl") and not string.find(device, "wlan") and not string.find(device, "wireless") and not string.find(device, "radio") then local node_ip node_ip = luci.http.formvalue("cbid.ffwizward.1.meship_" .. device) and ip.IPv4(luci.http.formvalue("cbid.ffwizward.1.meship_" .. device)) - node_ip6 = luci.http.formvalue("cbid.ffwizward.1.meship6_" .. device) and ip.IPv6(luci.http.formvalue("cbid.ffwizward.1.meship6_" .. device)) + if has_ipv6 then + node_ip6 = luci.http.formvalue("cbid.ffwizward.1.meship6_" .. device) and ip.IPv6(luci.http.formvalue("cbid.ffwizward.1.meship6_" .. device)) + end if not node_ip or not network or not network:contains(node_ip) then meship.tag_missing[section] = true node_ip = nil @@ -1049,7 +1076,9 @@ function main.write(self, section, value) util.update(netconfig, uci:get_all(external, "interface") or {}) netconfig.proto = "static" netconfig.ipaddr = node_ip:string() - netconfig.ip6addr = node_ip6:string() + if has_ipv6 then + netconfig.ip6addr = node_ip6:string() + end uci:section("network", "interface", device, netconfig) uci:save("network") if has_radvd then @@ -1085,10 +1114,12 @@ function main.write(self, section, value) local client = luci.http.formvalue("cbid.ffwizward.1.client_" .. device) if client then local dhcpmeshnet = luci.http.formvalue("cbid.ffwizward.1.dhcpmesh_" .. device) and ip.IPv4(luci.http.formvalue("cbid.ffwizward.1.dhcpmesh_" .. device)) - local ifacelist = uci:get_list("manager", "heartbeat", "interface") or {} - table.insert(ifacelist,device .. "dhcp") - uci:set_list("manager", "heartbeat", "interface", ifacelist) - uci:save("manager") + if has_hb then + local ifacelist = uci:get_list("manager", "heartbeat", "interface") or {} + table.insert(ifacelist,device .. "dhcp") + uci:set_list("manager", "heartbeat", "interface", ifacelist) + uci:save("manager") + end if dhcpmeshnet then if not dhcpmeshnet:minhost() or not dhcpmeshnet:mask() then dhcpmesh.tag_missing[section] = true @@ -1232,18 +1263,19 @@ function main.write(self, section, value) local new_hostname = uci:get("freifunk", "wizard", "hostname") local old_hostname = sys.hostname() - local dhcphb = hb:formvalue(section) - if dhcphb then - uci:set("manager", "heartbeat", "enabled", "1") - -- Make sure that heartbeat is enabled - sys.init.enable("machash") - - else - uci:set("manager", "heartbeat", "enabled", "0") - -- Make sure that heartbeat is enabled - sys.init.disable("machash") + if has_hb then + local dhcphb = hb:formvalue(section) + if dhcphb then + uci:set("manager", "heartbeat", "enabled", "1") + -- Make sure that heartbeat is enabled + sys.init.enable("machash") + else + uci:set("manager", "heartbeat", "enabled", "0") + -- Make sure that heartbeat is enabled + sys.init.disable("machash") + end + uci:save("manager") end - uci:save("manager") local custom_hostname = hostname:formvalue(section) uci:foreach("system", "system", @@ -1314,7 +1346,7 @@ function main.write(self, section, value) -- Write new nameservice settings uci:section("olsrd", "LoadPlugin", nil, { library = "olsrd_nameservice.so.0.3", - suffix = ".olsr", + suffix = "." .. suffix , hosts_file = "/var/etc/hosts.olsr", latlon_file = "/var/run/latlon.js", lat = latval and string.format("%.15f", latval) or "", @@ -1325,8 +1357,8 @@ function main.write(self, section, value) -- Import hosts and set domain uci:foreach("dhcp", "dnsmasq", function(s) uci:set_list("dhcp", s[".name"], "addnhosts", "/var/etc/hosts.olsr") - uci:set("dhcp", s[".name"], "local", "/olsr/") - uci:set("dhcp", s[".name"], "domain", "olsr") + uci:set("dhcp", s[".name"], "local", "/" .. suffix .. "/") + uci:set("dhcp", s[".name"], "domain", suffix) end) -- Make sure that OLSR is enabled @@ -1335,9 +1367,15 @@ function main.write(self, section, value) uci:save("olsrd") uci:save("dhcp") -- Import hosts and set domain - uci:foreach("dhcp", "dnsmasq", function(s) - uci:set_list("dhcp", s[".name"], "addnhosts", {"/var/etc/hosts.olsr","/var/etc/hosts.olsr.ipv6"}) - end) + if has_ipv6 then + uci:foreach("dhcp", "dnsmasq", function(s) + uci:set_list("dhcp", s[".name"], "addnhosts", {"/var/etc/hosts.olsr","/var/etc/hosts.olsr.ipv6"}) + end) + else + uci:foreach("dhcp", "dnsmasq", function(s) + uci:set_list("dhcp", s[".name"], "addnhosts", "/var/etc/hosts.olsr") + end) + end uci:save("dhcp") @@ -1346,10 +1384,14 @@ function main.write(self, section, value) if share_value == "1" then uci:set("freifunk", "wizard", "netconfig", "1") uci:section("firewall", "forwarding", nil, {src="freifunk", dest="wan"}) - -- Set autoipv6 tunnel mode - uci:set("autoipv6", "olsr_node", "enable", "0") - uci:set("autoipv6", "tunnel", "enable", "1") - uci:save("autoipv6") + + if has_autoipv6 then + -- Set autoipv6 tunnel mode + uci:set("autoipv6", "olsr_node", "enable", "0") + uci:set("autoipv6", "tunnel", "enable", "1") + uci:save("autoipv6") + end + -- Delete/Disable gateway plugin uci:delete_all("olsrd", "LoadPlugin", {library="olsrd_dyn_gw.so.0.5"}) uci:delete_all("olsrd", "LoadPlugin", {library="olsrd_dyn_gw_plain.so.0.4"}) @@ -1372,10 +1414,12 @@ function main.write(self, section, value) else uci:set("freifunk", "wizard", "netconfig", "0") uci:save("freifunk") - -- Set autoipv6 olsrd mode - uci:set("autoipv6", "olsr_node", "enable", "1") - uci:set("autoipv6", "tunnel", "enable", "0") - uci:save("autoipv6") + if has_autoipv6 then + -- Set autoipv6 olsrd mode + uci:set("autoipv6", "olsr_node", "enable", "1") + uci:set("autoipv6", "tunnel", "enable", "0") + uci:save("autoipv6") + end -- Delete gateway plugins uci:delete_all("olsrd", "LoadPlugin", {library="olsrd_dyn_gw.so.0.5"}) uci:delete_all("olsrd", "LoadPlugin", {library="olsrd_dyn_gw_plain.so.0.4"}) diff --git a/applications/luci-radvd/luasrc/model/cbi/radvd.lua b/applications/luci-radvd/luasrc/model/cbi/radvd.lua index 041decce5..18df46b19 100644 --- a/applications/luci-radvd/luasrc/model/cbi/radvd.lua +++ b/applications/luci-radvd/luasrc/model/cbi/radvd.lua @@ -53,9 +53,20 @@ function s.remove(self, section) return TypedSection.remove(self, section) end +o = s:option(Flag, "ignore", translate("Enable")) +o.rmempty = false +o.width = "30px" +function o.cfgvalue(...) + local v = Flag.cfgvalue(...) + return v == "1" and "0" or "1" +end +function o.write(self, section, value) + Flag.write(self, section, value == "1" and "0" or "1") +end o = s:option(DummyValue, "interface", translate("Interface")) o.template = "cbi/network_netinfo" +o.width = "10%" o = s:option(DummyValue, "UnicastOnly", translate("Multicast")) function o.cfgvalue(...) @@ -104,10 +115,23 @@ function s2.create(...) end +o = s2:option(Flag, "ignore", translate("Enable")) +o.rmempty = false +o.width = "30px" +function o.cfgvalue(...) + local v = Flag.cfgvalue(...) + return v == "1" and "0" or "1" +end +function o.write(self, section, value) + Flag.write(self, section, value == "1" and "0" or "1") +end + o = s2:option(DummyValue, "interface", translate("Interface")) o.template = "cbi/network_netinfo" +o.width = "10%" o = s2:option(DummyValue, "prefix", translate("Prefix")) +o.width = "60%" function o.cfgvalue(self, section) local v = Value.cfgvalue(self, section) if not v then @@ -168,10 +192,23 @@ function s3.create(...) end +o = s3:option(Flag, "ignore", translate("Enable")) +o.rmempty = false +o.width = "30px" +function o.cfgvalue(...) + local v = Flag.cfgvalue(...) + return v == "1" and "0" or "1" +end +function o.write(self, section, value) + Flag.write(self, section, value == "1" and "0" or "1") +end + o = s3:option(DummyValue, "interface", translate("Interface")) o.template = "cbi/network_netinfo" +o.width = "10%" o = s3:option(DummyValue, "prefix", translate("Prefix")) +o.width = "60%" function o.cfgvalue(self, section) local v = Value.cfgvalue(self, section) if v then @@ -210,10 +247,23 @@ function s.create(...) end +o = s4:option(Flag, "ignore", translate("Enable")) +o.rmempty = false +o.width = "30px" +function o.cfgvalue(...) + local v = Flag.cfgvalue(...) + return v == "1" and "0" or "1" +end +function o.write(self, section, value) + Flag.write(self, section, value == "1" and "0" or "1") +end + o = s4:option(DummyValue, "interface", translate("Interface")) o.template = "cbi/network_netinfo" +o.width = "10%" o = s4:option(DummyValue, "addr", translate("Address")) +o.width = "60%" function o.cfgvalue(self, section) local v = Value.cfgvalue(self, section) if not v then diff --git a/applications/luci-radvd/luasrc/model/cbi/radvd/interface.lua b/applications/luci-radvd/luasrc/model/cbi/radvd/interface.lua index ca510cd76..ae8e062cb 100644 --- a/applications/luci-radvd/luasrc/model/cbi/radvd/interface.lua +++ b/applications/luci-radvd/luasrc/model/cbi/radvd/interface.lua @@ -47,6 +47,19 @@ s:tab("mobile", translate("Mobile IPv6")) -- General -- +o = s:taboption("general", Flag, "ignore", translate("Enable")) +o.rmempty = false + +function o.cfgvalue(...) + local v = Flag.cfgvalue(...) + return v == "1" and "0" or "1" +end + +function o.write(self, section, value) + Flag.write(self, section, value == "1" and "0" or "1") +end + + o = s:taboption("general", Value, "interface", translate("Interface"), translate("Specifies the logical interface name this section belongs to")) diff --git a/applications/luci-radvd/luasrc/model/cbi/radvd/prefix.lua b/applications/luci-radvd/luasrc/model/cbi/radvd/prefix.lua index 460a244d0..d3567cb0e 100644 --- a/applications/luci-radvd/luasrc/model/cbi/radvd/prefix.lua +++ b/applications/luci-radvd/luasrc/model/cbi/radvd/prefix.lua @@ -38,6 +38,19 @@ s:tab("advanced", translate("Advanced")) -- General -- +o = s:taboption("general", Flag, "ignore", translate("Enable")) +o.rmempty = false + +function o.cfgvalue(...) + local v = Flag.cfgvalue(...) + return v == "1" and "0" or "1" +end + +function o.write(self, section, value) + Flag.write(self, section, value == "1" and "0" or "1") +end + + o = s:taboption("general", Value, "interface", translate("Interface"), translate("Specifies the logical interface name this section belongs to")) diff --git a/applications/luci-radvd/luasrc/model/cbi/radvd/rdnss.lua b/applications/luci-radvd/luasrc/model/cbi/radvd/rdnss.lua index 31450b8f3..91cf25c66 100644 --- a/applications/luci-radvd/luasrc/model/cbi/radvd/rdnss.lua +++ b/applications/luci-radvd/luasrc/model/cbi/radvd/rdnss.lua @@ -35,6 +35,19 @@ s.addremove = false -- General -- +o = s:option(Flag, "ignore", translate("Enable")) +o.rmempty = false + +function o.cfgvalue(...) + local v = Flag.cfgvalue(...) + return v == "1" and "0" or "1" +end + +function o.write(self, section, value) + Flag.write(self, section, value == "1" and "0" or "1") +end + + o = s:option(Value, "interface", translate("Interface"), translate("Specifies the logical interface name this section belongs to")) diff --git a/applications/luci-radvd/luasrc/model/cbi/radvd/route.lua b/applications/luci-radvd/luasrc/model/cbi/radvd/route.lua index 31b6900e5..6e84d0fb2 100644 --- a/applications/luci-radvd/luasrc/model/cbi/radvd/route.lua +++ b/applications/luci-radvd/luasrc/model/cbi/radvd/route.lua @@ -35,6 +35,19 @@ s.addremove = false -- General -- +o = s:option(Flag, "ignore", translate("Enable")) +o.rmempty = false + +function o.cfgvalue(...) + local v = Flag.cfgvalue(...) + return v == "1" and "0" or "1" +end + +function o.write(self, section, value) + Flag.write(self, section, value == "1" and "0" or "1") +end + + o = s:option(Value, "interface", translate("Interface"), translate("Specifies the logical interface name this section belongs to")) diff --git a/build/mkbasepot.sh b/build/mkbasepot.sh new file mode 100755 index 000000000..48e85cad6 --- /dev/null +++ b/build/mkbasepot.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +[ -d ./build ] || { + echo "Please execute as ./build/mkbasepot.sh" >&2 + exit 1 +} + +echo -n "Updating po/templates/base.pot ... " + +./build/i18n-scan.pl \ + libs/core/ libs/web/ \ + modules/admin-core/ modules/admin-full/ \ + themes/base/ themes/openwrt/ \ +> po/templates/base.pot + +echo "done" diff --git a/contrib/package/luci/Makefile b/contrib/package/luci/Makefile index 135849c84..490bee58f 100644 --- a/contrib/package/luci/Makefile +++ b/contrib/package/luci/Makefile @@ -322,7 +322,7 @@ endef $(eval $(call application,ffwizard-leipzig,Freifunk Leipzig configuration wizard)) $(eval $(call application,ffwizard,Freifunk configuration wizard,\ - +PACKAGE_luci-mod-freifunk)) + +luci-mod-freifunk)) $(eval $(call application,siitwizard,SIIT IPv4-over-IPv6 configuration wizard,\ +PACKAGE_luci-app-siitwizard:kmod-siit)) diff --git a/libs/web/luasrc/view/cbi/lvalue.htm b/libs/web/luasrc/view/cbi/lvalue.htm index 8c7581a2c..dba869f2e 100644 --- a/libs/web/luasrc/view/cbi/lvalue.htm +++ b/libs/web/luasrc/view/cbi/lvalue.htm @@ -16,7 +16,7 @@ $Id$ <% if self.widget == "select" then %> <% elseif self.widget == "radio" then diff --git a/libs/web/luasrc/view/cbi/tblsection.htm b/libs/web/luasrc/view/cbi/tblsection.htm index 860d54ed7..742817583 100644 --- a/libs/web/luasrc/view/cbi/tblsection.htm +++ b/libs/web/luasrc/view/cbi/tblsection.htm @@ -18,6 +18,16 @@ function rowstyle() rowcnt = rowcnt + 1 return (rowcnt % 2) + 1 end + +function width(o) + if o.width then + if type(o.width) == 'number' then + return ' style="width:%dpx"' % o.width + end + return ' style="width:%s"' % o.width + end + return '' +end -%> @@ -38,7 +48,7 @@ end <%- end -%> <%- end -%> <%- for i, k in pairs(self.children) do if not k.optional then -%> - + > <%- if k.titleref then -%><%- end -%> <%-=k.title-%> <%- if k.titleref then -%><%- end -%> @@ -56,7 +66,7 @@ end <%- end -%> <%- end -%> <%- for i, k in pairs(self.children) do if not k.optional then -%> - <%=k.description%> + ><%=k.description%> <%- end; end; if self.extedit or self.addremove then -%> <%- end -%> @@ -82,7 +92,7 @@ end -%> <%- if self.extedit or self.addremove then -%> - + <%- if self.extedit then -%> diff --git a/modules/freifunk/root/etc/config/freifunk b/modules/freifunk/root/etc/config/freifunk index 29d5ef925..fe1514f4c 100644 --- a/modules/freifunk/root/etc/config/freifunk +++ b/modules/freifunk/root/etc/config/freifunk @@ -172,6 +172,7 @@ config 'community' 'augsburg' option 'splash_prefix' '27' option 'latitude' '48.37071' option 'longitude' '10.89475' + option 'suffix' 'ffa' option 'external' 'freifunk_augsburg' config 'community' 'jena' -- 2.25.1