Index: openacs-4/packages/chat/lib/transcripts.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/lib/transcripts.tcl,v diff -u -r1.3 -r1.3.4.1 --- openacs-4/packages/chat/lib/transcripts.tcl 9 Nov 2008 23:29:23 -0000 1.3 +++ openacs-4/packages/chat/lib/transcripts.tcl 30 Nov 2016 17:04:43 -0000 1.3.4.1 @@ -1,14 +1,25 @@ +set transcript_create_p [permission::permission_p -object_id $room_id -privilege chat_transcript_create] set transcript_delete_p [permission::permission_p -object_id $room_id -privilege chat_transcript_delete] -set transcript_view_p [permission::permission_p -object_id $room_id -privilege chat_transcript_view] +set transcript_view_p [permission::permission_p -object_id $room_id -privilege chat_transcript_view] # List available chat transcript -db_multirow -extend { creation_date_pretty viewer transcript_url} chat_transcripts list_transcripts *SQL* { +db_multirow -extend { + creation_date_pretty + viewer + transcript_url + delete_url +} chat_transcripts list_transcripts {} { set creation_date_pretty [lc_time_fmt $creation_date "%q %X"] set transcript_url [export_vars -base "chat-transcript" {room_id transcript_id}] + set delete_url [export_vars -base "transcript-delete" {room_id transcript_id}] } -set actions [list [_ chat.Create_transcript] [export_vars -base "transcript-new" {room_id}]] +set actions {} +if {$transcript_create_p} { + lappend actions \ + [_ chat.Create_transcript] [export_vars -base "transcript-new" {room_id}] "" +} list::create \ -name "chat_transcripts" \ @@ -31,9 +42,9 @@ html { align "center" } display_template { - - #chat.Delete_transcript# - + + #chat.Delete_transcript# + } }