Index: openacs-4/packages/acs-tcl/tcl/table-display-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/table-display-procs.tcl,v diff -u -r1.23 -r1.23.2.1 --- openacs-4/packages/acs-tcl/tcl/table-display-procs.tcl 22 Jun 2015 21:03:13 -0000 1.23 +++ openacs-4/packages/acs-tcl/tcl/table-display-procs.tcl 25 Aug 2015 11:09:37 -0000 1.23.2.1 @@ -4,108 +4,7 @@ @cvs-id $Id$ } -# Dimensional selection bars. -# -ad_proc ad_dimensional { - option_list - {url {}} - {options_set ""} - {optionstype url} -} { - Generate an option bar as in the ticket system; -
- option_list structure is -
- { - {variable "Title" defaultvalue - { - {value "Text" {key clause}} - ... - } - } - ... - } - an example: - - set dimensional_list { - {visited "Last Visit" 1w { - {never "Never" {where "last_visit is null"}} - {1m "Last Month" {where "last_visit + 30 > sysdate"}} - {1w "Last Week" {where "last_visit + 7 > sysdate"}} - {1d "Today" {where "last_visit > trunc(sysdate)"}} - }} - ..(more of the same).. - } --} { - set html {} - - if {$option_list eq ""} { - return - } - - if {$options_set eq ""} { - set options_set [ns_getform] - } - - if {$url eq ""} { - set url [ad_conn url] - } - - append html "
[lindex $option 1] | \n" - } - append html "
---|
\[" - - # find out what the current option value is. - # check if a default is set otherwise the first value is used - set option_key [lindex $option 0] - set option_val {} - if { $options_set ne ""} { - set option_val [ns_set get $options_set $option_key] - } - if { $option_val eq "" } { - set option_val [lindex $option 2] - } - - set first_p 1 - foreach option_value [lindex $option 3] { - set thisoption [lindex $option_value 0] - if { $first_p } { - set first_p 0 - } else { - append html " | " - } - - if {$option_val eq $thisoption } { - append html "[ns_quotehtml [lindex $option_value 1]]" - } else { - set href $url?[export_ns_set_vars url $option_key $options_set]&[ns_urlencode $option_key]=[ns_urlencode $thisoption] - append html [subst {[ns_quotehtml [lindex $option_value 1]]}] - } - } - append html "\] | \n" - } - append html "