+
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 -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
--- /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
--- /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
--- /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
--- /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
--- /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
--- /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
--- /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 -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 -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 -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 -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 -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 -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]
}