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 -r1.1.18.2 -r1.1.18.3 --- openacs-4/packages/acs-subsite/lib/user-subsites.adp 23 Apr 2017 17:26:29 -0000 1.1.18.2 +++ openacs-4/packages/acs-subsite/lib/user-subsites.adp 24 Apr 2017 13:19:42 -0000 1.1.18.3 @@ -1,8 +1,9 @@ - <if @groups:rowcount@ gt 0> + <if @groups:rowcount@ gt 0> <h2>#acs-subsite.You_are_in_the_follow#</h2> <ul> <multiple name="groups"> <li> @groups.group_name@ + <if @groups.member_state;literal@ ne "approved"> (@groups.member_state_pretty@) </if> <if @groups.admin_p;literal@ true> [<a href="@groups.admin_url@">#acs-kernel.common_Administration#</a>]</if></li> </multiple> </ul> 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 -r1.1.18.2 -r1.1.18.3 --- openacs-4/packages/acs-subsite/lib/user-subsites.tcl 23 Apr 2017 17:26:29 -0000 1.1.18.2 +++ openacs-4/packages/acs-subsite/lib/user-subsites.tcl 24 Apr 2017 13:19:42 -0000 1.1.18.3 @@ -1,11 +1,18 @@ -db_multirow -extend {url admin_p admin_url} 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) +db_multirow -extend {url admin_p admin_url member_state_pretty} groups groups { + select ap.package_id, r.object_id_one as group_id, g.group_name, mr.member_state + from acs_rels r, + membership_rels mr, + groups g, + application_groups ap + where r.rel_type = 'membership_rel' + and r.object_id_two = :user_id + and mr.rel_id = r.rel_id + and g.group_id = r.object_id_one + and ap.group_id = g.group_id + order by lower(g.group_name) } { set admin_p [permission::permission_p -party_id $user_id -object_id $group_id -privilege "admin"] + set member_state_pretty [group::get_member_state_pretty -member_state $member_state] #set url [apm_package_url_from_id $package_id] set url "" set admin_url [export_vars -base /members/ {{group_id $group_id}}]