2
0

tabcontainer.htm 478 B

1234567891011121314
  1. <% for _, tab in ipairs(self.tab_names) do data = self.tabs[tab] %>
  2. <div class="cbi-tabcontainer"<%=
  3. attr("id", "container.%s.%s.%s" %{ self.config, section, tab }) ..
  4. attr("data-tab", tab) ..
  5. attr("data-tab-title", data.title) ..
  6. attr("data-tab-active", tostring(tab == self.selected_tab))
  7. %>>
  8. <% if data.description then %>
  9. <div class="cbi-tab-descr"><%=data.description%></div>
  10. <% end %>
  11. <% self:render_tab(tab, section, scope or {}) %>
  12. </div>
  13. <% end %>