Index: openacs-4/packages/dotlrn/www/one-community-admin.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-admin.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/one-community-admin.tcl 6 Oct 2001 18:24:42 -0000 1.1 +++ openacs-4/packages/dotlrn/www/one-community-admin.tcl 8 Oct 2001 21:38:37 -0000 1.2 @@ -20,12 +20,30 @@ set community_id [dotlrn_community::get_community_id] # Load some community type info -db_1row select_community_type_info {} +db_1row select_community_info {} -# Check what communities of this type the user is a member of -# cause we want to display that! -set communities [dotlrn_community::get_communities_by_user $community_type $user_id] +# Get active applets +set list_of_active_applets [dotlrn_community::list_applets $community_id] -# communities should be a data source +template::multirow create active_applets applet_key applet_pretty_name +foreach applet_key $list_of_active_applets { + template::multirow append active_applets $applet_key [dotlrn_community::applet_call $applet_key GetPrettyName] +} + + +# List all applets +set list_of_applets [dotlrn_community::list_applets] + +template::multirow create all_applets applet_key applet_pretty_name + +foreach applet_key $list_of_applets { + if {[lsearch $list_of_active_applets $applet_key] == -1} { + template::multirow append all_applets $applet_key [dotlrn_community::applet_call $applet_key GetPrettyName] + } +} + + +set context_bar {Admin} + ad_return_template