Index: openacs-4/packages/project-manager/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/index.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/project-manager/www/index.adp 23 Aug 2005 16:36:31 -0000 1.7 +++ openacs-4/packages/project-manager/www/index.adp 26 Aug 2005 17:00:30 -0000 1.8 @@ -2,7 +2,8 @@ - #project-manager.Projects# - @context;noquote@ +#project-manager.Projects# +@context;noquote@ - \ No newline at end of file + + Index: openacs-4/packages/project-manager/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/index.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/project-manager/www/index.tcl 23 Aug 2005 16:36:31 -0000 1.8 +++ openacs-4/packages/project-manager/www/index.tcl 26 Aug 2005 17:00:30 -0000 1.9 @@ -16,7 +16,7 @@ @return project_term_lower Terminology for projects (lower case) } { - orderby:optional + {orderby ""} {status_id:integer,optional} {searchterm ""} {end_range_f ""} @@ -44,8 +44,6 @@ # Sending only one value to the include set date_range "${start_range_f}/$end_range_f" -# --------------------------------------------------------------- # - set exporting_vars { status_id category_id assignee_id orderby format } set hidden_vars [export_vars -form $exporting_vars] @@ -58,7 +56,6 @@ # permissions permission::require_permission -party_id $user_id -object_id $package_id -privilege read - set write_p [permission::permission_p -object_id $package_id -privilege write] set create_p [permission::permission_p -object_id $package_id -privilege create] set admin_p [permission::permission_p -object_id $package_id -privilege admin] @@ -75,209 +72,26 @@ set fmt "%x" } - # root CR folder set root_folder [pm::util::get_root_folder -package_id $package_id] -# Projects, using list-builder --------------------------------- - # Set status if {![exists_and_not_null status_id]} { - set status_where_clause "" set status_id "" -} else { - set status_where_clause {p.status_id = :status_id} } # We want to set up a filter for each category tree. - set export_vars [export_vars -form {status_id orderby}] if {[exists_and_not_null category_id]} { - set temp_category_id $category_id set pass_cat $category_id } else { - set temp_category_id "" set pass_cat "" } -set category_select [pm::util::category_selects \ - -export_vars $export_vars \ - -category_id $temp_category_id \ - -package_id $package_id \ - ] - -set assignees_filter [pm::project::assignee_filter_select -status_id $status_id] - -if {![empty_string_p $searchterm]} { - - if {[regexp {([0-9]+)} $searchterm match query_digits]} { - set search_term_where " (upper(p.title) like upper('%$searchterm%') - or p.item_id = :query_digits) " - } else { - set search_term_where " upper(p.title) like upper('%$searchterm%')" - } -} else { - set search_term_where "" -} - - set default_orderby [pm::project::index_default_orderby] if {[exists_and_not_null orderby]} { pm::project::index_default_orderby \ -set $orderby } - -# Get url of the contacts package if it has been mounted for the links on the index page. -set contacts_url [util_memoize [list site_node::get_package_url -package_key contacts]] -if {[empty_string_p $contacts_url]} { - set contact_column "@projects.customer_name@" -} else { - set contact_column "@projects.customer_name@" -} - - -template::list::create \ - -name projects \ - -multirow projects \ - -selected_format $format \ - -key project_item_id \ - -elements { - project_name { - label "[_ project-manager.Project_name]" - link_url_col item_url - link_html { title "[_ project-manager.lt_View_this_project_ver]" } - } - customer_name { - label "[_ project-manager.Customer]" - display_template " -$contact_column@projects.customer_name@ -" - } - earliest_finish_date { - label "[_ project-manager.Earliest_finish]" - display_template "@projects.earliest_finish_date@@projects.earliest_finish_date@" - } - latest_finish_date { - label "[_ project-manager.Latest_Finish]" - display_template "@projects.latest_finish_date@@projects.latest_finish_date@" - } - actual_hours_completed { - label "[_ project-manager.Hours_completed]" - display_template "@projects.actual_hours_completed@/@projects.estimated_hours_total@" - } - category_id { - display_template "" - } - } \ - -actions [list "[_ project-manager.Add_project]" "add-edit" "[_ project-manager.Add_project]" "[_ project-manager.Customers]" "[site_node::get_package_url -package_key contacts]" "[_ project-manager.View_customers]"] \ - -bulk_actions [list "[_ project-manager.Close]" "bulk-close" "[_ project-manager.Close_project]"] \ - -sub_class { - narrow - } \ - -filters { - searchterm { - label "[_ project-manager.Search_1]" - where_clause {$search_term_where} - } - status_id { - label "[_ project-manager.Status_1]" - values {[pm::status::project_status_select]} - where_clause {$status_where_clause} - } - assignee_id { - label "[_ project-manager.Assignee]" - values {$assignees_filter} - where_clause {pa.party_id = :assignee_id} - } - category_id { - label Categories - where_clause {c.category_id = [join [value_if_exists category_id] ","]} - } - } \ - -orderby { - default_value $default_orderby - project_name { - label "[_ project-manager.Project_name]" - orderby_desc "upper(p.title) desc" - orderby_asc "upper(p.title) asc" - default_direction asc - } - customer_name { - label "[_ project-manager.Customer_Name]" - orderby_desc "upper(o.name) desc, earliest_finish_date desc" - orderby_asc "upper(o.name) asc, earliest_finish_date asc" - default_direction asc - } - category_id { - label "[_ project-manager.Categories]" - orderby_desc "c.category_name desc" - orderby_asc "c.category_name asc" - default_direction asc - } - earliest_finish_date { - label "[_ project-manager.Earliest_finish]" - orderby_desc "p.earliest_finish_date desc" - orderby_asc "p.earliest_finish_date asc" - default_direction asc - } - latest_finish_date { - label "[_ project-manager.Latest_finish]" - orderby_desc "p.latest_finish_date desc" - orderby_asc "p.latest_finish_date asc" - default_direction asc - } - actual_hours_completed { - label "[_ project-manager.Hours_completed]" - orderby_desc "p.actual_hours_completed desc" - orderby_asc "p.actual_hours_completed asc" - default_direction asc - } - } \ - -formats { - normal { - label "[_ project-manager.Table]" - layout table - row { - project_name {} - customer_name {} - category_id {} - earliest_finish_date {} - latest_finish_date {} - actual_hours_completed {} - } - } - csv { - label "[_ project-manager.CSV]" - output csv - page_size 0 - row { - project_name {} - customer_name {} - category_id {} - earliest_finish_date {} - latest_finish_date {} - actual_hours_completed {} - } - } - } \ - -orderby_name orderby \ - -html { - 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 contact index tables - -db_multirow -extend { item_url } projects project_folders { -} { - set item_url [export_vars -base "one" {project_item_id}] -} - - - -list::write_output -name projects - - -# ------------------------- END OF FILE ------------------------- #