2 BLOCK build_org_selector_options;
5 IF can_have_vols_only AND walker.ou_type.can_have_vols != 't';
6 disabled = 'disabled="disabled"';
7 ELSIF walker.id == value;
8 selected = 'selected="selected"';
10 IF ctx.is_staff || walker.opac_visible == 't';
12 <option value='[% walker.id | uri %]' [% selected %] [% disabled %]>
14 pad = walker.ou_type.depth * 2;
15 FOR idx IN [0..pad]; ' '; END;
19 [% FOR child IN walker.children;
20 PROCESS build_org_selector_options walker=child value=value;
25 # XXX TODO probably put this BLOCK somewhere else so it can be used widely.
26 # Org Unit Selector Widget :
27 # PROCESS build_org_selector id='selector-id' name='selector-name'
28 BLOCK build_org_selector;
30 <select [% IF id %] id='[% id %]' [% END %] name='[% name %]'>
31 [% PROCESS build_org_selector_options walker=(org_unit || ctx.aou_tree) value=value %]