gluon-web-*: consistently use <%| tag
This commit is contained in:
parent
dd23a805c2
commit
37cdea9733
@ -34,6 +34,6 @@
|
|||||||
<h2><%:Information%></h2>
|
<h2><%:Information%></h2>
|
||||||
<% for _, v in ipairs(values) do %>
|
<% for _, v in ipairs(values) do %>
|
||||||
<div class="gluon-value">
|
<div class="gluon-value">
|
||||||
<div class="gluon-value-title"><%=v[1]%></div><div class="gluon-value-field-text"><%=pcdata(v[2] or 'n/a')%></div>
|
<div class="gluon-value-title"><%|v[1]%></div><div class="gluon-value-field-text"><%|v[2] or 'n/a'%></div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -13,7 +13,7 @@ $Id$
|
|||||||
-%>
|
-%>
|
||||||
<h2><%:Upgrade firmware%></h2>
|
<h2><%:Upgrade firmware%></h2>
|
||||||
|
|
||||||
<form method="post" enctype="multipart/form-data" action="<%=url(request)%>">
|
<form method="post" enctype="multipart/form-data" action="<%|url(request)%>">
|
||||||
<p>
|
<p>
|
||||||
<%:You can manually upgrade your firmware here.%>
|
<%:You can manually upgrade your firmware here.%>
|
||||||
</p>
|
</p>
|
||||||
|
@ -46,13 +46,13 @@ You may obtain a copy of the License at
|
|||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
<div class="gluon-page-actions">
|
<div class="gluon-page-actions">
|
||||||
<form method="post" enctype="multipart/form-data" action="<%=url(request)%>" style="display:inline">
|
<form method="post" enctype="multipart/form-data" action="<%|url(request)%>" style="display:inline">
|
||||||
<input type="hidden" name="step" value="3" />
|
<input type="hidden" name="step" value="3" />
|
||||||
<input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
|
<input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
|
||||||
<input type="hidden" name="token" value="<%=token%>" />
|
<input type="hidden" name="token" value="<%=token%>" />
|
||||||
<input class="gluon-button gluon-button-submit" type="submit" value="<%:Continue%>" />
|
<input class="gluon-button gluon-button-submit" type="submit" value="<%:Continue%>" />
|
||||||
</form>
|
</form>
|
||||||
<form method="post" enctype="multipart/form-data" action="<%=url(request)%>" style="display:inline">
|
<form method="post" enctype="multipart/form-data" action="<%|url(request)%>" style="display:inline">
|
||||||
<input type="hidden" name="step" value="1" />
|
<input type="hidden" name="step" value="1" />
|
||||||
<input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
|
<input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
|
||||||
<input type="hidden" name="token" value="<%=token%>" />
|
<input type="hidden" name="token" value="<%=token%>" />
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<div class="gluon-value-field-long">
|
<div class="gluon-value-field-long">
|
||||||
<label<%= attr("for", id..'.1') %> class="gluon-value-title"><%:Security mode%></label>
|
<label<%= attr("for", id..'.1') %> class="gluon-value-title"><%:Security mode%></label>
|
||||||
<br />
|
<br />
|
||||||
<%= translate(
|
<%| translate(
|
||||||
'In security mode, the mesh VPN uses an encrypted tunnel to connect to the VPN servers. ' ..
|
'In security mode, the mesh VPN uses an encrypted tunnel to connect to the VPN servers. ' ..
|
||||||
'The encryption ensures that it is impossible for your internet access provider to see what ' ..
|
'The encryption ensures that it is impossible for your internet access provider to see what ' ..
|
||||||
'data is exchanged over your node.'
|
'data is exchanged over your node.'
|
||||||
@ -24,7 +24,7 @@
|
|||||||
<div class="gluon-value-field-long">
|
<div class="gluon-value-field-long">
|
||||||
<label<%= attr("for", id..'.2') %> class="gluon-value-title"><%:Performance mode%></label>
|
<label<%= attr("for", id..'.2') %> class="gluon-value-title"><%:Performance mode%></label>
|
||||||
<br />
|
<br />
|
||||||
<%= translate(
|
<%| translate(
|
||||||
'In performance mode, no encryption is used. This usually allows for higher throughput, but the data exchanged over your node is not ' ..
|
'In performance mode, no encryption is used. This usually allows for higher throughput, but the data exchanged over your node is not ' ..
|
||||||
'protected against eavesdropping.'
|
'protected against eavesdropping.'
|
||||||
) %>
|
) %>
|
||||||
|
@ -52,7 +52,7 @@ You may obtain a copy of the License at
|
|||||||
local active = (v == name)
|
local active = (v == name)
|
||||||
%>
|
%>
|
||||||
<li class="tabmenu-item-<%=v%><% if active then %> active<% end %>">
|
<li class="tabmenu-item-<%=v%><% if active then %> active<% end %>">
|
||||||
<a href="<%=url(append(prefix, v))%>"><%=pcdata(title(child))%></a>
|
<a href="<%|url(append(prefix, v))%>"><%|title(child)%></a>
|
||||||
</li>
|
</li>
|
||||||
<%
|
<%
|
||||||
end
|
end
|
||||||
@ -74,17 +74,17 @@ You may obtain a copy of the License at
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/cascade.css" />
|
<link rel="stylesheet" type="text/css" media="screen" href="<%|media%>/cascade.css" />
|
||||||
<title><%=pcdata( hostname .. ((rnode and rnode.title) and ' - ' .. title(rnode) or '')) %></title>
|
<title><%| hostname .. ((rnode and rnode.title) and ' - ' .. title(rnode) or '') %></title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="menubar">
|
<div id="menubar">
|
||||||
<div class="hostinfo">
|
<div class="hostinfo">
|
||||||
<a href="<%=url({})%>">
|
<a href="<%|url({})%>">
|
||||||
<%=pcdata(hostname)%>
|
<%|hostname%>
|
||||||
<% if release then %>
|
<% if release then %>
|
||||||
/ <%=pcdata(release)%>
|
/ <%|release%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -92,7 +92,7 @@ You may obtain a copy of the License at
|
|||||||
<% if #categories > 1 and not hidenav then %>
|
<% if #categories > 1 and not hidenav then %>
|
||||||
<ul id="topmenu">
|
<ul id="topmenu">
|
||||||
<% for i, r in ipairs(categories) do %>
|
<% for i, r in ipairs(categories) do %>
|
||||||
<li><a class="topcat<% if request[1] == r then %> active<%end%>" href="<%=url({r})%>"><%=pcdata(title(root.nodes[r]))%></a></li>
|
<li><a class="topcat<% if request[1] == r then %> active<%end%>" href="<%|url({r})%>"><%|title(root.nodes[r])%></a></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -6,4 +6,4 @@
|
|||||||
|
|
||||||
<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>
|
||||||
<tt><%=pcdata(message)%></tt>
|
<tt><%|message%></tt>
|
||||||
|
@ -6,4 +6,4 @@
|
|||||||
|
|
||||||
<h2 name="content">500 <%:Internal Server Error%></h2>
|
<h2 name="content">500 <%:Internal Server Error%></h2>
|
||||||
<p><%:Sorry, the server encountered an unexpected error.%></p>
|
<p><%:Sorry, the server encountered an unexpected error.%></p>
|
||||||
<pre class="error500"><%=pcdata(message)%></pre>
|
<pre class="error500"><%|message%></pre>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<%
|
<%
|
||||||
for i, val in ipairs(self:cfgvalue()) do
|
for i, val in ipairs(self:cfgvalue()) do
|
||||||
%>
|
%>
|
||||||
<input class="gluon-input-text" value="<%=pcdata(val)%>" data-update="change" type="text"<%=
|
<input class="gluon-input-text" value="<%|val%>" data-update="change" type="text"<%=
|
||||||
attr("id", id .. "." .. i) ..
|
attr("id", id .. "." .. i) ..
|
||||||
attr("name", id) ..
|
attr("name", id) ..
|
||||||
attr("size", self.size) ..
|
attr("size", self.size) ..
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
<form method="post" enctype="multipart/form-data" action="<%=url(request)%>">
|
<form method="post" enctype="multipart/form-data" action="<%|url(request)%>">
|
||||||
<input type="hidden" name="token" value="<%=token%>" />
|
<input type="hidden" name="token" value="<%=token%>" />
|
||||||
<input type="hidden" name="<%=id%>" value="1" />
|
<input type="hidden" name="<%=id%>" value="1" />
|
||||||
|
|
||||||
<div class="gluon-map" id="gluon-<%=self.config%>">
|
<div class="gluon-map" id="gluon-<%=self.config%>">
|
||||||
<% if self.title and #self.title > 0 then %><h2 name="content"><%=self.title%></h2><% end %>
|
<% if self.title and #self.title > 0 then %><h2 name="content"><%|self.title%></h2><% end %>
|
||||||
<% if self.description and #self.description > 0 then %><div class="gluon-map-descr"><%=self.description%></div><% end %>
|
<% if self.description and #self.description > 0 then %><div class="gluon-map-descr"><%=self.description%></div><% end %>
|
||||||
<% self:render_children(renderer) %>
|
<% self:render_children(renderer) %>
|
||||||
</div>
|
</div>
|
||||||
<%- if self.message then %>
|
<%- if self.message then %>
|
||||||
<div><%=self.message%></div>
|
<div><%|self.message%></div>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
<%- if self.errmessage then %>
|
<%- if self.errmessage then %>
|
||||||
<div class="error"><%=self.errmessage%></div>
|
<div class="error"><%|self.errmessage%></div>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
<div class="gluon-page-actions">
|
<div class="gluon-page-actions">
|
||||||
<%- if self.submit ~= false then %>
|
<%- if self.submit ~= false then %>
|
||||||
<input class="gluon-button gluon-button-submit" type="submit" value="
|
<input class="gluon-button gluon-button-submit" type="submit" value="
|
||||||
<%- if not self.submit then -%><%-:Save-%><%-else-%><%=pcdata(self.submit)%><%end-%>
|
<%- if not self.submit then -%><%-:Save-%><%-else-%><%|self.submit%><%end-%>
|
||||||
" />
|
" />
|
||||||
<% end %>
|
<% end %>
|
||||||
<%- if self.reset ~= false then %>
|
<%- if self.reset ~= false then %>
|
||||||
<input class="gluon-button gluon-button-reset" type="reset" value="
|
<input class="gluon-button gluon-button-reset" type="reset" value="
|
||||||
<%- if not self.reset then -%><%-:Reset-%><%-else-%><%=pcdata(self.reset)%><%end-%>
|
<%- if not self.reset then -%><%-:Reset-%><%-else-%><%|self.reset%><%end-%>
|
||||||
" />
|
" />
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
attr("data-index", i) ..
|
attr("data-index", i) ..
|
||||||
attr("data-depends", self:deplist(entry.deps)) ..
|
attr("data-depends", self:deplist(entry.deps)) ..
|
||||||
attr("selected", (self:cfgvalue() == entry.key) and "selected")
|
attr("selected", (self:cfgvalue() == entry.key) and "selected")
|
||||||
%>><%=pcdata(entry.value)%></option>
|
%>><%|entry.value%></option>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
</select>
|
</select>
|
||||||
<% elseif self.widget == "radio" then %>
|
<% elseif self.widget == "radio" then %>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
attr("checked", (self:cfgvalue() == entry.key) and "checked")
|
attr("checked", (self:cfgvalue() == entry.key) and "checked")
|
||||||
%> />
|
%> />
|
||||||
<label<%= attr("for", id.."."..entry.key)%>></label>
|
<label<%= attr("for", id.."."..entry.key)%>></label>
|
||||||
<%=pcdata(entry.value)%>
|
<%|entry.value%>
|
||||||
</label>
|
</label>
|
||||||
<% if i ~= #entries then write(br) end %>
|
<% if i ~= #entries then write(br) end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<fieldset class="gluon-section">
|
<fieldset class="gluon-section">
|
||||||
<% if self.title and #self.title > 0 then -%>
|
<% if self.title and #self.title > 0 then -%>
|
||||||
<legend><%=self.title%></legend>
|
<legend><%|self.title%></legend>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
<% if self.description and #self.description > 0 then -%>
|
<% if self.description and #self.description > 0 then -%>
|
||||||
<div class="gluon-section-descr"><%=self.description%></div>
|
<div class="gluon-section-descr"><%=self.description%></div>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
<%- elseif e == "missing" then -%>
|
<%- elseif e == "missing" then -%>
|
||||||
<%:One or more required fields have no value!%>
|
<%:One or more required fields have no value!%>
|
||||||
<%- else -%>
|
<%- else -%>
|
||||||
<%=pcdata(e)%>
|
<%|e%>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
</li>
|
</li>
|
||||||
<%- end %></ul>
|
<%- end %></ul>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<textarea class="gluon-input-textarea" <% if not self.size then %> style="width: 100%"<% else %> cols="<%=self.size%>"<% end %> data-update="change"<%= attr("name", id) .. attr("id", id) .. attr("rows", self.rows) .. attr("wrap", self.wrap) %>>
|
<textarea class="gluon-input-textarea" <% if not self.size then %> style="width: 100%"<% else %> cols="<%=self.size%>"<% end %> data-update="change"<%= attr("name", id) .. attr("id", id) .. attr("rows", self.rows) .. attr("wrap", self.wrap) %>>
|
||||||
<%-=pcdata(self:cfgvalue())-%>
|
<%-|self:cfgvalue()-%>
|
||||||
</textarea>
|
</textarea>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div class="gluon-value<% if self.error then %> gluon-value-error<% end %>" id="value-<%=id%>" data-index="<%=self.index%>"<%= attr("data-depends", self:deplist()) %>>
|
<div class="gluon-value<% if self.error then %> gluon-value-error<% end %>" id="value-<%=id%>" data-index="<%=self.index%>"<%= attr("data-depends", self:deplist()) %>>
|
||||||
<%- if self.title and #self.title > 0 then -%>
|
<%- if self.title and #self.title > 0 then -%>
|
||||||
<label class="gluon-value-title"<%= attr("for", id) %>>
|
<label class="gluon-value-title"<%= attr("for", id) %>>
|
||||||
<%-=self.title-%>
|
<%-|self.title-%>
|
||||||
</label>
|
</label>
|
||||||
<div class="gluon-value-field">
|
<div class="gluon-value-field">
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
@ -3,4 +3,4 @@
|
|||||||
map:render(renderer)
|
map:render(renderer)
|
||||||
end
|
end
|
||||||
%>
|
%>
|
||||||
<script type="text/javascript" src="<%=resource%>/gluon-web.js"></script>
|
<script type="text/javascript" src="<%|resource%>/gluon-web.js"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user