themes: drop oxygen and openwrt.org-oxygen, there unmaintained and not even packaged
[project/luci.git] / themes / freifunk-hannover / luasrc / view / themes / freifunk-hannover / header.htm
index 19e91b4..5b99d35 100644 (file)
@@ -30,7 +30,7 @@ for i,r in ipairs(request) do
        end
 end
 
-require("luci.i18n").loadc("default")
+require("luci.i18n").loadc("base")
 require("luci.http").prepare_content("application/xhtml+xml")
 
 -%>
@@ -49,10 +49,20 @@ require("luci.http").prepare_content("application/xhtml+xml")
 <script type="text/javascript" src="<%=resource%>/VarType.js"></script>
 <script type="text/javascript" src="<%=resource%>/XHTML1.js"></script>
 <script type="text/javascript" src="<%=resource%>/Dropdowns.js"></script>
-<title><%=striptags( hostname .. ( (node and node.title) and ' - ' .. node.title or '')) %> - LuCI</title>
+<script type="text/javascript" src="<%=resource%>/xhr.js"></script>
+
+<title><%=striptags( hostname .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
 </head>
 <body class="lang_<%=luci.i18n.context.lang%>">
 
+
+<%- if luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
+       <div class="warning">
+               <strong><%:No password set!%></strong><br />
+               <%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%>
+       </div>
+<%- end -%>
+
 <p class="skiplink">
 <span id="skiplink1"><a href="#navigation"><%:Skip to navigation%></a></span>
 <span id="skiplink2"><a href="#content"><%:Skip to content%></a></span>
@@ -96,7 +106,7 @@ local function submenu(prefix, node)
                                local href = controller .. prefix .. v.name .. "/"
                                href = (nnode.query) and href .. luci.http.build_querystring(nnode.query) or href
 %>
-<li><a<% if nnode._menu_selected then %> class="active"<%end%> href="<%=pcdata(href)%>"><%=pcdata(striptags(nnode.title))%></a><%-
+<li><a<% if nnode._menu_selected then %> class="active"<%end%> href="<%=pcdata(href)%>"><%=pcdata(striptags(translate(nnode.title)))%></a><%-
 submenu(prefix .. v.name .. "/", nnode)
 %></li>
 <%-
@@ -122,7 +132,7 @@ if cattree and cattree.nodes then
                        local href = controller.."/"..category.."/"..k.name.."/"
                        href = (k.query) and href .. luci.http.build_querystring(k.query) or href
 %>
-<li><a<% if node._menu_selected then %> class="preactive"<%end%> href="<%=pcdata(href)%>"><%=pcdata(node.title)%></a><%
+<li><a<% if node._menu_selected then %> class="preactive"<%end%> href="<%=pcdata(href)%>"><%=pcdata(translate(node.title))%></a><%
 submenu("/" .. category .. "/" .. k.name .. "/", node)
 %></li><% end
        end
@@ -133,7 +143,7 @@ end
 <ul id="modemenu"><%
 for k,node in pairs(tree.nodes) do
        if node.title and not node.hidden then %>
-<li><a<% if request[1] == k then %> class="active"<%end%> href="<%=controller%>/<%=k%>/"><%=pcdata(node.title)%></a></li><%
+<li><a<% if request[1] == k then %> class="active"<%end%> href="<%=controller%>/<%=k%>/"><%=pcdata(translate(node.title))%></a></li><%
        end
 end
 %>
@@ -161,3 +171,11 @@ else -%>
 <div class="clear"></div>
 </div>
 <div id="maincontent">
+<% if category ~= "freifunk" and category ~= "splash" then %>
+<noscript>
+       <div class="warning">
+               <strong><%:Java Script required!%></strong><br />
+               <%:You must enable Java Script in your browser or LuCI will not work properly.%>
+       </div>
+</noscript>
+<% end %>