treewide: avoid double-escaping CBI section labels
[project/luci.git] / applications / luci-app-banip / luasrc / view / banip / sourcelist.htm
1 <%#
2 Copyright 2018 Dirk Brenken (dev@brenken.org)
3 This is free software, licensed under the Apache License, Version 2.0
4 -%>
5
6 <%-
7 local anonclass = (not self.anonymous or self.sectiontitle) and "named" or "anonymous"
8 -%>
9
10 <%+banip/banip_css%>
11
12 <div class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
13 <% if self.title then -%>
14 <h3><%=self.title%></h3>
15 <%- end %>
16 <div class="cbi-section-descr"><%=self.description%></div>
17 <div class="cbi-section-node">
18 <div class="table cbi-section-table">
19 <div class="tr cbi-section-table-titles <%=anonclass%>">
20 <%- for i, k in pairs(self.children) do -%>
21 <div class="th cbi-section-table-cell">
22 <%-=k.title-%>
23 </div>
24 <%- end -%>
25 </div>
26 <%- local section, scope, isempty = true
27 for i, k in ipairs(self:cfgsections()) do
28 section = k
29 local sectionname = striptags((type(self.sectiontitle) == "function") and self:sectiontitle(section) or k)
30 local sectiontitle = ifattr(sectionname and (not self.anonymous or self.sectiontitle), "data-title", sectionname, true)
31 isempty = false
32 scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" }
33 -%>
34 <div class="tr cbi-section-table-row" id="cbi-<%=self.config%>-<%=section%>"<%=sectiontitle%>>
35 <%-
36 for k, node in ipairs(self.children) do
37 node:render(section, scope or {})
38 end
39 if not scope.cbid:match("ban_src_cat") then
40 -%>
41 <div class="td cbi-value-field">&#160;</div>
42 <%- end -%>
43 </div>
44 <%- end -%>
45 </div>
46 </div>
47 </div>