--
-- 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.
--
--
-- create portal defaults
--
-- @author arjun@openforce.net
-- @author yon@openforce.net
-- @creation-date 2001-10-01
-- @version $Id: defaults.sql,v 1.2 2003/09/25 02:12:16 vinodk Exp $
--
create function inline_0 ()
returns integer as '
declare
layout_id portal_layouts.layout_id%TYPE;
theme_id portal_themes.theme_id%TYPE;
begin
-- one-column layout, without a header.
layout_id := portal_layout__new(
null, -- layout_id
''1_column'', -- name
''A simple 1-column layout'', -- description
''layouts/simple1'', -- filename
''layouts/components/simple1'', -- resource_dir
null, -- object_type
null, -- creation_date
null, -- creation_user
null, -- creation_ip
null -- context_id
);
-- the supported regions for that layout.
perform portal_layout__add_region(layout_id, ''1'');
-- two-column layout, without a header.
layout_id := portal_layout__new(
null, -- layout_id
''2_column'', -- name
''A simple 2-column layout'', -- description
''layouts/simple2'', -- filename
''layouts/components/simple2'', -- resource_dir
null, -- object_type
null, -- creation_date
null, -- creation_user
null, -- creation_ip
null -- context_id
);
-- the supported regions for that layout.
perform portal_layout__add_region(layout_id, ''1'');
perform portal_layout__add_region(layout_id, ''2'');
-- same as above, only, three columns.
layout_id := portal_layout__new(
null, -- layout_id
''3_column'', -- name
''A simple 3-column layout'', -- description
''layouts/simple3'', -- filename
''layouts/components/simple3'', -- resource_dir
null, -- object_type
null, -- creation_date
null, -- creation_user
null, -- creation_ip
null -- context_id
);
perform portal_layout__add_region(layout_id, ''1'');
perform portal_layout__add_region(layout_id, ''2'');
perform portal_layout__add_region(layout_id, ''3'');
-- Now, some element themes.
theme_id := portal_theme__new(
''simple'',
''A simple red table-based theme'',
''themes/simple-theme'',
''themes/simple-theme''
);
theme_id := portal_theme__new(
''nada'',
''The un-theme. No graphics.'',
''themes/nada-theme'',
''themes/nada-theme''
);
theme_id := portal_theme__new(
''deco'',
''An Art Deco theme'',
''themes/deco-theme'',
''themes/deco-theme''
);
return 0;
end;' language 'plpgsql';
select inline_0();
drop function inline_0();