diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/cbi.js | 4 | ||||
-rw-r--r-- | modules/luci-base/po/ru/base.po | 198 | ||||
-rw-r--r-- | modules/luci-base/po/zh-cn/base.po | 38 | ||||
-rw-r--r-- | modules/luci-mod-freifunk/luasrc/model/cbi/freifunk/basics.lua | 2 | ||||
-rw-r--r-- | modules/luci-mod-freifunk/luasrc/view/freifunk/adminindex.htm | 13 | ||||
-rw-r--r-- | modules/luci-mod-freifunk/luasrc/view/freifunk/contact.htm | 25 | ||||
-rw-r--r-- | modules/luci-mod-freifunk/luasrc/view/freifunk/index.htm | 14 |
7 files changed, 62 insertions, 232 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js index f93c9351a7..67ddc6af36 100644 --- a/modules/luci-base/htdocs/luci-static/resources/cbi.js +++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js @@ -443,10 +443,10 @@ var CBIValidatorPrototype = { m6 = this.value.match((bracket == 1) ? /^\[(.+)\]:(\d+)$/ : /^([^\[\]]+):(\d+)$/); if (m4) - return this.assert(this.apply('ip4addr', m4[0], [true]) && this.apply('port', m4[1]), + return this.assert(this.apply('ip4addr', m4[1], [true]) && this.apply('port', m4[2]), _('valid address:port')); - return this.assert(m6 && this.apply('ip6addr', m6[0], [true]) && this.apply('port', m6[1]), + return this.assert(m6 && this.apply('ip6addr', m6[1], [true]) && this.apply('port', m6[2]), _('valid address:port')); }, diff --git a/modules/luci-base/po/ru/base.po b/modules/luci-base/po/ru/base.po index 0beac06472..c390fc78a9 100644 --- a/modules/luci-base/po/ru/base.po +++ b/modules/luci-base/po/ru/base.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: LuCI: base\n" "POT-Creation-Date: 2010-05-09 01:01+0300\n" -"PO-Revision-Date: 2018-11-20 20:01+0300\n" +"PO-Revision-Date: 2019-01-15 06:45+0300\n" "Last-Translator: Anton Kikin <a.kikin@tano-systems.com>\n" "Language-Team: http://cyber-place.ru\n" "Language: ru\n" @@ -25,7 +25,7 @@ msgstr "%d бит" #: modules/luci-base/htdocs/luci-static/resources/luci.js:307 msgid "%d invalid field(s)" -msgstr "" +msgstr "%d неверных полей" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/vlan.lua:256 msgid "%s is untagged in multiple VLANs!" @@ -362,11 +362,11 @@ msgstr "Добавить" #: modules/luci-base/luasrc/model/cbi/admin_network/proto_static.lua:60 msgid "Add IPv4 address…" -msgstr "" +msgstr "Добавить IPv4 адрес..." #: modules/luci-base/luasrc/model/cbi/admin_network/proto_static.lua:129 msgid "Add IPv6 address…" -msgstr "" +msgstr "Добавить IPv6 адрес..." #: modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js:120 #: modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js:143 @@ -511,11 +511,11 @@ msgstr "Объявлять всегда, как маршрутизатор по #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:50 msgid "Always off (%s)" -msgstr "" +msgstr "Всегда выключен (%s)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:48 msgid "Always on (%s)" -msgstr "" +msgstr "Всегда включен (%s)" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:258 msgid "" @@ -1234,7 +1234,7 @@ msgstr "" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:52 msgid "Custom flash intervall (%s)" -msgstr "" +msgstr "Произвольный интервал мигания (%s)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:4 msgid "" @@ -1246,15 +1246,15 @@ msgstr "" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:760 msgid "DAE-Client" -msgstr "" +msgstr "DAE-Клиент" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:768 msgid "DAE-Port" -msgstr "" +msgstr "DAE-Порт" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:776 msgid "DAE-Secret" -msgstr "" +msgstr "DAE-Секрет" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua:448 #: modules/luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua:459 @@ -2005,7 +2005,7 @@ msgstr "Прошивка..." #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:60 #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:62 msgid "Flashmemory write access (%s)" -msgstr "" +msgstr "Запись во флешпамять (%s)" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua:498 msgid "Force" @@ -2198,7 +2198,7 @@ msgstr "Ошибки контроля ошибок заголовка (HEC)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:56 msgid "Heartbeat intervall (%s)" -msgstr "" +msgstr "Интервал heartbeat (%s)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/system.lua:14 msgid "" @@ -2354,7 +2354,7 @@ msgstr "IPv4-адрес" #: protocols/luci-proto-ipip/luasrc/model/network/proto_ipip.lua:9 msgid "IPv4-in-IPv4 (RFC2003)" -msgstr "IPv4-in-IPv4 (RFC2003)" +msgstr "IPv4-в-IPv4 (RFC2003)" #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/iface_status.js:23 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/iface_status.js:24 @@ -2396,7 +2396,7 @@ msgstr "Настройки IPv6" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/network.lua:195 msgid "IPv6 ULA-Prefix" -msgstr "IPv6 ULA-Prefix" +msgstr "IPv6 ULA-префикс" #: modules/luci-mod-status/htdocs/luci-static/resources/view/status/index.js:71 msgid "IPv6 Upstream" @@ -3366,7 +3366,7 @@ msgstr "Образ системы для сетевой загрузки" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:54 msgid "Network device activity (%s)" -msgstr "" +msgstr "Активность сетевого устройства (%s)" #: modules/luci-base/luasrc/model/network.lua:33 msgid "Network device is not present" @@ -4912,11 +4912,11 @@ msgstr "Изменить протокол" #: modules/luci-base/luasrc/view/cbi/ipaddr.htm:26 msgid "Switch to CIDR list notation" -msgstr "" +msgstr "Переключить в формат CIDR" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:64 msgid "Switchport activity (%s)" -msgstr "" +msgstr "Активность порта коммутатора (%s)" #: modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm:25 #: modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm:34 @@ -5856,26 +5856,29 @@ msgid "" "R0/R1 key options below are not applied. Disable this to use the R0 and R1 " "key options." msgstr "" +"При использовании PSK, PMK может генерироваться автоматически. Если " +"включено, опции ключей R0/R1, расположенные ниже, не применяются. Для " +"использования опций ключей R0/R1 отключите данную опцию." #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:74 msgid "Wi-Fi activity (%s)" -msgstr "" +msgstr "Активность Wi-Fi (%s)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:70 msgid "Wi-Fi client association (%s)" -msgstr "" +msgstr "Ассоциация Wi-Fi клиента (%s)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:66 msgid "Wi-Fi data reception (%s)" -msgstr "" +msgstr "Приём данных Wi-Fi (%s)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:68 msgid "Wi-Fi data transmission (%s)" -msgstr "" +msgstr "Передача данных Wi-Fi (%s)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:72 msgid "Wi-Fi on (%s)" -msgstr "" +msgstr "Wi-Fi включен (%s)" #: modules/luci-base/luasrc/view/cbi/wireless_modefreq.htm:161 msgid "Width" @@ -6471,154 +6474,3 @@ msgstr "да" #: modules/luci-base/luasrc/view/cbi/delegator.htm:20 msgid "« Back" msgstr "« Назад" - -#~ msgid "" -#~ "When using a PSK, the PMK can be generated locally without inter AP " -#~ "communications" -#~ msgstr "" -#~ "При использовании PSK, PMK может быть создан локально без коммуникации AP " -#~ "между собой" - -#~ msgid "Apply unchecked" -#~ msgstr "Применить без проверки" - -#~ msgid "" -#~ "The device could not be reached within %d seconds after applying the " -#~ "pending changes, which caused the configuration to be rolled back for " -#~ "safety reasons. If you believe that the configuration changes are correct " -#~ "nonetheless, perform an unchecked configuration apply. Alternatively, you " -#~ "can dismiss this warning and edit changes before attempting to apply " -#~ "again, or revert all pending changes to keep the currently working " -#~ "configuration state." -#~ msgstr "" -#~ "Устройство недоступно в течение %d секунд после применения изменений. Это " -#~ "привело к откату конфигурации из соображений безопасности. Если вы " -#~ "считаете, что конфигурация верна, выполните настройку без проверки. Кроме " -#~ "того, вы можете отклонить это предупреждение и отредактировать изменения " -#~ "перед попыткой применить конфигурацию снова или откатить все изменения, " -#~ "чтобы сохранить рабочее состояние конфигурации." - -#~ msgid "Waiting for configuration to get applied… %ds" -#~ msgstr "Ожидание применения конфигурации... %d сек" - -#~ msgid "" -#~ "Here you can paste public SSH-Keys (one per line) for SSH public-key " -#~ "authentication." -#~ msgstr "" -#~ "Здесь вы можете добавить открытые SSH ключи (один ключ на строку) для SSH " -#~ "аутентификации." - -#~ msgid "Password successfully changed!" -#~ msgstr "Пароль успешно изменён!" - -#~ msgid "Unknown Error, password not changed!" -#~ msgstr "Неизвестная ошибка, пароль не был изменен!" - -#~ msgid "Design" -#~ msgstr "Тема" - -#~ msgid "Available packages" -#~ msgstr "Доступные пакеты" - -#~ msgid "Bind only to specific interfaces rather than wildcard address." -#~ msgstr "" -#~ "Соединение только с определенными интерфейсами, не использующими " -#~ "подстановочные адреса (wildcard)." - -#~ msgid "" -#~ "Build/distribution specific feed definitions. This file will NOT be " -#~ "preserved in any sysupgrade." -#~ msgstr "" -#~ "Build/distribution оригинальные feed-ы. Изменения в этом файле НЕ " -#~ "сохранятся при перепрошивке sysupgrade-совместимым образом." - -#~ msgid "" -#~ "Custom feed definitions, e.g. private feeds. This file can be preserved " -#~ "in a sysupgrade." -#~ msgstr "" -#~ "Custom-ные feed-ы — это пользовательские feed-ы. Этот файл может быть " -#~ "сохранен при перепрошивке sysupgrade-совместимым образом." - -#~ msgid "Custom feeds" -#~ msgstr "Список custom-ных feed-ов" - -#~ msgid "Displaying only packages containing" -#~ msgstr "Показываются только пакеты, содержащие" - -#~ msgid "Distribution feeds" -#~ msgstr "Список feed-ов дистрибутива" - -#~ msgid "Download and install package" -#~ msgstr "Загрузить и установить пакет" - -#~ msgid "Filter" -#~ msgstr "Фильтр" - -#~ msgid "Find package" -#~ msgstr "Найти пакет" - -#~ msgid "Free space" -#~ msgstr "Свободное место" - -#~ msgid "General options for opkg" -#~ msgstr "Основные настройки opkg" - -#~ msgid "Install" -#~ msgstr "Установить" - -#~ msgid "Installed packages" -#~ msgstr "Установленные пакеты" - -#~ msgid "No package lists available" -#~ msgstr "Список пакетов не доступен" - -#~ msgid "OK" -#~ msgstr "OK" - -#~ msgid "OPKG-Configuration" -#~ msgstr "Настройка OPKG" - -#~ msgid "Package lists are older than 24 hours" -#~ msgstr "Список пакетов обновлялся более 24 часов назад" - -#~ msgid "Package name" -#~ msgstr "Имя пакета" - -#~ msgid "Please update package lists first" -#~ msgstr "Пожалуйста обновите список пакетов" - -#~ msgid "Size (.ipk)" -#~ msgstr "Размер (.ipk)" - -#~ msgid "Software" -#~ msgstr "Программное обеспечение" - -#~ msgid "Update lists" -#~ msgstr "Обновить списки" - -#~ msgid "Version" -#~ msgstr "Версия" - -#~ msgid "none" -#~ msgstr "ничего" - -#~ msgid "Disable DNS setup" -#~ msgstr "Отключить DNS настройки" - -#~ msgid "IPv4 and IPv6" -#~ msgstr "IPv4 и IPv6" - -#~ msgid "IPv4 only" -#~ msgstr "Только IPv4" - -#~ msgid "IPv6 only" -#~ msgstr "Только IPv6" - -#~ msgid "Lease validity time" -#~ msgstr "Срок действия аренды" - -#~ msgid "Multicast address" -#~ msgstr "Адрес мультивещания" - -#~ msgid "Protocol family" -#~ msgstr "Семейство протоколов" diff --git a/modules/luci-base/po/zh-cn/base.po b/modules/luci-base/po/zh-cn/base.po index ac57c19da5..5fce99935c 100644 --- a/modules/luci-base/po/zh-cn/base.po +++ b/modules/luci-base/po/zh-cn/base.po @@ -1,10 +1,10 @@ # # Yangfl <mmyangfl@gmail.com>, 2018. -# Zheng Qian <sotux82@gmail.com>, 2018. +# Zheng Qian <sotux82@gmail.com>, 2019. # msgid "" msgstr "" -"PO-Revision-Date: 2018-12-14 09:11+0800\n" +"PO-Revision-Date: 2019-01-10 16:10+0800\n" "Last-Translator: Yangfl <mmyangfl@gmail.com>\n" "Language-Team: <debian-l10n-chinese@lists.debian.org>\n" "Language: \n" @@ -493,11 +493,11 @@ msgstr "总是通告默认路由" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:50 msgid "Always off (%s)" -msgstr "" +msgstr "总是关闭(%s)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:48 msgid "Always on (%s)" -msgstr "" +msgstr "总是开启(%s)" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua:258 msgid "" @@ -920,7 +920,7 @@ msgstr "更改访问设备的管理员密码" #: modules/luci-mod-system/htdocs/luci-static/resources/view/system/password.js:10 msgid "Changing password…" -msgstr "正在更改密码……" +msgstr "正在更改密码…" #: modules/luci-base/luasrc/view/cbi/wireless_modefreq.htm:157 #: modules/luci-mod-network/htdocs/luci-static/resources/view/network/wifi_status.js:45 @@ -1184,7 +1184,7 @@ msgstr "" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:52 msgid "Custom flash intervall (%s)" -msgstr "" +msgstr "自定义闪烁间隔(%s)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:4 msgid "" @@ -1935,7 +1935,7 @@ msgstr "正在刷写…" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:60 #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:62 msgid "Flashmemory write access (%s)" -msgstr "" +msgstr "闪存写访问(%s)" #: modules/luci-mod-network/luasrc/model/cbi/admin_network/ifaces.lua:498 msgid "Force" @@ -2128,7 +2128,7 @@ msgstr "请求头错误代码错误(HEC)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:56 msgid "Heartbeat intervall (%s)" -msgstr "" +msgstr "心跳间隔(%s)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/system.lua:14 msgid "" @@ -2850,7 +2850,7 @@ msgstr "加载中" #: modules/luci-mod-system/luasrc/view/admin_system/sshkeys.htm:35 msgid "Loading SSH keys…" -msgstr "正在加载 SSH 密钥……" +msgstr "正在加载 SSH 密钥…" #: modules/luci-base/luasrc/model/network.lua:30 msgid "Local IP address is invalid" @@ -3266,7 +3266,7 @@ msgstr "网络启动镜像" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:54 msgid "Network device activity (%s)" -msgstr "" +msgstr "网络设备活动(%s)" #: modules/luci-base/luasrc/model/network.lua:33 msgid "Network device is not present" @@ -3467,7 +3467,7 @@ msgstr "一个或多个必选项值为空!" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/backupfiles.lua:19 msgid "Open list..." -msgstr "打开列表……" +msgstr "打开列表…" #: protocols/luci-proto-openconnect/luasrc/model/network/proto_openconnect.lua:9 msgid "OpenConnect (CISCO AnyConnect)" @@ -4398,7 +4398,7 @@ msgstr "保存 mtdblock 内容" #: modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js:120 msgid "Saving keys…" -msgstr "正在保存密钥……" +msgstr "正在保存密钥…" #: modules/luci-mod-network/luasrc/view/admin_network/wifi_overview.htm:15 msgid "Scan" @@ -4770,7 +4770,7 @@ msgstr "切换到 CIDR 列表记法" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:64 msgid "Switchport activity (%s)" -msgstr "" +msgstr "交换口活动(%s)" #: modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm:25 #: modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm:34 @@ -5167,7 +5167,7 @@ msgstr "时区" #: modules/luci-base/htdocs/luci-static/resources/xhr.js:47 msgid "To login…" -msgstr "登录……" +msgstr "去登录…" #: modules/luci-mod-system/luasrc/view/admin_system/flashops.htm:32 msgid "" @@ -5665,23 +5665,23 @@ msgstr "" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:74 msgid "Wi-Fi activity (%s)" -msgstr "" +msgstr "Wi-Fi 活动(%s)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:70 msgid "Wi-Fi client association (%s)" -msgstr "" +msgstr "Wi-Fi 客户端关联(%s)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:66 msgid "Wi-Fi data reception (%s)" -msgstr "" +msgstr "Wi-Fi 数据接收(%s)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:68 msgid "Wi-Fi data transmission (%s)" -msgstr "" +msgstr "Wi-Fi 数据传输(%s)" #: modules/luci-mod-system/luasrc/model/cbi/admin_system/leds.lua:72 msgid "Wi-Fi on (%s)" -msgstr "" +msgstr "Wi-Fi 开启(%s)" #: modules/luci-base/luasrc/view/cbi/wireless_modefreq.htm:161 msgid "Width" diff --git a/modules/luci-mod-freifunk/luasrc/model/cbi/freifunk/basics.lua b/modules/luci-mod-freifunk/luasrc/model/cbi/freifunk/basics.lua index b08366de6c..eb0b49b11c 100644 --- a/modules/luci-mod-freifunk/luasrc/model/cbi/freifunk/basics.lua +++ b/modules/luci-mod-freifunk/luasrc/model/cbi/freifunk/basics.lua @@ -15,7 +15,7 @@ community.rmempty = false local profile for profile in fs.glob(profiles) do - local name = uci:get_first(profile, "community", "name") or "?" + local name = uci:get_first(string.gsub(profile, "/etc/config/", ""), "community", "name") or "?" community:value(string.gsub(profile, "/etc/config/profile_", ""), name) end diff --git a/modules/luci-mod-freifunk/luasrc/view/freifunk/adminindex.htm b/modules/luci-mod-freifunk/luasrc/view/freifunk/adminindex.htm index e0252ba891..a3f079716c 100644 --- a/modules/luci-mod-freifunk/luasrc/view/freifunk/adminindex.htm +++ b/modules/luci-mod-freifunk/luasrc/view/freifunk/adminindex.htm @@ -1,22 +1,15 @@ <%+header%> <% local uci = require "luci.model.uci".cursor() -local contact = uci:get_all("freifunk", "contact") +local nickname = uci:get("freifunk", "contact", "nickname") or "" +local name = uci:get("freifunk", "contact", "name") or "" +local mail = uci:get("freifunk", "contact", "mail") or "" local contacturl = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "freifunk", "contact") local hostname = uci:get_first ("system", "system", "hostname") local latitude = uci:get_first ("system", "system", "latitude") local longitude = uci:get_first ("system", "system", "longitude") local location = uci:get_first ("system", "system", "location") local basicsurl = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "freifunk", "basics") -local nickname, name, mail -if not contact then - nickname, name, mail = "" -else - nickname = contact.nickname - name = contact.name - mail = contact.mail -end - %> <h2><%:Freifunk Overview%></h2> diff --git a/modules/luci-mod-freifunk/luasrc/view/freifunk/contact.htm b/modules/luci-mod-freifunk/luasrc/view/freifunk/contact.htm index dca35376cb..dececeff51 100644 --- a/modules/luci-mod-freifunk/luasrc/view/freifunk/contact.htm +++ b/modules/luci-mod-freifunk/luasrc/view/freifunk/contact.htm @@ -9,22 +9,15 @@ <% local uci = require "luci.model.uci".cursor() -local contact = uci:get_all("freifunk", "contact") -local nickname, name, mail, phone, location, note -local lon = uci:get_first("system", "system", "longitude") -local lat = uci:get_first("system", "system", "latitude") - -if not contact then - 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 - note = contact.note or "" -end +local nickname = uci:get("freifunk", "contact", "nickname") or "" +local name = uci:get("freifunk", "contact", "name") or "" +local homepage = uci:get("freifunk", "contact", "homepage") or {} +local mail = uci:get("freifunk", "contact", "mail") or "" +local phone = uci:get("freifunk", "contact", "phone") or "" +local location = uci:get_first("system", "system", "locaton") or uci:get("freifunk", "contact", "location") or "" +local note = uci:get("freifunk", "contact", "note") or "" +local lon = uci:get_first("system", "system", "longitude") or "" +local lat = uci:get_first("system", "system", "latitude") or "" %> <h2 name="content"><%:Contact%></h2> diff --git a/modules/luci-mod-freifunk/luasrc/view/freifunk/index.htm b/modules/luci-mod-freifunk/luasrc/view/freifunk/index.htm index 3134f0b1b9..3affc73fb9 100644 --- a/modules/luci-mod-freifunk/luasrc/view/freifunk/index.htm +++ b/modules/luci-mod-freifunk/luasrc/view/freifunk/index.htm @@ -9,18 +9,10 @@ local uci = require "luci.model.uci".cursor() local tpl = require "luci.template" local fs = require "nixio.fs" -local ff = {} -local ff = uci:get_all("freifunk") -if not ff or not ff.community.name then - community = "Freifunk" - DefaultText = "" - nickname = "No Nickname set" -else - community = ff.community.name - DefaultText = ff.community.DefaultText - nickname = ff.contact.nickname -end +local community = uci:get("freifunk", "community", "name") or "Freifunk" +local DefaultText = uci:get("freifunk", "community", "DefaultText") or "" +local nickname = uci:get("freifunk", "contact", "nickname") or "No Nickname set" local co = "profile_" .. community --local community = uci:get_first(co, "community", "name") or "Freifunk" |