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.8 -r1.9 --- openacs-4/packages/project-manager-portlet/project-manager-portlet.info 15 Sep 2005 15:45:26 -0000 1.8 +++ openacs-4/packages/project-manager-portlet/project-manager-portlet.info 11 Nov 2005 20:25:38 -0000 1.9 @@ -7,16 +7,16 @@ 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/catalog/project-manager-portlet.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager-portlet/catalog/project-manager-portlet.en_US.ISO-8859-1.xml,v diff -u -r1.7 -r1.8 --- openacs-4/packages/project-manager-portlet/catalog/project-manager-portlet.en_US.ISO-8859-1.xml 12 Oct 2005 15:26:15 -0000 1.7 +++ openacs-4/packages/project-manager-portlet/catalog/project-manager-portlet.en_US.ISO-8859-1.xml 11 Nov 2005 20:25:39 -0000 1.8 @@ -1,5 +1,5 @@ - + Administration clear @@ -14,5 +14,6 @@ <a href="/project-manager/task-week-calendar">Project Manager Calendar Portlet </a> <a href="/project-manager">Project Manager Portlet</a> Project Manager Project Calendar Portlet + Projects Portlet <a href="/project-manager/tasks">Project Manager Task Portlet</a> Index: openacs-4/packages/project-manager-portlet/sql/postgresql/project-manager-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager-portlet/sql/postgresql/project-manager-portlet-create.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/project-manager-portlet/sql/postgresql/project-manager-portlet-create.sql 31 Jul 2005 22:24:00 -0000 1.4 +++ openacs-4/packages/project-manager-portlet/sql/postgresql/project-manager-portlet-create.sql 11 Nov 2005 20:25:39 -0000 1.5 @@ -274,3 +274,4 @@ \i project-manager-admin-portlet-create.sql \i project-manager-calendar-portlet-create.sql \i project-manager-project-calendar-portlet.sql +\i project-manager-projects-portlet.sql Index: openacs-4/packages/project-manager-portlet/sql/postgresql/project-manager-projects-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager-portlet/sql/postgresql/project-manager-projects-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager-portlet/sql/postgresql/project-manager-projects-portlet-create.sql 11 Nov 2005 20:25:39 -0000 1.1 @@ -0,0 +1,186 @@ +-- Creates projects portlet + +create function inline_0() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource__new( + ''project_manager_projects_portlet'', + ''Displays the Projects Portlet'' + ); + + + -- the standard 4 params + + -- shadeable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shadeable_p'', + ''t'' +); + + + -- hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' +); + + -- user_editable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''t'' +); + + -- shaded_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' +); + + -- link_hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' +); + + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''f'', + ''scoped_p'', + ''t'' + ); + + + return 0; + +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); + + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + -- create the implementation + foo := acs_sc_impl__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''project_manager_projects_portlet'' + ); + + return 0; + +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); + + + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + + -- add all the hooks + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''GetMyName'', + ''project_manager_projects_portlet::get_my_name'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''GetPrettyName'', + ''project_manager_projects_portlet::get_pretty_name'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''Link'', + ''project_manager_projects_portlet::link'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''AddSelfToPage'', + ''project_manager_projects_portlet::add_self_to_page'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''Show'', + ''project_manager_projects_portlet::show'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''Edit'', + ''project_manager_projects_portlet::edit'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''RemoveSelfFromPage'', + ''project_manager_projects_portlet::remove_self_from_page'', + ''TCL'' + ); + + return 0; + +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); + + + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + + -- Add the binding + perform acs_sc_binding__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'' + ); + + return 0; + +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); \ No newline at end of file Index: openacs-4/packages/project-manager-portlet/sql/postgresql/upgrade/upgrade-0.4d6-0.4d7.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager-portlet/sql/postgresql/upgrade/upgrade-0.4d6-0.4d7.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager-portlet/sql/postgresql/upgrade/upgrade-0.4d6-0.4d7.sql 11 Nov 2005 20:25:39 -0000 1.1 @@ -0,0 +1,186 @@ +-- Creates projects portlet + +create function inline_0() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource__new( + ''project_manager_projects_portlet'', + ''Displays the Projects Portlet'' + ); + + + -- the standard 4 params + + -- shadeable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shadeable_p'', + ''t'' +); + + + -- hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' +); + + -- user_editable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''t'' +); + + -- shaded_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' +); + + -- link_hideable_p + perform portal_datasource__set_def_param ( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' +); + + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''f'', + ''scoped_p'', + ''t'' + ); + + + return 0; + +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); + + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + -- create the implementation + foo := acs_sc_impl__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''project_manager_projects_portlet'' + ); + + return 0; + +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); + + + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + + -- add all the hooks + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''GetMyName'', + ''project_manager_projects_portlet::get_my_name'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''GetPrettyName'', + ''project_manager_projects_portlet::get_pretty_name'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''Link'', + ''project_manager_projects_portlet::link'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''AddSelfToPage'', + ''project_manager_projects_portlet::add_self_to_page'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''Show'', + ''project_manager_projects_portlet::show'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''Edit'', + ''project_manager_projects_portlet::edit'', + ''TCL'' + ); + + foo := acs_sc_impl_alias__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'', + ''RemoveSelfFromPage'', + ''project_manager_projects_portlet::remove_self_from_page'', + ''TCL'' + ); + + return 0; + +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); + + + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + + -- Add the binding + perform acs_sc_binding__new ( + ''portal_datasource'', + ''project_manager_projects_portlet'' + ); + + return 0; + +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); \ No newline at end of file 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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager-portlet/tcl/project-manager-projects-portlet-procs.tcl 11 Nov 2005 20:26:04 -0000 1.1 @@ -0,0 +1,107 @@ +ad_library { + + Procedures to support the Project Manager Projects Portlet + + @author Miguel Marin (miguelmarin@viaro.net) + @author Viaro Networks www.viaro.net + @creation_date 2005-11-11 +} + +namespace eval project_manager_projects_portlet { + + ad_proc -private my_package_key { + } { + return "project-manager-portlet" + } + + ad_proc -private get_my_name { + } { + return "project_manager_projects_portlet" + } + + ad_proc -public get_pretty_name { + } { + return "#project-manager-portlet.Project_Manager_Projects_Portlet#" + } + + ad_proc -public link { + } { + return "" + } + + ad_proc -public add_self_to_page { + {-portal_id:required} + {-package_id:required} + {-project_manager_id:required} + {-page_name ""} + {-pretty_name ""} + {-force_region ""} + {-scoped_p ""} + {-param_action "overwrite"} + + } { + Adds the Project Manager Projects Portlet to the given page. + + @param portal_id The page to add self to + @return element_id The new element's id + } { + + # allow overrides of pretty_name and force_region + if {[empty_string_p $pretty_name]} { + set pretty_name [get_pretty_name] + } + + if {[empty_string_p $force_region]} { + set force_region [parameter::get_from_package_key \ + -package_key [my_package_key] \ + -parameter "force_region" + ] + } + + set extra_params "" + + if {![empty_string_p $scoped_p]} { + set extra_params [list scoped_p $scoped_p] + } + + return [portal::add_element_parameters \ + -portal_id $portal_id \ + -page_name $page_name \ + -portlet_name [get_my_name] \ + -pretty_name $pretty_name \ + -force_region $force_region \ + -value $package_id \ + -key $project_manager_id \ + -param_action $param_action \ + -extra_params $extra_params + ] + } + + ad_proc -public remove_self_from_page { + {-portal_id:required} + {-package_id "0"} + } { + Removes the Project Manager Projects Portlet from the given page. + + @param portal_id The page to remove self from + + } { + portal::remove_element_parameters \ + -portal_id $portal_id \ + -portlet_name [get_my_name] \ + -key package_id \ + -value $package_id + } + + ad_proc -public show { + cf + } { + } { + + portal::show_proc_helper \ + -package_key [my_package_key] \ + -config_list $cf \ + -template_src "project-manager-projects-portlet" + } + +} Index: openacs-4/packages/project-manager-portlet/www/project-manager-projects-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager-portlet/www/project-manager-projects-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager-portlet/www/project-manager-projects-portlet.adp 11 Nov 2005 20:26:04 -0000 1.1 @@ -0,0 +1,8 @@ + + \ No newline at end of file Index: openacs-4/packages/project-manager-portlet/www/project-manager-projects-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager-portlet/www/project-manager-projects-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/project-manager-portlet/www/project-manager-projects-portlet.tcl 11 Nov 2005 20:26:04 -0000 1.1 @@ -0,0 +1,16 @@ +ad_page_contract { + Project Manager Project Portlet + + @author Miguel Marin (miguelmairn@viaro.net) + @author Viaro Netwroks www.viaro.net + @creation-date 2005-11-11 +} { + {format ""} + {show_filters_p "t"} + {ap_orderby ""} + {ped_filter ""} +} + +set user_id [ad_maybe_redirect_for_registration] + +