summaryrefslogtreecommitdiffhomepage
path: root/modules/freifunk/luasrc
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2013-01-09 11:22:15 +0000
committerManuel Munz <freifunk@somakoma.de>2013-01-09 11:22:15 +0000
commita9c2fc65b693398ffaf8c59706ee4ca2a1476bc4 (patch)
tree487ef435b96f7d3c867a714aad93b50a479e17f0 /modules/freifunk/luasrc
parentf5535cb8045455dae462f408b4817768e5c618a6 (diff)
modules/freifunk: Add homepage(s) field to contact information
Diffstat (limited to 'modules/freifunk/luasrc')
-rw-r--r--modules/freifunk/luasrc/model/cbi/freifunk/contact.lua1
-rw-r--r--modules/freifunk/luasrc/view/freifunk/contact.htm8
2 files changed, 8 insertions, 1 deletions
diff --git a/modules/freifunk/luasrc/model/cbi/freifunk/contact.lua b/modules/freifunk/luasrc/model/cbi/freifunk/contact.lua
index f6cdec7fe1..30e94a3e96 100644
--- a/modules/freifunk/luasrc/model/cbi/freifunk/contact.lua
+++ b/modules/freifunk/luasrc/model/cbi/freifunk/contact.lua
@@ -17,6 +17,7 @@ c = m:section(NamedSection, "contact", "public", "")
c:option(Value, "nickname", translate("Nickname"))
c:option(Value, "name", translate("Realname"))
+c:option(DynamicList, "homepage", translate("Homepage"))
c:option(Value, "mail", translate("E-Mail"))
c:option(Value, "phone", translate("Phone"))
c:option(TextValue, "note", translate("Notice")).rows = 10
diff --git a/modules/freifunk/luasrc/view/freifunk/contact.htm b/modules/freifunk/luasrc/view/freifunk/contact.htm
index 23a5e7b1af..2d79ccd406 100644
--- a/modules/freifunk/luasrc/view/freifunk/contact.htm
+++ b/modules/freifunk/luasrc/view/freifunk/contact.htm
@@ -21,10 +21,11 @@ local lon = uci:get_first("system", "system", "longitude")
local lat = uci:get_first("system", "system", "latitude")
if not contact then
- nickname, name, mail, phone, location, note = ""
+ nickname, name, homepage, mail, phone, location, note = ""
else
nickname = contact.nickname or ""
name = contact.name or ""
+ homepage = contact.homepage or {}
mail = contact.mail or ""
phone = contact.phone or ""
location = uci:get_first("system", "system", "location") or contact.location
@@ -39,6 +40,11 @@ end
<table cellspacing="10" width="100%" style="text-align:left">
<tr><th width="33%"><%:Nickname%>:</th><td><%=nickname%></td></tr>
<tr><th width="33%"><%:Realname%>:</th><td><%=name%></td></tr>
+ <tr><th width="33%"><%:Homepage%>:</th><td>
+ <% for k, v in ipairs(homepage) do %>
+ <a href="<%=v%>"><%=v%></a><br />
+ <% end %>
+ </td></tr>
<tr><th width="33%"><%:E-Mail%>:</th><td><a href="mailto:<%=mail%>"><%=mail%></a></td></tr>
<tr><th width="33%"><%:Phone%>:</th><td><%=phone%></td></tr>
</table>