Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/project-manager/lib/search-jobid.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.6 refers to a dead (removed) revision in file `openacs-4/packages/project-manager/lib/search-jobid.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/packages/project-manager/lib/search-jobid.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/project-manager/lib/search-project.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/search-project.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager/lib/search-project.adp 17 Dec 2005 10:33:08 -0000 1.1 @@ -0,0 +1,8 @@ + + + + + + Index: openacs-4/packages/project-manager/lib/search-project.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/search-project.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager/lib/search-project.tcl 17 Dec 2005 10:33:08 -0000 1.1 @@ -0,0 +1,49 @@ +# /packages/project-manager/lib/search-jobid.tcl +# +# Include that searchs for the name or the project_code of a project (project name) +# and redirects to the found project if it's just one and to the +# first one if there are various. +# +# +# This should probably rewritten to return a list of found projects. Maybe someone else cares to do it. +# +# Usage: +# ADP File: +# +# +# Expects: +# keyword The keyword to search projects +# return_url The return_url to return if no project is found. It would be the same page if empty. + +if { ![exists_and_not_null return_url] } { + set return_url [ad_return_url] +} + +set focus_message "if(this.value=='[_ project-manager.search_project]')this.value='';" +set blur_message "if(this.value=='')this.value='[_ project-manager.search_project]';" + +ad_form -name search_project -form { + {keyword:text(text) + {html {size 20 onfocus "$focus_message" onblur "$blur_message" class search_project}} + {value "[_ project-manager.search_project]"} + } + {return_url:text(hidden) {value $return_url}} +} -on_submit { + set match_projects [db_list_of_lists get_projects { }] + set match_length [llength $match_projects] + if { [string equal $match_length 0] } { + # No Match just redirect + ad_returnredirect $return_url + } else { + set project_item_id [lindex [lindex $match_projects 0] 0] + set object_package_id [lindex [lindex $match_projects 0] 2] + + # We get the node_id from the package_id and use it + # to get the url of the project-manager + set pm_node_id [site_node::get_node_id_from_object_id -object_id $object_package_id] + set pm_url [site_node::get_url -node_id $pm_node_id] + + # Just redirect to the pm_url and project_item_id + ad_returnredirect "${pm_url}one?project_item_id=$project_item_id" + } +} \ No newline at end of file Index: openacs-4/packages/project-manager/lib/search-project.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/search-project.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager/lib/search-project.xql 17 Dec 2005 10:33:08 -0000 1.1 @@ -0,0 +1,21 @@ + + + + + + select + distinct + item_id, + object_title, + object_package_id + from + pm_projectsx + where + lower(object_title) like lower(:keyword) + or lower(project_code) like lower(:keyword) + order by + object_title asc + + + + \ No newline at end of file Index: openacs-4/packages/project-manager/lib/tasks.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/tasks.tcl,v diff -u -r1.43 -r1.44 --- openacs-4/packages/project-manager/lib/tasks.tcl 15 Dec 2005 22:36:38 -0000 1.43 +++ openacs-4/packages/project-manager/lib/tasks.tcl 17 Dec 2005 10:33:08 -0000 1.44 @@ -433,6 +433,9 @@ status { label "[_ project-manager.Status_1]" } + project_status { + label "[_ project-manager.Status_1]" + } days_remaining { label "[_ project-manager.Days_work]" html { @@ -534,6 +537,11 @@ } set user_instead_full_p [parameter::get -parameter "UsernameInsteadofFullnameP" -default "f"] +if {[lsearch -exact $row_list project_status] == -1} { + set project_status_p 0 +} else { + set project_status_p 1 +} set row_count 0 set more_p 0 @@ -556,6 +564,7 @@ base_url \ task_close_url \ project_url \ + project_status \ assignee_name \ red_title_p] @@ -613,7 +622,12 @@ set latest_start_pretty [lc_time_fmt $latest_start $fmt] set latest_finish_pretty [lc_time_fmt $latest_finish $fmt] set end_date_pretty [lc_time_fmt $end_date $fmt] + set project_status [pm::project::get_status_description -project_item_id $project_item_id] + if {!$project_status_p} { + set project_name "[string index [lang::util::localize $project_status] 0]-$project_name" + } + set red_title_p 0 set sysdate [dt_sysdate -format "%Y-%m-%d %H:%M:%S"] if { [exists_and_not_null latest_start]} {