Index: openacs-4/contrib/packages/portal/sql/postgresql/portal-core-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/sql/postgresql/portal-core-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/contrib/packages/portal/sql/postgresql/portal-core-create.sql 27 Jan 2004 03:33:46 -0000 1.5 +++ openacs-4/contrib/packages/portal/sql/postgresql/portal-core-create.sql 29 Jan 2004 03:50:59 -0000 1.6 @@ -285,6 +285,32 @@ portals one theme for all its contained pages '; +create table portal_datasource_map ( + package_id integer + constraint pdm_package_id_fk + references apm_packages (package_id), + datasource_id integer + constraint pdm_datasource_id_fk + references portal_datasources (datasource_id), + constraint pdm_pk + primary key (package_id, datasource_id) +); + +comment on table portal_datasource_map is ' + Maps datasources to portal instances. This is used by the portal admin UI to track + which datasources have had their applications mounted under the instance''s mount + point. Independent applications like .LRN that use the portal package as a service + do not need to maintain this map. +'; + +comment on column portal_datasource_map.package_id is ' + The package id of the portal instance the datasource is mapped to. +'; + +comment on column portal_datasource_map.datasource_id is ' + The package id of the portal instance the datasource is mapped to. +'; + create table portal_pages ( page_id integer constraint p_pages_page_id_fk Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/tcl/page-procs-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/tcl/page-procs-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/contrib/packages/portal/tcl/page-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/tcl/page-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/portal/tcl/page-procs.tcl 24 Jan 2004 01:22:48 -0000 1.4 +++ openacs-4/contrib/packages/portal/tcl/page-procs.tcl 29 Jan 2004 03:50:59 -0000 1.5 @@ -47,7 +47,7 @@ ad_proc -public delete { {-page_id:required} } { - db_exec_plsql delete_page {} + package_exec_plsql -var_list [list [list page_id $page_id]] portal_page del } ad_proc -public get { Index: openacs-4/contrib/packages/portal/tcl/portal-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/tcl/portal-procs.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/contrib/packages/portal/tcl/portal-procs.tcl 24 Jan 2004 01:22:48 -0000 1.9 +++ openacs-4/contrib/packages/portal/tcl/portal-procs.tcl 29 Jan 2004 03:50:59 -0000 1.10 @@ -218,11 +218,20 @@ ad_proc -public get_render_data { {-portal_id:required} - {-page_num 0} + {-page_num ""} {-render_style individual} } { returns metadata needed to render a portal + + @portal_id The id of the portal you're interested in. + @page_num The page within the portal (defaults to page 0). + @render_style Either "individual" or "all-in-one". + + @return The portal metadata in array get format. } { + if { [string equal $page_num ""] } { + set page_num 0 + } # get the portal and layout db_1row portal_select {} -column_array portal set page_id $portal(page_id) @@ -269,6 +278,8 @@ FIXME REFACTOR ME + DRB: AND MAKE ME A *BLEEPING* PROPER TEMPLATE!!! + @param portal_id @return_url } { Index: openacs-4/contrib/packages/portal/www/admin/portal-show.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/www/admin/portal-show.adp,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/portal/www/admin/portal-show.adp 22 May 2003 15:08:10 -0000 1.2 +++ openacs-4/contrib/packages/portal/www/admin/portal-show.adp 29 Jan 2004 03:50:59 -0000 1.3 @@ -19,4 +19,5 @@ @referer;noquote@ @name;noquote@ -@html;noquote@ +@navbar;noquote@ + Index: openacs-4/contrib/packages/portal/www/admin/portal-show.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/www/admin/portal-show.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/portal/www/admin/portal-show.tcl 25 Oct 2002 21:29:17 -0000 1.1 +++ openacs-4/contrib/packages/portal/www/admin/portal-show.tcl 29 Jan 2004 03:50:59 -0000 1.2 @@ -29,4 +29,8 @@ } set name [portal::get_name -portal_id $portal_id] -set html "[portal::navbar -portal_id $portal_id] [portal::render -portal_id $portal_id -page_num $page_num]" +array set portal [portal::get_render_data -portal_id $portal_id -page_num $page_num] +set navbar [portal::navbar -portal_id $portal_id] + +ad_return_template +