Index: openacs-4/packages/fs-portlet/www/fs-portlet-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/www/fs-portlet-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/fs-portlet/www/fs-portlet-oracle.xql 16 Jan 2002 01:36:19 -0000 1.1 @@ -0,0 +1,54 @@ + + + +oracle8.1.6 + + + + select + i.item_id as file_id, + r.title as name, + i.live_revision file_live_rev, + r.mime_type as type, + 1 as ordering_key, + 0 as num + from + cr_items i, cr_revisions r, acs_objects o + where + i.item_id = o.object_id + and i.live_revision = r.revision_id (+) + and i.parent_id in (:my_folder_id) + and acs_permission.permission_p(i.item_id, :user_id, 'read') = 't' + and i.content_type = 'content_revision' + UNION + select + i.item_id as file_id, + f.label as name, + 0 as file_live_rev, + 'Folder', + 0 as ordering_key, + (select count(*) from cr_items where parent_id = i.item_id) as num + from + cr_items i, cr_folders f + where + i.item_id = f.folder_id + and i.parent_id in (:my_folder_id) + and acs_permission.permission_p(i.item_id, :user_id, 'read') = 't' + order by ordering_key,name + + + + + + +select package_id +from (select item_id + from cr_items + connect by prior parent_id = item_id + start with item_id = :my_folder_id) this, fs_root_folders +where item_id = folder_id + + + + + Index: openacs-4/packages/fs-portlet/www/fs-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/www/fs-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/fs-portlet/www/fs-portlet.adp 16 Jan 2002 01:36:19 -0000 1.1 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@items.name@ + @items.type@@items.num@ items@items.num@ item @items.name@File\[download\]
+ +
+ + Index: openacs-4/packages/fs-portlet/www/fs-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/www/fs-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/fs-portlet/www/fs-portlet.tcl 16 Jan 2002 01:36:19 -0000 1.1 @@ -0,0 +1,30 @@ +# www/fs-portlet.tcl +ad_page_contract { + The display logic for the fs portlet + + @author Arjun Sanyal (arjun@openforce.net) + @cvs_id $Id: fs-portlet.tcl,v 1.1 2002/01/16 01:36:19 oracle Exp $ +} -properties { + +} + +array set config $cf + +set user_id [ad_conn user_id] + +set list_of_folder_ids $config(folder_id) + +set my_folder_id [lindex $list_of_folder_ids 0] + +#foreach my_folder_id $list_of_folder_ids { + + db_multirow -local items select_files_and_folders {} { + set package_id [db_string select_package_id {}] + +# set items(url) \ +# [dotlrn_community::get_url_from_package_id -package_id $package_id] + + } +#} + +ad_return_template