Index: openacs-4/contrib/packages/project-manager/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/index.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/contrib/packages/project-manager/www/index.tcl 24 Jul 2004 08:33:55 -0000 1.20 +++ openacs-4/contrib/packages/project-manager/www/index.tcl 13 Jan 2005 13:54:36 -0000 1.21 @@ -103,9 +103,26 @@ } +set default_orderby [pm::project::index_default_orderby] + +if {[exists_and_not_null orderby_project]} { + pm::project::index_default_orderby \ + -set $orderby_project +} + +# Get url of the organizations package if it has been mounted for the links on the index page. +set organizations_url [util_memoize [list site_node::get_package_url -package_key organizations]] +if {[empty_string_p $organizations_url]} { + set organization_column "@projects.customer_name@" +} else { + set organization_column "@projects.customer_name@" +} + + template::list::create \ -name projects \ -multirow projects \ + -selected_format $format \ -key project_item_id \ -elements { project_name { @@ -116,7 +133,7 @@ customer_name { label "Customer" display_template " -@projects.customer_name@@projects.customer_name@ +$organization_column@projects.customer_name@ " } earliest_finish_date { @@ -161,7 +178,7 @@ } } \ -orderby { - default_value latest_finish_date,asc + default_value $default_orderby project_name { label "Project name" orderby_desc "upper(p.title) desc" @@ -231,20 +248,17 @@ width 100% } +# Note: On oracle it you get "ORA-03113: end-of-file on communication channel" +# please drop the index cat_object_map_i. Unique indexes are not allowed in organization index tables db_multirow -extend { item_url } projects project_folders { } { set item_url [export_vars -base "one" {project_item_id}] } -# This spits out the CSV if we happen to be in CSV layout -if {[string equal $format csv]} { +list::write_output -name projects - list::write_output -name projects -} - - # ------------------------- END OF FILE ------------------------- #