@@ -93,11 +93,11 class IssuesController < ApplicationController | |||||
93 | #@issue.assigned_to_id = (params[:issue][:assigned_to_id]) |
|
93 | #@issue.assigned_to_id = (params[:issue][:assigned_to_id]) | |
94 | #@issue.done_ratio = (params[:issue][:done_ratio]) |
|
94 | #@issue.done_ratio = (params[:issue][:done_ratio]) | |
95 | #@issue.lock_version = (params[:issue][:lock_version]) |
|
95 | #@issue.lock_version = (params[:issue][:lock_version]) | |
96 | @issue.init_journal(self.logged_in_user, params[:notes]) |
|
96 | journal = @issue.init_journal(self.logged_in_user, params[:notes]) | |
97 | @issue.status = @new_status |
|
97 | @issue.status = @new_status | |
98 | if @issue.update_attributes(params[:issue]) |
|
98 | if @issue.update_attributes(params[:issue]) | |
99 | flash[:notice] = l(:notice_successful_update) |
|
99 | flash[:notice] = l(:notice_successful_update) | |
100 |
Mailer.deliver_issue_ |
|
100 | Mailer.deliver_issue_edit(journal) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled? | |
101 | redirect_to :action => 'show', :id => @issue |
|
101 | redirect_to :action => 'show', :id => @issue | |
102 | end |
|
102 | end | |
103 | rescue ActiveRecord::StaleObjectError |
|
103 | rescue ActiveRecord::StaleObjectError |
@@ -15,7 +15,9 | |||||
15 | # along with this program; if not, write to the Free Software |
|
15 | # along with this program; if not, write to the Free Software | |
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
17 |
|
17 | |||
18 | class Mailer < ActionMailer::Base |
|
18 | class Mailer < ActionMailer::Base | |
|
19 | ||||
|
20 | helper IssuesHelper | |||
19 |
|
21 | |||
20 | def issue_add(issue) |
|
22 | def issue_add(issue) | |
21 | # Sends to all project members |
|
23 | # Sends to all project members |
@@ -1,7 +1,7 | |||||
1 | Issue #<%= @issue.id %> has been updated. |
|
1 | Issue #<%= @issue.id %> has been updated. | |
2 | <%= @journal.user.name %> |
|
2 | <%= @journal.user.name %> | |
3 | <% for detail in @journal.details %> |
|
3 | <% for detail in @journal.details %> | |
4 | <%= show_detail(detail) %> |
|
4 | <%= show_detail(detail, true) %> | |
5 | <% end %> |
|
5 | <% end %> | |
6 | <%= @journal.notes if @journal.notes? %> |
|
6 | <%= @journal.notes if @journal.notes? %> | |
7 | ---------------------------------------- |
|
7 | ---------------------------------------- |
@@ -1,7 +1,7 | |||||
1 | Issue #<%= @issue.id %> has been updated. |
|
1 | Issue #<%= @issue.id %> has been updated. | |
2 | <%= @journal.user.name %> |
|
2 | <%= @journal.user.name %> | |
3 | <% for detail in @journal.details %> |
|
3 | <% for detail in @journal.details %> | |
4 | <%= show_detail(detail) %> |
|
4 | <%= show_detail(detail, true) %> | |
5 | <% end %> |
|
5 | <% end %> | |
6 | <%= @journal.notes if @journal.notes? %> |
|
6 | <%= @journal.notes if @journal.notes? %> | |
7 | ---------------------------------------- |
|
7 | ---------------------------------------- |
@@ -1,7 +1,7 | |||||
1 | Issue #<%= @issue.id %> has been updated. |
|
1 | Issue #<%= @issue.id %> has been updated. | |
2 | <%= @journal.user.name %> |
|
2 | <%= @journal.user.name %> | |
3 | <% for detail in @journal.details %> |
|
3 | <% for detail in @journal.details %> | |
4 | <%= show_detail(detail) %> |
|
4 | <%= show_detail(detail, true) %> | |
5 | <% end %> |
|
5 | <% end %> | |
6 | <%= @journal.notes if @journal.notes? %> |
|
6 | <%= @journal.notes if @journal.notes? %> | |
7 | ---------------------------------------- |
|
7 | ---------------------------------------- |
@@ -1,7 +1,7 | |||||
1 | La demande #<%= @issue.id %> a été mise à jour. |
|
1 | La demande #<%= @issue.id %> a été mise à jour. | |
2 | <%= @journal.user.name %> - <%= format_date(@journal.created_on) %> |
|
2 | <%= @journal.user.name %> - <%= format_date(@journal.created_on) %> | |
3 | <% for detail in @journal.details %> |
|
3 | <% for detail in @journal.details %> | |
4 | <%= show_detail(detail) %> |
|
4 | <%= show_detail(detail, true) %> | |
5 | <% end %> |
|
5 | <% end %> | |
6 | <%= journal.notes if journal.notes? %> |
|
6 | <%= journal.notes if journal.notes? %> | |
7 | ---------------------------------------- |
|
7 | ---------------------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now