diff --git a/comments/templates/comments/vet_submitted_comments.html b/comments/templates/comments/vet_submitted_comments.html index 4a185057f651e3dca27e690075e9b809b6d984a8..46fb20515200a7d90574bb4098673c24c546936d 100644 --- a/comments/templates/comments/vet_submitted_comments.html +++ b/comments/templates/comments/vet_submitted_comments.html @@ -5,9 +5,12 @@ {% block bodysup %} <section> - <h1>SciPost Comment to vet:</h1> + {% if not comment_to_vet %} + <h1>There are no comments for you to vet.</h1> + + {% else %} - <br> + <h1>SciPost Comment to vet:</h1> <hr> {% if comment_to_vet.commentary %} <h3>Commentary associated to Comment:</h3> @@ -52,6 +55,7 @@ </div> </div> + {% endif %} </section> {% endblock bodysup %} diff --git a/comments/views.py b/comments/views.py index c193bd75385ec6c88b911b899c77db76b729a8c1..57ec2d951676c039b74661cb05d6a6326ce5f1ad 100644 --- a/comments/views.py +++ b/comments/views.py @@ -25,7 +25,7 @@ def vet_submitted_comments(request): comment_to_vet = Comment.objects.filter(status=0).first() # only handle one at a time if comment_to_vet is not None: form = VetCommentForm() - context = {'contributor': contributor, 'submitted_comment_to_vet': comment_to_vet, 'form': form } + context = {'contributor': contributor, 'comment_to_vet': comment_to_vet, 'form': form } return(render(request, 'comments/vet_submitted_comments.html', context)) return render (request, 'comments/no_comment_to_vet.html') @@ -70,7 +70,6 @@ def vet_submitted_comment_ack(request, comment_id): return render(request, 'comments/vet_submitted_comment_ack.html', context) - def reply_to_comment(request, comment_id): comment = get_object_or_404(Comment, pk=comment_id) if request.method == 'POST':