1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Add a banner if a new version is available

This commit is contained in:
Ycarus 2018-11-02 20:22:10 +01:00
parent 529dafb4f7
commit e8234223ba

View file

@ -154,6 +154,11 @@
end
end
end
-- 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 ""
-%>
<!DOCTYPE html>
<html lang="<%=luci.i18n.context.lang%>">
@ -199,6 +204,12 @@
<div class="right"><a class="btn" href="<%=url("admin/system/admin")%>"><%:Go to password configuration...%></a></div>
</div>
<%- end -%>
<%- 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 -%>
<noscript>
<div class="alert-message warning">