2 LuCI - Lua Configuration Interface
3 Copyright
2008 Steven Barth
<steven@midlink.org
>
4 Copyright
2008 Jo-Philipp Wich
<xm@leipzig.freifunk.net
>
5 Copyright
2011 Manuel Munz
<freifunk at somakoma dot de
>
7 Licensed under the Apache License, Version
2.0 (the
"License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-
2.0
17 local uci = require
"luci.model.uci".cursor()
18 local contact = uci:get_all(
"freifunk",
"contact")
19 local nickname, name, mail, phone, location, note
20 local lon = uci:get_first(
"system",
"system",
"longitude")
21 local lat = uci:get_first(
"system",
"system",
"latitude")
24 nickname, name, homepage, mail, phone, location, note =
""
26 nickname = contact.nickname or
""
27 name = contact.name or
""
28 homepage = contact.homepage or {}
29 mail = contact.mail or
""
30 phone = contact.phone or
""
31 location = uci:get_first(
"system",
"system",
"location") or contact.location
32 note = contact.note or
""
36 <h2><a id=
"content" name=
"content"><%:Contact%
></a></h2>
38 <fieldset xmlns=
"http://www.w3.org/1999/xhtml" class=
"cbi-section">
39 <legend><%:Operator%
></legend>
40 <table cellspacing=
"10" width=
"100%" style=
"text-align:left">
41 <tr><th width=
"33%"><%:Nickname%
>:
</th><td><%=nickname%
></td></tr>
42 <tr><th width=
"33%"><%:Realname%
>:
</th><td><%=name%
></td></tr>
43 <tr><th width=
"33%"><%:Homepage%
>:
</th><td>
44 <% for k, v in ipairs(homepage) do %
>
45 <a href=
"<%=v%>"><%=v%
></a><br />
48 <tr><th width=
"33%"><%:E-Mail%
>:
</th><td><a href=
"mailto:<%=mail%>"><%=mail%
></a></td></tr>
49 <tr><th width=
"33%"><%:Phone%
>:
</th><td><%=phone%
></td></tr>
53 <fieldset xmlns=
"http://www.w3.org/1999/xhtml" class=
"cbi-section">
54 <legend><%:Location%
></legend>
55 <table cellspacing=
"10" width=
"100%" style=
"text-align:left">
56 <tr><th width=
"33%"><%:Location%
>:
</th><td><%=location%
></td></tr>
57 <tr><th width=
"33%"><%:Coordinates%
>:
</th><td><%=lat%
> <%=lon%
> (
<a href=
"<%=pcdata(luci.dispatcher.build_url("freifunk/map
"))%>"><%:Show on map%
>)
</a></td></tr>
62 <fieldset xmlns=
"http://www.w3.org/1999/xhtml" class=
"cbi-section">
63 <legend><%:Notice%
></legend>
64 <table cellspacing=
"10" width=
"100%" style=
"text-align:left">
65 <tr><td><%=note%
></td></tr>