Merge pull request #4239 from etactica/error404-messages

luci-base: dispatcher: error404: flow message into template
This commit is contained in:
Florian Eckert 2020-08-31 14:12:54 +02:00 committed by GitHub
commit 4b8d4bac87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -395,7 +395,7 @@ function error404(message)
local function render() local function render()
local template = require "luci.template" local template = require "luci.template"
template.render("error404") template.render("error404", {message=message})
end end
if not util.copcall(render) then if not util.copcall(render) then

View file

@ -7,5 +7,6 @@
<%+header%> <%+header%>
<h2 name="content">404 <%:Not Found%></h2> <h2 name="content">404 <%:Not Found%></h2>
<p><%:Sorry, the object you requested was not found.%></p> <p><%:Sorry, the object you requested was not found.%></p>
<p><%=message%></p>
<tt><%:Unable to dispatch%>: <%=url(unpack(luci.dispatcher.context.request))%></tt> <tt><%:Unable to dispatch%>: <%=url(unpack(luci.dispatcher.context.request))%></tt>
<%+footer%> <%+footer%>