Added mail notification when a new message is posted in the forums.

Only users who "watch" the board receive notifications. To watch a board, go to the board and click on the "Watch" link.

Notifications are sent by MessageObserver observer.
GLoc was modified to use the mail template without language suffix when translated template (with language suffix) doesn't exist.
Usefull when there's no hard coded text in the mail tempate.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@531 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-05-14 17:03:59 +00:00
parent bca5bd9c62
commit 7ca7e4bad5
5 changed files with 40 additions and 2 deletions
+2 -1
View File
@@ -92,7 +92,8 @@ module ActionMailer #:nodoc:
private
alias :render_message_without_gloc :render_message
def render_message(method_name, body)
render_message_without_gloc("#{method_name}_#{current_language}", body)
template = File.exist?("#{template_path}/#{method_name}_#{current_language}.rhtml") ? "#{method_name}_#{current_language}" : "#{method_name}"
render_message_without_gloc(template, body)
end
end
end