gluon-web-*: consistently use <%| tag

This commit is contained in:
Matthias Schiffer 2018-02-23 20:05:07 +01:00
parent dd23a805c2
commit 37cdea9733
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
14 changed files with 29 additions and 29 deletions

View File

@ -34,6 +34,6 @@
<h2><%:Information%></h2>
<% for _, v in ipairs(values) do %>
<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>
<% end %>

View File

@ -13,7 +13,7 @@ $Id$
-%>
<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>
<%:You can manually upgrade your firmware here.%>
</p>

View File

@ -46,13 +46,13 @@ You may obtain a copy of the License at
</ul>
</p>
<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="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
<input type="hidden" name="token" value="<%=token%>" />
<input class="gluon-button gluon-button-submit" type="submit" value="<%:Continue%>" />
</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="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
<input type="hidden" name="token" value="<%=token%>" />

View File

@ -6,7 +6,7 @@
<div class="gluon-value-field-long">
<label<%= attr("for", id..'.1') %> class="gluon-value-title"><%:Security mode%></label>
<br />
<%= translate(
<%| translate(
'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 ' ..
'data is exchanged over your node.'
@ -24,7 +24,7 @@
<div class="gluon-value-field-long">
<label<%= attr("for", id..'.2') %> class="gluon-value-title"><%:Performance mode%></label>
<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 ' ..
'protected against eavesdropping.'
) %>

View File

@ -52,7 +52,7 @@ You may obtain a copy of the License at
local active = (v == name)
%>
<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>
<%
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="">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/cascade.css" />
<title><%=pcdata( hostname .. ((rnode and rnode.title) and ' - ' .. title(rnode) or '')) %></title>
<link rel="stylesheet" type="text/css" media="screen" href="<%|media%>/cascade.css" />
<title><%| hostname .. ((rnode and rnode.title) and ' - ' .. title(rnode) or '') %></title>
</head>
<body>
<div id="menubar">
<div class="hostinfo">
<a href="<%=url({})%>">
<%=pcdata(hostname)%>
<a href="<%|url({})%>">
<%|hostname%>
<% if release then %>
/ <%=pcdata(release)%>
/ <%|release%>
<% end %>
</a>
</div>
@ -92,7 +92,7 @@ You may obtain a copy of the License at
<% if #categories > 1 and not hidenav then %>
<ul id="topmenu">
<% 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 %>
</ul>
<% end %>

View File

@ -6,4 +6,4 @@
<h2 name="content">404 <%:Not Found%></h2>
<p><%:Sorry, the object you requested was not found.%></p>
<tt><%=pcdata(message)%></tt>
<tt><%|message%></tt>

View File

@ -6,4 +6,4 @@
<h2 name="content">500 <%:Internal Server Error%></h2>
<p><%:Sorry, the server encountered an unexpected error.%></p>
<pre class="error500"><%=pcdata(message)%></pre>
<pre class="error500"><%|message%></pre>

View File

@ -10,7 +10,7 @@
<%
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("name", id) ..
attr("size", self.size) ..

View File

@ -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="<%=id%>" value="1" />
<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 %>
<% self:render_children(renderer) %>
</div>
<%- if self.message then %>
<div><%=self.message%></div>
<div><%|self.message%></div>
<%- end %>
<%- if self.errmessage then %>
<div class="error"><%=self.errmessage%></div>
<div class="error"><%|self.errmessage%></div>
<%- end %>
<div class="gluon-page-actions">
<%- if self.submit ~= false then %>
<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 %>
<%- if self.reset ~= false then %>
<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 %>
</div>

View File

@ -18,7 +18,7 @@
attr("data-index", i) ..
attr("data-depends", self:deplist(entry.deps)) ..
attr("selected", (self:cfgvalue() == entry.key) and "selected")
%>><%=pcdata(entry.value)%></option>
%>><%|entry.value%></option>
<%- end %>
</select>
<% elseif self.widget == "radio" then %>
@ -35,7 +35,7 @@
attr("checked", (self:cfgvalue() == entry.key) and "checked")
%> />
<label<%= attr("for", id.."."..entry.key)%>></label>
<%=pcdata(entry.value)%>
<%|entry.value%>
</label>
<% if i ~= #entries then write(br) end %>
<% end %>

View File

@ -1,6 +1,6 @@
<fieldset class="gluon-section">
<% if self.title and #self.title > 0 then -%>
<legend><%=self.title%></legend>
<legend><%|self.title%></legend>
<%- end %>
<% if self.description and #self.description > 0 then -%>
<div class="gluon-section-descr"><%=self.description%></div>
@ -18,7 +18,7 @@
<%- elseif e == "missing" then -%>
<%:One or more required fields have no value!%>
<%- else -%>
<%=pcdata(e)%>
<%|e%>
<%- end -%>
</li>
<%- end %></ul>

View File

@ -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) %>>
<%-=pcdata(self:cfgvalue())-%>
<%-|self:cfgvalue()-%>
</textarea>

View File

@ -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()) %>>
<%- if self.title and #self.title > 0 then -%>
<label class="gluon-value-title"<%= attr("for", id) %>>
<%-=self.title-%>
<%-|self.title-%>
</label>
<div class="gluon-value-field">
<%- end -%>

View File

@ -3,4 +3,4 @@
map:render(renderer)
end
%>
<script type="text/javascript" src="<%=resource%>/gluon-web.js"></script>
<script type="text/javascript" src="<%|resource%>/gluon-web.js"></script>