From f15fe94d264fd6954d31a0b29996bc43e7f8c0f2 Mon Sep 17 00:00:00 2001
From: "J.-S. Caux" <J.S.Caux@uva.nl>
Date: Mon, 19 Sep 2016 20:45:32 +0200
Subject: [PATCH] Small improvements to admin for reg and ref invitations

---
 scipost/admin.py     | 2 +-
 scipost/utils.py     | 6 ------
 scipost/views.py     | 1 -
 submissions/admin.py | 5 ++++-
 4 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/scipost/admin.py b/scipost/admin.py
index 6eae13684..836a0893f 100644
--- a/scipost/admin.py
+++ b/scipost/admin.py
@@ -30,7 +30,7 @@ admin.site.register(Remark, RemarkAdmin)
 
 
 class RegistrationInvitationAdmin(admin.ModelAdmin):
-    search_fields = ['last_name', 'email']
+    search_fields = ['first_name', 'last_name', 'email', 'invitation_key']
 
 admin.site.register(RegistrationInvitation, RegistrationInvitationAdmin)
 
diff --git a/scipost/utils.py b/scipost/utils.py
index 80c880591..d3524aada 100644
--- a/scipost/utils.py
+++ b/scipost/utils.py
@@ -283,12 +283,6 @@ class Utils(object):
                            'of established, professionally practising scientists), designed to '
                            'ensure the highest achievable scientific quality while minimizing the '
                            'burden of the editorial workflow.\n\n'
-#                           'The SciPost.org portal has been intensively developed over the last '
-#                           'few months. It is legally based on a not-for-profit foundation and will '
-#                           'operate in perpetuity as a non-commercial entity at the exclusive service '
-#                           'of the academic sector. We are now entering the next phase in the '
-#                           'implementation, which is to build up the community of professional '
-#                           'academics who will help operate it.\n\n'
                            'SciPost.org is legally based on a not-for-profit foundation and will '
                            'operate in perpetuity as a non-commercial entity at the exclusive service '
                            'of the academic sector. '
diff --git a/scipost/views.py b/scipost/views.py
index e07fd36a5..2ab275ce6 100644
--- a/scipost/views.py
+++ b/scipost/views.py
@@ -278,7 +278,6 @@ def invitation(request, key):
             invitation.save()
             Utils.create_and_save_contributor(key)
             Utils.send_registration_email()
-            #return HttpResponseRedirect(reverse('scipost:thanks_for_registering'))
             context = {'ack_header': 'Thanks for registering to SciPost.',
                        'ack_message': ('You will receive an email with a link to verify '
                                        'your email address. Please visit this link within 48 hours. '
diff --git a/submissions/admin.py b/submissions/admin.py
index d013189cd..955b2b1ed 100644
--- a/submissions/admin.py
+++ b/submissions/admin.py
@@ -18,7 +18,10 @@ admin.site.register(EditorialAssignment, EditorialAssignmentAdmin)
 
 
 class RefereeInvitationAdmin(admin.ModelAdmin):
-    search_fields = ['submission__title']
+    search_fields = ['submission__title', 'submission__author_list',
+                     'referee__user__last_name',
+                     'first_name', 'last_name', 'email_address', ]
+                     
 
 admin.site.register(RefereeInvitation, RefereeInvitationAdmin)
 
-- 
GitLab