Index: openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/project-manager-procs.tcl,v diff -u -r1.2.2.7 -r1.2.2.8 --- openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl 20 Sep 2004 18:32:32 -0000 1.2.2.7 +++ openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl 21 Sep 2004 00:29:44 -0000 1.2.2.8 @@ -238,7 +238,7 @@ @param send_email_p Whether or not to send out an email notification t or f - @return + @return the comment_id of the new comment @error -1 if there is an error } { @@ -389,7 +389,7 @@ } - return 1 + return $comment_id } Index: openacs-4/contrib/packages/project-manager/www/task-one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-one.tcl,v diff -u -r1.24.2.5 -r1.24.2.6 --- openacs-4/contrib/packages/project-manager/www/task-one.tcl 10 Sep 2004 16:52:28 -0000 1.24.2.5 +++ openacs-4/contrib/packages/project-manager/www/task-one.tcl 21 Sep 2004 00:29:44 -0000 1.24.2.6 @@ -148,7 +148,7 @@ # set link to comments -set comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 $task_id "[ad_conn url]?task_id=$task_id"] +set comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 $task_id "[pm::task::get_url $task_id]"] set comments_link "Add comment" Index: openacs-4/contrib/packages/project-manager/www/comments/add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/comments/Attic/add.tcl,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/contrib/packages/project-manager/www/comments/add.tcl 10 Jun 2004 20:24:05 -0000 1.1 +++ openacs-4/contrib/packages/project-manager/www/comments/add.tcl 21 Sep 2004 00:29:45 -0000 1.1.2.1 @@ -13,6 +13,7 @@ title:notnull return_url:notnull {type "task"} + {attach_p "f"} {description:html ""} } -properties { } -validate { @@ -53,6 +54,12 @@ {options {{"Yes" "t"} {"No" "f"}}} } + {attach_p:text(select),optional + {label "Attach a file?"} + {options {{"Yes" "t"} {"No" "f"}}} + {value "f"} + } + } -new_request { set description [template::util::richtext::create "" {}] @@ -63,16 +70,21 @@ set description_body [template::util::richtext::get_property contents $description] set description_format [template::util::richtext::get_property format $description] - pm::util::general_comment_add \ - -object_id $object_id \ - -title "$title" \ - -comment "$description_body" \ - -mime_type "$description_format" \ - -send_email_p $send_email_p \ - -type $type + set comment_id [pm::util::general_comment_add \ + -object_id $object_id \ + -title "$title" \ + -comment "$description_body" \ + -mime_type "$description_format" \ + -send_email_p $send_email_p \ + -type $type] # does not seem to be working for some reason util_user_message -message "Comment: [ad_quotehtml $title] saved" - ad_returnredirect $return_url + + if { [string equal $attach_p "f"] && ![empty_string_p $return_url] } { + ad_returnredirect $return_url + } else { + ad_returnredirect "/comments/view-comment?[export_vars { comment_id return_url }]" + } }