Index: openacs-4/packages/xowiki/www/pages/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/pages/Attic/index.vuh,v diff -u -r1.2 -r1.3 --- openacs-4/packages/xowiki/www/pages/index.vuh 26 Jan 2006 01:30:46 -0000 1.2 +++ openacs-4/packages/xowiki/www/pages/index.vuh 27 Jan 2006 19:04:58 -0000 1.3 @@ -12,29 +12,15 @@ folder_id:optional } - -set context [list] -set supertype ::xowiki::Page - -# if object_type is specified, only list entries of this type; -# otherwise show types and subtypes of $supertype if {![info exists object_type]} { - set object_types [$supertype object_types] - set page_title "List of all kind of [$supertype set pretty_plural]" - set with_subtypes true - set object_type $supertype -} else { - set object_types [list $object_type] - set page_title "Index of [$object_type set pretty_plural]" - set with_subtypes false + set object_type ::xowiki::Page } if {![info exists folder_id]} { set folder_id [$object_type require_folder -name xowiki] } -#ns_log notice "-- folder_id = $folder_id" set path [ad_conn path_info] -ns_log notice "-- path=<$path>" +#ns_log notice "-- path=<$path>" if {$path ne ""} { if {![regexp {^..:} $path]} { set path [string range [lang::conn::locale] 0 1]:$path @@ -50,53 +36,3 @@ ad_abort_script } } - - -# set up categories -set package_id [ad_conn package_id] -set category_map_url [export_vars -base \ - [site_node::get_package_url -package_key categories]cadmin/one-object \ - { { object_id $package_id } }] - -set actions "" -foreach type $object_types { - append actions [subst { - Action new \ - -label "[_ xotcl-core.add [list type [$type pretty_name]]]" \ - -url [export_vars -base edit {{object_type $type} folder_id}] \ - -tooltip "[_ xotcl-core.add_long [list type [$type pretty_name]]]" - }] -} - -TableWidget t1 -volatile \ - -actions $actions \ - -columns { - ImageField_EditIcon edit -label "" - ImageField_ViewIcon view -label "" - Field title -label [_ xowiki.page_title] - Field object_type -label [_ xowiki.page_type] - ImageField_DeleteIcon delete -label "" - } - -ns_log notice "-- path=<$path> fetching " - -set order_clause "order by cr.title" -# -page_size 10 -# -page_number 1 -db_foreach instance_select \ - [$object_type instance_select_query \ - -folder_id $folder_id \ - -select_attributes title \ - -with_subtypes $with_subtypes \ - -order_clause $order_clause \ - ] { -ns_log notice "-- path=<$path> fetch item_id=$item_id" - t1 add \ - -title $title \ - -object_type $object_type \ - -view.href [export_vars -base view {item_id}] \ - -edit.href [export_vars -base edit {item_id}] \ - -delete.href [export_vars -base delete {item_id}] - } - -set t1 [t1 asHTML]