2 LuCI - Lua Configuration Interface
4 Copyright 2012 Manuel Munz <freifunk at somakoma de>
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
10 http://www.apache.org/licenses/LICENSE-2.0
13 local require = require
14 module "luci.controller.freifunk.widgets"
19 local page = node("admin", "freifunk", "widgets")
20 page.target = cbi("freifunk/widgets/widgets_overview")
21 page.title = _("Widgets")
25 local page = node("admin", "freifunk", "widgets", "widget")
26 page.target = cbi("freifunk/widgets/widget")
29 local page = node("freifunk", "search_redirect")
30 page.target = call("search_redirect")
34 function search_redirect()
35 local dsp = require "luci.dispatcher"
36 local http = require "luci.http"
37 local engine = http.formvalue("engine")
38 local searchterms = http.formvalue("searchterms") or ""
40 http.redirect(engine .. searchterms)
42 http.redirect(dsp.build_url())