Index: openacs-4/packages/file-storage/file-storage.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/file-storage.info,v diff -u -r1.27 -r1.28 --- openacs-4/packages/file-storage/file-storage.info 16 Feb 2004 17:06:12 -0000 1.27 +++ openacs-4/packages/file-storage/file-storage.info 16 Feb 2004 19:07:56 -0000 1.28 @@ -7,14 +7,14 @@ f f - + OpenACS Collaborative document storage 2003-11-10 OpenACS Provides a versioned document store with storage in the filesystem or database (depending on configuration). Documents and folders can be permissioned and folders downloaded. - + Index: openacs-4/packages/file-storage/catalog/file-storage.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/catalog/file-storage.en_US.ISO-8859-1.xml,v diff -u -r1.19 -r1.20 --- openacs-4/packages/file-storage/catalog/file-storage.en_US.ISO-8859-1.xml 18 Jan 2004 14:19:42 -0000 1.19 +++ openacs-4/packages/file-storage/catalog/file-storage.en_US.ISO-8859-1.xml 16 Feb 2004 19:07:56 -0000 1.20 @@ -1,5 +1,5 @@ - + Action Actions: @@ -33,6 +33,7 @@ Title: %title% Owner: %owner% folder + Folder available via WebDAV at Delete %folder_name% Folder ID Folder Name: Index: openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql,v diff -u -r1.36 -r1.37 --- openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql 15 Feb 2004 01:41:16 -0000 1.36 +++ openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql 16 Feb 2004 19:07:57 -0000 1.37 @@ -108,7 +108,7 @@ - select name from cr_items where item_id=:item_id + select file_storage__get_title(:item_id) Index: openacs-4/packages/file-storage/tcl/file-storage-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs.tcl,v diff -u -r1.40 -r1.41 --- openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 16 Feb 2004 17:06:13 -0000 1.40 +++ openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 16 Feb 2004 19:07:57 -0000 1.41 @@ -705,3 +705,42 @@ return $revision_id } + +ad_proc fs::webdav_url { + -item_id + {-root_folder_id ""} + {-package_id ""} +} { + Provide URL for webdav access to file or folder + + @param item_id folder_id or item_id of file-storage folder or file + @param root_folder_id root folder to resolve URL from + + @return fully qualified URL for WebDAV access or empty string if + item is not WebDAV enabled +} { + + if {[empty_string_p $package_id]} { + set package_id [ad_conn package_id] + } + + if {[empty_string_p $root_folder_id]} { + set root_folder_id [fs::get_root_folder -package_id $package_id] + } + + if {[string equal "t" [oacs_dav::folder_enabled -folder_id $root_folder_id]]} { + + set url_stub [item::get_url -root_folder_id $root_folder_id $item_id] + + set package_url [apm_package_url_from_id $package_id] + + set webdav_prefix [oacs_dav::uri_prefix] + + return "[ad_url]${webdav_prefix}${package_url}${url_stub}" + + } else { + + return "" + + } +} \ No newline at end of file Index: openacs-4/packages/file-storage/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/index.adp,v diff -u -r1.24 -r1.25 --- openacs-4/packages/file-storage/www/index.adp 15 Feb 2004 01:41:17 -0000 1.24 +++ openacs-4/packages/file-storage/www/index.adp 16 Feb 2004 19:07:57 -0000 1.25 @@ -8,3 +8,7 @@ + +

#file-storage.Folder_available_via_WebDAV_at# @webdav_url@

+
+ \ No newline at end of file Index: openacs-4/packages/file-storage/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/index.tcl,v diff -u -r1.22 -r1.23 --- openacs-4/packages/file-storage/www/index.tcl 15 Feb 2004 01:41:17 -0000 1.22 +++ openacs-4/packages/file-storage/www/index.tcl 16 Feb 2004 19:07:57 -0000 1.23 @@ -93,4 +93,6 @@ } } +set webdav_url [fs::webdav_url -item_id $folder_id] + ad_return_template