2 Copyright
2008 Steven Barth
<steven@midlink.org
>
3 Copyright
2008-
2016 Jo-Philipp Wich
<jow@openwrt.org
>
4 Copyright
2012 David Menting
<david@nut-bolt.nl
>
5 Licensed to the public under the Apache License
2.0.
9 local sys = require
"luci.sys"
10 local util = require
"luci.util"
11 local http = require
"luci.http"
12 local disp = require
"luci.dispatcher"
14 local boardinfo = util.ubus(
"system",
"board")
16 local node = disp.context.dispatched
19 http.prepare_content(
"text/html")
22 <html lang=
"<%=luci.i18n.context.lang%>">
24 <meta charset=
"utf-8">
25 <title><%=striptags( (boardinfo.hostname or
"?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %
> - LuCI
</title>
26 <meta name=
"viewport" content=
"initial-scale=1.0">
27 <link rel=
"stylesheet" href=
"<%=media%>/cascade.css">
28 <link rel=
"stylesheet" media=
"only screen and (max-device-width: 854px)" href=
"<%=media%>/mobile.css" type=
"text/css" />
29 <link rel=
"shortcut icon" href=
"<%=media%>/favicon.png">
30 <% if node and node.css then %
>
31 <link rel=
"stylesheet" href=
"<%=resource%>/<%=node.css%>">
34 <style title=
"text/css"><%= css %
></style>
36 <script src=
"<%=url('admin/translations', luci.i18n.context.lang)%><%# ?v=PKG_VERSION %>"></script>
37 <script src=
"<%=resource%>/cbi.js"></script>
38 <script src=
"<%=resource%>/xhr.js"></script>
40 <% include(
"themes/bootstrap/json-menu") %
>
43 <body class=
"lang_<%=luci.i18n.context.lang%> <% if node then %><%= striptags( node.title ) %><%- end %>" data-page=
"<%= pcdata(table.concat(disp.context.requestpath, "-
")) %>">
46 <div class=
"container">
47 <a class=
"brand" href=
"#"><%=boardinfo.hostname or
"?"%
></a>
48 <ul class=
"nav" id=
"topmenu" style=
"display:none"></ul>
49 <div id=
"indicators" class=
"pull-right">
50 <span id=
"xhr_poll_status" style=
"display:none" onclick=
"XHR.running() ? XHR.halt() : XHR.run()">
51 <span class=
"label success" id=
"xhr_poll_status_on"><%:Auto Refresh%
> <%:on%
></span>
52 <span class=
"label" id=
"xhr_poll_status_off" style=
"display:none"><%:Auto Refresh%
> <%:off%
></span>
59 <div id=
"maincontent" class=
"container">
60 <%- if luci.sys.process.info(
"uid") ==
0 and luci.sys.user.getuser(
"root") and not luci.sys.user.getpasswd(
"root") then -%
>
61 <div class=
"alert-message warning">
62 <h4><%:No password set!%
></h4>
63 <p><%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%
></p>
64 <% if disp.lookup(
"admin/system/admin") then %
>
65 <div class=
"right"><a class=
"btn" href=
"<%=url("admin/system/admin
")%>"><%:Go to password configuration...%
></a></div>
71 <div class=
"alert-message warning">
72 <h4><%:JavaScript required!%
></h4>
73 <p><%:You must enable JavaScript in your browser or LuCI will not work properly.%
></p>
77 <div id=
"tabmenu" style=
"display:none"></div>