modules/freifunk: Nicer layout of the contact page; make note a TextValue field in...
[project/luci.git] / modules / freifunk / luasrc / view / freifunk / contact.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 Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
6
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
10
11         http://www.apache.org/licenses/LICENSE-2.0
12 -%>
13
14 <%+header%>
15
16 <% 
17 local uci = require "luci.model.uci".cursor()
18 local contact = uci:get_all("freifunk", "contact")
19 local location = uci:get_first("system", "system", "location") or contact.location
20 local lon = uci:get_first("system", "system", "longitude")
21 local lat = uci:get_first("system", "system", "latitude")
22 %>
23
24 <h2><a id="content" name="content"><%:Contact%></a></h2>
25
26 <fieldset xmlns="http://www.w3.org/1999/xhtml" class="cbi-section">
27 <legend><%:Operator%></legend>
28         <table cellspacing="10" width="100%" style="text-align:left">
29                 <tr><th width="33%"><%:Nickname%>:</th><td><%=contact.nickname%></td></tr>
30                 <tr><th width="33%"><%:Realname%>:</th><td><%=contact.name%></td></tr>
31                 <tr><th width="33%"><%:E-Mail%>:</th><td><a href="mailto:<%=contact.mail%>"><%=contact.mail%></a></td></tr>
32                 <tr><th width="33%"><%:Phone%>:</th><td><%=contact.phone%></td></tr>
33         </table>
34 </fieldset>
35
36 <fieldset xmlns="http://www.w3.org/1999/xhtml" class="cbi-section">
37 <legend><%:Location%></legend>
38         <table cellspacing="10" width="100%" style="text-align:left">
39                 <tr><th width="33%"><%:Location%>:</th><td><%=location%></td></tr>
40                 <tr><th width="33%"><%:Coordinates%>:</th><td><%=lat%> <%=lon%> (<a href="<%=pcdata(luci.dispatcher.build_url("freifunk/map"))%>"><%:Show on map%>)</a></td></tr>
41         </table>
42 </fieldset>
43
44 <% if contact.note then %>
45 <fieldset xmlns="http://www.w3.org/1999/xhtml" class="cbi-section">
46 <legend><%:Notice%></legend>
47         <table cellspacing="10" width="100%" style="text-align:left">
48                 <tr><td><%=contact.note%></td></tr>
49         </table>
50 </fieldset>
51 <%end%>
52
53 <%+footer%>