From d0b91bcca266a6d386f9ebeef695e1cef34ad9cf Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 19 Jun 2018 17:10:38 +0200 Subject: luci-base: globally cleanup markup - add responsive attributes to partial cbi templates - unify and fix button style classes - fix styling of sysauth dialog - rework firewall_zoneforwards widget Signed-off-by: Jo-Philipp Wich --- .../luasrc/view/cbi/firewall_zoneforwards.htm | 79 +++++++++++++--------- 1 file changed, 46 insertions(+), 33 deletions(-) (limited to 'modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm') diff --git a/modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm b/modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm index 546fd8e85a..b38e4b13db 100644 --- a/modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm +++ b/modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm @@ -14,46 +14,59 @@ local def = fwm:get_defaults() local zone = fwm:get_zone(value) local empty = true + + local function render_zone(zone) +-%> + +<%- + end -%> <% if zone then %> -
- -  ⇒  - <% for _, fwd in ipairs(zone:get_forwardings_by("src")) do - fz = fwd:dest_zone() - if fz then - empty = false %> -   - <% end end %> - <% if empty then %> +
+
+ <%=render_zone(zone)%> +
+ +
+ <% + for _, fwd in ipairs(zone:get_forwardings_by("src")) do + fz = fwd:dest_zone() + if fz then + empty = false + render_zone(fz) + end + end + if empty then + %> <% end %> +
<% end %> -- cgit v1.2.3