Index: openacs-4/packages/dotlrn/www/one-community.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community.tcl,v diff -u -r1.29 -r1.30 --- openacs-4/packages/dotlrn/www/one-community.tcl 5 Jul 2002 08:13:46 -0000 1.29 +++ openacs-4/packages/dotlrn/www/one-community.tcl 13 Jul 2002 18:31:32 -0000 1.30 @@ -19,6 +19,7 @@ @author Ben Adida (ben@openforce.net) @author yon (yon@openforce.net) + @author arjun (arjun@openforce.net) @creation-date 2001-10-04 @version $Id$ } -query { @@ -34,40 +35,29 @@ # Get basic information set user_id [ad_conn user_id] set community_id [dotlrn_community::get_community_id] -set pretty_name [dotlrn_community::get_community_name $community_id] set admin_p [dotlrn::user_can_admin_community_p \ -user_id $user_id \ -community_id $community_id ] # Check that this user is a member if {![dotlrn_community::member_p $community_id $user_id] && !$admin_p} { - set context_bar [list "Not a member"] - if {[dotlrn_community::member_pending_p -community_id $community_id -user_id $user_id]} { - set member_pending_p "t" - set context_bar [list "Pending approval"] - } + set portal_id [dotlrn_community::get_non_member_portal_id \ + -community_id $community_id + ] - set portal_id [dotlrn_community::get_non_member_portal_id -community_id $community_id] - - # Possible that there is no portal page for non-members - if {! [empty_string_p $portal_id]} { - set rendered_page [dotlrn::render_page -hide_links_p "t" -page_num $page_num $portal_id] - - } else { - set rendered_page "" - } - - ad_return_template one-community-not-member - return } else { - set portal_id [dotlrn_community::get_portal_id -community_id $community_id] - set rendered_page [dotlrn::render_page -hide_links_p "t" -page_num $page_num $portal_id] + set portal_id [dotlrn_community::get_portal_id \ + -community_id $community_id + ] +} - set context_bar {View} - set url_stub "one-community" +set rendered_page [dotlrn::render_page \ + -hide_links_p t \ + -page_num $page_num \ + $portal_id +] - ad_return_template -} +ad_return_template