Index: openacs-4/packages/dotlrn/dotlrn.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/dotlrn.info,v diff -u -N -r1.23 -r1.24 --- openacs-4/packages/dotlrn/dotlrn.info 15 Jan 2002 20:47:01 -0000 1.23 +++ openacs-4/packages/dotlrn/dotlrn.info 15 Jan 2002 22:23:41 -0000 1.24 @@ -131,6 +131,8 @@ + + Index: openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl,v diff -u -N -r1.13 -r1.14 --- openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl 11 Jan 2002 21:51:50 -0000 1.13 +++ openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl 15 Jan 2002 22:23:41 -0000 1.14 @@ -78,8 +78,7 @@ if {[dotlrn::user_can_browse_p $user_id]} { append return_html "

\n" - append return_html "\[Subscribe to a new class\] " - append return_html "\[Subscribe to a new club\]\n" + append return_html "\[Subscribe to a new community\]\n" } append return_html "" Index: openacs-4/packages/dotlrn/tcl/navigation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/navigation-procs.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/dotlrn/tcl/navigation-procs.tcl 15 Jan 2002 20:47:01 -0000 1.4 +++ openacs-4/packages/dotlrn/tcl/navigation-procs.tcl 15 Jan 2002 22:23:41 -0000 1.5 @@ -65,6 +65,7 @@ lappend first_args [list [dotlrn_community::get_community_type_url $community_type] [ad_parameter classes_pretty_plural]] } elseif {[string equal ${community_type} "dotlrn_club"] != 0} { lappend first_args [list [dotlrn_community::get_community_type_url $community_type] [ad_parameter clubs_pretty_plural]] + } elseif {[string equal ${community_type} "dotlrn_community"] != 0} { } else { lappend first_args [list [dotlrn_community::get_community_type_url $community_type] [dotlrn_community::get_community_type_name $community_type]] } Index: openacs-4/packages/dotlrn/www/all-communities.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/all-communities.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/all-communities.adp 15 Jan 2002 22:23:41 -0000 1.1 @@ -0,0 +1,9 @@ + +@context_bar@ +All Communities + +

+ +
+ +
Index: openacs-4/packages/dotlrn/www/all-communities.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/all-communities.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/all-communities.tcl 15 Jan 2002 22:23:41 -0000 1.1 @@ -0,0 +1,14 @@ +ad_page_contract { + Displays all available communities + + @author yon (yon@openforce.net) + @creation-date 2002-01-15 + @version $Id: all-communities.tcl,v 1.1 2002/01/15 22:23:41 yon Exp $ +} -query { +} -properties { + context_bar:onevalue +} + +set context_bar {{All Communities}} + +ad_return_template Index: openacs-4/packages/dotlrn/www/communities-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/communities-oracle.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/dotlrn/www/communities-oracle.xql 11 Jan 2002 21:51:51 -0000 1.3 +++ openacs-4/packages/dotlrn/www/communities-oracle.xql 15 Jan 2002 22:23:41 -0000 1.4 @@ -7,7 +7,6 @@ select count(*) from dotlrn_communities_not_closed dotlrn_communities - where dotlrn_communities.community_type = :community_type @@ -27,12 +26,60 @@ and dotlrn_member_rels_full.community_id = dotlrn_communities.community_id)) as member_p, decode(acs_permission.permission_p(:user_id, dotlrn_communities.community_id, 'admin'),'f',0,1) as admin_p from dotlrn_communities_not_closed dotlrn_communities + order by dotlrn_communities.community_type, dotlrn_communities.pretty_name + + + + + + select dotlrn_communities.community_id, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name, + dotlrn_communities.description, + dotlrn_communities.package_id, + dotlrn_community.url(dotlrn_communities.community_id) as url, + (select count(*) + from dual + where exists (select 1 + from dotlrn_member_rels_full + where dotlrn_member_rels_full.user_id = :user_id + and dotlrn_member_rels_full.community_id = dotlrn_communities.community_id)) as member_p, + decode(acs_permission.permission_p(:user_id, dotlrn_communities.community_id, 'admin'),'f',0,1) as admin_p + from dotlrn_active_comms_not_closed dotlrn_communities + order by dotlrn_communities.community_type, dotlrn_communities.pretty_name + + + + + + select count(*) + from dotlrn_communities_not_closed dotlrn_communities where dotlrn_communities.community_type = :community_type + + + + + + select dotlrn_communities.community_id, + dotlrn_communities.community_type, + dotlrn_communities.pretty_name, + dotlrn_communities.description, + dotlrn_communities.package_id, + dotlrn_community.url(dotlrn_communities.community_id) as url, + (select count(*) + from dual + where exists (select 1 + from dotlrn_member_rels_full + where dotlrn_member_rels_full.user_id = :user_id + and dotlrn_member_rels_full.community_id = dotlrn_communities.community_id)) as member_p, + decode(acs_permission.permission_p(:user_id, dotlrn_communities.community_id, 'admin'),'f',0,1) as admin_p + from dotlrn_communities_not_closed dotlrn_communities + where dotlrn_communities.community_type = :community_type order by dotlrn_communities.pretty_name - + select dotlrn_communities.community_id, dotlrn_communities.community_type, Index: openacs-4/packages/dotlrn/www/communities.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/communities.adp,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/dotlrn/www/communities.adp 11 Jan 2002 21:51:51 -0000 1.4 +++ openacs-4/packages/dotlrn/www/communities.adp 15 Jan 2002 22:23:41 -0000 1.5 @@ -10,10 +10,10 @@ @communities.pretty_name@ - () + () - () + () Index: openacs-4/packages/dotlrn/www/communities.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/communities.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/dotlrn/www/communities.tcl 11 Jan 2002 21:51:51 -0000 1.4 +++ openacs-4/packages/dotlrn/www/communities.tcl 15 Jan 2002 22:23:41 -0000 1.5 @@ -6,16 +6,26 @@ @version $Id$ } -query { {filter "select_active_communities"} - {referer "./"} } -properties { n_communities:onevalue communities:multirow } +if {![info exists community_type]} { + set community_type "" +} + +if {![info exists referer]} { + set referer "./" +} + set user_id [ad_conn user_id] -set community_type [dotlrn_community::get_community_type] -set n_communities [db_string select_all_communities_count {}] +if {![empty_string_p $community_type]} { + set n_communities [db_string select_all_communities_count_by_type {}] +} else { + set n_communities [db_string select_all_communities_count {}] +} set filter_bar [ad_dimensional { {filter "Status:" select_active_communities @@ -26,6 +36,10 @@ } }] +if {![empty_string_p $community_type]} { + append filter "_by_type" +} + db_multirow communities $filter {} ad_return_template Index: openacs-4/packages/dotlrn/www/community-deregister.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/community-deregister.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/dotlrn/www/community-deregister.tcl 11 Jan 2002 21:51:51 -0000 1.3 +++ openacs-4/packages/dotlrn/www/community-deregister.tcl 15 Jan 2002 22:23:41 -0000 1.4 @@ -6,9 +6,9 @@ @creation-date 2001-10-06 @version $Id$ } -query { - {referer "./"} {user_id ""} {community_id ""} + {referer "./"} } ad_maybe_redirect_for_registration @@ -25,4 +25,4 @@ dotlrn_community::remove_user $community_id $user_id -ns_returnredirect $referer +ad_returnredirect $referer Index: openacs-4/packages/dotlrn/www/community-register.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/community-register.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/dotlrn/www/community-register.tcl 10 Jan 2002 19:30:18 -0000 1.4 +++ openacs-4/packages/dotlrn/www/community-register.tcl 15 Jan 2002 22:23:41 -0000 1.5 @@ -6,8 +6,8 @@ @creation-date 2001-10-06 @version $Id$ } -query { - {referer "./"} {community_id ""} + {referer "./"} } ad_maybe_redirect_for_registration Index: openacs-4/packages/dotlrn/www/one-community-type.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-type.adp,v diff -u -N -r1.13 -r1.14 --- openacs-4/packages/dotlrn/www/one-community-type.adp 10 Jan 2002 19:30:18 -0000 1.13 +++ openacs-4/packages/dotlrn/www/one-community-type.adp 15 Jan 2002 22:23:41 -0000 1.14 @@ -17,5 +17,5 @@

- +