Project

General

Profile

Feature #11530 » 0001-Support-hooks-in-mailer.patch

Kouhei Sutou, 2012-07-29 10:52

View differences:

app/views/mailer/wiki_content_added.html.erb
1 1
<p><%= l(:mail_body_wiki_content_added, :id => link_to(h(@wiki_content.page.pretty_title), @wiki_content_url),
2 2
                                        :author => h(@wiki_content.author)).html_safe %><br />
3 3
<em><%=h @wiki_content.comments %></em></p>
4

  
5
<%= call_hook(:view_mailer_wiki_content_added_bottom,
6
              :wiki_content => @wiki_content) %>
app/views/mailer/wiki_content_added.text.erb
3 3
<%= @wiki_content.comments %>
4 4

  
5 5
<%= @wiki_content_url %>
6

  
7
<%= call_hook(:view_mailer_wiki_content_added_bottom,
8
              :wiki_content => @wiki_content) %>
app/views/mailer/wiki_content_updated.html.erb
4 4

  
5 5
<p><%= l(:label_view_diff) %>:<br />
6 6
<%= link_to h(@wiki_diff_url), @wiki_diff_url %></p>
7

  
8
<%= call_hook(:view_mailer_wiki_content_updated_bottom,
9
              :wiki_content => @wiki_content) %>
app/views/mailer/wiki_content_updated.text.erb
6 6
<%= @wiki_content_url %>
7 7
<%= l(:label_view_diff) %>:
8 8
<%= @wiki_diff_url %>
9

  
10
<%= call_hook(:view_mailer_wiki_content_updated_bottom,
11
              :wiki_content => @wiki_content) %>
lib/redmine/plugin.rb
82 82
      view_path = File.join(p.directory, 'app', 'views')
83 83
      if File.directory?(view_path)
84 84
        ActionController::Base.prepend_view_path(view_path)
85
        ActionMailer::Base.prepend_view_path(view_path)
85 86
      end
86 87

  
87 88
      # Adds the app/{controllers,helpers,models} directories of the plugin to the autoload path
(1-1/8)