Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-templating/resources/dimensionals/dimensional-option.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-templating/resources/dimensionals/dimensional.adp'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-templating/tcl/dimensional-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/dimensional-procs.tcl,v diff -u -r1.1.2.3 -r1.1.2.4 --- openacs-4/packages/acs-templating/tcl/dimensional-procs.tcl 27 Aug 2015 08:06:57 -0000 1.1.2.3 +++ openacs-4/packages/acs-templating/tcl/dimensional-procs.tcl 27 Aug 2015 08:22:45 -0000 1.1.2.4 @@ -17,7 +17,7 @@ } { Generate an option bar from an option_list, which has the structure:
- { + { {variable "Title" defaultvalue { {value "Label" {key sql-clause}} @@ -42,12 +42,12 @@@param style name of the adp file (without extension) - @param option_list the structure with the option data provided + @param option_list the structure with the option data provided @param url url target for select (if blank we set it to ad_conn url). @param options_set if not provided defaults to [ns_getform], for hilite of selected options. - @param optionstype only url is used now, was thinking about extending - so we get radio buttons and a form since with a slow select updating one - thing at a time would be stupid. + @param optionstype only url is used now, was thinking about extending + so we get radio buttons and a form since with a slow select updating one + thing at a time would be stupid. @return HTML rendering } { if {$option_list eq ""} { @@ -57,22 +57,22 @@ if {$options_set eq ""} { set options_set [ns_getform] } - + if {$url eq ""} { set url [ad_conn url] } if {$style eq ""} { - set style [parameter::get \ - -package_id [ad_conn subsite_id] \ - -parameter DefaultDimensionalStyle \ - -default "dimensional-table"] + set style [parameter::get \ + -package_id [ad_conn subsite_id] \ + -parameter DefaultDimensionalStyle \ + -default "dimensional"] } # # Get the path. template::include needs a relative path. # - set adp_stub [template::resource_path -type dimensional -style $style -relative] + set adp_stub [template::resource_path -type dimensionals -style $style -relative] # # Create nested adp-arrays. Since the templating system does not @@ -84,41 +84,41 @@ set arrays {} foreach option $option_list { - lassign $option option_key option_label option_default option_values + lassign $option option_key option_label option_default option_values - template::multirow append dimensional $option_key $option_label - # - # Find out what the current option value is. - # check if a default is set otherwise the first value is used - # - set option_val {} - if { $options_set ne ""} { - set option_val [ns_set get $options_set $option_key] - } - if { $option_val eq "" } { - set option_val $option_default - } - # - # Manage the names of the innner multirows, and pass all inner - # multirows to the outer template such it becomes visible in - # the inner template. - # - set array opt_$option_key - lappend arrays &$array $array + template::multirow append dimensional $option_key $option_label + # + # Find out what the current option value is. + # check if a default is set otherwise the first value is used + # + set option_val {} + if { $options_set ne ""} { + set option_val [ns_set get $options_set $option_key] + } + if { $option_val eq "" } { + set option_val $option_default + } + # + # Manage the names of the innner multirows, and pass all inner + # multirows to the outer template such it becomes visible in + # the inner template. + # + set array opt_$option_key + lappend arrays &$array $array - template::multirow create $array key label current count href - set count 0 - - foreach option_value $option_values { - lassign $option_value key label clause + template::multirow create $array key label current count href + set count 0 - template::multirow append $array \ - $key $label [expr {$option_val eq $key}] [incr count] \ - $url?[export_ns_set_vars url $option_key $options_set]&[ns_urlencode $option_key]=[ns_urlencode $key] - } - + foreach option_value $option_values { + lassign $option_value key label clause + + template::multirow append $array \ + $key $label [expr {$option_val eq $key}] [incr count] \ + $url?[export_ns_set_vars url $option_key $options_set]&[ns_urlencode $option_key]=[ns_urlencode $key] + } + } - + # # Finally, pass everything to the templating engine. The outer # template contains an "