Index: openacs-4/packages/project-manager/project-manager.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/project-manager.info,v diff -u -r1.31 -r1.32 --- openacs-4/packages/project-manager/project-manager.info 21 Oct 2005 17:19:30 -0000 1.31 +++ openacs-4/packages/project-manager/project-manager.info 25 Oct 2005 23:05:59 -0000 1.32 @@ -7,15 +7,15 @@ <initial-install-p>f</initial-install-p> <singleton-p>f</singleton-p> - <version name="3.1d12" url="http://openacs.org/repository/download/apm/project-manager-3.1d12.apm"> + <version name="3.1d13" url="http://openacs.org/repository/download/apm/project-manager-3.1d13.apm"> <owner url="mailto:jade@rubick.com">Jade Rubick</owner> <summary>Project management tool for OpenACS</summary> - <release-date>2005-10-21</release-date> + <release-date>2005-10-25</release-date> <vendor url="mailto:jader@bread.com">Integrated Bakery Resources</vendor> <description format="text/plain">Track tasks, estimates and actual progress for a project. See the <a href="http://openacs.org/projects/dotwrk/project_management/">project page</a> for more information.</description> <maturity>0</maturity> - <provides url="project-manager" version="3.1d12"/> + <provides url="project-manager" version="3.1d13"/> <requires url="acs-datetime" version="4.0"/> <requires url="acs-subsite" version="5.2.0a4"/> <requires url="acs-templating" version="5.1.6d1"/> Index: openacs-4/packages/project-manager/catalog/project-manager.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/catalog/project-manager.en_US.ISO-8859-1.xml,v diff -u -r1.47 -r1.48 --- openacs-4/packages/project-manager/catalog/project-manager.en_US.ISO-8859-1.xml 21 Oct 2005 17:18:35 -0000 1.47 +++ openacs-4/packages/project-manager/catalog/project-manager.en_US.ISO-8859-1.xml 25 Oct 2005 23:05:59 -0000 1.48 @@ -143,6 +143,7 @@ <msg key="Go_back">Go back</msg> <msg key="Goal">Goal</msg> <msg key="Goal_1">Goal:</msg> + <msg key="Hide">Hide</msg> <msg key="Hour_to_date">Hour to date</msg> <msg key="hours">hours</msg> <msg key="Hours_completed">Hours completed</msg> @@ -541,6 +542,7 @@ <msg key="send_message_to">Send message to:</msg> <msg key="Set_permissions">Set permissions</msg> <msg key="Set_up">Set up</msg> + <msg key="Show">Show</msg> <msg key="Show_closed">Show closed</msg> <msg key="show_this_projects">Show this projects</msg> <msg key="Skip_this_task">Skip this task?</msg> @@ -560,6 +562,7 @@ <msg key="Subject">Subject:</msg> <msg key="Subject_1">Subject</msg> <msg key="Subject_2">Subject\</msg> + <msg key="Subproject_tasks">Subproject Tasks</msg> <msg key="Subprojects">Subprojects</msg> <msg key="Subtotal">Subtotal</msg> <msg key="Subtotal_Average">Subtotal Average</msg> 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.8 -r1.10 --- openacs-4/packages/project-manager/lib/projects.adp 13 Sep 2005 18:40:42 -0000 1.8 +++ openacs-4/packages/project-manager/lib/projects.adp 25 Oct 2005 23:06:00 -0000 1.10 @@ -6,16 +6,15 @@ @hidden_vars;noquote@ #project-manager.Start_date#: <input type=text name="start_range_f" value="@start_range_f@" id="sel1" size="10"/> - <input type='reset' value='...' onclick="return showCalendar('sel1', 'y-m-d');"> + <input type='reset' value='...' onclick="return showCalendar('sel1', 'yy-m-d');"> #project-manager.End_date#: <input type=text name="end_range_f" value="@end_range_f@" id="sel2" size="10"/> - <input type='reset' value='...' onclick="return - showCalendar('sel2', 'y-m-d');"> + <input type='reset' value='...' onclick="return showCalendar('sel2', 'yyyy-m-d');"> <input type="submit" value="#project-manager.search#" /> </div> </form> <br /> - <div id="search-block"> + <div id="search-block-big"> <multiple name="projects"> @projects.category_select;noquote@ </multiple> Index: openacs-4/packages/project-manager/lib/tasks-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/tasks-postgresql.xql,v diff -u -r1.10 -r1.11 --- openacs-4/packages/project-manager/lib/tasks-postgresql.xql 22 Sep 2005 07:40:31 -0000 1.10 +++ openacs-4/packages/project-manager/lib/tasks-postgresql.xql 25 Oct 2005 23:06:00 -0000 1.11 @@ -137,8 +137,19 @@ and ppm.party_id = :user_id) $done_clause [template::list::filter_where_clauses -and -name tasks] - [template::list::orderby_clause -name tasks -orderby]) t + [template::list::orderby_clause -name tasks -orderby]) t </querytext> </fullquery> +<fullquery name="get_subprojects"> + <querytext> + select + distinct item_id + from + pm_projectsx + where + parent_id = :project_item_id + </querytext> +</fullquery> + </queryset> 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.26 -r1.27 --- openacs-4/packages/project-manager/lib/tasks.tcl 14 Oct 2005 18:37:29 -0000 1.26 +++ openacs-4/packages/project-manager/lib/tasks.tcl 25 Oct 2005 23:06:00 -0000 1.27 @@ -1,9 +1,10 @@ # Possible # party_id # role_id + set required_param_list [list] set optional_param_list [list orderby searchterm status_id page bulk_p actions_p base_url page_num page_size] -set optional_unset_list [list party_id role_id project_item_id is_observer_p instance_id filter_package_id] +set optional_unset_list [list party_id role_id project_item_id is_observer_p instance_id filter_package_id subproject_tasks] set use_bulk_p [parameter::get -parameter "UseBulkP" -default "0"] @@ -143,6 +144,15 @@ set project_item_clause [pm::project::get_list_of_open -object_package_id $filter_package_id] } +if { [exists_and_not_null subproject_tasks]} { + set subprojects_list [db_list get_subprojects { } ] + lappend subprojects_list $project_item_id + set project_item_where_clause "t.parent_id in ([template::util::tcl_to_sql_list $subprojects_list])" + +} else { + set project_item_where_clause "t.parent_id = :project_item_id" +} + set filters [list \ searchterm [list \ label "[_ project-manager.Search_1]" \ @@ -156,14 +166,14 @@ project_item_id [list \ label "[_ project-manager.Project_1]" \ values { $project_item_clause } \ - where_clause "t.parent_id = :project_item_id" + where_clause "$project_item_where_clause" ] \ instance_id [list \ where_clause "ti.process_instance = :instance_id" ] \ is_observer_p [list \ label "[_ project-manager.Observer]" \ - values { {True t} {False f} } \ + values { {"[_ project-manager.True]" t} { "[_ project-manager.False]" f} } \ where_clause "r.is_observer_p = :is_observer_p" ] \ party_id [list \ @@ -174,7 +184,16 @@ filter_package_id [list \ where_clause "p.object_package_id = :filter_package_id" ] \ - ] + ] + +if { [exists_and_not_null project_item_id] } { + lappend filters subproject_tasks [list \ + label "[_ project-manager.Subproject_tasks]" \ + values {{ "[_ project-manager.Show]" 1}} \ + ] + +} + # Setup the actions, so we can append the rest later on if {$actions_p == 1} { set actions [list "[_ project-manager.Add_task]" [export_vars \ Index: openacs-4/packages/project-manager/www/tasks.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/tasks.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/project-manager/www/tasks.adp 22 Sep 2005 07:40:32 -0000 1.6 +++ openacs-4/packages/project-manager/www/tasks.adp 25 Oct 2005 23:06:00 -0000 1.7 @@ -11,7 +11,7 @@ <table> <tr valign=top> <td> - <include src="/packages/project-manager/lib/tasks" project_item_id="@project_item_id@" status_id="@status_id@" party_id="@party_id@" actions_p="1" fmt=@fmt@ instance_id=@instance_id@ is_observer_p=@is_observer_p@ page_size="@page_size@" page="@page@" page_num="@page_num@" base_url="@base_url@" searchterm="@searchterm@" orderby="@orderby@" role_id="@role_id@" filter_package_id="@filter_package_id@"> + <include src="/packages/project-manager/lib/tasks" project_item_id="@project_item_id@" status_id="@status_id@" party_id="@party_id@" actions_p="1" fmt=@fmt@ instance_id=@instance_id@ is_observer_p=@is_observer_p@ page_size="@page_size@" page="@page@" page_num="@page_num@" base_url="@base_url@" searchterm="@searchterm@" orderby="@orderby@" role_id="@role_id@" filter_package_id="@filter_package_id@" subproject_tasks="@subproject_tasks@"> </td> </tr> </table> Index: openacs-4/packages/project-manager/www/tasks.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/tasks.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/project-manager/www/tasks.tcl 7 Oct 2005 22:56:50 -0000 1.8 +++ openacs-4/packages/project-manager/www/tasks.tcl 25 Oct 2005 23:06:00 -0000 1.9 @@ -33,6 +33,7 @@ {filter_package_id ""} {role_id ""} {base_url ""} + {subproject_tasks ""} } -properties { task_term:onevalue context:onevalue