- %>
- <div class="pull-right">
- <% if ucichanges > 0 then %>
- <a class="label notice" href="<%=controller%>/<%=category%>/uci/changes?redir=<%=http.urlencode(http.formvalue("redir") or REQUEST_URI)%>"><%:Unsaved Changes%>: <%=ucichanges%></a>
- <% end %>
- <span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
- <span class="label success" id="xhr_poll_status_on"><%:Auto Refresh%> <%:on%></span>
- <span class="label" id="xhr_poll_status_off" style="display:none"><%:Auto Refresh%> <%:off%></span>
- </span>
- </div>
- <% end %>
- </div>
- </div>
- </header>
-
-<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
-<div class="container">
- <div class="alert-message warning">
- <h4><%:No password set!%></h4>
- <%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%><br>
- <a href="<%=pcdata(luci.dispatcher.build_url("admin/system/admin"))%>"><%:Go to password configuration...%></a>
- </div>
-</div>
-<%- end -%>
-
-<div id="maincontent" class="container">
-<% if category then subtree("/" .. category .. "/", cattree) end %>
+
+ if ucichanges > 0 then
+ write('<a class="label notice" href="%s?redir=%s">%s: %d</a>' %{
+ url(category, 'uci/changes'),
+ http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
+ translate('Unsaved Changes'),
+ ucichanges
+ })
+ end
+ end
+ end
+-%>
+<!DOCTYPE html>
+<html lang="<%=luci.i18n.context.lang%>">
+ <head>
+ <meta charset="utf-8">
+ <title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
+ <!--[if lt IE 9]><script src="<%=media%>/html5.js"></script><![endif]-->
+ <meta name="viewport" content="initial-scale=1.0">
+ <link rel="stylesheet" href="<%=media%>/cascade.css">
+ <link rel="stylesheet" media="only screen and (max-device-width: 854px)" href="<%=media%>/mobile.css" type="text/css" />
+ <link rel="shortcut icon" href="<%=media%>/favicon.ico">
+ <% if node and node.css then %>
+ <link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
+ <% end -%>
+ <% if css then %>
+ <style title="text/css"><%= css %></style>
+ <% end -%>
+ <script src="<%=resource%>/xhr.js"></script>
+ </head>
+
+ <body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %>">
+ <header>
+ <div class="fill">
+ <div class="container">
+ <a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
+ <% render_topmenu() %>
+ <div class="pull-right">
+ <% render_changes() %>
+ <span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
+ <span class="label success" id="xhr_poll_status_on"><%:Auto Refresh%> <%:on%></span>
+ <span class="label" id="xhr_poll_status_off" style="display:none"><%:Auto Refresh%> <%:off%></span>
+ </span>
+ </div>
+ </div>
+ </div>
+ </header>
+
+ <%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
+ <div class="container">
+ <div class="alert-message warning">
+ <h4><%:No password set!%></h4>
+ <%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%><br>
+ <a href="<%=pcdata(luci.dispatcher.build_url("admin/system/admin"))%>"><%:Go to password configuration...%></a>
+ </div>
+ </div>
+ <%- end -%>
+
+ <noscript>
+ <div class="alert-message warning">
+ <strong><%:JavaScript required!%></strong><br />
+ <%:You must enable JavaScript in your browser or LuCI will not work properly.%>
+ </div>
+ </noscript>
+
+ <div id="maincontent" class="container">
+ <% if category then render_tabmenu(category, cattree) end %>