luci-theme-material: fix theme for applyreboot page changes
[project/luci.git] / applications / luci-app-adblock / luasrc / view / adblock / blocklist.htm
1 <%#
2 Copyright 2017-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 <style type="text/css">
11 .table.cbi-section-table .th,
12 .table.cbi-section-table .td,
13 .cbi-section-table-cell,
14 .cbi-section-table-row,
15 .tr[data-title]::before
16 {
17 text-align:left;
18 vertical-align:top;
19 margin-left:0px;
20 padding-left:2px;
21 }
22 .table.cbi-section-table .th
23 {
24 white-space:nowrap;
25 }
26 .table.cbi-section-table input
27 {
28 width:7em;
29 }
30 .cbi-section-table-row > .cbi-value-field [data-dynlist] > input,
31 .table.cbi-section-table input
32 {
33 width:7em;
34 }
35
36 .cbi-input-text
37 {
38 text-align:left;
39 padding-left:2px;
40 outline:none;
41 box-shadow:none;
42 background:transparent;
43 width:7em;
44 }
45 </style>
46
47 <div class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
48 <% if self.title then -%>
49 <legend><%=self.title%></legend>
50 <%- end %>
51 <div class="cbi-section-descr"><%=self.description%></div>
52 <div class="cbi-section-node">
53 <div class="table cbi-section-table">
54 <div class="tr cbi-section-table-titles <%=anonclass%>">
55 <%- for i, k in pairs(self.children) do -%>
56 <div class="th cbi-section-table-cell">
57 <%-=k.title-%>
58 </div>
59 <%- end -%>
60 </div>
61 <%- local section, scope, isempty = true
62 for i, k in ipairs(self:cfgsections()) do
63 section = k
64 local sectionname = striptags((type(self.sectiontitle) == "function") and self:sectiontitle(section) or k)
65 local sectiontitle = ifattr(sectionname and (not self.anonymous or self.sectiontitle), "data-title", sectionname)
66 isempty = false
67 scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" }
68 -%>
69 <div class="tr cbi-section-table-row" id="cbi-<%=self.config%>-<%=section%>"<%=sectiontitle%>>
70 <%-
71 for k, node in ipairs(self.children) do
72 node:render(section, scope or {})
73 end
74 if not scope.cbid:match("adb_src_cat") then
75 -%>
76 <div class="td cbi-value-field">&#160;</div>
77 <%- end -%>
78 </div>
79 <%- end -%>
80 </div>
81 </div>
82 </div>