diff plugins/redmine_bibliography/lib/bibliography/mailer_patch.rb @ 1432:ebda59ca84db bibliography_testing

Merge from main luisf branch (includes new authorship interface).
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 08 Oct 2013 17:18:50 +0100
parents 581999ce44ea
children a59e53e4f006
line wrap: on
line diff
--- a/plugins/redmine_bibliography/lib/bibliography/mailer_patch.rb	Thu Aug 22 14:50:56 2013 +0100
+++ b/plugins/redmine_bibliography/lib/bibliography/mailer_patch.rb	Tue Oct 08 17:18:50 2013 +0100
@@ -4,7 +4,7 @@
   module MailerPatch
       def self.included(base) # :nodoc:
 
-        # Builds a tmail object used to email the specified user that a publication was created and the user is 
+        # Builds a tmail object used to email the specified user that a publication was created and the user is
         # an author of that publication
         #
         # Example:
@@ -16,16 +16,15 @@
           @project = project
 
           set_language_if_valid user.language
-          recipients user.mail
-          subject l(:mail_subject_publication_added, Setting.app_title)
-          body :publication_url => url_for( :controller => 'publications', :action => 'show', :id => publication.id ),
-              :publication_title => publication.title
 
-          render_multipart('publication_added', body)
+          mail :to => user.mail,
+          :subject => l(:mail_subject_register, Setting.app_title)
 
+          @publication_url = url_for( :controller => 'publications', :action => 'show', :id => publication.id )
+          @publication_title = publication.title
         end
-        
-        
+
+
     end
   end
 end