dir_alpha_nav_bar (public)
dir_alpha_nav_bar [ -group_id group_id ] [ -all_users all_users ] \ letter [ excluded_vars ]
Defined in packages/directory/tcl/directory-procs.tcl
Returns an A-Z bar with greyed out letters not in initial_list and bolds "letter". Includes all existing url vars except those in the "excluded_vars" list.
- Switches:
- -group_id (optional)
- -all_users (optional)
- Parameters:
- letter (required)
- excluded_vars (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: if {$all_users == "t"} { set table_and_group [db_map table_and_group_1] } else { set table_and_group [db_map table_and_group_2] set group_id [lindex [dir_app_group_info] 0] } set url "[ad_conn url]?" set exclude_list [list "letter"] foreach v $excluded_vars { lappend exclude_list $v } set query_args [export_ns_set_vars url $exclude_list] if { ![empty_string_p $query_args] } { append url "$query_args&" } set initial_list [db_list initial_list " select distinct upper(substr(last_name,1,1)) from $table_and_group"] set html_list [list] foreach l [dir_all_letters] { if {$l ni $initial_list} { # This means no user has this initial lappend html_list "<font color=gray>$l</font>" } elseif { [string compare $l $letter] == 0 } { lappend html_list "<b>$l</b>" } else { lappend html_list "<a href=${url}letter=$l>$l</a>" } } if { [empty_string_p $letter] || [string compare $letter "all"] == 0 } { lappend html_list "<b>All</b>" } else { lappend html_list "<a href=${url}letter=all>All</a>" } return [join $html_list " | "]XQL Not present: PostgreSQL, Oracle Generic XQL file: <fullquery name="dir_alpha_nav_bar.initial_list"> <querytext> select distinct upper(substr(last_name,1,1)) from $table_and_group </querytext> </fullquery> <fullquery name="dir_alpha_nav_bar.table_and_group_1"> <querytext> dir_all_users m where 1=1 </querytext> </fullquery> <fullquery name="dir_alpha_nav_bar.table_and_group_2"> <querytext> dir_group_members m where group_id = :group_id </querytext> </fullquery>packages/directory/tcl/directory-procs.xql