applications: add freifunk widgets app to customize the index page
[project/luci.git] / applications / luci-freifunk-widgets / luasrc / model / cbi / freifunk / widgets / search.lua
diff --git a/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/search.lua b/applications/luci-freifunk-widgets/luasrc/model/cbi/freifunk/widgets/search.lua
new file mode 100644 (file)
index 0000000..4d861c5
--- /dev/null
@@ -0,0 +1,12 @@
+local map, section = ...
+local utl = require "luci.util"
+
+local form, ferr = loadfile(utl.libpath() .. "/model/cbi/freifunk/widgets/heightwidth.lua")
+if form then
+       setfenv(form, getfenv(1))(m, wdg)
+end
+
+local engine = wdg:option(DynamicList, "engine", translate("Search Engine"),
+       translate("Use the form Name|URL, where URL must be a full URL to the search engine "  ..
+                 "including the query GET parameter, e.g. 'Google|http://www.google.de/search?q='")
+       )