Index: openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl 24 Jul 2007 20:52:16 -0000 1.20 +++ openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl 30 Jul 2007 17:16:03 -0000 1.21 @@ -226,19 +226,25 @@ Table instproc write_csv {} { set output "" set line [list] + my msg columns=[[self]::__columns children] foreach column [[self]::__columns children] { - set value [string map {\" \\\"} [$column name]] + set label [$column label] + if {[regexp {^#(.*)#$} $label _ message_key]} { + set label [_ $message_key] + } + set value [string map {\" \\\"} $label] lappend line \"$value\" } append output [join $line ,] \n foreach row [my children] { set line [list] foreach column [[self]::__columns children] { - set value [string map {\" \\\"} [$row set [$column name]]] + set value [string map {\" \\\"} [$row set [$column set name]]] lappend line \"$value\" } append output [join $line ,] \n } + #ns_return 200 text/plain $output ns_return 200 text/csv $output } Index: openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/Attic/xowiki-portlet-procs.tcl,v diff -u -r1.81 -r1.82 --- openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 30 Jul 2007 12:04:07 -0000 1.81 +++ openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 30 Jul 2007 17:16:02 -0000 1.82 @@ -2149,6 +2149,7 @@ {-orderby "_last_modified,desc"} {-all:boolean false} {-field_names} + {-csv false} }} } @@ -2272,7 +2273,9 @@ set page_link [$package_id pretty_link [$p name]] t1 add \ + -delete delete \ -delete.href [$package_id make_link -link $page_link $p delete return_url] \ + -edit edit \ -edit.href [$package_id make_link -link $page_link $p edit return_url] set __c [t1 last_child] @@ -2297,11 +2300,15 @@ } } + if {$csv} { + return [t1 write_csv] + } + set base [$package_id pretty_link [$__including_page name]] set label [$__including_page name] append html [_ xowiki.entries_using_form [list form "$label

"]] - #"

Instances of Form $label

\n" [t1 asHTML] append html [t1 asHTML] + append html "csv" return $html } }