Merge branch 'release/4.2' into release/4.3

pull/6827/head
Jens Ulferts 9 years ago
commit 15895439ec
  1. 21
      app/controllers/meeting_contents_controller.rb
  2. 2
      config/locales/de.yml
  3. 2
      config/locales/en.yml

@ -83,10 +83,23 @@ class MeetingContentsController < ApplicationController
def notify def notify
unless @content.new_record? unless @content.new_record?
recipients = @content.meeting.participants.collect(&:mail).reject { |r| r == @content.meeting.author.mail } author_mail = @content.meeting.author.mail
recipients << @content.meeting.author.mail unless @content.meeting.author.preference[:no_self_notified] do_not_notify_author = @content.meeting.author.preference[:no_self_notified]
recipients.each do |recipient|
MeetingMailer.content_for_review(@content, @content_type, recipient).deliver recipients_with_errors = []
@content.meeting.participants.each do |recipient|
begin
next if recipient.mail == author_mail && do_not_notify_author
MeetingMailer.content_for_review(@content, @content_type, recipient.mail).deliver
rescue
recipients_with_errors << recipient
end
end
if recipients_with_errors == []
flash[:notice] = l(:notice_successful_notification)
else
flash[:error] = l(:error_notification_with_errors,
recipients: recipients_with_errors.map(&:name).join('; '))
end end
end end
redirect_back_or_default controller: '/meetings', action: 'show', id: @meeting redirect_back_or_default controller: '/meetings', action: 'show', id: @meeting

@ -36,7 +36,7 @@ de:
description_attended: "teilgenommen" description_attended: "teilgenommen"
description_invite: "eingeladen" description_invite: "eingeladen"
error_notification_with_errors: "Benachrichtigungversenden fehlgeschlagen. Folgende Empfänger konnten nicht benachrichtigt werden: " error_notification_with_errors: "Benachrichtigungversenden fehlgeschlagen. Folgende Empfänger konnten nicht benachrichtigt werden: %{recipients}"
events: events:
meeting: Besprechung bearbeitet meeting: Besprechung bearbeitet

@ -44,7 +44,7 @@ en:
meeting_minutes: Meeting minutes edited meeting_minutes: Meeting minutes edited
meeting_minutes_created: Meeting minutes created meeting_minutes_created: Meeting minutes created
error_notification_with_errors: "Failed to send notification. The following recipients could not be notified: " error_notification_with_errors: "Failed to send notification. The following recipients could not be notified: %{recipients}"
label_meeting_hour: "Time (hour)" label_meeting_hour: "Time (hour)"
label_meeting_minute: "Time (minute)" label_meeting_minute: "Time (minute)"

Loading…
Cancel
Save