Index: openacs-4/packages/acs-subsite/lib/user-subsites.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/lib/user-subsites.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-subsite/lib/user-subsites.adp 22 Mar 2005 00:57:59 -0000 1.1 @@ -0,0 +1,8 @@ + <if @groups:rowcount@ gt 0> + <h2>#acs-subsite.You_are_in_the_follow#</h2> + <ul> + <multiple name="groups"> + <li> <a href="@groups.url@">@groups.group_name@</a><if @groups.admin_p@ true> [<a href="@groups.url@admin/">#acs-kernel.common_Administration#</a>]</if></li> + </multiple> + </ul> + </if> \ No newline at end of file Index: openacs-4/packages/acs-subsite/lib/user-subsites.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/lib/user-subsites.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-subsite/lib/user-subsites.tcl 22 Mar 2005 00:57:59 -0000 1.1 @@ -0,0 +1,10 @@ +db_multirow -extend {url admin_p} groups groups { + select distinct ap.package_id, groups.group_id, lower(groups.group_name), groups.group_name + from groups, group_member_map gm, application_groups ap + where groups.group_id = gm.group_id and gm.member_id=:user_id + and ap.group_id = groups.group_id + order by lower(groups.group_name) +} { + set admin_p [permission::permission_p -party_id $user_id -object_id $group_id -privilege "admin"] + set url [apm_package_url_from_id $package_id] +} Index: openacs-4/packages/acs-subsite/tcl/callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/callback-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-subsite/tcl/callback-procs.tcl 22 Mar 2005 00:57:59 -0000 1.1 @@ -0,0 +1,26 @@ +ad_library { + Callback definitions + + @author Jeff Davis <davis@xarg.net> + @creation-date 2005-03-11 + @cvs-id $Id: callback-procs.tcl,v 1.1 2005/03/22 00:57:59 jeffd Exp $ +} + +ad_proc -public -callback user::workspace { + -user_id +} { + used to generate html fragments for display on the /pvt/home page. + + The html fragment should have an h2 header for sectioning. + + @param user_id - the user to display + + @see callback::user::workspace::impl::acs-subsite +} - + + +ad_proc -public -callback user::workspace -impl acs-subsite {} { + Generate a table showing the application group membership +} { + return [template::adp_include /packages/acs-subsite/lib/user-subsites [list user_id $user_id]] +} Index: openacs-4/packages/acs-subsite/www/pvt/home.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/pvt/home.adp,v diff -u -r1.19 -r1.20 --- openacs-4/packages/acs-subsite/www/pvt/home.adp 13 Jan 2005 23:34:16 -0000 1.19 +++ openacs-4/packages/acs-subsite/www/pvt/home.adp 22 Mar 2005 00:58:41 -0000 1.20 @@ -2,61 +2,68 @@ <property name=title>@page_title@</property> <property name="context">@context;noquote@</property> <property name="focus">user_info.first_names</property> + <property name="displayed_object_id">@user_id@</property> -<h2>#acs-subsite.Basic_Information#</h2> + <h2>#acs-subsite.Basic_Information#</h2> -<include src="/packages/acs-subsite/lib/user-info"> + <include src="/packages/acs-subsite/lib/user-info" /> + <p><a href="@community_member_url@">#acs-subsite.lt_What_other_people_see#</a></p> -<if @account_status@ eq "closed"> - #acs-subsite.Account_closed_workspace_msg# -</if> + <list name="fragments"> + @fragments:item;noquote@ + </list> -<ul class="action-links"> - <li><a href="../user/email-privacy-level">#acs-subsite.Change_my_email_P#</a></li> - <li><a href="../user/password-update">#acs-subsite.Change_my_Password#</a></li> - <if @change_locale_url@ not nil> - <li><a href="@change_locale_url@">#acs-subsite.Change_locale_label#</a></li> + <if @account_status@ eq "closed"> + #acs-subsite.Account_closed_workspace_msg# </if> - <if @notifications_url@ not nil> - <li><a href="@notifications_url@">#acs-subsite.Manage_your_notifications#</a></li> - </if> + <h2>#acs-kernel.common_Actions#</h2> + <ul class="action-links"> + <li><a href="../user/email-privacy-level">#acs-subsite.Change_my_email_P#</a></li> + <li><a href="../user/password-update">#acs-subsite.Change_my_Password#</a></li> - <if @account_status@ ne "closed"> - <li><a href="unsubscribe">#acs-subsite.Close_your_account#</a></li> - </if> + <if @change_locale_url@ not nil> + <li><a href="@change_locale_url@">#acs-subsite.Change_locale_label#</a></li> + </if> - <li><a href="@community_member_url@">#acs-subsite.lt_What_other_people_see#</a></li> -</ul> + <if @notifications_url@ not nil> + <li><a href="@notifications_url@">#acs-subsite.Manage_your_notifications#</a></li> + </if> -<if @portrait_state@ eq upload> - <h2>#acs-subsite.Your_Portrait#</h2> - <p> - #acs-subsite.lt_Show_everyone_else_at# <a href="@portrait_upload_url@">#acs-subsite.upload_a_portrait#</a> - </p> -</if> -<if @portrait_state@ eq show> - <h2>#acs-subsite.Your_Portrait#</h2> - <p> - #acs-subsite.lt_On_portrait_publish_d#. - </p> -</if> + <if @account_status@ ne "closed"> + <li><a href="unsubscribe">#acs-subsite.Close_your_account#</a></li> + </if> -<h2>#acs-subsite.Whos_Online_title#</h2> + </ul> -<ul class="action-links"> - <li><a href="@whos_online_url@">#acs-subsite.Whos_Online_link_label#</a></li> -</ul> + <if @portrait_state@ eq upload> + <h2>#acs-subsite.Your_Portrait#</h2> + <p> + #acs-subsite.lt_Show_everyone_else_at# <a href="@portrait_upload_url@">#acs-subsite.upload_a_portrait#</a> + </p> + </if> -<if @invisible_p@ true> - #acs-subsite.Currently_invisible_msg# + <if @portrait_state@ eq show> + <h2>#acs-subsite.Your_Portrait#</h2> + <p> + #acs-subsite.lt_On_portrait_publish_d#. + </p> + </if> + + <h2>#acs-subsite.Whos_Online_title#</h2> <ul class="action-links"> - <li><a href="@make_visible_url@">#acs-subsite.Make_yourself_visible_label#</a></li> + <li><a href="@whos_online_url@">#acs-subsite.Whos_Online_link_label#</a></li> </ul> -</if> -<else> - #acs-subsite.Currently_visible_msg# - <ul class="action-links"> - <li><a href="@make_invisible_url@">#acs-subsite.Make_yourself_invisible_label#</a></li> - </ul> -</else> + + <if @invisible_p@ true> + #acs-subsite.Currently_invisible_msg# + <ul class="action-links"> + <li><a href="@make_visible_url@">#acs-subsite.Make_yourself_visible_label#</a></li> + </ul> + </if> + <else> + #acs-subsite.Currently_visible_msg# + <ul class="action-links"> + <li><a href="@make_invisible_url@">#acs-subsite.Make_yourself_invisible_label#</a></li> + </ul> + </else> Index: openacs-4/packages/acs-subsite/www/pvt/home.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/pvt/home.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/packages/acs-subsite/www/pvt/home.tcl 3 Oct 2003 10:14:31 -0000 1.17 +++ openacs-4/packages/acs-subsite/www/pvt/home.tcl 22 Mar 2005 00:58:41 -0000 1.18 @@ -17,7 +17,6 @@ export_user_id:onevalue ad_url:onevalue member_link:onevalue - subsite_url:onevalue pvt_home_url:onevalue } @@ -32,17 +31,16 @@ set pvt_home_url [ad_pvt_home] -set subsite_url [subsite::get_element -element url] - set context [list $page_title] +set fragments [callback 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 "../user/portrait/upload" { { return_url [ad_return_url] } }]