-#chat.There_are_no_rooms_available#
+
+#chat.There_are_no_rooms_available#
- <% set num_rooms 0 %>
- <%
- set can_see 0
- if {($rooms(active_p) eq "t" && $rooms(user_p) eq "t") || ($rooms(admin_p) eq "t")} {
- set can_see 1
- set num_rooms [expr $num_rooms + 1]
- }
- %>
-
+
- @rooms.pretty_name@ |
+ @rooms.pretty_name@ |
- [ HTML | java ]
+ [ #chat-portlet.html_mode# ]
|
@@ -50,21 +42,11 @@
(NO #chat.Active#)
- <%
- if {$inside_comm_p eq "1"} {
- set desc [string range $rooms(description) 0 50]
- } else {
- set desc $rooms(keyclub)
- }
- %>
- @desc@
+ @rooms.description@
|
|
-
- #chat.There_are_no_rooms_available#
-
Index: openacs-4/packages/chat-portlet/www/chat-portlet.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/chat-portlet/www/chat-portlet.tcl,v
diff -u -r1.1 -r1.1.2.1
--- openacs-4/packages/chat-portlet/www/chat-portlet.tcl 14 Mar 2006 12:23:38 -0000 1.1
+++ openacs-4/packages/chat-portlet/www/chat-portlet.tcl 25 Apr 2006 08:58:25 -0000 1.1.2.1
@@ -30,34 +30,27 @@
array set config $cf
set list_of_package_ids $config(package_id)
-set user_id [ad_conn user_id]
set sep_package_ids [join $list_of_package_ids ", "]
+set chat_url "[ad_conn package_url]/chat/"
-if {[llength $list_of_package_ids] == 1} {
- set single_p "t"
-} else {
- set single_p "f"
-}
-
set context [list]
-set shaded_p $config(shaded_p)
-set chat_url "[ad_conn package_url]/chat/"
+set user_id [ad_conn user_id]
set community_id [dotlrn_community::get_community_id]
set room_create_p [ad_permission_p $user_id chat_room_create]
-set one_instance_p [ad_decode [llength $list_of_package_ids] 1 1 0]
-if {[exists_and_not_null community_id]} {
- #We are in portal for one class or community
- set inside_comm_p 1
- db_multirow rooms rooms_list {}
+set default_mode [ad_parameter DefaultClient chat "ajax"]
+set num_rooms 0
+
+if { $community_id eq 0 } {
+ set query_name "rooms_list_all"
} else {
- #We are in user portal
- set inside_comm_p 0
- db_multirow -extend { keyclub } rooms rooms_list_all {} {
- set keyclub [dotlrn_community::get_community_description -community_id [dotlrn_community::get_community_id_from_url -url $base_url]]
- if {$keyclub eq ""} {
- set keyclub $description
- }
- }
+ set query_name "rooms_list"
}
-ad_return_template
+db_multirow -extend { can_see_p } rooms $query_name {} {
+ set can_see_p 0
+ if {($active_p eq "t" && $user_p eq "t") || ($admin_p eq "t")} {
+ set can_see_p 1
+ set num_rooms [expr $num_rooms + 1]
+ }
+}
+ad_return_template