From aac672d0a3bcc0c7894acd7bb4df40ba55594dd4 Mon Sep 17 00:00:00 2001 From: Abhishek Yadav Date: Fri, 20 Jul 2018 23:30:25 +0530 Subject: [PATCH] - Send review comments (as emails) to authors also. Right from the talk page Changes wording also - Removes Accept/Decline buttons --- cfp/signals.py | 5 +++++ cfp/templates/cfp/staff/talk_details.html | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cfp/signals.py b/cfp/signals.py index 6d5ddfb..13fe89a 100644 --- a/cfp/signals.py +++ b/cfp/signals.py @@ -66,14 +66,19 @@ def send_message_notifications(sender, instance, **kwargs): user_subject = _('[%(conference)s] Message from the staff') % {'conference': str(conf)} staff_subject = _('[%(conference)s] Conversation with %(user)s') % {'conference': str(conf), 'user': str(user)} if author == user: # message from the user, notify the staff + ## Author sending message to reviewer message.send_notification(sender=sender, dests=staff_dests, reply_to=reply_to, message_id=message_id, reference=reference, subject=staff_subject) else: # message to the user, notify the user, and the staff if the message is not a conference notification + ## The message from the user-profile page message.send_notification(sender=sender, dests=dests, reply_to=reply_to, message_id=message_id, reference=reference, subject=user_subject) if author != conf: message.send_notification(sender=sender, dests=staff_dests, reply_to=reply_to, message_id=message_id, reference=reference, subject=staff_subject) elif hasattr(thread, 'talk'): message.send_notification(sender=sender, dests=staff_dests, reply_to=reply_to, message_id=message_id, reference=reference) + ## Send the reviewer's comment to the speakers also (be careful with indentation - use spaces not tabs) + speaker_dests = [ (user, user.name, user.email) for user in thread.talk.speakers.all() ] + message.send_notification(sender=sender, dests=speaker_dests, reply_to=reply_to, message_id=message_id, reference=reference) # connected in apps.py diff --git a/cfp/templates/cfp/staff/talk_details.html b/cfp/templates/cfp/staff/talk_details.html index 7ab0848..814b585 100644 --- a/cfp/templates/cfp/staff/talk_details.html +++ b/cfp/templates/cfp/staff/talk_details.html @@ -97,8 +97,8 @@

{% trans "Vote" %}

{{ talk.vote_set.count }} {% trans "vote" %}{{ talk.vote_set.count|pluralize }}, {% trans "average:" %} {{ talk.score|floatformat:1 }}

-{% trans "Accept" %} -{% trans "Decline" %} + + {% elif talk.accepted == True and talk.confirmed == None %}

{% trans "Speaker confirmation" %}

@@ -125,7 +125,7 @@

{% trans "Messaging" %}

{% include 'mailing/_message_list.html' with messages=talk.conversation.message_set.all %} -{% trans "Comment this talk – this message will be received by the staff team only" as message_form_title %} +{% trans "Comment this talk – this message will be received by the staff team and the authors" as message_form_title %} {% include 'mailing/_message_form.html' %} {% endblock %}