Index: openacs-4/contrib/packages/portal/portal.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/portal.info,v diff -u -r1.8 -r1.9 --- openacs-4/contrib/packages/portal/portal.info 12 Mar 2004 04:54:02 -0000 1.8 +++ openacs-4/contrib/packages/portal/portal.info 14 Mar 2004 01:16:29 -0000 1.9 @@ -24,7 +24,7 @@ - + Index: openacs-4/contrib/packages/portal/lib/layouts/header3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/Attic/header3.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/layouts/header3.adp 14 Mar 2004 01:16:30 -0000 1.1 @@ -0,0 +1,47 @@ +<% + + # + # 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/header3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/Attic/header3.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/layouts/header3.tcl 14 Mar 2004 01:16:30 -0000 1.1 @@ -0,0 +1,25 @@ +# +# 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. +# + +# www/templates/header3.tcl +ad_page_contract { + @cvs_id $Id: header3.tcl,v 1.1 2004/03/14 01:16:30 donb Exp $ +} -properties { + element_list:onevalue + element_src:onevalue +} + +portal_layout_elements $element_list Index: openacs-4/contrib/packages/portal/lib/layouts/simple-element.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/Attic/simple-element.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/layouts/simple-element.adp 14 Mar 2004 01:16:30 -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. + # + +%> + + + + + + +
+ + + + + + + + + +
+ @name@ + + +
+ + + +
+
+ Index: openacs-4/contrib/packages/portal/lib/layouts/simple1.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/Attic/simple1.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/layouts/simple1.adp 14 Mar 2004 01:16:30 -0000 1.1 @@ -0,0 +1,40 @@ +<% + + # + # 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/simple1.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/Attic/simple1.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/layouts/simple1.tcl 14 Mar 2004 01:16:30 -0000 1.1 @@ -0,0 +1,42 @@ +# +# 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. +# + +# www/templates/simple2.tcl +ad_page_contract { + @cvs_id $Id: simple1.tcl,v 1.1 2004/03/14 01:16:30 donb Exp $ +} -properties { + element_list:onevalue + element_src:onevalue + action_string:onevalue + theme_id:onevalue + return_url:onevalue +} + +if { ![info exists action_string]} { + set action_string "" +} + +if { ![info exists theme_id]} { + set theme_id "" +} + +if { ![info exists return_url]} { + set return_url "" +} + +portal::layout_elements $element_list + +ad_return_template Index: openacs-4/contrib/packages/portal/lib/layouts/simple2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/Attic/simple2.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/layouts/simple2.adp 14 Mar 2004 01:16:30 -0000 1.1 @@ -0,0 +1,56 @@ +<% + + # + # 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/simple2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/Attic/simple2.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/layouts/simple2.tcl 14 Mar 2004 01:16:30 -0000 1.1 @@ -0,0 +1,45 @@ +# +# 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 is a simple 2 column layout called from portal::render and the like. + It laysout the elements with portal::layout_elements and hands off rendering + of the individual portlets to the template in the "element_src" var + + @version $Id: simple2.tcl,v 1.1 2004/03/14 01:16:30 donb Exp $ +} -properties { + element_list:onevalue + element_src:onevalue + action_string:onevalue + theme_id:onevalue + return_url:onevalue +} + +if {![exists_and_not_null action_string]} { + set action_string "" +} + +if {![exists_and_not_null theme_id]} { + set theme_id "" +} + +if {![exists_and_not_null return_url]} { + set return_url "" +} + +portal::layout_elements $element_list + +ad_return_template Index: openacs-4/contrib/packages/portal/lib/layouts/simple3.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/Attic/simple3.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/layouts/simple3.adp 14 Mar 2004 01:16:30 -0000 1.1 @@ -0,0 +1,71 @@ +<% + + # + # 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/simple3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/layouts/Attic/simple3.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/layouts/simple3.tcl 14 Mar 2004 01:16:30 -0000 1.1 @@ -0,0 +1,48 @@ +# +# 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 is a simple 3 column layout called from portal::render and the like. + It lays out the elements with portal::layout_elements and hands off + rendering of the individual portlets to the template in the + "element_src" var + + @author arjun@openforce.net + @author yon@openforce.net + @version $Id: simple3.tcl,v 1.1 2004/03/14 01:16:30 donb Exp $ +} -properties { + element_list:onevalue + element_src:onevalue + action_string:onevalue + theme_id:onevalue + return_url:onevalue +} + +if {![exists_and_not_null action_string]} { + set action_string "" +} + +if {![exists_and_not_null theme_id]} { + set theme_id "" +} + +if {![exists_and_not_null return_url]} { + set return_url "" +} + +portal::layout_elements $element_list + +ad_return_template Index: openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-element.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-element.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-element.adp 14 Mar 2004 01:16:30 -0000 1.1 @@ -0,0 +1,35 @@ +<% + + # + # 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. + # + +%> + + + + + +@element.name;noquote@ +@element.resource_dir;noquote@ +@element.element_id;noquote@ +@element.shadeable_p;noquote@ +@element.shaded_p;noquote@ +@element.hideable_p;noquote@ + +
    +
  • @element.name@
    +
  • +
