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 -r1.44 -r1.45 --- openacs-4/packages/new-portal/tcl/portal-procs.tcl 5 Nov 2001 19:48:24 -0000 1.44 +++ openacs-4/packages/new-portal/tcl/portal-procs.tcl 5 Nov 2001 20:59:39 -0000 1.45 @@ -629,11 +629,22 @@ "portal-config.tcl?[export_url_vars portal_id]" } } - "add a new element here" { - db_dml unhide_element \ - "update portal_element_map - set state = 'full' - where element_id = :element_id" + "add here" { + + regexp {[&]*element_id=(\d+)} $query "" element_id + + db_transaction { + db_dml set_region_element \ + "update portal_element_map + set region = :target_region + where element_id = :element_id" + + db_dml unhide_element \ + "update portal_element_map + set state = 'full' + where element_id = :element_id" + } + } "remove all checked" { Index: openacs-4/packages/new-portal/www/place-element.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/place-element.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/new-portal/www/place-element.tcl 5 Nov 2001 20:08:25 -0000 1.13 +++ openacs-4/packages/new-portal/www/place-element.tcl 5 Nov 2001 20:59:51 -0000 1.14 @@ -51,22 +51,18 @@ set add_html "" set new_package_id [db_nextval acs_object_id_seq] -append add_html "" -db_foreach datasource_avail { - select name, pd.datasource_id - from portal_datasources pd, portal_datasource_avail_map pdam - where pdam.portal_id = :portal_id - and pd.datasource_id = pdam.datasource_id - and pd.datasource_id in ( - select datasource_id - from portal_element_map - where portal_id = :portal_id - and state = 'hidden') +db_foreach hidden_elements { + select element_id, name + from portal_element_map pem + where + pem.portal_id = :portal_id + and pem.state = 'hidden' order by name } { set add_avail_p 1 - append add_html "\n" + append add_html "\n" } append add_html ""