Skip to content

Commit

Permalink
Merge branch 'develop' into feature/3570_incorrect_issns
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Eardley committed Sep 1, 2023
2 parents 12f72e7 + c6150b2 commit 79c7ae0
Show file tree
Hide file tree
Showing 39 changed files with 232 additions and 126 deletions.
34 changes: 17 additions & 17 deletions cms/data/notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,38 @@ application:assed:assigned:notify:
long: |
An application, or update request for the journal **{journal_title}** has been assigned to you by the Editor of your group **{group_name}**. Please start work on this within 10 days.
short:
New application assigned to you
New application ({issns}) assigned to you

application:assed:inprogress:notify:
long: |
The application for **{application_title}** has not passed review by an Editor or Managing Editor and has been assigned back to you with questions or changes.
short:
One of your applications has not passed review
One of your applications ({issns}) has not passed review

application:editor:completed:notify:
long: |
**{associate_editor}** has finished a review of the application for **{application_title}**
and marked it as **Completed**. Please review within 5 working days.
short:
Application marked as completed
Application ({issns}) marked as completed

application:editor_group:assigned:notify:
long: |
A new application or an update request for the journal **{journal_name}** has been assigned to your group by a Managing Editor. Please assign this to an Associate Editor within 5 working days.
short:
New application assigned to your group
New application ({issns}) assigned to your group

application:editor:inprogress:notify:
long: |
The application for **{application_title}** has not passed review by a Managing Editor and has been assigned back to your group with questions or changes.
short:
Application reverted to 'In Progress' by Managing Editor
Application ({issns}) reverted to 'In Progress' by Managing Editor

application:maned:ready:notify:
long: |
The application for **{application_title}** has been marked **Ready** by **{editor}**. Please review it as soon as possible.
short:
Application marked as ready
Application ({issns}) marked as ready

application:publisher:accepted:notify:
long: |
Expand All @@ -52,13 +52,13 @@ application:publisher:accepted:notify:
We are delighted to welcome this journal into DOAJ. Do not hesitate to contact us at [[email protected]](mailto:[email protected]) if you have any questions.
short:
Your journal has been accepted
Your journal ({issns}) has been accepted

application:publisher:assigned:notify:
long: |
Your application for **{application_title}** submitted on {application_date} has been assigned to an editor for review for inclusion in the DOAJ. Please look out for further communications about the application. These may come from someone who is not using a DOAJ email address: [{volunteers_url}]({volunteers_url})
short:
Your application has been assigned an editor for review
Your application ({issns}) has been assigned to an editor for review

application:publisher:created:notify:
long: |
Expand All @@ -72,15 +72,15 @@ application:publisher:created:notify:
If you write to us, check first that there is nothing in your Spam folder from us or one of our volunteers. Our volunteers may not be emailing from a DOAJ email address so you can check that their name is there on this page [{volunteers_url}]({volunteers_url})
short:
Your application to DOAJ has been received
Your application ({issns}) to DOAJ has been received

application:publisher:inprogress:notify:
long: |
Your submission for **{title}** submitted on {date_applied} is now being reviewed by an Associate Editor.
The Associate Editor ([{volunteers}]({volunteers})) may contact you by email with questions. They may not be using a doaj.org email address. These emails can end up in your Spam folder so please check your Spam folder regularly.
short:
Your submission is under review
Your submission ({issns}) is under review

application:publisher:quickreject:notify:
long: |
Expand All @@ -90,13 +90,13 @@ application:publisher:quickreject:notify:
You may submit a new application 6 months after the date of this email unless advised otherwise by a member of the DOAJ Editorial Team. Before you apply again, make any necessary changes to ensure your journal adheres to our criteria: ([{doaj_guide_url}]({doaj_guide_url}))
short:
Your application was rejected
Your application ({issns}) was rejected

application:publisher:revision:notify:
long: |
The update which you submitted for **{application_title}** on {date_applied} requires some revisions before it can be accepted. The Managing Editor reviewing your update will contact you to explain the changes that are needed.
short:
Your update request needs revisions
Your update request ({issns}) needs revisions

bg:job_finished:notify:
long: |
Expand All @@ -108,29 +108,29 @@ journal:assed:assigned:notify:
long: |
The journal **{journal_name}** has been assigned to you by the Editor of your group **{group_name}**. Please start work on this within 10 days.
short:
New journal assigned to you
New journal ({issns}) assigned to you

journal:editor_group:assigned:notify:
long: |
The journal **{journal_name}** has been assigned to your group by a Managing Editor. Please assign this to an Associate Editor within 5 working days.
short:
New journal assigned to your group
New journal ({issns}) assigned to your group

