1 [% # XXX TODO probably put this BLOCK somewhere else so it can be used widely.
2 # Org Unit Selector Widget :
3 # PROCESS build_org_selector id='selector-id' name='selector-name'
4 BLOCK build_org_selector;
7 org_unit = ctx.aou_tree;
10 <select id='[% id %]' name='[% name %]'>
12 <option value='[% org_unit.id %]' [% IF org_unit.id == value %] selected='selected' [% END %]>
14 pad = org_unit.ou_type.depth * 2;
15 FOR idx IN [0..pad]; ' '; END;
19 [% FOR child IN org_unit.children; PROCESS build_org_selector org_unit = child; END %]
25 <!-- ****************** libselect.xml ***************************** -->
26 <span id='depth_selector_span'>
27 [% PROCESS build_org_selector name='loc' %]
29 <span id='lib_selector_span'>
30 <a id='lib_selector_link' class='classic_link'
31 href='#'>[% l("Choose a library to search") %]</a>
33 <!-- ****************** end: libselect.xml ***************************** -->