Index: openacs-4/contrib/packages/project-manager/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/index.adp,v diff -u -r1.20 -r1.20.2.1 --- openacs-4/contrib/packages/project-manager/www/index.adp 12 Mar 2004 13:44:44 -0000 1.20 +++ openacs-4/contrib/packages/project-manager/www/index.adp 14 Jul 2004 20:12:09 -0000 1.20.2.1 @@ -1,31 +1,38 @@ - - -@project_term@s -@context;noquote@ - - - - - - - -
- + + + @project_term@s + @context;noquote@ + + + + + + - - + + + + + +
+ +
+ Search:
+ + @hidden_vars;noquote@ + +
+ @category_select;noquote@ - + - -
- + + + + +
-
- - - 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.13.2.3 -r1.13.2.4 --- openacs-4/contrib/packages/project-manager/www/index.tcl 9 Jul 2004 00:08:52 -0000 1.13.2.3 +++ openacs-4/contrib/packages/project-manager/www/index.tcl 14 Jul 2004 20:12:09 -0000 1.13.2.4 @@ -18,6 +18,7 @@ } { orderby_project:optional {status_id:integer,optional} + {searchterm ""} category_id:multiple,optional {format "normal"} {assignee_id:integer,optional} @@ -42,6 +43,10 @@ set project_term [parameter::get -parameter "ProjectName" -default "Project"] set project_term_lower [parameter::get -parameter "projectname" -default "project"] +set exporting_vars { status_id category_id assignee_id orderby_project format } +set hidden_vars [export_vars -form $exporting_vars] + + # set up context bar set context [list] @@ -85,6 +90,19 @@ 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 "" +} + + template::list::create \ -name projects \ -multirow projects \ @@ -123,6 +141,10 @@ narrow } \ -filters { + searchterm { + label "Search" + where_clause {$search_term_where} + } status_id { label "Status" values {[pm::status::project_status_select]}