Index: openacs-4/contrib/packages/bcms/tcl/bcms-item-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms/tcl/bcms-item-procs-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/bcms/tcl/bcms-item-procs-postgresql.xql 27 Aug 2003 17:23:27 -0000 1.3 +++ openacs-4/contrib/packages/bcms/tcl/bcms-item-procs-postgresql.xql 22 Sep 2003 07:32:52 -0000 1.4 @@ -42,7 +42,8 @@ i.publish_status, i.content_type, i.storage_type, - i.tree_sortkey + i.tree_sortkey, + to_char(last_modified,'YYYY-MM-DD HH:MM AM') as last_modified $addtnl_select from cr_items i $addtnl_from @@ -60,15 +61,17 @@ i.content_type, i.storage_type, i.tree_sortkey, + null as last_modified, f.label as title, f.description $addtnl_select_folder from cr_items i, cr_folders f where i.parent_id = :parent_id and i.item_id = f.folder_id + $addtnl_where_folder - order by tree_sortkey + order by $orderby Index: openacs-4/contrib/packages/bcms/tcl/bcms-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms/tcl/bcms-item-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/bcms/tcl/bcms-item-procs.tcl 27 Aug 2003 17:23:27 -0000 1.3 +++ openacs-4/contrib/packages/bcms/tcl/bcms-item-procs.tcl 22 Sep 2003 07:32:52 -0000 1.4 @@ -126,6 +126,8 @@ {-multirow_name bcms_list_items} {-return_list:boolean false} {-additional_columns} + {-orderby "item_id asc"} + {-show_only} } { Gets all content item under the parent_id @@ -177,11 +179,19 @@ lappend addtnl_where_list "content_type = :content_type" } + # show only a subset of item_id + if [info exists show_only] { + lappend addtnl_where_list "i.item_id in ($show_only)" + lappend addtnl_where_folder_list "i.item_id in ($show_only)" + } + # construct the additionals if {[llength $addtnl_where_list] > 0} { set addtnl_where "and [join $addtnl_where_list " and "]" + set addtnl_where_folder "and [join $addtnl_where_folder_list " and "]" } else { set addtnl_where "" + set addtnl_where_folder "" } if {[llength $addtnl_select_list] > 0} { set addtnl_select_folder ", null as [join $addtnl_select_list ", null as "]"