Index: openacs-4/packages/dotlrn-fs/www/all-objects.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/www/all-objects.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-fs/www/all-objects.adp 28 Apr 2002 17:16:57 -0000 1.1 @@ -0,0 +1,17 @@ + +All items + + + + + + +
  • + + Showing files modified within the past days. + +
    + +
    + +@table@ Index: openacs-4/packages/dotlrn-fs/www/all-objects.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/www/all-objects.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-fs/www/all-objects.tcl 28 Apr 2002 17:16:57 -0000 1.1 @@ -0,0 +1,84 @@ +# dotlrn-fs/www/all-objects.tcl + +ad_page_contract { + @author yon (yon@openforce.net) + @creation-date Apr 25, 2002 + @version $Id: all-objects.tcl,v 1.1 2002/04/28 17:16:57 yon Exp $ +} -query { + {n_past_days:integer 999999} + {orderby "folder_name,name"} +} -properties { + n_past_days:onevalue + orderby:onevalue + table:onevalue +} + +set user_id [ad_verify_and_get_user_id] + +form create n_past_days_form + +set options {{All 999999} {1 1} {2 2} {3 3} {7 7} {14 14} {30 30}} +element create n_past_days_form n_past_days \ + -label "" \ + -datatype text \ + -widget select \ + -options $options \ + -html {onChange document.n_past_days_form.submit()} \ + -value $n_past_days + +element create n_past_days_form orderby \ + -label "Order By" \ + -datatype text \ + -widget hidden \ + -value $orderby + +if {[form is_valid n_past_days_form]} { + form get_values n_past_days_form \ + n_past_days orderby +} + +set table_def [list] + +lappend table_def [list name Name {fs_objects.name $order} "\$name"] +lappend table_def [list folder_name Folder {} "\$folder_name"] +lappend table_def {type Type {fs_objects.type $order} {c}} +lappend table_def {size Size {fs_objects.content_size $order} {[ad_decode $type Folder "$content_size item[ad_decode $content_size 1 {} s]" URL {} "$content_size byte[ad_decode $content_size 1 {} s]"]}} +lappend table_def {last_modified {Last Modified} {fs_objects.last_modified $order} {[util_AnsiDatetoPrettyDate $last_modified]}} + +set dotlrn_package_key [dotlrn::package_key] + +set sql " + select fs_objects.*, + fs_folders.name as folder_name + from fs_objects, + fs_folders + where fs_objects.object_id in (select acs_objects.object_id + from acs_objects + connect by acs_objects.context_id = prior acs_objects.object_id + start with acs_objects.context_id in (select portal_node_mappings.object_id + from portal_node_mappings, + site_nodes, + fs_root_folders + where portal_node_mappings.node_id = site_nodes.node_id + and portal_node_mappings.object_id = fs_root_folders.folder_id + and site_nodes.parent_id in (select sn.node_id + from site_nodes sn, + apm_packages ap + where sn.object_id = ap.package_id + and ap.package_key = :dotlrn_package_key))) + and fs_objects.parent_id = fs_folders.folder_id + and fs_objects.type <> 'Folder' + and fs_objects.last_modified >= (sysdate - :n_past_days) + and 't' = acs_permission.permission_p(fs_objects.object_id, :user_id, 'read') + [ad_order_by_from_sort_spec $orderby $table_def] +" + +set table [ad_table \ + -Torderby $orderby \ + -Ttable_extra_html {width="95%"} \ + select_folder_contents \ + $sql \ + $table_def +] + +ad_return_template