+@folder_name@
+@folder_name@
+@context_bar@
+
+
+
+ |
+
+ INot including items from subfolders
+ (
+
+ exclude
+
+
+ include
+
+ )
+ |
+
+
+ |
+
+
+ Showing files modified within the past days.
+
+ |
+
+
+
+
+
+@table@
Index: openacs-4/packages/file-storage/www/folder-contents.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/folder-contents.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/file-storage/www/folder-contents.tcl 26 Apr 2002 21:07:10 -0000 1.1
@@ -0,0 +1,112 @@
+# file-storage/www/folder-contents.tcl
+
+ad_page_contract {
+ @author yon (yon@openforce.net)
+ @creation-date Apr 25, 2002
+ @version $Id: folder-contents.tcl,v 1.1 2002/04/26 21:07:10 yon Exp $
+} -query {
+ {folder_id:integer {[fs::get_root_folder]}}
+ {recurse_p:boolean 0}
+ {n_past_days:integer 999999}
+ {orderby "fs_objects.name"}
+} -validate {
+ valid_folder -requires {folder_id:integer} {
+ if {[empty_string_p $folder_id] || ![fs::folder_p -object_id $folder_id]} {
+ ad_complain
+ }
+ }
+} -errors {
+ valid_folder {No valid folder was found}
+} -properties {
+ folder_id:onevalue
+ folder_name:onevalue
+ context_bar:onevalue
+ recurse_p:onevalue
+ n_past_days:onevalue
+ orderby:onevalue
+ table:onevalue
+}
+
+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 folder_id \
+ -label "Folder ID" \
+ -datatype text \
+ -widget hidden \
+ -value $folder_id
+
+element create n_past_days_form recurse_p \
+ -label "RecurseP" \
+ -datatype text \
+ -widget hidden \
+ -value $recurse_p
+
+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 folder_id recurse_p 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] | }}
+
+if {$recurse_p} {
+ 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 = :folder_id)
+ and fs_objects.parent_id = fs_folders.folder_id
+ and fs_objects.type <> 'Folder'
+ and fs_objects.last_modified >= (sysdate - :n_past_days)
+ [ad_order_by_from_sort_spec $orderby $table_def]
+ "
+} else {
+ set sql "
+ select fs_objects.*,
+ fs_folders.name as folder_name
+ from fs_objects,
+ fs_folders
+ where fs_objects.parent_id = :folder_id
+ and fs_folders.folder_id = :folder_id
+ and fs_objects.last_modified >= (sysdate - :n_past_days)
+ [ad_order_by_from_sort_spec $orderby $table_def]
+ "
+}
+
+set table [ad_table \
+ -Torderby $orderby \
+ -Tmissing_text "Folder [fs::get_folder_name -folder_id $folder_id] is empty.
" \
+ -Ttable_extra_html {width="95%"} \
+ select_folder_contents \
+ $sql \
+ $table_def
+]
+
+set folder_name [fs::get_folder_name -folder_id $folder_id]
+set context_bar [fs_context_bar_list $folder_id]
+
+ad_return_template