Index: openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl,v diff -u -r1.1.2.9 -r1.1.2.10 --- openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl 24 Oct 2005 11:17:06 -0000 1.1.2.9 +++ openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl 10 Nov 2005 13:52:21 -0000 1.1.2.10 @@ -110,3 +110,92 @@ application_data_link::new -this_object_id $project_id -target_object_id $folder_id } } + +#Callbacks for application-track + +ad_proc -callback application-track::getApplicationName -impl file_storage {} { + callback implementation + } { + return "file_storage" + } + +ad_proc -callback application-track::getGeneralInfo -impl file_storage {} { + callback implementation + } { + + db_1row my_query { + select count(1) as result + from acs_objects a, acs_objects b + where b.object_id = :comm_id + and a.tree_sortkey between b.tree_sortkey + and tree_right(b.tree_sortkey) + and a.object_type = 'file_storage_object' + } + + + return "$result" + } + + +ad_proc -callback application-track::getSpecificInfo -impl file_storage {} { + callback implementation + } { + + upvar $query_name my_query + upvar $elements_name my_elements + + + set my_query { + + SELECT f.name as name, f.file_id, f.type as type, f.content_size as size, + to_char(f.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified, + to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date, + (select site_node__url(site_nodes.node_id) + from site_nodes, acs_objects + where site_nodes.object_id = file_storage__get_package_id(f.parent_id) and acs_objects.object_id = f.file_id) as url, + com.community_id as class_id + FROM fs_files f,dotlrn_communities_full com,acs_objects o, acs_objects o2 + WHERE f.file_id = o.object_id + and com.community_id=:class_instance_id + and o2.object_id= file_storage__get_package_id(f.parent_id) + and o2.context_id=com.package_id + + } + + + set my_elements { + name { + label "Name" + display_col name + html {align center} + + } + type { + label "Type" + display_col type + html {align center} + + } + size { + label "Size" + display_col size + html {align center} + + } + last_modification_date { + label "Last_Modification_Date" + display_col last_modified + html {align center} + } + post_date { + label "Post_Date" + display_col creation_date + html {align center} + + } + + } + + + } +