Hierarchical tableselect

The forms a tree is administered through, which are the two places a table lists a hierarchy: the terms of a vocabulary and the links of a menu. Three tables, because the shape takes two elements to build. The first is a real tableselect over a tree of terms, so the column of check boxes and the select all cell in the header are the ones the element builds, with a row selected, a row disabled and the indentation markers a row carries per level. The second is the overview form of a menu: a table whose rows are form elements, so each one holds the state of a link, its weight, its parent and an operations dropbutton, the whole table is draggable, and the check box column has to be built by hand because it cannot be asked of the element there. The third is the same element with multiple turned off, which is the picker: radio buttons instead of check boxes, no select all cell, and the rows a link may not be moved under disabled. Nothing is saved, and the trees are made up, so the page renders the same on every site.

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.