Hierarchical tableselect

The two places a table lists a tree with a column of check boxes: the terms of a vocabulary and the links of a menu. Three tables, because the shape takes two elements to build -- a real tableselect over a term tree, with a selected row, a disabled row and the per-level indentation markers; the overview form of a menu, whose rows are form elements and whose check box column has to be built by hand; and the same element with multiple turned off, which gives radio buttons and no select all cell. The trees are made up and nothing is saved.

A tree in a tableselect

The element itself: a table of check boxes over rows that are data rather than form elements. The column and the "select all" cell in the header are added by the element, and the hierarchy is the one thing it knows nothing about -- the indentation is markup the row carries in its first cell, exactly as the overview form of a vocabulary builds it. Two rows are selected to begin with, and one is disabled, which is the state most easily forgotten: a row whose check box cannot be reached still has to line up with the column above it.

Name Status Items Operations
Design Published 24
 
Typography
Published 9
 
Colour
Published 7
 
 
Contrast
Published 3
Development Published 31
 
Front end
Published 18
 
Back end
Unpublished 13
Accessibility Published 11

One row of the tree, chosen

The same element with #multiple turned off, which is what a picker is: the check boxes become radio buttons and the "select all" cell in the header goes away, because selecting every row of a list you may only pick one of means nothing. The tree being picked from is the menu above, so it is a link that is being given a new parent, and the rows the link may not be moved under -- itself, and everything below it -- are disabled. A theme that only ever sees the multiple variation of this element misses both differences.

Menu link Level the moved link would sit at
Main navigation Top level
 
Home
Level 2
 
About us
Level 2
 
 
Our team
Level 3
 
 
History
Level 3
 
 
 
The founding
Level 4
 
Services
Level 2
 
 
Consulting
Level 3
 
 
Training
Level 3
 
 
 
Workshops
Level 4
 
Contact
Level 2

The same trees in the tables that have no such column -- dragged, grouped into regions, or simply printed -- are on the hierarchical tables example. The menu overview form and the terms overview form as core really builds them, without the column of check boxes this example puts in front of them, are on the menu and taxonomy overview example.