Index: openacs-4/packages/dotlrn/www/dotlrn-main-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/dotlrn-main-portlet.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/dotlrn-main-portlet.adp 21 Jan 2002 07:47:09 -0000 1.1 @@ -0,0 +1,15 @@ +Join/Drop a Class or Community Group + + + + + + + + + +
+ + @communities.community_key@ @communities.pretty_name@
+ + Index: openacs-4/packages/dotlrn/www/dotlrn-main-portlet.adp~ =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/dotlrn-main-portlet.adp~,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/dotlrn-main-portlet.adp~ 21 Jan 2002 07:47:09 -0000 1.1 @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@foo.name@ + @foo.type@@foo.num@ items@foo.num@ item @foo.name@File\[download\]
+ +
+ + Index: openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl 21 Jan 2002 07:47:09 -0000 1.1 @@ -0,0 +1,29 @@ +# dotlrn/www/dotlrn-main-portlet-procs.tcl +ad_page_contract { + The display logic for the dotlrn main (Groups) portlet + + @author Arjun Sanyal (arjun@openforce.net) + @cvs_id $Id: dotlrn-main-portlet.tcl,v 1.1 2002/01/21 07:47:09 oracle Exp $ +} + +array set config $cf + +set user_id [ad_get_user_id] +set list_of_communities [dotlrn_community::get_all_communities_by_user $user_id] +set my_community_id [lindex $list_of_communities 0] + +db_multirow -local communities select_communities " +select dotlrn_communities.community_id, +dotlrn_communities.community_type, +dotlrn_communities.community_key, +dotlrn_communities.pretty_name, +dotlrn_communities.package_id +from dotlrn_communities, +dotlrn_member_rels_full +where dotlrn_communities.community_id = dotlrn_member_rels_full.community_id +and dotlrn_member_rels_full.user_id = :user_id" { +# ad_return_complaint 1 "aks [info locals] ${communities(package_id)}" + set communities(url) [dotlrn_community::get_url_from_package_id -package_id ${communities(package_id)} ] +} + +ad_return_template Index: openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl~ =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/dotlrn-main-portlet.tcl~,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl~ 21 Jan 2002 07:47:09 -0000 1.1 @@ -0,0 +1,31 @@ +# dotlrn/www/dotlrn-main-portlet-procs.tcl +ad_page_contract { + The display logic for the fs portlet + + @author Arjun Sanyal (arjun@openforce.net) + @cvs_id $Id: dotlrn-main-portlet.tcl~,v 1.1 2002/01/21 07:47:09 oracle Exp $ +} + +array set config $cf +set user_id [ad_get_user_id] + +# This is not templated. OH NO. I am a horrible, horrible, +# little man. (ben) + +set return_html "" +set communities [dotlrn_community::get_all_communities_by_user $user_id] + +foreach community $communities { + set url [dotlrn_community::get_url_from_package_id -package_id [lindex $community 4]] + set name [lindex $community 3] + + append return_html "\n" +} + +if {[dotlrn::user_can_browse_p $user_id]} { + append return_html "\n" + append return_html "\n" +} + +append return_html "
${name}

\[Subscribe to a new community\]
" +return $return_html