Index: openacs-4/packages/research-portlet/research-portlet.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/research-portlet.info,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/research-portlet.info 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,49 @@ + + + + + Research Paper Portlet + Research Paper Portlets + f + f + + + + oracle + postgresql + + Yonatan Feldman + OpenForce + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/packages/research-portlet/sql/oracle/research-portlet-admin-sc-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/sql/oracle/research-portlet-admin-sc-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/sql/oracle/research-portlet-admin-sc-create.sql 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,144 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- create the research portlet admin data source +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-07-20 +-- @version $Id: research-portlet-admin-sc-create.sql,v 1.1 2002/07/26 21:10:53 yon Exp $ +-- + +declare + ds_id portal_datasources.datasource_id%TYPE; + foo integer; +begin + + ds_id := portal_datasource.new( + 'research_admin_portlet', + 'Displays the research paper portlet' + ); + + portal_datasource.set_def_param( + ds_id, + 't', + 't', + 'shadeable_p', + 'f' + ); + + portal_datasource.set_def_param( + ds_id, + 't', + 't', + 'shaded_p', + 'f' + ); + + portal_datasource.set_def_param( + ds_id, + 't', + 't', + 'hideable_p', + 't' + ); + + portal_datasource.set_def_param( + ds_id, + 't', + 't', + 'user_editable_p', + 'f' + ); + + portal_datasource.set_def_param( + ds_id, + 't', + 't', + 'link_hideable_p', + 't' + ); + + acs_sc_impl.new( + 'portal_datasource', + 'research_admin_portlet', + 'research_admin_portlet' + ); + + foo := acs_sc_impl.new_alias( + 'portal_datasource', + 'research_admin_portlet', + 'GetMyName', + 'research_admin_portlet::get_my_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias( + 'portal_datasource', + 'research_admin_portlet', + 'GetPrettyName', + 'research_admin_portlet::get_pretty_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias( + 'portal_datasource', + 'research_admin_portlet', + 'Link', + 'research_admin_portlet::link', + 'TCL' + ); + + foo := acs_sc_impl.new_alias( + 'portal_datasource', + 'research_admin_portlet', + 'AddSelfToPage', + 'research_admin_portlet::add_self_to_page', + 'TCL' + ); + + foo := acs_sc_impl.new_alias( + 'portal_datasource', + 'research_admin_portlet', + 'Show', + 'research_admin_portlet::show', + 'TCL' + ); + + foo := acs_sc_impl.new_alias( + 'portal_datasource', + 'research_admin_portlet', + 'Edit', + 'research_admin_portlet::edit', + 'TCL' + ); + + foo := acs_sc_impl.new_alias( + 'portal_datasource', + 'research_admin_portlet', + 'RemoveSelfFromPage', + 'research_admin_portlet::remove_self_from_page', + 'TCL' + ); + + acs_sc_binding.new( + 'portal_datasource', + 'research_admin_portlet' + ); + +end; +/ +show errors Index: openacs-4/packages/research-portlet/sql/oracle/research-portlet-admin-sc-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/sql/oracle/research-portlet-admin-sc-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/sql/oracle/research-portlet-admin-sc-drop.sql 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,93 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- drop the research admin portlet data source +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-07-20 +-- @version $Id: research-portlet-admin-sc-drop.sql,v 1.1 2002/07/26 21:10:53 yon Exp $ +-- + +declare + ds_id portal_datasources.datasource_id%TYPE; + foo integer; +begin + + select datasource_id + into ds_id + from portal_datasources + where name = 'research_admin_portlet'; + + if ds_id is not null then + portal_datasource.delete(ds_id); + end if; + + foo := acs_sc_impl.delete_alias( + 'portal_datasource', + 'research_admin_portlet', + 'GetMyName' + ); + + foo := acs_sc_impl.delete_alias( + 'portal_datasource', + 'research_admin_portlet', + 'GetPrettyName' + ); + + foo := acs_sc_impl.delete_alias( + 'portal_datasource', + 'research_admin_portlet', + 'Link' + ); + + foo := acs_sc_impl.delete_alias( + 'portal_datasource', + 'research_admin_portlet', + 'AddSelfToPage' + ); + + foo := acs_sc_impl.delete_alias( + 'portal_datasource', + 'research_admin_portlet', + 'Show' + ); + + foo := acs_sc_impl.delete_alias( + 'portal_datasource', + 'research_admin_portlet', + 'Edit' + ); + + foo := acs_sc_impl.delete_alias( + 'portal_datasource', + 'research_admin_portlet', + 'RemoveSelfFromPage' + ); + + acs_sc_binding.delete( + 'portal_datasource', + 'research_admin_portlet' + ); + + acs_sc_impl.delete( + 'portal_datasource', + 'research_admin_portlet' + ); + +end; +/ +show errors Index: openacs-4/packages/research-portlet/sql/oracle/research-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/sql/oracle/research-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/sql/oracle/research-portlet-create.sql 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,26 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- create the research portlet +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-07-20 +-- @version $Id: research-portlet-create.sql,v 1.1 2002/07/26 21:10:53 yon Exp $ +-- + +@@ research-portlet-sc-create.sql +@@ research-portlet-admin-sc-create.sql Index: openacs-4/packages/research-portlet/sql/oracle/research-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/sql/oracle/research-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/sql/oracle/research-portlet-drop.sql 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,26 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- drop the research portlet +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-07-20 +-- @version $Id: research-portlet-drop.sql,v 1.1 2002/07/26 21:10:53 yon Exp $ +-- + +@@ research-portlet-admin-sc-drop.sql +@@ research-portlet-sc-drop.sql Index: openacs-4/packages/research-portlet/sql/oracle/research-portlet-sc-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/sql/oracle/research-portlet-sc-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/sql/oracle/research-portlet-sc-create.sql 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,152 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- create the research portlet data source +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-07-20 +-- @version $Id: research-portlet-sc-create.sql,v 1.1 2002/07/26 21:10:53 yon Exp $ +-- + +declare + ds_id portal_datasources.datasource_id%TYPE; + foo integer; +begin + + ds_id := portal_datasource.new( + 'research_portlet', + 'Displays the research paper portlet' + ); + + portal_datasource.set_def_param( + ds_id, + 't', + 't', + 'shadeable_p', + 't' + ); + + portal_datasource.set_def_param( + ds_id, + 't', + 't', + 'shaded_p', + 'f' + ); + + portal_datasource.set_def_param( + ds_id, + 't', + 't', + 'hideable_p', + 't' + ); + + portal_datasource.set_def_param( + ds_id, + 't', + 't', + 'user_editable_p', + 'f' + ); + + portal_datasource.set_def_param( + ds_id, + 't', + 't', + 'link_hideable_p', + 't' + ); + + portal_datasource.set_def_param( + ds_id, + 't', + 'f', + 'package_id', + '' + ); + + acs_sc_impl.new( + 'portal_datasource', + 'research_portlet', + 'research_portlet' + ); + + foo := acs_sc_impl.new_alias( + 'portal_datasource', + 'research_portlet', + 'GetMyName', + 'research_portlet::get_my_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias( + 'portal_datasource', + 'research_portlet', + 'GetPrettyName', + 'research_portlet::get_pretty_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias( + 'portal_datasource', + 'research_portlet', + 'Link', + 'research_portlet::link', + 'TCL' + ); + + foo := acs_sc_impl.new_alias( + 'portal_datasource', + 'research_portlet', + 'AddSelfToPage', + 'research_portlet::add_self_to_page', + 'TCL' + ); + + foo := acs_sc_impl.new_alias( + 'portal_datasource', + 'research_portlet', + 'Show', + 'research_portlet::show', + 'TCL' + ); + + foo := acs_sc_impl.new_alias( + 'portal_datasource', + 'research_portlet', + 'Edit', + 'research_portlet::edit', + 'TCL' + ); + + foo := acs_sc_impl.new_alias( + 'portal_datasource', + 'research_portlet', + 'RemoveSelfFromPage', + 'research_portlet::remove_self_from_page', + 'TCL' + ); + + acs_sc_binding.new( + 'portal_datasource', + 'research_portlet' + ); + +end; +/ +show errors Index: openacs-4/packages/research-portlet/sql/oracle/research-portlet-sc-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/sql/oracle/research-portlet-sc-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/sql/oracle/research-portlet-sc-drop.sql 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,93 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- drop the research portlet data source +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-07-20 +-- @version $Id: research-portlet-sc-drop.sql,v 1.1 2002/07/26 21:10:53 yon Exp $ +-- + +declare + ds_id portal_datasources.datasource_id%TYPE; + foo integer; +begin + + select datasource_id + into ds_id + from portal_datasources + where name = 'research_portlet'; + + if ds_id is not null then + portal_datasource.delete(ds_id); + end if; + + foo := acs_sc_impl.delete_alias( + 'portal_datasource', + 'research_portlet', + 'GetMyName' + ); + + foo := acs_sc_impl.delete_alias( + 'portal_datasource', + 'research_portlet', + 'GetPrettyName' + ); + + foo := acs_sc_impl.delete_alias( + 'portal_datasource', + 'research_portlet', + 'Link' + ); + + foo := acs_sc_impl.delete_alias( + 'portal_datasource', + 'research_portlet', + 'AddSelfToPage' + ); + + foo := acs_sc_impl.delete_alias( + 'portal_datasource', + 'research_portlet', + 'Show' + ); + + foo := acs_sc_impl.delete_alias( + 'portal_datasource', + 'research_portlet', + 'Edit' + ); + + foo := acs_sc_impl.delete_alias( + 'portal_datasource', + 'research_portlet', + 'RemoveSelfFromPage' + ); + + acs_sc_binding.delete( + 'portal_datasource', + 'research_portlet' + ); + + acs_sc_impl.delete( + 'portal_datasource', + 'research_portlet' + ); + +end; +/ +show errors Index: openacs-4/packages/research-portlet/sql/postgresql/research-portlet-admin-sc-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/sql/postgresql/research-portlet-admin-sc-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/sql/postgresql/research-portlet-admin-sc-create.sql 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,148 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- create the research portlet admin data source +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-07-20 +-- @version $Id: research-portlet-admin-sc-create.sql,v 1.1 2002/07/26 21:10:53 yon Exp $ +-- + +create function inline_0() returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + ds_id := portal_datasource__new( + ''research_admin_portlet'', + ''Displays the research paper portlet'' + ); + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''shadeable_p'', + ''f'' + ); + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' + ); + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' + ); + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' + ); + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' + ); + + perform acs_sc_impl__new( + ''portal_datasource'', + ''research_admin_portlet'', + ''research_admin_portlet'' + ); + + perform acs_sc_impl_alias__new( + ''portal_datasource'', + ''research_admin_portlet'', + ''GetMyName'', + ''research_admin_portlet::get_my_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new( + ''portal_datasource'', + ''research_admin_portlet'', + ''GetPrettyName'', + ''research_admin_portlet::get_pretty_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new( + ''portal_datasource'', + ''research_admin_portlet'', + ''Link'', + ''research_admin_portlet::link'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new( + ''portal_datasource'', + ''research_admin_portlet'', + ''AddSelfToPage'', + ''research_admin_portlet::add_self_to_page'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new( + ''portal_datasource'', + ''research_admin_portlet'', + ''Show'', + ''research_admin_portlet::show'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new( + ''portal_datasource'', + ''research_admin_portlet'', + ''Edit'', + ''research_admin_portlet::edit'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new( + ''portal_datasource'', + ''research_admin_portlet'', + ''RemoveSelfFromPage'', + ''research_admin_portlet::remove_self_from_page'', + ''TCL'' + ); + + perform acs_sc_binding__new( + ''portal_datasource'', + ''research_admin_portlet'' + ); + + return 0; + +end; +' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); Index: openacs-4/packages/research-portlet/sql/postgresql/research-portlet-admin-sc-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/sql/postgresql/research-portlet-admin-sc-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/sql/postgresql/research-portlet-admin-sc-drop.sql 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,97 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- drop the research admin portlet data source +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-07-20 +-- @version $Id: research-portlet-admin-sc-drop.sql,v 1.1 2002/07/26 21:10:53 yon Exp $ +-- + +create function inline_0() returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + select datasource_id + into ds_id + from portal_datasources + where name = ''research_admin_portlet''; + + if ds_id is not null then + perform portal_datasource__delete(ds_id); + end if; + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''research_admin_portlet'', + ''GetMyName'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''research_admin_portlet'', + ''GetPrettyName'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''research_admin_portlet'', + ''Link'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''research_admin_portlet'', + ''AddSelfToPage'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''research_admin_portlet'', + ''Show'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''research_admin_portlet'', + ''Edit'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''research_admin_portlet'', + ''RemoveSelfFromPage'' + ); + + perform acs_sc_binding__delete ( + ''portal_datasource'', + ''research_admin_portlet'' + ); + + perform acs_sc_impl__delete ( + ''portal_datasource'', + ''research_admin_portlet'' + ); + + return 0; + +end; +' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); Index: openacs-4/packages/research-portlet/sql/postgresql/research-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/sql/postgresql/research-portlet-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/sql/postgresql/research-portlet-create.sql 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,26 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- create the research portlet +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-07-20 +-- @version $Id: research-portlet-create.sql,v 1.1 2002/07/26 21:10:53 yon Exp $ +-- + +\i research-portlet-sc-create.sql +\i research-portlet-admin-sc-create.sql Index: openacs-4/packages/research-portlet/sql/postgresql/research-portlet-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/sql/postgresql/research-portlet-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/sql/postgresql/research-portlet-drop.sql 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,26 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- drop the research portlet +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-07-20 +-- @version $Id: research-portlet-drop.sql,v 1.1 2002/07/26 21:10:53 yon Exp $ +-- + +\i research-portlet-admin-sc-drop.sql +\i research-portlet-sc-drop.sql Index: openacs-4/packages/research-portlet/sql/postgresql/research-portlet-sc-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/sql/postgresql/research-portlet-sc-create.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/sql/postgresql/research-portlet-sc-create.sql 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,156 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- create the research portlet data source +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-07-20 +-- @version $Id: research-portlet-sc-create.sql,v 1.1 2002/07/26 21:10:53 yon Exp $ +-- + +create function inline_0() returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + ds_id := portal_datasource__new( + ''research_portlet'', + ''Displays the research paper portlet'' + ); + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''shadeable_p'', + ''t'' + ); + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''shaded_p'', + ''f'' + ); + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''hideable_p'', + ''t'' + ); + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''user_editable_p'', + ''f'' + ); + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''t'', + ''link_hideable_p'', + ''t'' + ); + + perform portal_datasource__set_def_param( + ds_id, + ''t'', + ''f'', + ''package_id'', + '''' + ); + + perform acs_sc_impl__new( + ''portal_datasource'', + ''research_portlet'', + ''research_portlet'' + ); + + perform acs_sc_impl_alias__new( + ''portal_datasource'', + ''research_portlet'', + ''GetMyName'', + ''research_portlet::get_my_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new( + ''portal_datasource'', + ''research_portlet'', + ''GetPrettyName'', + ''research_portlet::get_pretty_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new( + ''portal_datasource'', + ''research_portlet'', + ''Link'', + ''research_portlet::link'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new( + ''portal_datasource'', + ''research_portlet'', + ''AddSelfToPage'', + ''research_portlet::add_self_to_page'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new( + ''portal_datasource'', + ''research_portlet'', + ''Show'', + ''research_portlet::show'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new( + ''portal_datasource'', + ''research_portlet'', + ''Edit'', + ''research_portlet::edit'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new( + ''portal_datasource'', + ''research_portlet'', + ''RemoveSelfFromPage'', + ''research_portlet::remove_self_from_page'', + ''TCL'' + ); + + perform acs_sc_binding__new( + ''portal_datasource'', + ''research_portlet'' + ); + + return 0; + +end; +' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); Index: openacs-4/packages/research-portlet/sql/postgresql/research-portlet-sc-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/sql/postgresql/research-portlet-sc-drop.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/sql/postgresql/research-portlet-sc-drop.sql 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,97 @@ +-- +-- Copyright (C) 2001, 2002 OpenForce, Inc. +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- drop the research portlet data source +-- +-- @author yon (yon@openforce.net) +-- @creation-date 2002-07-20 +-- @version $Id: research-portlet-sc-drop.sql,v 1.1 2002/07/26 21:10:53 yon Exp $ +-- + +create function inline_0() returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + + select datasource_id + into ds_id + from portal_datasources + where name = ''research_portlet''; + + if ds_id is not null then + perform portal_datasource__delete(ds_id); + end if; + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''research_portlet'', + ''GetMyName'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''research_portlet'', + ''GetPrettyName'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''research_portlet'', + ''Link'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''research_portlet'', + ''AddSelfToPage'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''research_portlet'', + ''Show'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''research_portlet'', + ''Edit'' + ); + + perform acs_sc_impl_alias__delete ( + ''portal_datasource'', + ''research_portlet'', + ''RemoveSelfFromPage'' + ); + + perform acs_sc_binding__delete ( + ''portal_datasource'', + ''research_portlet'' + ); + + perform acs_sc_impl__delete ( + ''portal_datasource'', + ''research_portlet'' + ); + + return 0; + +end; +' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); Index: openacs-4/packages/research-portlet/tcl/research-admin-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/tcl/research-admin-portlet-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/tcl/research-admin-portlet-procs.tcl 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,78 @@ +# +# Copyright (C) 2001, 2002 OpenForce, Inc. +# +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + +ad_library { + + procedures to support the research admin portlet + + @author yon (yon@openforce.net) + @creation-date 2002-07-20 + @version $Id: research-admin-portlet-procs.tcl,v 1.1 2002/07/26 21:10:53 yon Exp $ + +} + +namespace eval research_admin_portlet { + + ad_proc -private get_my_name { + } { + return research_admin_portlet + } + + ad_proc -public get_pretty_name { + } { + return "Research Paper Administration" + } + + ad_proc -private my_package_key { + } { + return "research-portlet" + } + + ad_proc -public link { + } { + return "" + } + + ad_proc -public add_self_to_page { + {-portal_id:required} + } { + return [portal::add_element_parameters \ + -portal_id $portal_id \ + -portlet_name [get_my_name] \ + -pretty_name [get_pretty_name] \ + -key fake_key \ + -value fake_value \ + ] + } + + ad_proc -public remove_self_from_page { + {-portal_id:required} + } { + portal::remove_element \ + -portal_id $portal_id \ + -portlet_name [get_my_name] + } + + ad_proc -public show { + cf + } { + portal::show_proc_helper \ + -package_key [my_package_key] \ + -config_list $cf \ + -template_src "research-admin-portlet" + } + +} Index: openacs-4/packages/research-portlet/tcl/research-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/tcl/research-portlet-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/tcl/research-portlet-procs.tcl 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,78 @@ +# +# Copyright (C) 2001, 2002 OpenForce, Inc. +# +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + +ad_library { + + Procedures to support the research portlet + + @author yon (yon@openforce.net) + @creation-date 2002-07-20 + @version $Id: research-portlet-procs.tcl,v 1.1 2002/07/26 21:10:53 yon Exp $ + +} + +namespace eval research_portlet { + + ad_proc -private get_my_name { + } { + return research_portlet + } + + ad_proc -public get_pretty_name { + } { + return "Research Papers" + } + + ad_proc -private my_package_key { + } { + return "research-portlet" + } + + ad_proc -public link { + } { + return "" + } + + ad_proc -public add_self_to_page { + {-portal_id:required} + } { + return [portal::add_element_parameters \ + -portal_id $portal_id \ + -portlet_name [get_my_name] \ + -pretty_name [get_pretty_name] \ + -key fake_key \ + -value fake_value \ + ] + } + + ad_proc -public remove_self_from_page { + {-portal_id:required} + } { + portal::remove_element \ + -portal_id $portal_id \ + -portlet_name [get_my_name] + } + + ad_proc -public show { + cf + } { + portal::show_proc_helper \ + -package_key [my_package_key] \ + -config_list $cf \ + -template_src "research-portlet" + } + +} Index: openacs-4/packages/research-portlet/www/research-admin-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/www/research-admin-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/www/research-admin-portlet.adp 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,29 @@ +<% + + # + # Copyright (C) 2001, 2002 OpenForce, Inc. + # + # This file is part of dotLRN. + # + # dotLRN is free software; you can redistribute it and/or modify it under the + # terms of the GNU General Public License as published by the Free Software + # Foundation; either version 2 of the License, or (at your option) any later + # version. + # + # dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY + # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + # details. + # + +%> + + Index: openacs-4/packages/research-portlet/www/research-admin-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/www/research-admin-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/www/research-admin-portlet.tcl 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,26 @@ +# +# Copyright (C) 2001, 2002 OpenForce, Inc. +# +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + +set community_id [dotlrn_community::get_community_id] + +set attachments [attachments::get_attachments -object_id [dotlrn_community::get_community_id]] +set add_attachment_url "[dotlrn::get_url]/" +append add_attachment_url [attachments::add_attachment_url \ + -object_id $community_id \ + -pretty_name [dotlrn_community::get_community_name $community_id] \ + -folder_id [dotlrn_fs::get_user_root_folder -user_id [ad_conn user_id]] \ + -return_url "[ad_conn url]?[ad_conn query]" \ +] Index: openacs-4/packages/research-portlet/www/research-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/www/research-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/www/research-portlet.adp 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,40 @@ +<% + + # + # Copyright (C) 2001, 2002 OpenForce, Inc. + # + # This file is part of dotLRN. + # + # dotLRN is free software; you can redistribute it and/or modify it under the + # terms of the GNU General Public License as published by the Free Software + # Foundation; either version 2 of the License, or (at your option) any later + # version. + # + # dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY + # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + # details. + # + +%> + + + + +Research Papers: + + + + +No Research Papers + + + +   + Index: openacs-4/packages/research-portlet/www/research-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/research-portlet/www/research-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/research-portlet/www/research-portlet.tcl 26 Jul 2002 21:10:53 -0000 1.1 @@ -0,0 +1,22 @@ +# +# Copyright (C) 2001, 2002 OpenForce, Inc. +# +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + +array set config $cf + +set shaded_p $config(shaded_p) + +set attachments [attachments::get_attachments -object_id [dotlrn_community::get_community_id]] +set n_attachments [llength $attachments]