diff --git a/src/themes/material/templates/elements/public_reviews.html b/src/themes/material/templates/elements/public_reviews.html
index d53823da49..5ecf4b87d9 100644
--- a/src/themes/material/templates/elements/public_reviews.html
+++ b/src/themes/material/templates/elements/public_reviews.html
@@ -2,7 +2,11 @@
{% for review in article.public_reviews %}
-
Open peer review from {{ review.reviewer.full_name }}
+
Open peer review from {{ review.reviewer.full_name }}
+
+ Reviewer: {{ review.reviewer.full_name }}
+ DOI: {{ review.get_doi }}
+
{% for answer in review.review_form_answers %}
{% if answer.author_can_see %}
diff --git a/src/themes/material/templates/repository/preprint.html b/src/themes/material/templates/repository/preprint.html
index 696402f3a2..7c6188a1af 100644
--- a/src/themes/material/templates/repository/preprint.html
+++ b/src/themes/material/templates/repository/preprint.html
@@ -167,8 +167,11 @@
{% trans "Abstract" %}
{% if preprint.preprint_doi %}
-
DOI
-
{% include "elements/doi_display.html" with doi=preprint.preprint_doi title=preprint.title %}
+
DOI
+
https://doi.org/{{ preprint.preprint_doi }}
+ {% elif preprint.current_version.get_doi %}
+
DOI
+
https://doi.org/{{ preprint.current_version.get_doi }}
{% endif %}
{% if preprint.subject.all %}
diff --git a/src/utils/install/journal_defaults.json b/src/utils/install/journal_defaults.json
index 623e9ace5b..ee1653bb10 100644
--- a/src/utils/install/journal_defaults.json
+++ b/src/utils/install/journal_defaults.json
@@ -5065,6 +5065,25 @@
"journal-manager"
]
},
+ {
+ "group": {
+ "name": "general"
+ },
+ "setting": {
+ "description": "Enable this to show that this journal uses the isolinear plugin.",
+ "is_translatable": true,
+ "name": "uses_isolinear_plugin",
+ "pretty_name": "Journal Uses Isolinear Plugin",
+ "type": "boolean"
+ },
+ "value": {
+ "default": ""
+ },
+ "editable_by": [
+ "journal-manager",
+ "editor"
+ ]
+ },
{
"group": {
"name": "general"
@@ -5616,6 +5635,25 @@
"journal-manager"
]
},
+ {
+ "group": {
+ "name": "Identifiers"
+ },
+ "setting": {
+ "description": "If enabled crossref DOIs will be minted for open reviews.",
+ "is_translatable": true,
+ "name": "mint_open_review_dois",
+ "pretty_name": "Mint Open Review DOIs",
+ "type": "boolean"
+ },
+ "value": {
+ "default": ""
+ },
+ "editable_by": [
+ "editor",
+ "journal-manager"
+ ]
+ },
{
"group": {
"name": "general"
diff --git a/src/utils/install/repository_settings.json b/src/utils/install/repository_settings.json
index 34ac485e37..5556efd32b 100644
--- a/src/utils/install/repository_settings.json
+++ b/src/utils/install/repository_settings.json
@@ -9,7 +9,7 @@
"review_invitation": "
Dear {{ review.reviewer.full_name }},
I hope this message finds you well. We would like to invite you to comment on a {{ request.repository.object_name }} titled {{ review.preprint.title }} submitted to {{ request.repository.name }}. We would be most grateful for your time and feedback.
{{ url }}
{{ request.user.signature }}
{{ request.repository.site_url }}
",
"review_helper": "
Add your comments below. These will be displayed publicly once approved. You can mark your comments as anonymous if you do not want to display your name alongside the comments.
",
"manager_review_status_change": "
Dear {{ review.manager.full_name }},
The Review invitation you initiated for \"{{ review.preprint.title }}\" has been updated.
{{ status_text }}
You can view the review here: {{url}}
{{ request.repository.name }} Team
",
- "reviewer_review_status_change": "
Dear {{ review.reviewer.full_name }},
I hope this message finds you well. I am writing to inform you that the invitation we sent to ask that you add a review comment to \"{{ review.preprint.title }}\" has been withdrawn. The following reason has been given:
{{ review.status_reason|linebreaksbr }}
{{ request.user.signature|safe }}
{{ request.repository.site_url }}
"
-
+ "reviewer_review_status_change": "
Dear {{ review.reviewer.full_name }},
I hope this message finds you well. I am writing to inform you that the invitation we sent to ask that you add a review comment to \"{{ review.preprint.title }}\" has been withdrawn. The following reason has been given:
{{ review.status_reason|linebreaksbr }}
{{ request.user.signature|safe }}
{{ request.repository.site_url }}
",
+ "new_version_submitted": "
{{ preprint.owner.full_name }} has uploaded a new version of the {{ request.repository.object_name }} '{{ preprint.title }}' to {{ request.repository.name }}.
The new version can be viewed in the queue: {{ url }}.
{{ request.repository.name }} Team
{{ request.repository.site_url }}
"
}
]
\ No newline at end of file
diff --git a/src/utils/management/commands/register_crossref_preprint_dois.py b/src/utils/management/commands/register_crossref_preprint_dois.py
new file mode 100644
index 0000000000..bae3494a8e
--- /dev/null
+++ b/src/utils/management/commands/register_crossref_preprint_dois.py
@@ -0,0 +1,32 @@
+from django.core.management.base import BaseCommand
+
+from identifiers import preprints
+from repository import models
+
+
+class Command(BaseCommand):
+ """Registers a repository object version with Crossref."""
+
+ help = "Registers a repository object version with Crossref."
+
+ def add_arguments(self, parser):
+ """Adds arguments to Django's management command-line parser.
+
+ :param parser: the parser to which the required arguments will be added
+ :return: None
+ """
+ parser.add_argument("version_id")
+
+ def handle(self, *args, **options):
+ """Calls the Crossref registration options
+
+ :param args: None
+ :param options: Dictionary containing 'article_id'
+ :return: None
+ """
+ version = models.PreprintVersion.objects.get(pk=options.get("version_id"))
+ if version:
+ preprints.deposit_doi_for_preprint_version(
+ version.preprint.repository,
+ [version],
+ )
diff --git a/src/utils/management/commands/register_crossref_review_dois.py b/src/utils/management/commands/register_crossref_review_dois.py
new file mode 100644
index 0000000000..a169b1f137
--- /dev/null
+++ b/src/utils/management/commands/register_crossref_review_dois.py
@@ -0,0 +1,34 @@
+from django.core.management.base import BaseCommand
+
+from identifiers import reviews
+from submission import models as submission_models
+
+
+class Command(BaseCommand):
+ """Registers an article's review with Crossref."""
+
+ help = "Registers an article's review with Crossref."
+
+ def add_arguments(self, parser):
+ """Adds arguments to Django's management command-line parser.
+
+ :param parser: the parser to which the required arguments will be added
+ :return: None
+ """
+ parser.add_argument("article_id")
+
+ def handle(self, *args, **options):
+ """Calls the Crossref registration options
+
+ :param args: None
+ :param options: Dictionary containing 'article_id'
+ :return: None
+ """
+ article = submission_models.Article.objects.get(
+ pk=options["article_id"],
+ )
+
+ identifier_logic.deposit_doi_for_reviews(
+ article.journal,
+ article.completed_reviews_with_permission,
+ )
diff --git a/src/utils/management/commands/update_journal_workflows.py b/src/utils/management/commands/update_journal_workflows.py
new file mode 100644
index 0000000000..1dfd75d6e7
--- /dev/null
+++ b/src/utils/management/commands/update_journal_workflows.py
@@ -0,0 +1,53 @@
+from django.core.management.base import BaseCommand
+
+from journal import models as jm
+from core import models as cm
+
+
+class Command(BaseCommand):
+ help = "Loops through all journals adding the Typesetting plugin to workflows"
+
+ def handle(self, *args, **options):
+ try:
+ from plugins.typesetting import plugin_settings
+ except ImportError:
+ exit("The typesetting plugin could not be imported.")
+
+ journals = jm.Journal.objects.all()
+
+ for journal in journals:
+ workflow = cm.Workflow.objects.get(journal=journal)
+ elements_to_remove = ["production", "proofing"]
+
+ cm.WorkflowElement.objects.filter(
+ journal=journal,
+ element_name__in=elements_to_remove,
+ ).delete()
+
+ ts_element, c = cm.WorkflowElement.objects.get_or_create(
+ journal=journal,
+ element_name=plugin_settings.PLUGIN_NAME,
+ defaults={
+ "handshake_url": plugin_settings.HANDSHAKE_URL,
+ "jump_url": plugin_settings.JUMP_URL,
+ "stage": plugin_settings.STAGE,
+ },
+ )
+ workflow.elements.add(ts_element)
+
+ stage_order = [
+ "review",
+ "copyediting",
+ "Typesetting Plugin",
+ "prepublication",
+ ]
+
+ journal_elements = cm.WorkflowElement.objects.filter(
+ journal=journal,
+ )
+ print(journal_elements)
+
+ for element in journal_elements:
+ order = stage_order.index(element.element_name)
+ element.order = order
+ element.save()
diff --git a/src/utils/transactional_emails.py b/src/utils/transactional_emails.py
index 9be1476210..a78d5abef2 100644
--- a/src/utils/transactional_emails.py
+++ b/src/utils/transactional_emails.py
@@ -1851,6 +1851,53 @@ def preprint_version_update(**kwargs):
)
+def preprint_new_version(**kwargs):
+ """
+ Called by events.Event.ON_PREPRINT_NEW_VERSION
+ :param kwargs: Dictionary containing new_version, preprint and request
+ objects
+ :return: None
+ """
+ request = kwargs.get("request")
+ preprint = kwargs.get("preprint")
+ new_version = kwargs.get("new_version")
+
+ description = "{author} has submitted a new {obj} version.".format(
+ author=request.user.full_name(),
+ obj=request.repository.object_name,
+ title=preprint.title,
+ )
+ log_dict = {
+ "level": "Info",
+ "action_text": description,
+ "types": "Submission",
+ "target": preprint,
+ }
+ url = request.repository.site_url(path=reverse("version_queue"))
+ # Send an email to the preprint editors
+ template = request.repository.new_version_submitted
+ email_text = render_template.get_message_content(
+ request,
+ {"preprint": preprint, "new_version": new_version, "url": url},
+ template,
+ template_is_setting=True,
+ )
+ repo = request.repository
+ recipients = (
+ repo.submission_notification_recipients
+ if repo.submission_notification_recipients.count() > 0
+ else repo.managers
+ )
+ for r in recipients.all():
+ notify_helpers.send_email_with_body_from_user(
+ request,
+ "{} New Version".format(request.repository.object_name),
+ r.email,
+ email_text,
+ log_dict=log_dict,
+ )
+
+
def send_cancel_corrections(**kwargs):
request = kwargs.get("request")
article = kwargs.get("article")