Index: openacs-4/packages/sloan-bboard/sql/oracle/bboard-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/sloan-bboard/sql/oracle/bboard-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/sloan-bboard/sql/oracle/bboard-create.sql 15 Feb 2002 21:27:06 -0000 1.1 +++ openacs-4/packages/sloan-bboard/sql/oracle/bboard-create.sql 18 Feb 2002 20:56:18 -0000 1.2 @@ -138,6 +138,10 @@ not null constraint bboard_forums_moderated_p_ck check (moderated_p in ('t','f')), + format varchar(200) default 'q-and-a' + constraint bboard_forums_format_nn not null + constraint bboard_forums_format_ck + check (format in ('q-and-a','thread')), bboard_id integer constraint bboard_forums_bboard_id_nn not null Index: openacs-4/packages/sloan-bboard/sql/oracle/bboard-packages.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/sloan-bboard/sql/oracle/bboard-packages.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/sloan-bboard/sql/oracle/bboard-packages.sql 15 Feb 2002 21:27:06 -0000 1.1 +++ openacs-4/packages/sloan-bboard/sql/oracle/bboard-packages.sql 18 Feb 2002 20:56:18 -0000 1.2 @@ -19,6 +19,7 @@ short_name in bboard_forums.short_name%TYPE, charter in bboard_forums.charter%TYPE default null, moderated_p in bboard_forums.moderated_p%TYPE default 'f', + format in bboard_forums.format%TYPE default 'q-and-a', bboard_id in bboard_forums.bboard_id%TYPE, context_id in acs_objects.context_id%TYPE default null, creation_date in acs_objects.creation_date%TYPE default sysdate, @@ -201,6 +202,7 @@ short_name in bboard_forums.short_name%TYPE, charter in bboard_forums.charter%TYPE default null, moderated_p in bboard_forums.moderated_p%TYPE default 'f', + format in bboard_forums.format%TYPE default 'q-and-a', bboard_id in bboard_forums.bboard_id%TYPE, context_id in acs_objects.context_id%TYPE default null, creation_date in acs_objects.creation_date%TYPE default sysdate, @@ -222,8 +224,8 @@ object_type => object_type ); insert into bboard_forums - (forum_id, short_name, charter, moderated_p, bboard_id) - values (v_forum_id, short_name, charter, moderated_p, bboard_id); + (forum_id, short_name, charter, moderated_p, format, bboard_id) + values (v_forum_id, short_name, charter, moderated_p, format, bboard_id); return v_forum_id; end new; Index: openacs-4/packages/static-portlet/tcl/static-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/tcl/static-portlet-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/static-portlet/tcl/static-portlet-procs.tcl 18 Feb 2002 05:23:12 -0000 1.2 +++ openacs-4/packages/static-portlet/tcl/static-portlet-procs.tcl 18 Feb 2002 20:56:22 -0000 1.3 @@ -75,7 +75,7 @@ ad_proc -public remove_self_from_page { portal_id - instance_id + element_id } { Removes static PE from the given page } { Index: openacs-4/packages/static-portlet/www/element-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/www/element-delete.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/static-portlet/www/element-delete.tcl 18 Feb 2002 05:23:12 -0000 1.1 +++ openacs-4/packages/static-portlet/www/element-delete.tcl 18 Feb 2002 20:56:22 -0000 1.2 @@ -6,14 +6,30 @@ } -query { {content_id ""} {referer "../one-community-admin"} + portal_id:integer,notnull } -properties { title:onevalue } +set ds_name [static_portlet::my_name] +set pretty_name [static_portal_content::get_pretty_name -content_id $content_id] -# do the deed -static_portal_content::delete -content_id $content_id +# THIS NEEDS TO BE GENERALIZED (FIXME - ben) +# FIXME : this might not be unique +set element_id [db_string select_element_id " +select element_id from portal_element_map, portal_pages +where portal_pages.portal_id= :portal_id +and portal_pages.page_id = portal_element_map.page_id +and ds_name= :ds_name and pretty_name= :pretty_name"] +db_transaction { + # Remove element + portal::remove_element $element_id + + # do the deed + static_portal_content::delete -content_id $content_id +} + # redirect and abort ad_returnredirect $referer ad_script_abort Index: openacs-4/packages/static-portlet/www/static-admin-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/www/static-admin-portlet.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/static-portlet/www/static-admin-portlet.adp 18 Feb 2002 20:23:00 -0000 1.3 +++ openacs-4/packages/static-portlet/www/static-admin-portlet.adp 18 Feb 2002 20:56:22 -0000 1.4 @@ -5,7 +5,7 @@