SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 960e54d4 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Autho accept puboffer buttons; improve displays of info on rec, dec

parent 8da70070
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,12 @@ ...@@ -37,7 +37,12 @@
{% if sub.editor_in_charge %} {% if sub.editor_in_charge %}
<li><a href="{% url 'submissions:communication' sub.preprint.identifier_w_vn_nr 'AtoE' %}">Write to the Editor-in-charge</a></li> <li><a href="{% url 'submissions:communication' sub.preprint.identifier_w_vn_nr 'AtoE' %}">Write to the Editor-in-charge</a></li>
{% endif %} {% endif %}
<li><a href="{% url 'submissions:withdraw_manuscript' sub.preprint.identifier_w_vn_nr %}"><span class="text-danger">Withdraw</span></a> (leads to confirmation page)</li> {% if sub.editorial_decision %}
{% if sub.editorial_decision.status == sub.editorial_decision.AWAITING_PUBOFFER_ACCEPTANCE %}
<li><a class="btn btn-primary my-1 px-1 py-0" href="{% url 'submissions:accept_puboffer' sub.preprint.identifier_w_vn_nr %}">Accept offer for publication in {{ sub.editorial_decision.for_journal }} (one-click action)</a></li>
{% endif %}
{% endif %}
<li><ahref="{% url 'submissions:withdraw_manuscript' sub.preprint.identifier_w_vn_nr %}"><span class="text-danger">Withdraw</span> (leads to confirmation page)</a></li>
{% endif %} {% endif %}
</ul> </ul>
</p> </p>
......
...@@ -38,7 +38,8 @@ SUBMISSION_STATUS = ( ...@@ -38,7 +38,8 @@ SUBMISSION_STATUS = (
# Submissions which are currently under consideration # Submissions which are currently under consideration
SUBMISSION_UNDER_CONSIDERATION = [ SUBMISSION_UNDER_CONSIDERATION = [
STATUS_INCOMING, STATUS_UNASSIGNED, STATUS_EIC_ASSIGNED, STATUS_RESUBMITTED STATUS_INCOMING, STATUS_UNASSIGNED, STATUS_EIC_ASSIGNED, STATUS_RESUBMITTED,
STATUS_ACCEPTED_AWAITING_PUBOFFER_ACCEPTANCE
] ]
# Submissions with these statuses never have required actions. # Submissions with these statuses never have required actions.
......
...@@ -1249,10 +1249,6 @@ class EICRecommendationForm(forms.ModelForm): ...@@ -1249,10 +1249,6 @@ class EICRecommendationForm(forms.ModelForm):
kwargs['initial'] = { kwargs['initial'] = {
'for_journal': latest_recommendation.for_journal, 'for_journal': latest_recommendation.for_journal,
'recommendation': latest_recommendation.recommendation, 'recommendation': latest_recommendation.recommendation,
'remarks_for_authors': latest_recommendation.remarks_for_authors,
'requested_changes': latest_recommendation.requested_changes,
'remarks_for_editorial_college':
latest_recommendation.remarks_for_editorial_college,
} }
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
......
...@@ -71,14 +71,10 @@ ...@@ -71,14 +71,10 @@
</table> </table>
</div> </div>
{% if submission.eicrecommendations.active %} {% if submission.eicrecommendations %}
<div class="mb-4"> <div class="mb-4">
<h4 class="mb-2">Editorial Recommendation:</h4> <h4 class="mb-2">Editorial Recommendation:</h4>
{% for recommendation in submission.eicrecommendations.active %} {% include 'partials/submissions/recommendation_author_content.html' with recommendation=submission.eicrecommendations.last %}
{% include 'partials/submissions/recommendation_author_content.html' with recommendation=recommendation %}
{% empty %}
No Editorial Recommendation has yet been formulated.
{% endfor %}
</div> </div>
{% endif %} {% endif %}
......
...@@ -53,10 +53,10 @@ ...@@ -53,10 +53,10 @@
{% endif %} {% endif %}
<br> <br>
<h3 id="editorial-recommendation">Editorial Recommendation</h3> {% if submission.eicrecommendations %}
{% for recommendation in submission.eicrecommendations.all %} <h3 id="editorial-recommendation">Editorial Recommendation</h3>
{% include 'partials/submissions/recommendation_fellow_content.html' with recommendation=recommendation %} {% include 'partials/submissions/recommendation_fellow_content.html' with recommendation=submission.eicrecommendations.last %}
{% endfor %} {% endif %}
{% if submission.eic_recommendation_required %} {% if submission.eic_recommendation_required %}
<div class="mb-4"> <div class="mb-4">
......
...@@ -98,7 +98,18 @@ ...@@ -98,7 +98,18 @@
<h3 class="highlight">Editorial decision</h3> <h3 class="highlight">Editorial decision</h3>
<p>For Journal {{ submission.editorial_decision.for_journal }}: {{ submission.editorial_decision.get_decision_display }}<br>(status: {{ submission.editorial_decision.get_status_display }})</p> <p>For Journal {{ submission.editorial_decision.for_journal }}: {{ submission.editorial_decision.get_decision_display }}<br>(status: {{ submission.editorial_decision.get_status_display }})</p>
{% if is_author and submission.editorial_decision.status == submission.editorial_decision.AWAITING_PUBOFFER_ACCEPTANCE %} {% if is_author and submission.editorial_decision.status == submission.editorial_decision.AWAITING_PUBOFFER_ACCEPTANCE %}
<p>Message from Editorial Administration: we are awaiting your response to the publication offer.</p> <p>
<strong>We are awaiting your response to the publication offer.</strong>
<br>
You can either accept it, or withdraw your manuscript.</p>
<ul class="list-unstyled">
<li class="list-item my-1">
<a class="btn btn-primary" href="{% url 'submissions:accept_puboffer' submission.preprint.identifier_w_vn_nr %}">Accept offer for publication in {{ submission.editorial_decision.for_journal }} (one-click action)</a>
</li>
<li class="list-item my-1">
<a class="btn btn-danger" href="{% url 'submissions:withdraw_manuscript' submission.preprint.identifier_w_vn_nr %}">Turn down offer and withdraw manuscript (leads to confirmation page)</a>
</li>
</ul>
{% endif %} {% endif %}
{% endif %} {% endif %}
......
...@@ -66,7 +66,6 @@ urlpatterns = [ ...@@ -66,7 +66,6 @@ urlpatterns = [
# url(r'^admin/{regex}/recommendations/(?P<rec_id>[0-9]+)$'.format( # url(r'^admin/{regex}/recommendations/(?P<rec_id>[0-9]+)$'.format(
# regex=SUBMISSIONS_COMPLETE_REGEX), views.EICRecommendationView.as_view(), # regex=SUBMISSIONS_COMPLETE_REGEX), views.EICRecommendationView.as_view(),
# name='eic_recommendation_detail'), # name='eic_recommendation_detail'),
# url(r'^admin/{regex}/recommendations/(?P<rec_id>[0-9]+)$'.format(
url(r'^admin/{regex}/recommendation$'.format( url(r'^admin/{regex}/recommendation$'.format(
regex=SUBMISSIONS_COMPLETE_REGEX), views.EICRecommendationDetailView.as_view(), regex=SUBMISSIONS_COMPLETE_REGEX), views.EICRecommendationDetailView.as_view(),
name='eic_recommendation_detail'), name='eic_recommendation_detail'),
...@@ -94,6 +93,13 @@ urlpatterns = [ ...@@ -94,6 +93,13 @@ urlpatterns = [
views.fix_editorial_decision, views.fix_editorial_decision,
name='fix_editorial_decision' name='fix_editorial_decision'
), ),
url(
r'^{regex}/accept_puboffer$'.format(
regex=SUBMISSIONS_COMPLETE_REGEX),
views.accept_puboffer,
name='accept_puboffer'
),
url(r'^admin/reports$', views.reports_accepted_list, name='reports_accepted_list'), url(r'^admin/reports$', views.reports_accepted_list, name='reports_accepted_list'),
url(r'^admin/reports/(?P<report_id>[0-9]+)/compile$', url(r'^admin/reports/(?P<report_id>[0-9]+)/compile$',
views.report_pdf_compile, name='report_pdf_compile'), views.report_pdf_compile, name='report_pdf_compile'),
......
...@@ -2157,6 +2157,42 @@ def fix_editorial_decision(request, identifier_w_vn_nr): ...@@ -2157,6 +2157,42 @@ def fix_editorial_decision(request, identifier_w_vn_nr):
return mail_request.interrupt() return mail_request.interrupt()
@login_required
def accept_puboffer(request, identifier_w_vn_nr):
"""
Method for authors to accept an outstanding publication offer.
A publication offer occurs when the relevant College agrees on a
Publish recommendation for a journal which is subsidiary to the one
originally submitted to by the authors.
This method handles acceptance of this offer by updating the status
of the Submission and of the EditorialDecision. It then redirects to
the personal page.
"""
submission = get_object_or_404(Submission, preprint__identifier_w_vn_nr=identifier_w_vn_nr)
if request.user.contributor.id != submission.submitted_by.id:
errormessage = ('You are not marked as the submitting author of this Submission, '
'and thus are not allowed to take this action.')
if submission.status != STATUS_ACCEPTED_AWAITING_PUBOFFER_ACCEPTANCE:
errormessage = ('This Submission\'s status is incompatible with accepting'
' a publication offer.')
if errormessage != '':
return render(request, 'scipost/error.html', {'errormessage': errormessage})
Submission.objects.filter(id=submission.id).update(status=STATUS_ACCEPTED)
EditorialDecision.objects.filter(id=submission.editorialdecision.id).update(
status=EditorialDecision.FIXED_AND_ACCEPTED)
mail_sender = DirectMailUtil(
'authors/confirm_puboffer_acceptance', submission=submission)
submission.add_general_event('Authors have accepted the publication offer.')
messages.success(request, ('Your acceptance of the publication offer has been registered. '
'Congratulations! We will immediately start producing the proofs.'))
return redirect(reverse('scipost:personal_page'))
# ATTEMPT: to drop # ATTEMPT: to drop
# class EditorialDecisionFixView(PermissionsMixin, UpdateView): # class EditorialDecisionFixView(PermissionsMixin, UpdateView):
# """This fixes the decision and emails the authors.""" # """This fixes the decision and emails the authors."""
......
<p>
Dear {{ submission.submitted_by.get_title_display }} {{ submission.submitted_by.user.last_name }},
</p>
<p>
We hereby confirm your acceptance of our publication offer of your Submission
</p>
<p>{{ submission.title }}</p>
<p>by {{ submission.author_list }}</p>
<p>
in {{ submission.editorial_decision.for_journal }}.
</p>
<p>
Your manuscript will now be taken charge of by our production team,
which will soon send you proofs to check before final publication.
</p>
<p>Sincerely,</p>
<p>The SciPost Team.</p>
{% include 'email/_footer.html' %}
{% include 'email/_submission_thread_uuid.html' with submission=submission %}
{
"subject": "SciPost: acceptance of publication offer",
"recipient_list": [
"submitted_by.user.email"
],
"bcc": [
"edadmin@scipost.org",
"editor_in_charge.user.email"
],
"from_name": "SciPost Editorial Administration",
"from_email": "edadmin@scipost.org"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment