3 LuCI - Lua Configuration Interface
5 Copyright
2012 Manuel Munz
<freifunk at somakoma dot de
>
7 Licensed under the Apache License, Version
2.0 (the
"License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-
2.0
14 local utl = require
"luci.util"
15 local title = luci.i18n.translate(data.title or
"Search")
16 local name = data['.name']
17 local width = data.width or
"100%"
19 if type(width) ==
"number" then
24 if type(data.engine) ==
"table" then
27 for k, v in ipairs(string.split(data.engine,
" ")) do
28 table.insert(engines, v)
33 <div id=
"<%=name%>" style=
"width:<%=width%>;float:left">
35 <div id=
"form_<%=name%>">
36 <form name=
"searchform" id=
"search_<%=name%>" action=
"<%=url('freifunk/search_redirect')%>">
37 <input type=
"text" name=
"searchterms" style=
"margin-bottom:15px; width: 90%"><br />
39 local checked =
" checked"
40 for k, v in ipairs(engines) do
41 local e = utl.split(v,
"|")
46 <input name=
"engine" type=
"radio" value=
"<%=url%>"<%=checked%
>> <%=name%
><br />
51 <input type=
"submit" name=
"SearchSubmit" value=
"Search" style=
"margin-top: 15px">