Rebased from upstream / out of band repository.
[librecmc/librecmc.git] / package / luci / modules / luci-base / luasrc / view / header.htm
1 <%#
2  Copyright 2008 Steven Barth <steven@midlink.org>
3  Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
4  Licensed to the public under the Apache License 2.0.
5 -%>
6
7 <%
8         if not luci.dispatcher.context.template_header_sent then
9                 include("themes/" .. theme .. "/header")
10                 luci.dispatcher.context.template_header_sent = true
11         end
12 %>
13
14 <script type="text/javascript" src="<%=resource%>/luci.js"></script>
15 <script type="text/javascript">
16         L = new LuCI(<%= luci.http.write_json({
17                 token       = token,
18                 resource    = resource,
19                 scriptname  = luci.http.getenv("SCRIPT_NAME"),
20                 pathinfo    = luci.http.getenv("PATH_INFO"),
21                 requestpath = luci.dispatcher.context.requestpath,
22                 pollinterval    = luci.config.main.pollinterval or 5
23         }) %>);
24 </script>