Index: openacs-4/packages/dotlrn/tcl/community-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 9 Nov 2001 15:24:57 -0000 1.20 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 11 Nov 2001 18:48:01 -0000 1.21 @@ -89,7 +89,7 @@ ad_proc set_attribute { community_id attribute_name - attribuate_value + attribute_value } { Set an attribute for a community } { @@ -307,6 +307,30 @@ return [db_string select_community {} -default ""] } + ad_proc -public get_community_type_url { + community_type + } { + Get the URL for a community type + } { + return [get_url -package_id [get_community_type_package_id $community_type]] + } + + ad_proc -public get_community_url { + community_id + } { + Get the URL for a community + } { + return [get_url -package_id [get_package_id $community_id]] + } + + ad_proc -public get_community_type_package_id { + community_type + } { + get the package id for a particular community type + } { + return [db_string select_package_id {} -default ""] + } + ad_proc -public get_package_id { community_id } { @@ -323,6 +347,22 @@ } { return [db_string select_package_id {} -default ""] } + + ad_proc -public get_community_type_name { + community_type + } { + get the name for a community type + } { + return [db_string select_community_type_name {} -default ""] + } + + ad_proc -public get_community_name { + community_id + } { + get the name for a community + } { + return [db_string select_community_name {} -default ""] + } ad_proc -public add_applet { community_id Index: openacs-4/packages/dotlrn/tcl/community-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.xql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn/tcl/community-procs.xql 9 Nov 2001 15:24:57 -0000 1.8 +++ openacs-4/packages/dotlrn/tcl/community-procs.xql 11 Nov 2001 18:48:01 -0000 1.9 @@ -113,6 +113,12 @@ + + +select package_id from dotlrn_community_types where community_type= :community_type + + + select package_id from dotlrn_communities where community_id= :community_id @@ -125,6 +131,12 @@ + + + + + + insert into dotlrn_community_applets 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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/tcl/navigation-procs.tcl 11 Nov 2001 18:48:01 -0000 1.1 @@ -0,0 +1,58 @@ + +# +# Procs for DOTLRN navigation +# Copyright 2001 OpenForce, inc. +# Distributed under the GNU GPL v2 +# +# November 10th, 2001 +# + +ad_library { + + Procs for dotLRN navigation + + @author ben@openforce.net + @creation-date 2001-11-10 + +} + +namespace eval dotlrn { + + ad_proc -public root_url { + } { + return "/dotlrn" + } + + ad_proc -public navbar { + { -community_id "" } + { -community_type "" } + args + } { + Creates a Navigation Bar for dotLRN + } { + # Fetch community_id and community_type if they're not there + if {[empty_string_p $community_id] && [empty_string_p $community_type]} { + set community_id [dotlrn::get_community_id] + set community_type [dotlrn::get_community_type] + } + + if {![empty_string_p $community_id]} { + set community_type [dotlrn_community::get_community_type_from_community_id $community_id] + } + + set list_of_links [list "dotLRN"] + + lappend list_of_links "[dotlrn_community::get_community_type_name $community_type]" + + if {![empty_string_p $community_id]} { + lappend list_of_links "[dotlrn_community::get_community_name $community_id]" + } + + foreach arg $args { + lappend list_of_links "[lindex $arg 1]" + } + + return "[join $list_of_links " > "] >
" + } + +} 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 -r1.6 -r1.7 --- openacs-4/packages/dotlrn/www/one-community-type.adp 10 Nov 2001 02:33:38 -0000 1.6 +++ openacs-4/packages/dotlrn/www/one-community-type.adp 11 Nov 2001 18:48:01 -0000 1.7 @@ -6,6 +6,7 @@ @description@ +

Communities You're a Member Of