Index: openacs-4/packages/new-portal/sql/oracle/add-sloan-theme.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/sql/oracle/Attic/add-sloan-theme.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/new-portal/sql/oracle/add-sloan-theme.sql 16 Oct 2002 15:39:16 -0000 1.1 @@ -0,0 +1,49 @@ +-- +-- 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. +-- + +-- +-- The New Portal Package +-- copyright 2001, OpenForce, Inc. +-- distributed under the GNU GPL v2 +-- +-- Arjun Sanyal (arjun@openforce.net) +-- $Id: add-sloan-theme.sql,v 1.1 2002/10/16 15:39:16 jeffd Exp $ +-- + + +-- ampersands break if I don't do this. +set scan off + +-- Insert some default templates. +declare + layout_id portal_layouts.layout_id%TYPE; + theme_id portal_element_themes.theme_id%TYPE; +begin + + theme_id := portal_element_theme.new ( + name => 'Sloan', + description => 'MIT Sloan theme', + filename => 'themes/sloan-theme', + resource_dir => 'themes/sloan-theme'); + + +end; +/ + + + + + Index: openacs-4/packages/new-portal/sql/postgresql/add-sloan-theme.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/sql/postgresql/Attic/add-sloan-theme.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/new-portal/sql/postgresql/add-sloan-theme.sql 16 Oct 2002 15:39:16 -0000 1.1 @@ -0,0 +1,43 @@ +-- +-- 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. +-- + +-- +-- The New Portal Package +-- copyright 2001, OpenForce, Inc. +-- distributed under the GNU GPL v2 +-- +-- Arjun Sanyal (arjun@openforce.net) +-- $Id: add-sloan-theme.sql,v 1.1 2002/10/16 15:39:16 jeffd Exp $ +-- + + +-- Insert some default templates. +create function inline_0() +returns integer as ' +begin + perform portal_element_theme__new ( + ''Sloan'', -- name + ''MIT Sloan theme'', -- description + ''themes/sloan-theme'', -- filename + ''themes/sloan-theme'' -- directory + ); + return 0; +end;' language 'plpgsql'; + +select inline_0(); + +drop function inline_0(); + Index: openacs-4/packages/new-portal/tcl/portal-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs.tcl,v diff -u -N -r1.156 -r1.157 --- openacs-4/packages/new-portal/tcl/portal-procs.tcl 9 Aug 2002 20:56:29 -0000 1.156 +++ openacs-4/packages/new-portal/tcl/portal-procs.tcl 16 Oct 2002 15:39:16 -0000 1.157 @@ -346,6 +346,7 @@ ad_proc -public configure { {-referer ""} {-template_p f} + {-allow_theme_change_p 1} portal_id return_url } { @@ -429,14 +430,18 @@ } append theme_chunk "" + if {$allow_theme_change_p} { append template "$theme_chunk" + } # # Per-page template chunks # set list_of_page_ids [list_pages_tcl_list -portal_id $portal_id] + set last_page [lindex $list_of_page_ids [expr [llength $list_of_page_ids] - 1]] + ns_log warning "last_page is $last_page" foreach page_id $list_of_page_ids { set first_page_p [portal::first_page_p -portal_id $portal_id -page_id $page_id] @@ -448,18 +453,20 @@ # # Page rename chunk # - - set page_name_chunk " - -