rejection now included with email systems.
This commit is contained in:
1 parent
b67730775c
commit
026fef47af
10 files changed
+223
-20
No files matched your search
@@ -149,6 +149,8 @@ class Admin::AnnouncementsController < OrbitAdminController
|
||||
if AnnouncementSetting.is_pro?
|
||||
if user_can_approve?
|
||||
bulletin.approved = true
|
||||
else
|
||||
send_notification_mail_to_managers(bulletin,"approval")
|
||||
end
|
||||
else
|
||||
bulletin.approved = true
|
||||
@@ -162,7 +164,16 @@ class Admin::AnnouncementsController < OrbitAdminController
|
||||
def approve_bulletin
|
||||
id = params[:id]
|
||||
bulletin = Bulletin.find(id)
|
||||
bulletin.approved = true
|
||||
if params["approved"] == "true"
|
||||
bulletin.approved = true
|
||||
bulletin.rejected = false
|
||||
bulletin.reapproval = false
|
||||
else
|
||||
bulletin.rejected = true
|
||||
bulletin.reapproval = false
|
||||
bulletin.rejection_reason = params["reason"]
|
||||
send_rejection_email(bulletin) rescue ""
|
||||
end
|
||||
bulletin.save
|
||||
redirect_to admin_announcements_path
|
||||
end
|
||||
@@ -197,7 +208,13 @@ class Admin::AnnouncementsController < OrbitAdminController
|
||||
end
|
||||
|
||||
bulletin.update_attributes(bps)
|
||||
bulletin.save
|
||||
if bulletin.rejected
|
||||
bulletin.reapproval = true
|
||||
bulletin.save
|
||||
send_notification_mail_to_managers(bulletin,"reapproval")
|
||||
else
|
||||
bulletin.save
|
||||
end
|
||||
build_email(bulletin)
|
||||
redirect_to params['referer_url']
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user