Index: openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-element.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-element.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/render-styles/all-in-one/render-element.tcl 14 Mar 2004 01:16:30 -0000 1.1 @@ -0,0 +1,34 @@ +# +# 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. +# + +# www/render-element.tcl + +ad_page_contract { + Render an element. + + @author Don Baccus (dhogaza@pacifier.com) + @creation-date + @cvs_id $Id: render-element.tcl,v 1.1 2004/03/14 01:16:30 donb Exp $ +} -properties { + element_id:onevalue + region:onevalue +} + +# we get element_id, action_string, theme_id, region, portal_id, + +# Get all the good stuff we need to render this sucker +array set element [portal::element::get_render_data -element_id $element_id] + Index: openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.adp 14 Mar 2004 01:16:30 -0000 1.1 @@ -0,0 +1,32 @@ +<% + + # + # 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. + # + +%> + + + + + +@element.name;noquote@ +@element.resource_dir;noquote@ +@element.element_id;noquote@ +@element.shadeable_p;noquote@ +@element.shaded_p;noquote@ +@element.hideable_p;noquote@ + + 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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/render-styles/individual/render-element.tcl 14 Mar 2004 01:16:30 -0000 1.1 @@ -0,0 +1,32 @@ +# +# 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. +# + +# www/render-element.tcl +ad_page_contract { + + Render a portal element. + + @author Don Baccus (dhogaza@pacifier.com) + @creation-date + @cvs_id $Id: render-element.tcl,v 1.1 2004/03/14 01:16:30 donb Exp $ + +} + +# we get element_id, action_string, theme_id, region, portal_id, +# edit_p, return_url, page_id, and layout_id from the layout_template + +# Get all the good stuff we need to render this sucker +array set element [portal::element::get_render_data -element_id $element_id -edit_p $edit_p] Index: openacs-4/contrib/packages/portal/lib/render-styles/individual/render-page.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/render-styles/individual/render-page.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/render-styles/individual/render-page.adp 14 Mar 2004 01:16:30 -0000 1.1 @@ -0,0 +1,9 @@ + + + Index: openacs-4/contrib/packages/portal/lib/render-styles/individual/render-page.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/render-styles/individual/render-page.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/render-styles/individual/render-page.tcl 14 Mar 2004 01:16:30 -0000 1.1 @@ -0,0 +1,35 @@ +# +# 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. +# + +# render-page.tcl + +ad_page_contract { + + Render a portal page. + + This is intended to be included, not called directly, with the following parameters + defined: + + @param page_id The portal the page belongs to + + @author Don Baccus (dhogaza@pacifier.com) + @creation-date 2004/01/24 + @cvs_id $Id: render-page.tcl,v 1.1 2004/03/14 01:16:30 donb Exp $ + +} + +array set page [portal::page::get_render_data -page_id $page_id] +set elements_exist_p [expr {[llength $page(element_list)] > 0}] Index: openacs-4/contrib/packages/portal/lib/themes/deco-theme.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/themes/deco-theme.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/themes/deco-theme.adp 14 Mar 2004 01:16:31 -0000 1.1 @@ -0,0 +1,83 @@ +<% + + # + # 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. + # + +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 + + + + + + + + unshade + + + + + + + + + +
+ @name@ + + + + shade + hide
+ +
+
+ + + + + +
+ + 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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/themes/nada-theme.adp 14 Mar 2004 01:16:31 -0000 1.1 @@ -0,0 +1,74 @@ +<% + + # + # 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. + # + +%> + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+ @name@ + + + + + + [shade] + + + [unshade] + + + + + [hide] + + +
+ +
+
+ + + +
+ + Index: openacs-4/contrib/packages/portal/lib/themes/raw-theme.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/themes/raw-theme.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/themes/raw-theme.adp 14 Mar 2004 01:16:31 -0000 1.1 @@ -0,0 +1,21 @@ +<% + + # + # 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/themes/sloan-theme.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/themes/sloan-theme.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/themes/sloan-theme.adp 14 Mar 2004 01:16:31 -0000 1.1 @@ -0,0 +1,59 @@ +<% + + # + # 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. + # + +%> + + + + + + + + + + + + + + +
+ <%= [string toupper @name@] %> +
+ + + +
+ + + + + +
+ + + + +
+ +
+
+ + + + + Index: openacs-4/contrib/packages/portal/lib/themes/standard-theme.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/lib/themes/standard-theme.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/portal/lib/themes/standard-theme.adp 14 Mar 2004 01:16:31 -0000 1.1 @@ -0,0 +1,54 @@ +<% + + # + # 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. + # + +%> + + + + + + + + + + + + + +
+

