Index: openacs-4/contrib/packages/portal/portal.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/portal.info,v diff -u -N -r1.11 -r1.12 --- openacs-4/contrib/packages/portal/portal.info 19 Mar 2004 00:41:21 -0000 1.11 +++ openacs-4/contrib/packages/portal/portal.info 24 Mar 2004 00:03:36 -0000 1.12 @@ -32,6 +32,7 @@ + Index: openacs-4/contrib/packages/portal/lib/configure-help.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/configure-help.adp,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/packages/portal/lib/configure-help.adp 12 Mar 2004 04:54:03 -0000 1.1 +++ openacs-4/contrib/packages/portal/lib/configure-help.adp 24 Mar 2004 00:03:36 -0000 1.2 @@ -1,13 +1,14 @@

This wizard will take you through the steps necessary to configure the portal package. Before configuring you should:

    -
  • Install the applications and portal datasource packages that you want to make available. The wizard will mount the applications your choose and make their portlets available. +
  • Install the applications and portal datasource packages that you want to make available. The wizard will mount the applications you choose and make their portlets available.
  • Decide whether or not individual users should have their own private portal pages, or whether you want to configure one portal configuration to be shared by all visitors. Creating individual private portal pages is more flexible but also consumes more system resources.
  • Decide whether or not visitors should be able to "hide" or "shade" (shrink) portlets (only possible if you decide to give each user their own custom portal). +
  • Decide the navigation style you wish this portlet and subsite to use.
  • Decide whether or not you want the parent subsite to display a portal page rather than its standard index page.
