diff --git a/journals/models.py b/journals/models.py index 613acad1ffe2089ef1b7a3c6b1e1f50dfe7b5dd2..50ed3c768deeb46ca1992e096f5edfbf2ffe869c 100644 --- a/journals/models.py +++ b/journals/models.py @@ -2,7 +2,6 @@ from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.contrib.postgres.fields import JSONField from django.db import models -from django.template import Template, Context from django.utils import timezone from django.urls import reverse @@ -16,7 +15,6 @@ from .managers import IssueManager, PublicationManager, JournalManager from scipost.constants import SCIPOST_DISCIPLINES, SCIPOST_SUBJECT_AREAS from scipost.fields import ChoiceArrayField -from scipost.models import Contributor ################ @@ -90,7 +88,9 @@ class Issue(models.Model): unique_together = ('number', 'in_volume') def __str__(self): - text = '%s issue %s' % (self.in_volume, self.number) + text = self.issue_number + if hasattr(self, 'proceedings'): + return text text += self.period_as_string() if self.status == STATUS_DRAFT: text += ' (In draft)' @@ -103,6 +103,10 @@ class Issue(models.Model): def doi_string(self): return '10.21468/' + self.doi_label + @property + def issue_number(self): + return '%s issue %s' % (self.in_volume, self.number) + def short_str(self): return 'Vol. %s issue %s' % (self.in_volume.number, self.number) diff --git a/journals/templates/journals/journal_issues.html b/journals/templates/journals/journal_issues.html index a8bca5b13f8b4d4e132112e1ff713e4c8d9ca1fe..d74a86cc6fa99e0d94784f71740ff287ba9cacf5 100644 --- a/journals/templates/journals/journal_issues.html +++ b/journals/templates/journals/journal_issues.html @@ -21,6 +21,9 @@ {% for issue in issues %} <li> <a href="{{issue.get_absolute_url}}">{{issue}}</a> + {% if issue.proceedings %} + <div class="pl-4 mb-1">Submission deadline: {{ issue.proceedings.submissions_deadline }}</div> + {% endif %} </li> {% empty %} <li> diff --git a/proceedings/templates/partials/proceedings/description.html b/proceedings/templates/partials/proceedings/description.html index 038474ca7039369f707797110c2384a04a68e803..53f83352b7a0488ec38f728ff7f33b886427e4f5 100644 --- a/proceedings/templates/partials/proceedings/description.html +++ b/proceedings/templates/partials/proceedings/description.html @@ -1,3 +1,11 @@ -<h3>Event: {{ proceedings.event_name }}</h3> -<h4 class="pt-0 text-muted">From {{ proceedings.event_start_date }} until {{ proceedings.event_end_date }}</h4> -<p class="mt-1">{{ proceedings.event_description|linebreaksbr }}</p> +<h3>{{ proceedings.event_name }} {% if proceedings.event_suffix %}({{ proceedings.event_suffix }}){% endif %}</h3> +<div class="mb-4"> + This event was held from {{ proceedings.event_start_date }} to {{ proceedings.event_end_date }}. + <div class="my-1"> + <strong>Submission deadline: {{ proceedings.submissions_deadline }}</strong>. + </div> + {% if proceedings.open_for_submission %} + <a href="{% url 'submissions:submit_manuscript' %}">Submit your manuscript here</a> + {% endif %} +</div> +<p>{{ proceedings.event_description|linebreaksbr }}</p>