{# Foldable group headings for list views that group their rows. fold_all_menu() puts Expand all / Collapse all into the menu bar, they stay hidden until the page found groups. fold_assets() brings the styles and window.GroupFold: var fold = GroupFold({tbody: tbody, storageKey: '...', rowClass: '...'}); var head = fold.header(key, colCount); // tr.group-header, button inside head.button.appendChild(...); // the heading's label fold.restore(); // folded groups from last visit Rows carry rowClass, a group is every such row up to the next heading. Which groups are folded is kept per key in the browser, without browser storage every group starts unfolded. #} {% macro fold_all_menu(push_right=True) %}