Index: openacs-4/packages/project-manager-portlet/project-manager-portlet.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager-portlet/project-manager-portlet.info,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/project-manager-portlet/project-manager-portlet.info 11 Nov 2005 20:25:38 -0000 1.9
+++ openacs-4/packages/project-manager-portlet/project-manager-portlet.info 16 Nov 2005 16:43:22 -0000 1.10
@@ -7,15 +7,15 @@
f
f
-
+
Bjoern Kiesbye
Malte Sussdorff
Portlet for the Project Manager.
Cognovis
Portlet for the Project Manager.
0
-
+
Index: openacs-4/packages/project-manager-portlet/tcl/project-manager-projects-portlet-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager-portlet/tcl/project-manager-projects-portlet-procs.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager-portlet/tcl/project-manager-projects-portlet-procs.tcl 11 Nov 2005 20:26:04 -0000 1.1
+++ openacs-4/packages/project-manager-portlet/tcl/project-manager-projects-portlet-procs.tcl 16 Nov 2005 16:43:23 -0000 1.2
@@ -104,4 +104,33 @@
-template_src "project-manager-projects-portlet"
}
+ ad_proc -public add_to_all_portals { } {
+
+ Add the Project Manager Projects Portlet to all portals that have a template_id ( This means that they are
+ a user, club, class or subcommunity portals). Here we use a package_id equal to 0 since we don't
+ care about the pm_instance_id since the portlet doesn't make use of it.
+
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+ @creation-date 2005-11-16
+
+ } {
+
+ # We get all portals
+ set all_portals [db_list get_all_portals {
+ select
+ portal_id
+ from
+ portals
+ where
+ template_id is not null
+ }]
+
+ foreach portal_id $all_portals {
+ project_manager_projects_portlet::add_self_to_page \
+ -portal_id $portal_id \
+ -project_manager_id 0 \
+ -package_id 0
+ }
+ }
}