gluon-config-mode: allow using templates for texts again

This commit is contained in:
Matthias Schiffer 2014-05-16 12:36:01 +02:00
parent e16bfbe309
commit d1cd4a7f53
3 changed files with 7 additions and 5 deletions

View File

@ -64,7 +64,7 @@ function action_reboot()
if nixio.fork() ~= 0 then if nixio.fork() ~= 0 then
luci.template.render("gluon-config-mode/reboot", luci.template.render("gluon-config-mode/reboot",
{pubkey=pubkey, hostname=hostname, site=site}) {luci=luci, pubkey=pubkey, hostname=hostname, site=site})
else else
debug.setfenv(io.stdout, debug.getfenv(io.open '/dev/null')) debug.setfenv(io.stdout, debug.getfenv(io.open '/dev/null'))
io.stdout:close() io.stdout:close()

View File

@ -1,10 +1,12 @@
<%- <%-
local site = require 'gluon.site_config' local site = require 'gluon.site_config'
local sysconfig = require 'gluon.sysconfig'
local template = require 'luci.template'
-%> -%>
<h2>Willkommen!</h2> <h2>Willkommen!</h2>
<p> <p>
<%= site.config_mode.msg_welcome %> <%= template.render_string(site.config_mode.msg_welcome, {hostname=hostname, sysconfig=sysconfig}) %>
</p> </p>
<% if not self.embedded then %> <% if not self.embedded then %>

View File

@ -13,17 +13,17 @@
<% if pubkey then %> <% if pubkey then %>
<fieldset class="cbi-section"> <fieldset class="cbi-section">
<p> <p>
<%= site.config_mode.msg_pubkey %> <%= luci.template.render_string(site.config_mode.msg_pubkey) %>
</p> </p>
<div class="the-key"> <div class="the-key">
# Hostname: <%= hostname %> # <%= hostname %>
<br/> <br/>
<%= pubkey %> <%= pubkey %>
</div> </div>
</fieldset> </fieldset>
<% end %> <% end %>
<fieldset class="cbi-section"> <fieldset class="cbi-section">
<%= site.config_mode.msg_reboot %> <%= luci.template.render_string(site.config_mode.msg_reboot) %>
</fieldset> </fieldset>
</div> </div>
</div> </div>