Index: openacs-4/packages/chat/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/index.tcl,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/chat/www/index.tcl 19 Nov 2007 01:14:16 -0000 1.8 +++ openacs-4/packages/chat/www/index.tcl 9 Nov 2008 23:29:23 -0000 1.9 @@ -29,10 +29,15 @@ lappend actions "#chat.Create_a_new_room#" room-edit "#chat.Create_a_new_room#" } -db_multirow -extend { active_users last_activity } rooms rooms_list {} { - set room [::chat::Chat create new -volatile -chat_id $room_id] - set active_users [$room nr_active_users] - set last_activity [$room last_activity] +db_multirow -extend { active_users last_activity room_url} rooms rooms_list {} { + + set room [::chat::Chat create new -volatile -chat_id $room_id] + set active_users [$room nr_active_users] + set last_activity [$room last_activity] + + if { $active_p } { + set room_url [export_vars -base "room-enter" {room_id {client $default_client}}] + } } list::create \ @@ -42,36 +47,28 @@ -pass_properties {room_create_p} \ -actions $actions \ -row_pretty_plural [_ chat.rooms] \ + -no_data [_ chat.There_are_no_rooms_available] \ -elements { active { label "#chat.Active#" - html { align "center" } + html { style "text-align: center" } display_template { -
- -
+ #chat.Room_active#
-
- -
+ #chat.Room_no_active#
} } pretty_name { label "#chat.Room_name#" - html { width 400px } - display_template { - - @rooms.pretty_name@ \[#chat.HTML_chat#\] - - - @rooms.pretty_name@ - -
@rooms.description@
- } + link_url_col room_url + link_html {title "[_ chat.Enter_rooms_pretty_name]"} } + description { + label "[_ chat.Description]" + } active_users { label "#chat.active_users#" html { style "text-align:center;" } @@ -91,4 +88,8 @@ } } +# set page properties + +set doc(title) [_ chat.Chat_main_page] + ad_return_template