Rework LuCI build system
[project/luci.git] / applications / luci-app-freifunk-widgets / luasrc / model / cbi / freifunk / widgets / rssfeed.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2012 Manuel Munz <freifunk at somakoma dot de>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 ]]--
13
14 local map, section = ...
15 local utl = require "luci.util"
16
17 local form, ferr = loadfile(utl.libpath() .. "/model/cbi/freifunk/widgets/heightwidth.lua")
18 if form then
19         setfenv(form, getfenv(1))(m, wdg)
20 end
21
22 local url = wdg:option(Value, "url", translate("URL"))
23 url.default = "http://global.freifunk.net/rss/all/rss.xml"
24
25 local max = wdg:option(Value, "max", translate("Maximal entries to show"))
26 max.rmempty = true
27 max.default = "10"
28 max.datatype = "integer"
29
30 local cache = wdg:option(Value, "cache", translate("Cache Time"), translate("Cache downloaded feed for that many seconds."))
31 cache.rmempty = true
32 cache.default = "3600"
33 cache.datatype = "integer"
34
35