1 -- Copyright 2012 Manuel Munz <freifunk at somakoma de>
2 -- Licensed to the public under the Apache License 2.0.
4 local require = require
5 module "luci.controller.freifunk.widgets"
10 local page = node("admin", "freifunk", "widgets")
11 page.target = cbi("freifunk/widgets/widgets_overview")
12 page.title = _("Widgets")
16 local page = node("admin", "freifunk", "widgets", "widget")
17 page.target = cbi("freifunk/widgets/widget")
20 local page = node("freifunk", "search_redirect")
21 page.target = call("search_redirect")
25 function search_redirect()
26 local dsp = require "luci.dispatcher"
27 local http = require "luci.http"
28 local engine = http.formvalue("engine")
29 local searchterms = http.formvalue("searchterms") or ""
31 http.redirect(engine .. searchterms)
33 http.redirect(dsp.build_url())