From a9c2fc65b693398ffaf8c59706ee4ca2a1476bc4 Mon Sep 17 00:00:00 2001 From: Manuel Munz Date: Wed, 9 Jan 2013 11:22:15 +0000 Subject: [PATCH] modules/freifunk: Add homepage(s) field to contact information --- modules/freifunk/luasrc/model/cbi/freifunk/contact.lua | 1 + modules/freifunk/luasrc/view/freifunk/contact.htm | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/freifunk/luasrc/model/cbi/freifunk/contact.lua b/modules/freifunk/luasrc/model/cbi/freifunk/contact.lua index f6cdec7fe..30e94a3e9 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 23a5e7b1a..2d79ccd40 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 +
<%:Nickname%>:<%=nickname%>
<%:Realname%>:<%=name%>
<%:Homepage%>: + <% for k, v in ipairs(homepage) do %> + <%=v%>
+ <% end %> +
<%:E-Mail%>:<%=mail%>
<%:Phone%>:<%=phone%>
-- 2.11.0