Index: openacs-4/packages/tasks/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/tasks/www/index.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/tasks/www/index.tcl 1 Mar 2006 13:49:15 -0000 1.9
+++ openacs-4/packages/tasks/www/index.tcl 4 Mar 2006 22:57:25 -0000 1.10
@@ -5,15 +5,10 @@
@creation-date 2004-07-28
@cvs-id $Id$
} {
- {tasks_orderby:optional ""}
- {format "normal"}
{search_id:integer ""}
{query ""}
- {page:optional "1"}
- {page_size:integer "25"}
{tasks_future:integer "7"}
- {tasks_previous:integer "0"}
- {page_flush_p "0"}
+ {tasks_previous:integer ""}
}
@@ -26,7 +21,6 @@
set return_url [export_vars -base $url -url {orderby format search_id query page page_size tasks_future tasks_previous {page_flush_p t}}]
-
set package_id [site_node::get_element -url "/contacts" -element object_id]
if { [exists_and_not_null search_id] } {
contact::search::log -search_id $search_id
@@ -43,8 +37,8 @@
{search_id:integer(select),optional {label ""} {options $search_options} {html {onChange "javascript:acs_FormRefresh('search')"}}}
{query:text(text),optional {label ""} {html {size 20 maxlength 255}}}
{save:text(submit) {label {[_ contacts.Search]}} {value "go"}}
- {tasks_previous:integer(text),optional {label " [_ tasks.View_previous]"} {after_html "days"} {html {size 2 maxlength 3 onChange "javascript:acs_FormRefresh('search')"}}}
- {tasks_future:integer(text),optional {label " [_ tasks.View_next]"} {after_html "days"} {html {size 2 maxlength 3 onChange "javascript:acs_FormRefresh('search')"}}}
+ {tasks_previous:integer(text),optional {label " [_ tasks.View_previous]"} {after_html "days"} {html {size 2 maxlength 3 onChange "javascript:acs_FormRefresh('search')"}}}
+ {tasks_future:integer(text),optional {label " [_ tasks.View_next]"} {after_html "days"} {html {size 2 maxlength 3 onChange "javascript:acs_FormRefresh('search')"}}}
}
if { [parameter::get -boolean -parameter "ForceSearchBeforeAdd" -default "0"] } {
@@ -75,3 +69,14 @@
and group_distinct_member_map.group_id in ('[join [contacts::default_groups] "','"]')
[contact::search_clause -and -search_id $search_id -query $query -party_id "parties.party_id" -revision_id "revision_id"]
"
+
+
+
+set start_date ""
+set end_date ""
+if { $tasks_future ne "" } {
+ set end_date [db_string get_new_start_date " select ( now() + '$tasks_future days'::interval ) " -default {}]
+}
+if { $tasks_previous ne "" } {
+ set start_date [db_string get_new_end_date " select ( now() - '$tasks_previous days'::interval ) " -default {}]
+}