@name@

+
+ + + + shade + + + shade + + + + + hide + + +   + +
+ +
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.5 -r1.6 --- openacs-4/contrib/packages/portal/tcl/apm-callback-procs.tcl 12 Mar 2004 04:54:04 -0000 1.5 +++ openacs-4/contrib/packages/portal/tcl/apm-callback-procs.tcl 14 Mar 2004 01:16:31 -0000 1.6 @@ -20,6 +20,86 @@ } } } + + # Now define some default layouts. + + set var_list { + {name 1_column} + {description "One column"} + {filename layouts/simple1} + } + 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 { + {name 2_column} + {description "Two columns"} + {filename layouts/simple2} + } + 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 3_column} + {description "Three columns"} + {filename layouts/simple3} + } + 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 { + {name default} + {description "Default OpenACS Theme"} + {filename themes/standard-theme} + {resource_dir themes/standard-theme} + } + package_instantiate_object -var_list $var_list portal_theme + + set var_list { + {name blank} + {description "No graphics"} + {filename themes/nada-theme} + {resource_dir themes/nada-theme} + } + package_instantiate_object -var_list $var_list portal_theme + + set var_list { + {name deco} + {description "An Art Deco Theme"} + {filename themes/deco-theme} + {resource_dir themes/deco-theme} + } + package_instantiate_object -var_list $var_list portal_theme + } ad_proc portal::install::package_uninstall {} { 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.11 -r1.12 --- openacs-4/contrib/packages/portal/tcl/element-procs.tcl 12 Mar 2004 04:54:04 -0000 1.11 +++ openacs-4/contrib/packages/portal/tcl/element-procs.tcl 14 Mar 2004 01:16:31 -0000 1.12 @@ -417,7 +417,7 @@ -portal_id [portal::page::get_portal_id -page_id $element(page_id)] \ ] \ ] - set element(filename) "[portal::www_path]/$theme(filename)" + set element(filename) "/packages/portal/lib/$theme(filename)" set element(resource_dir) "/resources/portal/$theme(resource_dir)" if {!$edit_p} { 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.5 -r1.6 --- openacs-4/contrib/packages/portal/tcl/page-procs.tcl 29 Jan 2004 03:50:59 -0000 1.5 +++ openacs-4/contrib/packages/portal/tcl/page-procs.tcl 14 Mar 2004 01:16:32 -0000 1.6 @@ -165,9 +165,9 @@ array set page [get -page_id $page_id] set layout_id [get_layout_id -page_id $page_id] db_1row layout_select {} - set page(layout_filename) "[portal::www_path]/$layout_filename" + set page(layout_filename) "/packages/portal/lib/$layout_filename" - set page(element_src) "[portal::www_path]/render-styles/${render_style}/render-element" + set page(element_src) "/packages/portal/lib/render-styles/${render_style}/render-element" db_foreach element_select {} -column_array entry { lappend element_ids($entry(region)) $entry(element_id) } if_no_rows { 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.18 -r1.19 --- openacs-4/contrib/packages/portal/tcl/portal-procs.tcl 13 Mar 2004 00:40:26 -0000 1.18 +++ openacs-4/contrib/packages/portal/tcl/portal-procs.tcl 14 Mar 2004 01:16:32 -0000 1.19 @@ -27,14 +27,6 @@ namespace eval portal { - # work around for template::util::url_to_file - ad_proc -private www_path {} { - returns the path of the www dir of the portal package. we need this for - stupid template tricks. - } { - return "/packages/portal/www" - } - ad_proc -public mount_point {} { caches the mount point } { @@ -55,6 +47,7 @@ {-page_list {{{Page 1} 2_column}}} {-owner_privileges {read write admin}} {-initialize_elements:boolean} + {-theme_name ""} } { Create a new portal for the passed in owner_id. create pages passed in the page_list. @@ -70,20 +63,27 @@ would make sense to only grant read to the party directly. @initialize_elements_p If true and template_id is set, initialize elements after copying. + @theme_name The theme to assign to this portal (defaults to the package's + default_theme_name) } { if { [string equal $context_id ""] } { set context_id [ad_conn package_id] } + if { [string equal $theme_name ""] } { + set theme_name [parameter::get -parameter default_theme_name] + } + db_transaction { set var_list [subst { {name $name} {template_id $template_id} {context_id $context_id} {owner_id $owner_id} + {theme_id [portal::theme::get_id -name $theme_name]} {package_id [ad_conn package_id]}}] set portal_id [package_instantiate_object -var_list $var_list portal] @@ -269,7 +269,7 @@ # get the portal and layout db_1row portal_select {} -column_array portal set page_id $portal(page_id) - set portal(page_src) "[www_path]/render-styles/${render_style}/render-page" + set portal(page_src) "/packages/portal/lib/render-styles/${render_style}/render-page" return [array get portal] } @@ -693,11 +693,11 @@ # create the master template - portal::new -owner_id 0 -owner_privileges {} + portal::new -name "Shared Portal" -owner_id 0 -owner_privileges {} # create the admin template - portal::new -owner_id [ad_conn package_id] -owner_privileges {} + portal::new -name "Administration" -owner_id [ad_conn package_id] -owner_privileges {} } } Index: openacs-4/contrib/packages/portal/tcl/theme-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/tcl/theme-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/portal/tcl/theme-procs.tcl 27 Feb 2004 01:13:15 -0000 1.3 +++ openacs-4/contrib/packages/portal/tcl/theme-procs.tcl 14 Mar 2004 01:16:32 -0000 1.4 @@ -42,4 +42,16 @@ return [array get theme] } + ad_proc -public get_id { + {-name:required} + } { + Return a theme's id + + @name The name of the theme + @return The theme_id + + } { + return [db_string select_theme_id {}] + } + } Index: openacs-4/contrib/packages/portal/tcl/theme-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/tcl/theme-procs.xql,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/portal/tcl/theme-procs.xql 27 Feb 2004 01:13:15 -0000 1.4 +++ openacs-4/contrib/packages/portal/tcl/theme-procs.xql 14 Mar 2004 01:16:32 -0000 1.5 @@ -10,4 +10,12 @@ + + + select theme_id + from portal_themes + where name = :name + + + Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/www/layouts/header3.adp'. 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/www/layouts/header3.tcl'. 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/www/layouts/simple-element.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/www/layouts/simple1.adp'. 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/www/layouts/simple1.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/www/layouts/simple2.adp'. 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/www/layouts/simple2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/www/layouts/simple3.adp'. 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/www/layouts/simple3.tcl'. 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/www/layouts/title-buttons.adp'. 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/www/layouts/title-buttons.tcl'. 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/www/layouts/components/header3/example.adp'. 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/www/layouts/components/simple-element/example.adp'. 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/www/layouts/components/simple2/example.adp'. 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/www/layouts/components/simple3/example.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.6 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/www/render-styles/all-in-one/render-element.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/www/render-styles/all-in-one/render-element.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.7 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/www/render-styles/individual/render-element.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.6 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/www/render-styles/individual/render-element.tcl'. 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/www/render-styles/individual/render-page.adp'. 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/www/render-styles/individual/render-page.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/contrib/packages/portal/www/resources/themes/standard-theme/shade.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/www/resources/themes/standard-theme/shade.gif,v diff -u Binary files differ Index: openacs-4/contrib/packages/portal/www/resources/themes/standard-theme/unshade.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/www/resources/themes/standard-theme/unshade.gif,v diff -u Binary files differ Index: openacs-4/contrib/packages/portal/www/resources/themes/standard-theme/x.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/www/resources/themes/standard-theme/x.gif,v diff -u Binary files differ Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/www/themes/deco-theme.adp'. 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/www/themes/nada-theme.adp'. 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/www/themes/raw-theme.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/www/themes/simple-theme.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/packages/portal/www/themes/sloan-theme.adp'. Fisheye: No comparison available. Pass `N' to diff?