Index: openacs-4/packages/project-manager-portlet/lib/projects-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager-portlet/lib/projects-postgresql.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager-portlet/lib/projects-postgresql.xql 12 Aug 2005 22:31:21 -0000 1.1
+++ openacs-4/packages/project-manager-portlet/lib/projects-postgresql.xql 15 Aug 2005 09:21:01 -0000 1.2
@@ -26,7 +26,7 @@
to_char(p.latest_finish_date, 'YYYY-MM-DD HH24:MI:SS') as latest_finish_date,
case when o.name is null then '--no customer--' else o.name
end as customer_name,
- o.organization_id as customer_id
+ o.organization_id as customer_id, f.package_id
FROM pm_projectsx p
LEFT JOIN pm_project_assignment pa
ON p.item_id = pa.project_id
@@ -51,12 +51,13 @@
WHERE
p.project_id = i.live_revision
and i.parent_id = f.folder_id
- and f.package_id = :package_id
+ and f.package_id in ($package_ids)
and exists (select 1 from acs_object_party_privilege_map ppm
where ppm.object_id = p.project_id
and ppm.privilege = 'read'
and ppm.party_id = :user_id)
- [template::list::filter_where_clauses -and -name "projects_${package_id}"]
+ [template::list::filter_where_clauses -and -name "projects"]
+ order by planned_end_date desc
Index: openacs-4/packages/project-manager-portlet/lib/projects.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager-portlet/lib/projects.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager-portlet/lib/projects.tcl 12 Aug 2005 22:31:21 -0000 1.1
+++ openacs-4/packages/project-manager-portlet/lib/projects.tcl 15 Aug 2005 09:21:01 -0000 1.2
@@ -15,6 +15,7 @@
}
}
+set package_ids [join $package_id ","]
foreach optional_param $optional_param_list {
if {![info exists $optional_param]} {
set $optional_param {}
@@ -41,34 +42,6 @@
template::multirow create pm_packages "list_id" "contact_column" "community_name"
set c_row 0
-
-
-foreach package_id $_package_id {
-
-
-set _base_url [site_node::get_url_from_object_id -object_id $package_id]
-
-if {![empty_string_p $_base_url]} {
-
- set base_url $_base_url
-}
-
-set community_id [dotlrn_community::get_community_id_from_url \
- -url $base_url \
- ]
-
-if {![empty_string_p $community_id]} {
-
- set community_name [dotlrn_community::get_community_name $community_id]
-
- set portal_info_name "Project: $community_name"
- set portal_info_url [lindex $base_url 0]
-
-}
-
-
-
-
set exporting_vars { status_id category_id assignee_id format }
set hidden_vars [export_vars -form $exporting_vars]
@@ -78,10 +51,6 @@
# the unique identifier for this package
set user_id [ad_maybe_redirect_for_registration]
-
-# root CR folder
-set root_folder [pm::util::get_root_folder -package_id $package_id]
-
# Projects, using list-builder ---------------------------------
# Set status
@@ -106,11 +75,6 @@
}
}
-set category_select [pm::util::category_selects \
- -export_vars $export_vars \
- -category_id $temp_category_id \
- -package_id $package_id \
- ]
set assignees_filter [pm::project::assignee_filter_select -status_id $status_id]
@@ -152,32 +116,33 @@
# Get url of the contacts package if it has been mounted for the links on the index page.
set contacts_url [util_memoize [list site_node::get_package_url -package_key contacts]]
if {[empty_string_p $contacts_url]} {
- set contact_column "@projects_${package_id}.customer_name@"
+ set contact_column "@projects.customer_name@"
} else {
- set contact_column "@projects_${package_id}.customer_name@"
+ set contact_column "@projects.customer_name@"
}
# Store project names and all other project individuel data
set contact_coloum "fff"
-template::multirow append pm_packages "projects_${package_id}" "$contact_column"
+template::multirow append pm_packages "projects" "$contact_column"
-ns_log notice "projects = projects_${package_id} c_row=$c_row\n [template::multirow get pm_packages 1 list_id] , [template::multirow columns pm_packages] , [template::multirow size pm_packages]"
+ns_log notice "projects = projects c_row=$c_row\n [template::multirow get pm_packages 1 list_id] , [template::multirow columns pm_packages] , [template::multirow size pm_packages]"
incr c_row
# Get the rows to display
-set row_list "checkbox {}\nproject_name {}\n"
-foreach element $elements {
- append row_list "$element {}\n"
-}
-
if {$bulk_p == 1} {
+ set row_list "checkbox {}\nproject_name {}\n"
set bulk_actions [list "[_ project-manager.Close]" "@{base_url}/bulk-close" "[_ project-manager.Close_project]" ]
} else {
+ set row_list "project_name {}\n"
set bulk_actions [list]
}
+foreach element $elements {
+ append row_list "$element {}\n"
+}
+
if {$actions_p == 1} {
if {[info exists portal_info_name]} {
@@ -195,8 +160,8 @@
}
template::list::create \
- -name "projects_${package_id}" \
- -multirow projects_${package_id} \
+ -name "projects" \
+ -multirow projects \
-selected_format $format \
-key project_item_id \
-elements {
@@ -208,27 +173,27 @@
customer_name {
label "[_ project-manager.Customer]"
display_template "
-$contact_column@projects_${package_id}.customer_name@
+$contact_column@projects.customer_name@
"
}
earliest_finish_date {
label "[_ project-manager.Earliest_finish]"
- display_template "@projects_${package_id}.earliest_finish_date@@projects_${package_id}.earliest_finish_date@"
+ display_template "@projects.earliest_finish_date@@projects.earliest_finish_date@"
}
latest_finish_date {
label "[_ project-manager.Latest_Finish]"
- display_template "@projects_${package_id}.latest_finish_date@@projects_${package_id}.latest_finish_date@"
+ display_template "@projects.latest_finish_date@@projects.latest_finish_date@"
}
actual_hours_completed {
label "[_ project-manager.Hours_completed]"
- display_template "@projects_${package_id}.actual_hours_completed@/@projects_${package_id}.estimated_hours_total@"
+ display_template "@projects.actual_hours_completed@/@projects.estimated_hours_total@"
}
category_id {
display_template ""
}
status_id {
label "[_ project-manager.Status_1]"
- display_template "#project-manager.Closed##project-manager.Open#"
+ display_template "#project-manager.Closed##project-manager.Open#"
}
planned_end_date {
label "[_ project-manager.Planned_end_date]"
@@ -280,15 +245,31 @@
width 100%
}
-db_multirow -extend { item_url } "projects_${package_id}" project_folders {
+db_multirow -extend { item_url } "projects" project_folders {
} {
set earliest_finish_date [lc_time_fmt $earliest_finish_date $fmt]
set latest_finish_date [lc_time_fmt $latest_finish_date $fmt]
set item_url [export_vars -base "${base_url}one" {project_item_id}]
-}
+ set _base_url [site_node::get_url_from_object_id -object_id $package_id]
+
+ if {![empty_string_p $_base_url]} {
+ set base_url $_base_url
+ }
+ # root CR folder
+ #set root_folder [pm::util::get_root_folder -package_id $package_id]
+ set community_id [dotlrn_community::get_community_id_from_url \
+ -url $base_url \
+ ]
+ if {![empty_string_p $community_id]} {
+
+ set community_name [dotlrn_community::get_community_name $community_id]
+
+ set portal_info_name "Project: $community_name"
+ set portal_info_url [lindex $base_url 0]
+
+ }
-
}
Index: openacs-4/packages/project-manager-portlet/www/project-manager-portlet.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager-portlet/www/project-manager-portlet.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/project-manager-portlet/www/project-manager-portlet.adp 12 Aug 2005 22:32:34 -0000 1.4
+++ openacs-4/packages/project-manager-portlet/www/project-manager-portlet.adp 15 Aug 2005 09:21:01 -0000 1.5
@@ -23,4 +23,4 @@
-
+