| |
367 |
367 |
|
| |
368 |
368 |
return $min_region |
| |
369 |
369 |
|
| |
370 |
370 |
} |
| |
371 |
371 |
|
| |
372 |
372 |
ad_proc -private render { |
| |
373 |
373 |
{-element_id:required} |
| |
374 |
374 |
{-edit_p f} |
| |
375 |
375 |
} { |
| |
376 |
376 |
render a portal element |
| |
377 |
377 |
} { |
| |
378 |
378 |
|
| |
379 |
379 |
array set element [get -element_id $element_id] |
| |
380 |
380 |
array set theme [portal::theme::get \ |
| |
381 |
381 |
-theme_id [portal::get_theme_id \ |
| |
382 |
382 |
-portal_id [portal::page::get_portal_id -page_id $element(page_id)] \ |
| |
383 |
383 |
] \ |
| |
384 |
384 |
] |
| |
385 |
385 |
|
| |
386 |
386 |
array set config [list \ |
| |
387 |
|
shaded_p [util_decode $element(state) shaded t f] \ |
| |
|
387 |
shaded_p [ad_decode $element(state) shaded t f] \ |
| |
388 |
388 |
shadeable_p $element(shadeable_p) \ |
| |
389 |
389 |
hideable_p $element(hideable_p) \ |
| |
390 |
390 |
] |
| |
391 |
391 |
array set config [portal::element::parameter::get_all -element_id $element_id] |
| |
392 |
392 |
|
| |
393 |
393 |
if {!$edit_p} { |
| |
394 |
394 |
array set config {shadeable_p f hideable_p f} |
| |
395 |
395 |
} |
| |
396 |
396 |
|
| |
397 |
397 |
set datasource_name [portal::datasource::get_name \ |
| |
398 |
398 |
-datasource_id $element(datasource_id) \ |
| |
399 |
399 |
] |
| |
400 |
400 |
|
| |
401 |
401 |
# if the element's name is the same as its datasource's, then we call |
| |
402 |
402 |
# the datasource's GetPrettyName operation |
| |
403 |
403 |
if {[string equal $element(name) $datasource_name]} { |
| |
404 |
404 |
set element(name) [portal::datasource::call \ |
| |
405 |
405 |
-name $datasource_name \ |
| |
406 |
406 |
-op GetPrettyName \ |
| |
407 |
407 |
] |