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.59 -r1.60 --- openacs-4/packages/new-portal/tcl/portal-procs.tcl 10 Nov 2001 20:16:36 -0000 1.59 +++ openacs-4/packages/new-portal/tcl/portal-procs.tcl 11 Nov 2001 17:49:43 -0000 1.60 @@ -252,7 +252,38 @@ # } # # get the portal. + + # get the themes, template::multirow is not working here + set theme_count 0 + set theme_data "
" + + # get the current theme + db_1row configure_portal_curr_theme_select " + select distinct + theme_id as cur_theme_id + from portal_element_map + where portal_id = :portal_id + " + db_foreach configure_theme_select " + select + pet.theme_id, + pet.name, + pet.description + from portal_element_themes pet + order by name " { + if { $cur_theme_id == $theme_id } { + append theme_data "
" + } else { + append theme_data "
" + } +} + + append theme_data "" + + # get the portal. db_1row configure_portal_select " select p.portal_id, @@ -276,7 +307,29 @@ set element_list [array get fake_element_ids] set element_src "[portal::www_path]/place-element" - + +# +# +# +# +# +# +#
+# checked> +# @themes.name@
+# +# +#
+# +#
+# +# @themes.description@ +#
+# +#
+# # the sources /www/place-element.tcl set template " @@ -296,6 +349,14 @@ + +
+ + Change Theme: + @theme_data@ +
+ + Undo Your Changes:
@@ -367,7 +428,7 @@ ad_require_permission $portal_id portal_edit_portal set op [ns_set get $form op] - + switch $op { "Rename" { portal::update_name $portal_id [ns_set get $form new_name] @@ -426,6 +487,14 @@ } } } + "Update Theme" { + set theme_id [ns_set get $form theme_id] + + db_dml configure_dispatch_update_theme \ + "update portal_element_map + set theme_id = :theme_id + where portal_id = :portal_id" + } "revert to default" { ad_return_complaint 1 \ "portal::config_dispatch: Not implimented op = $op" @@ -723,6 +792,7 @@ pem.name, pem.datasource_id, pem.theme_id, + pem.state, pet.description, pet.filename, pet.resource_dir @@ -775,9 +845,10 @@ set element(mime_type) $datasource(mime_type) regsub -all {/} $element(mime_type) {+} element(mime_type_noslash) - # pass the ds link to the element + # pass the ds link, and the shaded_p param to the element set element(link) $datasource(link) - + set element(shaded_p) $config(shaded_p) + return [array get element] }