modules/freifunk: fix typo
[project/luci.git] / modules / freifunk / luasrc / view / freifunk / index.htm
index c5ee17b..d93dcd8 100644 (file)
@@ -1,11 +1,58 @@
+<%#
+LuCI - Lua Configuration Interface
+Copyright 2008 Steven Barth <steven@midlink.org>
+Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+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
+
+$Id$
+
+-%>
 <%+header%>
-<% local ff = luci.model.uci.sections("freifunk") %>
-<h1><%:hellonet Hallo und willkommen im Netz von%> <%=ff.community.name%>!</h1>
-<p><%:public1 Wir sind eine Initiative zur Schaffung eines freien, offenen und unabhängigen Funknetzwerks auf WLAN-Basis.%><br />
-<%:public2 Dies ist der Zugangspunkt %><%=luci.sys.hostname()%>. <%:public3 Er wird betrieben von %>
-<a href="<%=controller%>/public/index/contact"><%=ff.contact.nickname%></a>.</p>
-<p><%:public4 Weitere Informationen zur globalen Freifunkinitiative findest du unter%> <a href="http://freifunk.net">Freifunk.net</a>.<br />
-<%:public5 Hast du Interesse an diesem Projekt, dann wende dich an deine lokale Gemeinschaft%> <a href="<%=ff.community.homepage%>"><%=ff.community.name%></a>.</p>
-<p><strong><%:note Hinweis%></strong>: <%:public6 Der Internetzugang über das experimentelle Freifunknetz ist an technische und organisatorische Bedingungen geknüpft und deshalb möglicherweise
-nicht (immer) gewährleistet.%></p>
-<%+footer%>
\ No newline at end of file
+<% 
+local ff = luci.model.uci.cursor():get_all("freifunk")
+require("luci.fs")
+local usertext = luci.fs.readfile("/www/luci-static/index_user.html")
+
+if (ff.community.DefaultText or "") ~= "disabled" then
+
+       defaulttext = '<h2><a id="content" name="content">'..
+       (translate("Hello and welcome in the network of"))..
+       ' '..
+       (ff.community.name or "Freifunk Deutschland")..
+       '!</a></h2><p>'..
+       translate("We are an initiative to establish a free, independent and open wireless mesh network.")..
+       '<br />'..
+       translate("This is the access point")..
+       ' '..
+       luci.sys.hostname()..
+       '. '..
+       translate("It is operated by")..
+       '<a href="'..
+       luci.dispatcher.build_url("freifunk", "index", "contact")..
+       '"> '..
+       (ff.contact.nickname or "Anonymous")..
+       '</a>.</p><p>'..
+       translate("You can find further information about the global Freifunk initiative at")..
+       ' <a href="http://freifunk.net">Freifunk.net</a>.<br />'..
+       translate("If you are interested in our project then contact the local community")..
+       ' <a href="'..
+       (ff.community.homepage or "http//freifunk.net")..
+       '">'..
+       (ff.community.name or "Freifunk")..
+       '</a>.</p><p><strong>'..
+       translate("Notice")..
+       '</strong>: '..
+       translate("Internet access depends on technical and organisational conditions and may or may not work for you.")..
+       '</p>'
+end
+%>
+
+<%=defaulttext%>
+<%=usertext%>
+
+<%+footer%>