diff --git a/scipost/management/commands/add_groups_and_permissions.py b/scipost/management/commands/add_groups_and_permissions.py index 3ed30dba435663d05cb7525f0b169ed45ce07e0e..0ada5fb492b10a9423c4c7d2d2c6ddf89969c073 100644 --- a/scipost/management/commands/add_groups_and_permissions.py +++ b/scipost/management/commands/add_groups_and_permissions.py @@ -105,10 +105,6 @@ class Command(BaseCommand): content_type=content_type) # Editorial College - view_bylaws, created = Permission.objects.get_or_create( - codename='view_bylaws', - name='Can view By-laws of Editorial College', - content_type=content_type) can_attend_VGMs, created = Permission.objects.get_or_create( codename='can_attend_VGMs', name='Can attend Virtual General Meetings', @@ -159,10 +155,6 @@ class Command(BaseCommand): codename='can_submit_manuscript', name='Can submit manuscript', content_type=content_type) - can_read_all_eic_events, created = Permission.objects.get_or_create( - codename='can_read_all_eic_events', - name='Can read all Editor-in-charge events', - content_type=content_type) can_do_plagiarism_checks, created = Permission.objects.get_or_create( codename='can_do_plagiarism_checks', name='Can do plagiarism checks on submissions', @@ -281,13 +273,11 @@ class Command(BaseCommand): can_publish_accepted_submission, can_attend_VGMs, can_manage_reports, - can_read_all_eic_events, ]) EditorialCollege.permissions.set([ can_view_pool, can_take_charge_of_submissions, - view_bylaws, can_attend_VGMs, ]) diff --git a/scipost/templates/scipost/personal_page.html b/scipost/templates/scipost/personal_page.html index c7bd7000a7cb2b094874ad646d8e9f3a9b4580f2..d0d661adc558ecc92fd0d076b9bb0bf54196cbcc 100644 --- a/scipost/templates/scipost/personal_page.html +++ b/scipost/templates/scipost/personal_page.html @@ -277,7 +277,7 @@ <h3>Editorial Admin actions</h3> <ul> <li><a href="{% url 'submissions:reports_accepted_list' %}">Accepted Reports</a>{% if nr_reports_without_pdf %} ({{nr_reports_without_pdf}} unfinished){% endif %}</li> - <li><a href="{% url 'submissions:latest_events' %}">All events in the last 24 hours</a></li> + <li><a href="{% url 'submissions:admin' %}">Editorial Administration Page</a></li> <li><a href="{% url 'submissions:treated_submissions_list' %}">Fully treated Submissions</a>{% if nr_treated_submissions_without_pdf %} ({{nr_treated_submissions_without_pdf}} unfinished){% endif %}</li> <li><a href="{% url 'journals:harvest_citedby_list' %}">Harvest citedby data</a></li> <li><a href="{% url 'journals:manage_metadata' %}">Manage metadata</a></li> diff --git a/submissions/models.py b/submissions/models.py index 4a7e33cb1d6d601faf41556a0d963d1fe576002c..fac326dd38cebf55267f3bb054d066f5931eb3c3 100644 --- a/submissions/models.py +++ b/submissions/models.py @@ -431,7 +431,8 @@ class Report(SubmissionRelatedObjectMixin, models.Model): author of the report already has a vetted report in the series of the specific Submission. """ return (self.author.reports.accepted() - .filter(submission__arxiv_identifier_wo_vn_nr=self.submission.arxiv_identifier_wo_vn_nr) + .filter(submission__arxiv_identifier_wo_vn_nr=self.submission.arxiv_identifier_wo_vn_nr, + submission__arxiv_vn_nr__lt=self.submission.arxiv_vn_nr) .exists()) def latest_report_from_series(self): diff --git a/submissions/templates/submissions/admin/editorial_admin.html b/submissions/templates/submissions/admin/editorial_admin.html index b4bb315cb883119da6bead8ec95cce00e582a507..f4daca1875640058f3f10369785d8e4747bdc7ab 100644 --- a/submissions/templates/submissions/admin/editorial_admin.html +++ b/submissions/templates/submissions/admin/editorial_admin.html @@ -28,11 +28,17 @@ {% if sub == submission %} <strong> <a href="?submission={{sub.arxiv_identifier_w_vn_nr}}">{{sub.title}}</a> - <div class="pl-md-4">latest activity: {{sub.latest_activity|timesince}} ago</div> + <div class="pl-md-4"> + <em>by {{sub.author_list}}</em><br> + latest activity: {{sub.latest_activity|timesince}} ago + </div> </strong> {% else %} <a href="?submission={{sub.arxiv_identifier_w_vn_nr}}">{{sub.title}}</a> - <div class="pl-md-4">latest activity: {{sub.latest_activity|timesince}} ago</div> + <div class="pl-md-4"> + <em>by {{sub.author_list}}</em><br> + latest activity: {{sub.latest_activity|timesince}} ago + </div> {% endif %} </li> {% empty %} @@ -48,11 +54,17 @@ {% if sub == submission %} <strong> <a href="?submission={{sub.arxiv_identifier_w_vn_nr}}">{{sub.title}}</a> - <div class="pl-md-4">latest activity: {{sub.latest_activity|timesince}} ago</div> + <div class="pl-md-4"> + <em>by {{sub.author_list}}</em><br> + latest activity: {{sub.latest_activity|timesince}} ago + </div> </strong> {% else %} <a href="?submission={{sub.arxiv_identifier_w_vn_nr}}">{{sub.title}}</a> - <div class="pl-md-4">latest activity: {{sub.latest_activity|timesince}} ago</div> + <div class="pl-md-4"> + <em>by {{sub.author_list}}</em><br> + latest activity: {{sub.latest_activity|timesince}} ago + </div> {% endif %} </li> {% empty %} @@ -68,11 +80,17 @@ {% if sub == submission %} <strong> <a href="?submission={{sub.arxiv_identifier_w_vn_nr}}">{{sub.title}}</a> - <div class="pl-md-4">latest activity: {{sub.latest_activity|timesince}} ago</div> + <div class="pl-md-4"> + <em>by {{sub.author_list}}</em><br> + latest activity: {{sub.latest_activity|timesince}} ago + </div> </strong> {% else %} <a href="?submission={{sub.arxiv_identifier_w_vn_nr}}">{{sub.title}}</a> - <div class="pl-md-4">latest activity: {{sub.latest_activity|timesince}} ago</div> + <div class="pl-md-4"> + <em>by {{sub.author_list}}</em><br> + latest activity: {{sub.latest_activity|timesince}} ago + </div> {% endif %} </li> {% empty %} diff --git a/submissions/templates/submissions/latest_events.html b/submissions/templates/submissions/latest_events.html deleted file mode 100644 index 3025ec20dc1effe510f5e3693f80f6ec18700a20..0000000000000000000000000000000000000000 --- a/submissions/templates/submissions/latest_events.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends 'scipost/_personal_page_base.html' %} - -{% block pagetitle %}: Latest events{% endblock pagetitle %} - -{% load scipost_extras %} -{% load bootstrap %} - -{% block breadcrumb_items %} - {{block.super}} - <a href="javascript:;" class="breadcrumb-item">Admin</a> - <span class="breadcrumb-item">All events in the last 24 hours</span> -{% endblock %} - -{% block content %} - -<div class="row"> - <div class="col-12"> - <h1>All events in the last 24 hours</h1> - <h2 class="text-warning">Submission Events are under construction. Please note this list may not be complete!</h2> - <div class="ml-md-5 mt-5">{% include 'submissions/submission_event_list_general.html' with events=events %}</div> - </div> -</div> - - - -{% endblock content %} diff --git a/submissions/urls.py b/submissions/urls.py index 7799a3a580a876bae1f3011b83d3da0e05f0c563..431ae957cad857afb401cabd2a15b58a9f53fe67 100644 --- a/submissions/urls.py +++ b/submissions/urls.py @@ -1,6 +1,7 @@ from django.conf.urls import url from django.views.generic import TemplateView +from . import views urlpatterns = [ # Submissions @@ -33,7 +34,6 @@ urlpatterns = [ views.PlagiarismReportPDFView.as_view(), name='plagiarism_report'), url(r'^admin/(?P<arxiv_identifier_w_vn_nr>[0-9]{4,}.[0-9]{5,}v[0-9]{1,2})/recommendations/(?P<rec_id>[0-9]+)$', views.EICRecommendationView.as_view(), name='eic_recommendation_detail'), - url(r'^admin/events/latest$', views.latest_events, name='latest_events'), url(r'^admin/reports$', views.reports_accepted_list, name='reports_accepted_list'), url(r'^admin/reports/(?P<report_id>[0-9]+)/compile$', views.report_pdf_compile, name='report_pdf_compile'), diff --git a/submissions/views.py b/submissions/views.py index 77eb5c43bcf0d8fbf623f2cc076d76d36075006f..7f53451343204d046ff2f976e5e9fb5a96faee4f 100644 --- a/submissions/views.py +++ b/submissions/views.py @@ -308,16 +308,6 @@ def treated_submission_pdf_compile(request, arxiv_identifier_w_vn_nr): return render(request, 'submissions/treated_submission_pdf_compile.html', context) -@permission_required('scipost.can_read_all_eic_events', raise_exception=True) -def latest_events(request): - events = (SubmissionEvent.objects.for_eic() - .filter(created__gte=timezone.now() - datetime.timedelta(hours=24))) - context = { - 'events': events - } - return render(request, 'submissions/latest_events.html', context) - - ###################### # Editorial workflow # ######################