diff --git a/scipost_django/submissions/templates/submissions/submit_steps.html b/scipost_django/submissions/templates/submissions/submit_steps.html index 86f6630eefcef2d03e4c17cc14a895a73d4f1c93..3c164abc9322f0f1d8181ecfe83fdb4aadede25c 100644 --- a/scipost_django/submissions/templates/submissions/submit_steps.html +++ b/scipost_django/submissions/templates/submissions/submit_steps.html @@ -33,13 +33,15 @@ </td> <td>Fill in the submission details form</td> </tr> - <tr> - <td>Step 5</td> - <td class="text-center"> - {% if step == 5 %}<span class="text-warning">{% include 'bi/arrow-right-square-fill.html' %}</span>{% endif %} - {% if step > 5 %}<span class="text-success">{% include 'bi/check-square-fill.html' %}</span>{% endif %} - </td> - <td>Indicate potential referees</td> - </tr> + {% if not thread_hash %} + <tr> + <td>Step 5</td> + <td class="text-center"> + {% if step == 5 %}<span class="text-warning">{% include 'bi/arrow-right-square-fill.html' %}</span>{% endif %} + {% if step > 5 %}<span class="text-success">{% include 'bi/check-square-fill.html' %}</span>{% endif %} + </td> + <td>Indicate potential referees</td> + </tr> + {% endif %} </table> </div> diff --git a/scipost_django/submissions/views/__init__.py b/scipost_django/submissions/views/__init__.py index b486b098aa109f8b069518eabce9a0e00badce22..8e617f9037441bd0abac71a0ed2663f5bb1faf4b 100644 --- a/scipost_django/submissions/views/__init__.py +++ b/scipost_django/submissions/views/__init__.py @@ -370,6 +370,7 @@ class RequestSubmissionView(LoginRequiredMixin, PermissionRequiredMixin, CreateV context["journal"] = get_object_or_404( Journal, doi_label=self.kwargs.get("journal_doi_label") ) + context["thread_hash"] = self.request.GET.get("thread_hash") return context def get_form_kwargs(self): @@ -423,10 +424,13 @@ class RequestSubmissionView(LoginRequiredMixin, PermissionRequiredMixin, CreateV def get_success_url(self): """Redirect to the indicate referees step.""" - return reverse( - "submissions:submit_indicate_referees", - kwargs={"identifier_w_vn_nr": self.submission.preprint.identifier_w_vn_nr}, - ) + + url_kwargs = {"identifier_w_vn_nr": self.submission.preprint.identifier_w_vn_nr} + if not self.submission.is_resubmission: + # First submission, redirect to indicate referees + return reverse("submissions:submit_indicate_referees", kwargs=url_kwargs) + else: + return reverse("submissions:submission", kwargs=url_kwargs) class RequestSubmissionUsingSciPostView(RequestSubmissionView): @@ -518,7 +522,8 @@ def submit_indicate_referees(request, identifier_w_vn_nr): ): raise PermissionDenied("You are not the submitting author of this Submission.") - if submission.status != Submission.INCOMING: + # Redirect to main referee indications view if passed preassignment of is resubmission + if submission.status != Submission.INCOMING or submission.is_resubmission: return redirect( reverse( "submissions:referee_indications",