Index: openacs-4/packages/project-manager/lib/projects.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/projects.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/project-manager/lib/projects.adp 21 Jul 2005 20:43:45 -0000 1.4
+++ openacs-4/packages/project-manager/lib/projects.adp 10 Aug 2005 17:20:24 -0000 1.5
@@ -1,20 +1,22 @@
-
-
@category_select;noquote@
-
-
-
-
+
+
-
-
Index: openacs-4/packages/project-manager/lib/projects.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/projects.tcl,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/project-manager/lib/projects.tcl 30 Jul 2005 00:26:33 -0000 1.10
+++ openacs-4/packages/project-manager/lib/projects.tcl 10 Aug 2005 17:20:24 -0000 1.11
@@ -6,7 +6,7 @@
# @cvs-id $Id$
set required_param_list [list package_id]
-set optional_param_list [list orderby status_id searchterm bulk_p action_p filter_p base_url customer_id]
+set optional_param_list [list orderby status_id searchterm bulk_p action_p filter_p base_url customer_id end_date_f]
set optional_unset_list [list assignee_id]
foreach required_param $required_param_list {
@@ -126,7 +126,29 @@
set search_term_where ""
}
+##############################################
+# Filter for planned_end_date
+if { ![empty_string_p $date_range] } {
+ set start_range_f [lindex [split $date_range "/"] 0]
+ set end_range_f [lindex [split $date_range "/"] 1]
+ if {![empty_string_p $start_range_f] && ![empty_string_p $end_range_f]} {
+ set p_range_where "to_char(p.planned_end_date,'YYYY-MM-DD') >= :start_range_f and
+ to_char(p.planned_end_date,'YYYY-MM-DD') <= :end_range_f"
+ } else {
+ if {![empty_string_p $start_range_f] } {
+ set p_range_where "to_char(p.planned_end_date,'YYYY-MM-DD') >= :start_range_f"
+ } elseif { ![empty_string_p $end_range_f] } {
+ set p_range_where "to_char(p.planned_end_date,'YYYY-MM-DD') <= :end_range_f"
+ } else {
+ set p_range_where ""
+ }
+ }
+} else {
+ set p_range_where ""
+}
+##############################################
+
set default_orderby [pm::project::index_default_orderby]
if {[exists_and_not_null orderby]} {
@@ -226,6 +248,10 @@
label "[_ project-manager.Search_1]"
where_clause {$search_term_where}
}
+ date_range {
+ label "[_ project-manager.Planned_end_date]"
+ where_clause {$p_range_where}
+ }
status_id {
label "[_ project-manager.Status_1]"
values {[pm::status::project_status_select]}
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.5 -r1.6
--- openacs-4/packages/project-manager/www/index.adp 30 Jul 2005 00:26:33 -0000 1.5
+++ openacs-4/packages/project-manager/www/index.adp 10 Aug 2005 17:19:50 -0000 1.6
@@ -5,4 +5,4 @@
#project-manager.Projects#
@context;noquote@
-
\ No newline at end of file
+
\ 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.6 -r1.7
--- openacs-4/packages/project-manager/www/index.tcl 30 Jul 2005 00:26:33 -0000 1.6
+++ openacs-4/packages/project-manager/www/index.tcl 10 Aug 2005 17:19:50 -0000 1.7
@@ -19,6 +19,8 @@
orderby:optional
{status_id:integer,optional}
{searchterm ""}
+ {end_range_f ""}
+ {start_range_f ""}
category_id:multiple,optional
{format "normal"}
{assignee_id ""}
@@ -34,8 +36,12 @@
task_term_lower:onevalue
project_term:onevalue
project_term_lower:onevalue
+ date_range:onevalue
}
+# 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 }