SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit b6eb351e authored by Jorran de Wit's avatar Jorran de Wit
Browse files

Overwrite minimum number of referees per Proceedings issue

parent d90acbf7
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ class ProceedingsForm(forms.ModelForm): ...@@ -12,6 +12,7 @@ class ProceedingsForm(forms.ModelForm):
model = Proceedings model = Proceedings
fields = ( fields = (
'issue', 'issue',
'minimum_referees',
'event_name', 'event_name',
'event_suffix', 'event_suffix',
'event_description', 'event_description',
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-09-19 07:11
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('proceedings', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='proceedings',
name='minimum_referees',
field=models.PositiveSmallIntegerField(blank=True, help_text='Require an explicit minimum number of referees for the default ref cycle.', null=True),
),
]
...@@ -18,9 +18,12 @@ class Proceedings(TimeStampedModel): ...@@ -18,9 +18,12 @@ class Proceedings(TimeStampedModel):
A Proceeding is a special kind of Journal Issue. A Proceeding is a special kind of Journal Issue.
""" """
# Link to the actual Journal platform # Link to the actual Journal platform
issue = models.OneToOneField('journals.Issue', related_name='proceedings', issue = models.OneToOneField(
limit_choices_to={ 'journals.Issue', related_name='proceedings',
'in_volume__in_journal__name': 'SciPostPhysProc'}) limit_choices_to={'in_volume__in_journal__name': 'SciPostPhysProc'})
minimum_referees = models.PositiveSmallIntegerField(
help_text='Require an explicit minimum number of referees for the default ref cycle.',
blank=True, null=True)
# Event the Proceedings is for # Event the Proceedings is for
event_name = models.CharField(max_length=256, blank=True) event_name = models.CharField(max_length=256, blank=True)
......
<table class="proceedings summary"> <table class="proceedings summary table table-borderless">
<tr> <tr>
<th>Event name</th> <th style="min-width: 200px;">Event name</th>
<td>{{ proceedings.event_name }}</td> <td>{{ proceedings.event_name }}</td>
</tr> </tr>
<tr> <tr>
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
{% block content %} {% block content %}
<h1>Proceedings details</h1> <h1>Proceedings details</h1>
<h2 class="text-primary">{{ proceedings }}</h2> <h2 class="text-primary">{{ proceedings }}</h2>
<a href="{% url 'proceedings:proceedings_edit' proceedings.id %}" class="breadcrumb-item">Edit Proceedings</a>
<br> <br>
{% include 'partials/proceedings/summary.html' with proceedings=proceedings %} {% include 'partials/proceedings/summary.html' with proceedings=proceedings %}
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
{% block breadcrumb_items %} {% block breadcrumb_items %}
{{ block.super }} {{ block.super }}
<a href="{% url 'proceedings:proceedings' %}" class="breadcrumb-item">Proceedings</a> <a href="{% url 'proceedings:proceedings' %}" class="breadcrumb-item">Proceedings</a>
<span class="breadcrumb-item">Edit new</span> <span class="breadcrumb-item">Edit {{ proceedings.event_name }}</span>
{% endblock %} {% endblock %}
{% block pagetitle %}: Edit Proceedings{% endblock pagetitle %} {% block pagetitle %}: Edit Proceedings{% endblock pagetitle %}
......
...@@ -153,6 +153,14 @@ class BaseRefereeSubmissionCycle(BaseSubmissionCycle): ...@@ -153,6 +153,14 @@ class BaseRefereeSubmissionCycle(BaseSubmissionCycle):
This *abstract* submission cycle adds the specific actions needed for submission cycles This *abstract* submission cycle adds the specific actions needed for submission cycles
that require referees to be invited. that require referees to be invited.
""" """
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
if self.submission.proceedings:
# Check if proceedings has overwritten the `minimum_referees`
if self.submission.proceedings.minimum_referees:
self.minimum_referees = self.submission.proceedings.minimum_referees
def update_status(self): def update_status(self):
if self.submission.status == STATUS_INCOMING and self.submission.is_resubmission: if self.submission.status == STATUS_INCOMING and self.submission.is_resubmission:
from .models import Submission from .models import Submission
......
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