Index: openacs-4/packages/acs-templating/tcl/list-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/list-procs.tcl,v diff -u -r1.45 -r1.46 --- openacs-4/packages/acs-templating/tcl/list-procs.tcl 29 Aug 2007 14:01:33 -0000 1.45 +++ openacs-4/packages/acs-templating/tcl/list-procs.tcl 25 Sep 2007 15:22:39 -0000 1.46 @@ -2802,18 +2802,17 @@ # Provide a reference to the list properties for use by the list template # Get an upvar'd reference to list_properties get_reference -name $name - + set filter_names_options_tmp [list] set filter_names_options [list] set filter_hidden_filters [list] set filter_key_filters [list] set filter_hidden_filters_url_vars [list] - + set filter_exclude_from_key [list orderby groupby page] # loop through all the filters in this list foreach filter_ref $list_properties(filter_refs) { - upvar #$level $filter_ref filter_properties - if {$filter_properties(label) ne "" && $filter_properties(name) ne "orderby" && $filter_properties(name) ne "groupby"} { + if {$filter_properties(label) ne "" && [lsearch $filter_exclude_from_key $filter_properties(name)] < 0} { # filters with a label will be added to the form for the user # to choose from lappend filter_names_options_tmp [list $filter_properties(label) $filter_properties(name)] @@ -2829,7 +2828,8 @@ upvar $list_properties(ulevel) $filter_properties(name) current_filter_value if {[info exists current_filter_value] && $current_filter_value ne ""} { lappend filter_hidden_filters $filter_properties(name) - if {$filter_properties(name) ne "groupby" && $filter_properties(name) ne "orderby"} { + + if {[lsearch $filter_exclude_from_key $filter_properties(name)] < 0} { lappend filter_key_filters $filter_properties(name) $current_filter_value } } @@ -2844,7 +2844,6 @@ set list_filter_form_client_property_key [ns_sha1 [list [ad_conn url] $name $filter_key_filters]] upvar \#[template::adp_level] __client_property_filters client_property_filters set client_property_filters [ad_get_client_property acs-templating $list_filter_form_client_property_key] - # take out filters we already applied... set i 0 foreach option_list $filter_names_options_tmp { @@ -2893,7 +2892,6 @@ # form of selected filters set client_property_filters $__client_property_filters ad_set_client_property acs-templating $__list_filter_form_client_property_key $__client_property_filters - # now reload the form. excluding var clear_one set pattern [ns_urlencode "clear_one"]=[ns_urlencode "$clear_one"] regsub "${pattern}&?" [ad_return_url] {} url @@ -2999,6 +2997,5 @@ {submit:text(submit) {label "Apply Filters"}} } } - }