update_request:publisher:accepted:notify:
long: |
Congratulations! The changes which you sent us for **{application_title}** on {application_date} have been reviewed and the journal record updated. Please note that some of the changes you suggested may have been omitted and replaced with other values by the Managing Editor who carried out the review. Review the journal record here: [{publisher_dashboard_url}]({publisher_dashboard_url}).
Thank you for updating this journal and helping to keep the DOAJ database up-to-date.
short:
Update request accepted
Update request ({issns}) accepted

update_request:publisher:assigned:notify:
long: |
The update you submitted for **{application_title}** on {application_date} has been assigned to a Managing Editor for review.
Thank you for helping to keep the DOAJ database up-to-date.
short:
Your update request has been assigned an editor for review
Your update request ({issns}) has been assigned to an editor for review

update_request:publisher:rejected:notify:
long: |
Expand All @@ -140,7 +140,7 @@ update_request:publisher:rejected:notify:
- We already have one active update in the system. Additional updates are rejected without review.
short:
Your update request was rejected
Your update request ({issns}) was rejected

journal:assed:discontinuing_soon:notify:
long: |
Expand Down
4 changes: 4 additions & 0 deletions cms/sass/components/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
}
}

.dropdown--notifications {
@extend .dropdown;
}

.dropdown__menu {
display: none;
padding: 0;
Expand Down
2 changes: 1 addition & 1 deletion cms/sass/layout/_editorial-panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@media (min-width: 992px) {
position: -webkit-sticky;
position: sticky;
top: 55px; // sticky header + 5px
top: 100px;

&__content {
max-height: 70vh;
Expand Down
44 changes: 32 additions & 12 deletions doajtest/testdrive/todo_maned_editor_associate.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,55 @@ class TodoManedEditorAssociate(TestDrive):
def setup(self) -> dict:
un = self.create_random_str()
pw = self.create_random_str()
acc = models.Account.make_account(un + "@example.com", un, "TodoManedEditorAssociate " + un, ["admin", "editor", constants.ROLE_ASSOCIATE_EDITOR])
acc.set_password(pw)
acc.save()
admin = models.Account.make_account(un + "@example.com", un, "TodoManedEditorAssociate " + un, ["admin", "editor", constants.ROLE_ASSOCIATE_EDITOR])
admin.set_password(pw)
admin.save()

oun = self.create_random_str()
owner = models.Account.make_account(oun + "@example.com", oun, "Owner " + un, ["publisher"])
owner.save()

eun = self.create_random_str()
editor = models.Account.make_account(eun + "@example.com", eun, "Associate Editor " + un, ["associate_editor"])
editor.save()
assed = models.Account.make_account(eun + "@example.com", eun, "Associate Editor " + un, ["associate_editor"])
assed.save()

gn1 = "Maned Group " + un
eg1 = models.EditorGroup(**{
"name": gn1
})
eg1.set_maned(acc.id)
eg1.add_associate(editor.id)
eg1.set_maned(admin.id)
eg1.add_associate(assed.id)
eg1.save()

gn2 = "Editor Group " + un
eg2 = models.EditorGroup(**{
"name": gn2
})
eg2.set_editor(acc.id)
eg2.set_editor(admin.id)
eg2.save()

# the eponymous group
eg3 = models.EditorGroup(**{
"name": admin.id
})
eg3.set_maned(admin.id)
eg3.set_editor(admin.id)
eg3.add_associate(admin.id)
eg3.save()

aapps = build_associate_applications(un)
eapps = build_editor_applications(un, eg2)
mapps = build_maned_applications(un, eg1, owner.id)
mapps = build_maned_applications(un, eg1, owner.id, eg3)


return {
"account": {
"username": acc.id,
"username": admin.id,
"password": pw
},
"users": [
owner.id,
editor.id
assed.id
],
"editor_group": {
"id": eg2.id,
Expand Down Expand Up @@ -86,7 +96,7 @@ def teardown(self, params) -> dict:
return {"status": "success"}


def build_maned_applications(un, eg, owner):
def build_maned_applications(un, eg, owner, eponymous_group):
w = 7 * 24 * 60 * 60

apps = {}
Expand Down Expand Up @@ -132,6 +142,16 @@ def build_maned_applications(un, eg, owner):
"title": un + " Maned Pending Application"
}]

app = build_application(un + " Maned Low Priority Pending Application", 1 * w, 1 * w,
constants.APPLICATION_STATUS_PENDING,
editor_group=eponymous_group.name, owner=owner)
app.remove_editor()
app.save()
apps["low_priority_pending"] = [{
"id": app.id,
"title": un + " Maned Low Priority Pending Application"
}]

return apps


Expand Down
Loading

0 comments on commit 79c7ae0

Please sign in to comment.