2018-02-14 16:46:53 +00:00
< %#
Copyright 2008 Steven Barth < steven @ midlink . org >
2018-05-31 13:44:12 +00:00
Copyright 2008-2016 Jo-Philipp Wich < jow @ openwrt . org >
2018-02-14 16:46:53 +00:00
Copyright 2012 David Menting < david @ nut-bolt . nl >
Licensed to the public under the Apache License 2.0.
-%>
< %
local sys = require "luci.sys"
local util = require "luci.util"
local http = require "luci.http"
local disp = require "luci.dispatcher"
local boardinfo = util.ubus("system", "board")
local node = disp.context.dispatched
2018-05-31 13:44:12 +00:00
-- send as HTML5
2018-02-14 16:46:53 +00:00
http.prepare_content("text/html")
2018-11-02 19:22:10 +00:00
-- Get current and latest OMR version
local current_omr_version = luci.model.uci.cursor():get("openmptcprouter","settings","version") or ""
local latest_omr_version = luci.model.uci.cursor():get("openmptcprouter","latest_versions","omr") or ""
2018-05-31 13:44:12 +00:00
-%>
<!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 >
< meta name = "viewport" content = "initial-scale=1.0" >
2021-09-15 18:21:26 +00:00
< meta http-equiv = "Cache-Control" content = "no-cache, no-store, must-revalidate" / >
< meta http-equiv = "Pragma" content = "no-cache" / >
< meta http-equiv = "Expires" content = "0" / >
2018-05-31 13:44:12 +00:00
< 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" / >
2019-12-21 21:26:15 +00:00
< link rel = "shortcut icon" type = "image/png" href = "<%=media%>/favicon.png" >
2020-10-19 11:19:50 +00:00
< link rel = "apple-touch-icon" href = "<%=media%>/omr-logo-apple.png" >
2018-05-31 13:44:12 +00:00
< % if node and node.css then %>
< link rel = "stylesheet" href = "<%=resource%>/<%=node.css%>" >
< % end -%>
< % if css then %>
< style title = "text/css" > < % = css % > < / style >
< % end -%>
2019-12-21 21:26:15 +00:00
< script src = "<%=url('admin/translations', luci.i18n.context.lang)%><%# ?v=PKG_VERSION %>" > < / script >
2018-07-23 17:23:18 +00:00
< script src = "<%=resource%>/cbi.js" > < / script >
2018-05-31 13:44:12 +00:00
< / head >
2019-12-21 21:26:15 +00:00
< body class = "lang_<%=luci.i18n.context.lang%> <% if node then %><%= striptags( node.title ) %><%- end %>" data-page = "<%= table.concat(disp.context.requestpath, " - " ) % > ">
2018-05-31 13:44:12 +00:00
< header >
< div class = "fill" >
< div class = "container" >
< a class = "brand" href = "#" alt = "OpenMPTCProuter" > < img src = "<%=resource%>/openmptcprouter/images/omr-logo.png" height = "30" width = "30" alt = "OMR" / > OpenMPTCProuter< / a >
2019-12-21 21:26:15 +00:00
< ul class = "nav" id = "topmenu" style = "display:none" > < / ul >
2020-05-01 09:03:21 +00:00
< div id = "indicators" class = "pull-right" > < / div >
2018-05-31 13:44:12 +00:00
< / div >
< / div >
< / header >
2018-06-08 08:51:00 +00:00
< div id = "maincontent" class = "container" >
< %- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
2018-05-31 13:44:12 +00:00
< div class = "alert-message warning" >
< h4 > < %:No password set!%>< / h4 >
2020-08-19 13:46:42 +00:00
< p > < %:There is no password set on this router. Please configure a root password to protect the web interface.%>< / p >
2019-12-21 21:26:15 +00:00
< % if disp.lookup("admin/system/admin") then %>
< div class = "right" > < a class = "btn" href = "<%=url(" admin / system / admin " ) % > ">< %:Go to password configuration...%>< / a > < / div >
< % end %>
2018-05-31 13:44:12 +00:00
< / div >
2018-06-08 08:51:00 +00:00
< %- end -%>
2018-11-02 19:22:10 +00:00
< %- if current_omr_version ~= "" and latest_omr_version ~= "" and current_omr_version < latest_omr_version then - % >
< div class = "alert-message notice" >
< p > < %=translatef("You have OpenMPTCProuter version %s and version %s is now available",current_omr_version,latest_omr_version)%>< / p >
< div class = "right" > < a class = "btn" href = "https://www.openmptcprouter.com/" > < %:Download latest version...%>< / a > < / div >
< / div >
< %- end -%>
2018-05-31 13:44:12 +00:00
2018-06-08 08:51:00 +00:00
< noscript >
< div class = "alert-message warning" >
< h4 > < %:JavaScript required!%>< / h4 >
< p > < %:You must enable JavaScript in your browser or LuCI will not work properly.%>< / p >
< / div >
< / noscript >
2018-05-31 13:44:12 +00:00
2019-12-21 21:26:15 +00:00
< div id = "tabmenu" style = "display:none" > < / div >