Index: openacs-4/packages/theme-selva/theme-selva.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/theme-selva/theme-selva.info,v diff -u -r1.14 -r1.15 --- openacs-4/packages/theme-selva/theme-selva.info 28 Sep 2005 04:42:06 -0000 1.14 +++ openacs-4/packages/theme-selva/theme-selva.info 29 Sep 2005 10:19:38 -0000 1.15 @@ -8,23 +8,24 @@ f theme-selva - + Rafael Calvo 2005-09-28 0 - + - + + Index: openacs-4/packages/theme-selva/tcl/selva-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/theme-selva/tcl/selva-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/theme-selva/tcl/selva-procs.tcl 28 Sep 2005 03:21:03 -0000 1.5 +++ openacs-4/packages/theme-selva/tcl/selva-procs.tcl 29 Sep 2005 10:19:38 -0000 1.6 @@ -35,9 +35,92 @@ for dotlrn. It is called from the selva-master template. } { set current_url [ad_conn url] + + # Set up some basic stuff + set community_id [dotlrn_community::get_community_id] + + # Get user information + set sw_admin_p 0 + set user_id [ad_conn user_id] + set untrusted_user_id [ad_conn untrusted_user_id] + if { $untrusted_user_id != 0 } { + set user_name [person::name -person_id $untrusted_user_id] + set pvt_home_url [ad_pvt_home] + set pvt_home_name [_ acs-subsite.Your_Account] + set logout_url [ad_get_logout_url] + + # Site-wide admin link + set admin_url {} + + set sw_admin_p [acs_user::site_wide_admin_p -user_id $untrusted_user_id] + + if { $sw_admin_p } { + set admin_url "/acs-admin/" + set locale_admin_url "/acs-lang/admin" + } else { + set subsite_admin_p [permission::permission_p \ + -object_id [subsite::get_element -element object_id] \ + -privilege admin \ + -party_id $untrusted_user_id] + + if { $subsite_admin_p } { + set admin_url "[subsite::get_element -element url]admin/" + } + } + } else { + set login_url [ad_get_login_url -return] + set user_name {} + } set subnavbar "" + } + + set current_url [ad_conn url] + + set subnavbar "