Index: openacs-4/packages/theme-selva/www/preferences.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/theme-selva/www/Attic/preferences.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/theme-selva/www/preferences.adp 6 Dec 2005 03:38:41 -0000 1.1 @@ -0,0 +1,118 @@ + + @page_title@ + @context;noquote@ + user_info.first_names + @user_id@ + + + + + +
+ + + +
+
+

#acs-subsite.Privacy#

+

+ +
+ +
+ +
+
+

#acs-subsite.My_Account#

+
+
+ + + #acs-subsite.Account_closed_workspace_msg# + +
+
+ + + + +
+
+

#acs-subsite.Your_Portrait#

+
+
+

+ #acs-subsite.lt_Show_everyone_else_at# #acs-subsite.upload_a_portrait# +

+
+
+
+ + +
+
+

#acs-subsite.Your_Portrait#

+
+
+

+ #acs-subsite.lt_On_portrait_publish_d#. +

+ +
+Portrait

+#acs-subsite.Edit# +

@portrait_description@
+
+
+
+ +
+
+

+

+
+ @fragments:item;noquote@ + +
+
Index: openacs-4/packages/theme-selva/www/preferences.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/theme-selva/www/Attic/preferences.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/theme-selva/www/preferences.tcl 6 Dec 2005 03:38:41 -0000 1.1 @@ -0,0 +1,84 @@ +# /pvt/home.tcl + +ad_page_contract { + user's workspace page + @cvs-id $Id: preferences.tcl,v 1.1 2005/12/06 03:38:41 rafael Exp $ +} -properties { + system_name:onevalue + context:onevalue + full_name:onevalue + email:onevalue + url:onevalue + screen_name:onevalue + bio:onevalue + portrait_state:onevalue + portrait_publish_date:onevalue + portrait_title:onevalue + portrait_description:onevalue + export_user_id:onevalue + ad_url:onevalue + member_link:onevalue + pvt_home_url:onevalue +} + +set user_id [auth::require_login -account_status closed] + +acs_user::get -array user -include_bio -user_id $user_id + +set account_status [ad_conn account_status] +set login_url [ad_get_login_url] +set subsite_url [ad_conn vhost_subsite_url] + +set page_title [ad_pvt_home_name] + +set pvt_home_url [ad_pvt_home] + +set context [list $page_title] + +set fragments [callback -catch user::workspace -user_id $user_id] + +set ad_url [ad_url] + +set community_member_url [acs_community_member_url -user_id $user_id] + +set notifications_url [lindex [site_node::get_children -node_id [subsite::get_element -element node_id] -package_key "notifications"] 0] + +set system_name [ad_system_name] + +set portrait_upload_url [export_vars -base "/acs-subsite/user/portrait/upload" { { return_url [ad_return_url] } }] + +if { [llength [lang::system::get_locales]] > 1 } { + set change_locale_url [apm_package_url_from_key "acs-lang"] +} + + + +if [ad_parameter SolicitPortraitP "user-info" 0] { + # we have portraits for some users + if ![db_0or1row get_portrait_info " + select cr.publish_date, nvl(cr.title,'your portrait') as portrait_title, + nvl(cr.description,'no description') as portrait_description + from cr_revisions cr, cr_items ci, acs_rels a + where cr.revision_id = ci.live_revision + and ci.item_id = a.object_id_two + and a.object_id_one = :user_id + and a.rel_type = 'user_portrait_rel' + "] { + set portrait_state "upload" + } else { + if { [empty_string_p $portrait_title] } { + set portrait_title "[_ acs-subsite.no_portrait_title_message]" + } + + set portrait_state "show" + set portrait_publish_date [lc_time_fmt $publish_date "%q"] + } +} else { + set portrait_state "none" +} + + +set whos_online_url "[subsite::get_element -element url]shared/whos-online" +set make_visible_url "[subsite::get_element -element url]shared/make-visible" +set make_invisible_url "[subsite::get_element -element url]shared/make-invisible" +set invisible_p [whos_online::user_invisible_p [ad_conn untrusted_user_id]] Index: openacs-4/packages/theme-selva/www/preferences.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/theme-selva/www/Attic/preferences.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/theme-selva/www/preferences.xql 6 Dec 2005 03:38:41 -0000 1.1 @@ -0,0 +1,53 @@ + + + + + + + select first_names, last_name, email, url, screen_name + from cc_users + where user_id=:user_id + + + + + + + + +select attr_value +from acs_attribute_values +where object_id = :user_id +and attribute_id = + (select attribute_id + from acs_attributes + where object_type = 'person' + and attribute_name = 'bio') + + + + + + + + select cr.publish_date, cr.title as portrait_title, cr.description as portrait_description + from cr_revisions cr, cr_items ci, acs_rels a + where cr.revision_id = ci.live_revision + and ci.item_id = a.object_id_two + and a.object_id_one = :user_id + and a.rel_type = 'user_portrait_rel' + + + + + + + select email + from cc_users + where user_iad=:user_id + + + + + +