Index: openacs-4/packages/file-storage/tcl/file-storage-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-install-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/file-storage/tcl/file-storage-install-procs.tcl 13 Jan 2005 13:58:12 -0000 1.3 +++ openacs-4/packages/file-storage/tcl/file-storage-install-procs.tcl 26 Jan 2005 00:43:54 -0000 1.4 @@ -124,3 +124,17 @@ } } + +ad_proc -private ::install::xml::action::file-storage-folder { node } { + Create a file storage folder from install.xml +} { + set url [apm_required_attribute_value $node url] + set name [apm_required_attribute_value $node name] + set pretty_name [apm_required_attribute_value $node pretty-name] + + set package_id [site_node::get_element -url $url -element package_id] + + set root [fs::get_root_folder -package_id $package_id] + + fs::new_folder -name $name -pretty_name $pretty_name -parent_id $root -creation_user 0 -creation_ip 127.0.0.1 +} Index: openacs-4/packages/file-storage/www/folder-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/folder-chunk.adp,v diff -u -r1.24 -r1.25 --- openacs-4/packages/file-storage/www/folder-chunk.adp 13 Jan 2005 13:58:13 -0000 1.24 +++ openacs-4/packages/file-storage/www/folder-chunk.adp 26 Jan 2005 00:43:54 -0000 1.25 @@ -9,7 +9,6 @@ #file-storage.this_may_take_a_while#

- Index: openacs-4/packages/file-storage/www/folder-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/folder-chunk.tcl,v diff -u -r1.28 -r1.29 --- openacs-4/packages/file-storage/www/folder-chunk.tcl 13 Jan 2005 13:58:13 -0000 1.28 +++ openacs-4/packages/file-storage/www/folder-chunk.tcl 26 Jan 2005 00:43:54 -0000 1.29 @@ -50,6 +50,10 @@ set content_size_total 0 +if {![exists_and_not_null format]} { + set format table +} + if {![exists_and_not_null root_folder_id]} { set root_folder_id [fs::get_root_folder] } @@ -91,6 +95,12 @@ display_template {@contents.name@@contents.title@
@contents.name@
} \ orderby_desc {fs_objects.name desc} \ orderby_asc {fs_objects.name asc}] \ + short_name \ + [list label [_ file-storage.Name] \ + hide_p 1 \ + display_template {@contents.title@} \ + orderby_desc {fs_objects.name desc} \ + orderby_asc {fs_objects.name asc}] \ content_size_pretty \ [list label [_ file-storage.Size] \ orderby_desc {content_size desc} \ @@ -114,12 +124,30 @@ set bulk_actions "" } +if {$format eq "list"} { + set actions {} +} + template::list::create \ -name contents \ -multirow contents \ -key object_id \ -actions $actions \ -bulk_actions $bulk_actions \ + -selected_format $format \ + -formats { + table { + label Table + layout table + } + list { + label List + layout list + template { + - + } + } + } \ -filters { folder_id {hide_p 1} } \ @@ -134,7 +162,7 @@ db_multirow -extend {label icon last_modified_pretty content_size_pretty properties_link properties_url download_url} contents select_folder_contents {} { set last_modified_ansi [lc_time_system_to_conn $last_modified_ansi] - set last_modified_pretty [lc_time_fmt $last_modified_ansi "%x %X"] + set last_modified_pretty [lc_time_fmt $last_modified_ansi "%x "] if {[string equal $type "folder"]} { set content_size_pretty [lc_numeric $content_size] append content_size_pretty " [_ file-storage.items]" @@ -185,11 +213,15 @@ # We need to encode the hashes in any i18n message keys (.LRN plays this trick on some of its folders). # If we don't, the hashes will cause the path to be chopped off (by ns_conn url) at the leftmost hash. - regsub -all {#} $file_url {%23} file_url + regsub -all \# $file_url {%23} file_url } if { $expose_rss_p } { db_multirow feeds select_subscrs {} } +if {$format eq "list"} { + set content_size_total 0 +} + ad_return_template