Index: openacs-4/contrib/packages/portal/lib/configure-subsite-integration.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/configure-subsite-integration.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/contrib/packages/portal/lib/configure-subsite-integration.tcl 19 Mar 2004 00:41:22 -0000 1.2 +++ openacs-4/contrib/packages/portal/lib/configure-subsite-integration.tcl 24 Mar 2004 00:03:36 -0000 1.3 @@ -19,6 +19,11 @@ {values {1}} {label "Should the parent subsite serve the portal package as its index page?"} } + {show_single_button_navbar_p:boolean(radio) + {options {{Yes 1} {No 0}}} + {values {0}} + {label "Should we show the navigation tabs when there's only one of them?"} + } } -on_submit { switch $template_style { @@ -75,6 +80,12 @@ -package_id [ad_conn subsite_id] \ -value [ad_conn package_url] } + + parameter::set_value \ + -parameter ShowSingleButtonNavbar \ + -package_id [ad_conn package_id] \ + -value $show_single_button_navbar_p + template::wizard::forward } Index: openacs-4/contrib/packages/portal/lib/plain-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/plain-master.adp,v diff -u -N -r1.3 -r1.4 --- openacs-4/contrib/packages/portal/lib/plain-master.adp 19 Mar 2004 00:41:22 -0000 1.3 +++ openacs-4/contrib/packages/portal/lib/plain-master.adp 24 Mar 2004 00:03:36 -0000 1.4 @@ -11,31 +11,33 @@ -
-
-
- - + +
+
+
+ + +
+ @portal_pages.name@ +
+
+ + + +
+
- @portal_pages.name@ + @application@
- - - - - -
- @application@ -
-
+
-
-
+
+ Index: openacs-4/contrib/packages/portal/lib/plain-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/plain-master.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/contrib/packages/portal/lib/plain-master.tcl 18 Mar 2004 00:31:32 -0000 1.2 +++ openacs-4/contrib/packages/portal/lib/plain-master.tcl 24 Mar 2004 00:03:36 -0000 1.3 @@ -13,6 +13,10 @@ -package_key portal \ -include_self] +set show_single_button_navbar_p [parameter::get \ + -package_id $package_id \ + -parameter ShowSingleButtonNavbar] + if { ![string equal $package_id ""] } { set user_portal_id [portal::get_user_portal_id -package_id $package_id] Index: openacs-4/contrib/packages/portal/lib/undecorated-element.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/undecorated-element.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/undecorated-element.adp 24 Mar 2004 00:03:36 -0000 1.1 @@ -0,0 +1,7 @@ + + + + +
+ +
Index: openacs-4/contrib/packages/portal/lib/layouts/left-right-sidebar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/left-right-sidebar.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/layouts/left-right-sidebar.adp 24 Mar 2004 00:03:36 -0000 1.1 @@ -0,0 +1,57 @@ +<% + + # + # Copyright (C) 2001, 2002 MIT + # + # 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/contrib/packages/portal/lib/layouts/left-right-sidebar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/left-right-sidebar.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/layouts/left-right-sidebar.tcl 24 Mar 2004 00:03:36 -0000 1.1 @@ -0,0 +1,30 @@ +# +# Copyright (C) 2001, 2002 MIT +# +# 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_page_contract { + + This template handles all even-width decorated column layouts. + + @version $Id: left-right-sidebar.tcl,v 1.1 2004/03/24 00:03:36 donb Exp $ + +} -properties { + element_list:onevalue + element_src:onevalue +} + +array set element_list $page(element_list) + +ad_return_template Index: openacs-4/contrib/packages/portal/lib/layouts/left-sidebar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/left-sidebar.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/layouts/left-sidebar.adp 24 Mar 2004 00:03:36 -0000 1.1 @@ -0,0 +1,46 @@ +<% + + # + # Copyright (C) 2001, 2002 MIT + # + # 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/contrib/packages/portal/lib/layouts/left-sidebar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/left-sidebar.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/layouts/left-sidebar.tcl 24 Mar 2004 00:03:36 -0000 1.1 @@ -0,0 +1,30 @@ +# +# Copyright (C) 2001, 2002 MIT +# +# 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_page_contract { + + This template handles all even-width decorated column layouts. + + @version $Id: left-sidebar.tcl,v 1.1 2004/03/24 00:03:36 donb Exp $ + +} -properties { + element_list:onevalue + element_src:onevalue +} + +array set element_list $page(element_list) + +ad_return_template Index: openacs-4/contrib/packages/portal/lib/layouts/right-sidebar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/right-sidebar.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/layouts/right-sidebar.adp 24 Mar 2004 00:03:36 -0000 1.1 @@ -0,0 +1,46 @@ +<% + + # + # Copyright (C) 2001, 2002 MIT + # + # 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/contrib/packages/portal/lib/layouts/right-sidebar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/right-sidebar.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/layouts/right-sidebar.tcl 24 Mar 2004 00:03:36 -0000 1.1 @@ -0,0 +1,30 @@ +# +# Copyright (C) 2001, 2002 MIT +# +# 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_page_contract { + + This template handles all even-width decorated column layouts. + + @version $Id: right-sidebar.tcl,v 1.1 2004/03/24 00:03:36 donb Exp $ + +} -properties { + element_list:onevalue + element_src:onevalue +} + +array set element_list $page(element_list) + +ad_return_template Index: openacs-4/contrib/packages/portal/lib/layouts/simple.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/simple.adp,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/packages/portal/lib/layouts/simple.adp 22 Mar 2004 17:33:33 -0000 1.1 +++ openacs-4/contrib/packages/portal/lib/layouts/simple.adp 24 Mar 2004 00:03:36 -0000 1.2 @@ -26,6 +26,7 @@
Index: openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.tcl 22 Mar 2004 01:57:37 -0000 1.2 +++ openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.tcl 24 Mar 2004 00:03:37 -0000 1.3 @@ -25,4 +25,7 @@ } -array set element [portal::element::get_render_data -element_id $element_id -edit_p $edit_p] +array set element [portal::element::get_render_data \ + -element_id $element_id \ + -decorate_p $decorate_p \ + -edit_p $edit_p] Index: openacs-4/contrib/packages/portal/lib/themes/nada-theme.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/themes/nada-theme.adp,v diff -u -N -r1.2 -r1.3 --- openacs-4/contrib/packages/portal/lib/themes/nada-theme.adp 16 Mar 2004 01:10:13 -0000 1.2 +++ openacs-4/contrib/packages/portal/lib/themes/nada-theme.adp 24 Mar 2004 00:03:37 -0000 1.3 @@ -19,9 +19,6 @@ %> - - - Index: openacs-4/contrib/packages/portal/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/tcl/apm-callback-procs.tcl,v diff -u -N -r1.11 -r1.12 --- openacs-4/contrib/packages/portal/tcl/apm-callback-procs.tcl 23 Mar 2004 03:04:09 -0000 1.11 +++ openacs-4/contrib/packages/portal/tcl/apm-callback-procs.tcl 24 Mar 2004 00:03:37 -0000 1.12 @@ -76,6 +76,62 @@ [list region 3]] package_exec_plsql -var_list $var_list portal_layout add_region + set var_list { + {name left_sidebar} + {description "Left sidebar"} + {filename /packages/portal/lib/layouts/left-sidebar} + } + set layout_id [package_instantiate_object -var_list $var_list portal_layout] + + set var_list [list \ + [list layout_id $layout_id] \ + [list region 1]] + package_exec_plsql -var_list $var_list portal_layout add_region + + set var_list [list \ + [list layout_id $layout_id] \ + [list region 2]] + package_exec_plsql -var_list $var_list portal_layout add_region + + set var_list { + {name right_sidebar} + {description "Right sidebar"} + {filename /packages/portal/lib/layouts/right-sidebar} + } + set layout_id [package_instantiate_object -var_list $var_list portal_layout] + + set var_list [list \ + [list layout_id $layout_id] \ + [list region 1]] + package_exec_plsql -var_list $var_list portal_layout add_region + + set var_list [list \ + [list layout_id $layout_id] \ + [list region 2]] + package_exec_plsql -var_list $var_list portal_layout add_region + + set var_list { + {name left_right_sidebar} + {description "Left and right sidebars"} + {filename /packages/portal/lib/layouts/left-right-sidebar} + } + set layout_id [package_instantiate_object -var_list $var_list portal_layout] + + set var_list [list \ + [list layout_id $layout_id] \ + [list region 1]] + package_exec_plsql -var_list $var_list portal_layout add_region + + set var_list [list \ + [list layout_id $layout_id] \ + [list region 2]] + package_exec_plsql -var_list $var_list portal_layout add_region + + set var_list [list \ + [list layout_id $layout_id] \ + [list region 3]] + package_exec_plsql -var_list $var_list portal_layout add_region + # And some themes set var_list { @@ -113,10 +169,21 @@ template /packages/portal/lib/portal-admin-portlet admin_p t aliases { - Initialize portal_admin_portlet::initialize + Initialize portal::element::default_initializer } } + portal::datasource::new -spec { + name subsites_portlet + description "Subsites Portlet" + pretty_name "Subsites" + application "" + owner portal + template /packages/portal/lib/subsites-portlet + aliases { + Initialize portal::element::default_initializer + } + } } Index: openacs-4/contrib/packages/portal/tcl/element-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/tcl/element-procs.tcl,v diff -u -N -r1.17 -r1.18 --- openacs-4/contrib/packages/portal/tcl/element-procs.tcl 23 Mar 2004 03:04:09 -0000 1.17 +++ openacs-4/contrib/packages/portal/tcl/element-procs.tcl 24 Mar 2004 00:03:37 -0000 1.18 @@ -397,29 +397,32 @@ ad_proc -private get_render_data { {-element_id:required} + {-decorate_p 1} {-edit_p 0} } { Return all the good stuff a render template needs to render an element. @element_id The element in question + @decorate_p If true decorate the element with the portal theme. @edit_p If true the render template should show the shade and hide widgets } { array set element [get -element_id $element_id] - # Eventually we should be able to theme down to the element level, to allow, for - # instance, the common undecorated center column flanked by decorated left and - # right column format without kludging a special layout. + if { $decorate_p } { + array set theme [portal::theme::get \ + -theme_id [portal::get_theme_id \ + -portal_id [portal::page::get_portal_id -page_id $element(page_id)] \ + ] \ + ] + set element(filename) "$theme(filename)" + set element(resource_dir) "$theme(resource_dir)" + } else { + set element(filename) /packages/portal/lib/undecorated-element + set element(resource_dir) "" + } - array set theme [portal::theme::get \ - -theme_id [portal::get_theme_id \ - -portal_id [portal::page::get_portal_id -page_id $element(page_id)] \ - ] \ - ] - set element(filename) "$theme(filename)" - set element(resource_dir) "$theme(resource_dir)" - if {!$edit_p || ![::parameter::get -parameter ShowShadeButton]} { set element(shadeable_p) f } @@ -642,4 +645,16 @@ } } + ad_proc -public default_initializer { + element_id + } { + + Default portlet initializer. It is very simple, as it does nothing. This + happens to fit the needs of many portlets, which only need the package_id that + is stored for every portal element. + + @param element_id The element that we're not going to do anything to! + } { + } + } 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 -N -r1.26 -r1.27 --- openacs-4/contrib/packages/portal/tcl/portal-procs.tcl 23 Mar 2004 03:04:09 -0000 1.26 +++ openacs-4/contrib/packages/portal/tcl/portal-procs.tcl 24 Mar 2004 00:03:37 -0000 1.27 @@ -616,7 +616,7 @@ -datasource_name $name] } else { set element_id [portal::element::new \ - -portal_id $template_portal_id \ + -portal_id $master_portal_id \ -state hidden \ -datasource_name $name] }