Merge branch 'master' of https://github.com/openSUSE/osem into feature_tests2
This commit is contained in:
commit
53bc0a7dac
3 changed files with 23 additions and 18 deletions
|
|
@ -74,7 +74,9 @@ class ConferenceRegistrationController < ApplicationController
|
||||||
if update_registration
|
if update_registration
|
||||||
redirect_message = "Registration updated."
|
redirect_message = "Registration updated."
|
||||||
else
|
else
|
||||||
Mailbot.registration_mail(conference, current_user.person).deliver
|
if conference.email_settings.send_on_registration?
|
||||||
|
Mailbot.registration_mail(conference, current_user.person).deliver
|
||||||
|
end
|
||||||
end
|
end
|
||||||
redirect_to(register_conference_path(:id => conference.short_title), :notice => redirect_message)
|
redirect_to(register_conference_path(:id => conference.short_title), :notice => redirect_message)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -132,14 +132,17 @@ class Event < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def process_acceptance(options)
|
def process_acceptance(options)
|
||||||
if options[:send_mail] == "true"
|
if conference.email_settings.send_on_accepted &&
|
||||||
Rails.logger.debug "Sending acceptance mail"
|
options[:send_mail].blank?
|
||||||
|
Rails.logger.debug 'Sending event acceptance mail'
|
||||||
Mailbot.acceptance_mail(self).deliver
|
Mailbot.acceptance_mail(self).deliver
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def process_rejection(options)
|
def process_rejection(options)
|
||||||
if options[:send_mail] == "true"
|
if conference.email_settings.send_on_rejected &&
|
||||||
|
options[:send_mail].blank?
|
||||||
|
Rails.logger.debug 'Sending rejected mail'
|
||||||
Mailbot.rejection_mail(self).deliver
|
Mailbot.rejection_mail(self).deliver
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -106,21 +106,21 @@
|
||||||
<b class="caret"></b>
|
<b class="caret"></b>
|
||||||
%ul.dropdown-menu
|
%ul.dropdown-menu
|
||||||
- if event.transition_possible? :accept
|
- if event.transition_possible? :accept
|
||||||
%li= link_to 'Accept event (no email)',
|
%li= link_to 'Accept event',
|
||||||
update_state_admin_conference_event_path(@conference.short_title, event, transition: :accept, send_mail: false),
|
update_state_admin_conference_event_path(@conference.short_title, event, transition: :accept),
|
||||||
method: :patch, hint: 'Accept this event without sending an automated email.', id: 'accept_event'
|
method: :patch, id: 'accept_event'
|
||||||
%li= link_to 'Accept event (WITH email)',
|
- if @conference.email_settings.send_on_accepted?
|
||||||
update_state_admin_conference_event_path(@conference.short_title, event, transition: :accept, send_mail: true),
|
%li= link_to 'Accept event (without email)',
|
||||||
method: :patch, hint: 'Accept this event and send an automated email.', id: 'accept_event_mail'
|
update_state_admin_conference_event_path(@conference.short_title, event, transition: :accept, send_mail: false),
|
||||||
|
method: :patch, hint: 'Accept this event without sending an automated email.', id: 'accept_event_without_mail'
|
||||||
- if event.transition_possible? :reject
|
- if event.transition_possible? :reject
|
||||||
%li= link_to 'Reject event (no email)',
|
%li= link_to 'Reject event',
|
||||||
update_state_admin_conference_event_path(@conference.short_title, event, transition: :reject, send_mail: false),
|
update_state_admin_conference_event_path(@conference.short_title, event, transition: :reject),
|
||||||
method: :patch, confirm: 'Are you sure?',
|
method: :patch, confirm: 'Are you sure?', id: 'reject_event'
|
||||||
hint: 'Reject this event without sending an automated email.', id: 'reject_event'
|
- if @conference.email_settings.send_on_rejected?
|
||||||
%li= link_to 'Reject event (WITH email)',
|
%li= link_to 'Reject event (without email)',
|
||||||
update_state_admin_conference_event_path(@conference.short_title, event, transition: :reject, send_mail: true),
|
update_state_admin_conference_event_path(@conference.short_title, event, transition: :reject, send_mail: false),
|
||||||
method: :patch, confirm: 'Are you sure?',
|
method: :patch, confirm: 'Are you sure?', id: 'reject_event_without_mail'
|
||||||
hint: 'Reject this event and send an automated email.', id: 'reject_event_mail'
|
|
||||||
- if event.transition_possible? :start_review
|
- if event.transition_possible? :start_review
|
||||||
%li= link_to 'Start review',
|
%li= link_to 'Start review',
|
||||||
update_state_admin_conference_event_path(@conference.short_title, event, transition: :start_review),
|
update_state_admin_conference_event_path(@conference.short_title, event, transition: :start_review),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue