<% local vals = self:cfgvalue(section) or {} local week_days = luci.util_tlt.week_days() %> <% include( valueheader or "cbi/scheduler_header" ) %>
<%for i=0, 23 do%> <%end%> <% for n, w_day in pairs(week_days) do local class local val = vals[n] and vals[n] or "000000000000000000000000" %> <% if val ~= "" then %> <% for i=1, 24 do if string.sub(val, i, i) == "1" then class = "schedule_all" else class = "schedule_clear" end %> <% end %> <% else %> <% for i=1, 24 do %> <% end %> <% end %> <% end %>
Days/Hours<%=i%>h
/> <%=w_day[2]%>
<%- if self.legend_inactive then if type(self.legend_inactive) == "function" then write(self:legend_inactive(section)) else write(self.legend_inactive) end end-%>
<%- if self.legend_inactive then if type(self.legend_active) == "function" then write(self:legend_active(section)) else write(self.legend_active) end end-%>
<%+cbi/valuefooter%>