Index: openacs-4/packages/new-portal/www/template-place-element.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/template-place-element.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/new-portal/www/template-place-element.adp 21 Nov 2001 17:03:41 -0000 1.1 @@ -0,0 +1,75 @@ + + +
+ + + + + + + +
+ + + @element_multi.name@ + + + move up + + + move down + + + + + move right + + + + move left + move right + move left + + +

+ +hide this element + +
+ + +Moveable: unlocked (set lock) + +Moveable: locked (unlock) + + +
+ + +Hideable: (set unhideable) + +Not hideable: (set hideable) + + + +Shadeable: (set un-shadeable) + +Not shadeable: (set shadeable) + + +
+ + + + + +
+@show_html@ + +
+ +

+ +
+ + Index: openacs-4/packages/new-portal/www/template-place-element.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/template-place-element.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/new-portal/www/template-place-element.tcl 21 Nov 2001 17:03:34 -0000 1.1 @@ -0,0 +1,78 @@ +# www/template-place-element.tcl +ad_page_contract { + Place elements in a portal template. + + @author Arjun Sanyal (arjun@openforce.net) + @cvs_id $Id: template-place-element.tcl,v 1.1 2001/11/21 17:03:34 oracle Exp $ +} -properties { + region:onevalue + action_string:onevalue + portal_id:onevalue +} + +set layout_id [portal::get_layout_id $portal_id] + +db_1row select_num_regions " +select count(*) as num_regions +from portal_supported_regions +where layout_id = :layout_id" + +# get the elements for this region. +set region_count 0 +template::multirow create element_multi element_id name sort_key state hideable_p shadeable_p +db_foreach select_elements_by_region { + select element_id, name, sort_key, state + from portal_element_map + where + portal_id = :portal_id + and region = :region + and state != 'hidden' + order by sort_key } { + + db_1row select_shadeable_p \ + "select value as shadeable_p from portal_element_parameters where key = 'shadeable_p' and element_id = :element_id" + + db_1row select_hideable_p \ + "select value as hideable_p from portal_element_parameters where key = 'hideable_p' and element_id = :element_id" + + template::multirow append element_multi \ + $element_id $name $sort_key $state $hideable_p $shadeable_p + incr region_count + + } + + db_1row select_all_noimm_count \ + "select count(*) as all_count + from portal_element_map + where + portal_id = :portal_id + and state != 'hidden' + and region not like 'i%'" + + # Set up the form target + set target_stub [lindex [ns_conn urlv] [expr [ns_conn urlc] - 1]] + set show_avail_p 0 + set show_html "" + + append show_html "