4a9ab2efe1c4e664ce0ffd31d94ac77940b5442d
[project/luci.git] / modules / freifunk / luasrc / view / freifunk / index.htm
1 <%#
2 LuCI - Lua Configuration Interface
3 Copyright 2008 Steven Barth <steven@midlink.org>
4 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13
14 -%>
15 <%+header%>
16 <%
17 local uci = require "luci.model.uci".cursor()
18 local ff = uci:get_all("freifunk")
19 if not ff.community.name then
20 ff.community.name = ""
21 end
22 local co = "profile_" .. ff.community.name
23 local community = uci:get_first(co, "community", "name") or "Freifunk"
24 local url = uci:get_first(co, "community", "homepage") or "http://www.freifunk.net"
25
26
27 require("luci.fs")
28 local usertext = luci.fs.readfile("/www/luci-static/index_user.html")
29
30 if (ff.community.DefaultText or "") ~= "disabled" then
31
32 defaulttext = '<h2><a id="content" name="content">'..
33 (translate("Hello and welcome in the network of"))..
34 ' '..
35 (community or "Freifunk Deutschland")..
36 '!</a></h2><p>'..
37 translate("We are an initiative to establish a free, independent and open wireless mesh network.")..
38 '<br />'..
39 translate("This is the access point")..
40 ' '..
41 luci.sys.hostname()..
42 '. '..
43 translate("It is operated by ")..
44 '<a href="'..
45 luci.dispatcher.build_url("freifunk", "index", "contact")..
46 '">'..
47 (ff.contact.nickname or translate("Please set your contact information"))..
48 '</a>.</p><p>'..
49 translate("You can find further information about the global Freifunk initiative at")..
50 ' <a href="http://freifunk.net">Freifunk.net</a>.<br />'..
51 translate("If you are interested in our project then contact the local community")..
52 ' <a href="'..url..'">'..community..'</a>.</p><p><strong>'..
53 translate("Notice")..
54 '</strong>: '..
55 translate("Internet access depends on technical and organisational conditions and may or may not work for you.")..
56 '</p>'
57 end
58 %>
59
60 <%=defaulttext%>
61 <%=usertext%>
62
63 <%+footer%>