<%# Copyright 2008 Steven Barth Copyright 2008-2015 Jo-Philipp Wich Copyright 2017-2020 Stan Grishin Licensed to the public under the Apache License 2.0. -%> <%+header%>

<%:Advanced Reboot%>


<%- local c = require("luci.model.uci").cursor():changes(); if c and next(c) then -%>

<%:Warning: There are unsaved changes that will get lost on reboot!%>

<%- end -%> <%- if errorMessage and errorMessage ~= "" then -%>

<%:ERROR: %><%=errorMessage%>

<%- end -%> <%- if device_name then -%>
<%=device_name%><%: Partitions%>
<%:Partition%>
<%:Status%>
<%:Firmware%>
<%:Reboot%>
<%=string.format("%X", bev1p1)%>
<%- if bev1p1 == current_partition then -%><%:Current%><%- else -%><%:Alternative%><%- end -%>
<%=p1_os%>
<%- if bev1p1 == current_partition then -%>
<%- else -%>
<%- end -%>
<%=string.format("%X", bev1p2)%>
<%- if bev1p2 == current_partition then -%><%:Current%><%- else -%><%:Alternative%><%- end -%>
<%=p2_os%>
<%- if bev1p2 == current_partition then -%>
<%- else -%>
<%- end -%>
<%- else -%> <%- if rom_board_name then -%>

<%=pcdata(translatef("Warning: Device (%s) is unknown or isn't a dual-partition device!", rom_board_name))%>

<%- else -%>

<%=pcdata(translatef("Warning: Unable to obtain device information!"))%>

<%- end -%> <%- end -%>
<%- if nixio.fs.access("/sbin/poweroff") then -%>
<%- else -%>

<%:Warning: This system does not support powering off!%>

<%- end -%> <%+footer%>