Skip to content

Commit

Permalink
Merge branch 'feature/3356_restructure_templates' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Eardley committed Oct 3, 2024
2 parents 9b0e135 + c7e8d70 commit 68af124
Show file tree
Hide file tree
Showing 332 changed files with 49,298 additions and 3,989 deletions.
6 changes: 3 additions & 3 deletions cms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,19 @@ frontmatter directives, then you can also import the template directly at any po

This is done by wrapping a template import directive in an HTML `<div>` tag (to prevent the markdown
interpreter from touching it). This is done as follows. Ensure that the import directive is formatted
exactly as specified here. You should just change the path to the template file (`data/sponsors.html`)
exactly as specified here. You should just change the path to the template file (`public/includes/_sponsors.html`)
to the appropriate path for the template you wish to include:

```
<div>{% include "data/sponsors.html" %}</div>
<div>{% include "public/includes/_sponsors.html" %}</div>
```

For example, to import a data template in the middle of some text:

```
Here is some introductory text about the following data...
<div>{% include "data/sponsors.html" %}</div>
<div>{% include "public/includes/_sponsors.html" %}</div>
Wasn't that data interesting?
```
Expand Down
2 changes: 1 addition & 1 deletion cms/data/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ entries:
url: '#'
modal:
id: wechat
include: "includes/_wechat_modal.html"
include: "public/includes/_wechat_modal.html"
- label: Atom feed
feather: rss
route: atom.feed # ~~->Atom:WebRoute~~
Expand Down
4 changes: 2 additions & 2 deletions cms/data/notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ application:publisher:inprogress:notify:

application:publisher:quickreject:notify:
long: |
The application which you submitted for **{title}** on {date_applied} has been rejected as the journal does not meet our basic criteria ([{doaj_guide_url}]({doaj_guide_url})).
The application you submitted for **{title}** on {date_applied} has been rejected as the journal does not meet our criteria for inclusion.
{note}
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}))
You may submit a new application 6 months after the date of this email. Before you apply again, make the necessary changes to ensure your journal adheres to our criteria: ([{doaj_guide_url}]({doaj_guide_url}))
short:
Your application ({issns}) was rejected

Expand Down
2 changes: 1 addition & 1 deletion cms/pages/about/advisory-board-council.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: no-sidenav
include: /data/advisory-board-council.html
include: /public/includes/_advisory-board-council.html
title: Advisory Board & Council
section: About
toc: true
Expand Down
4 changes: 2 additions & 2 deletions cms/pages/about/ambassadors.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: sidenav
include: /data/ambassadors.html
layout: no-sidenav
include: /public/includes/_ambassadors.html
title: Ambassadors
section: About
toc: true
Expand Down
2 changes: 1 addition & 1 deletion cms/pages/about/team.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: no-sidenav
include: /data/team.html
include: /public/includes/_team.html
title: DOAJ team
section: About
toc: true
Expand Down
2 changes: 1 addition & 1 deletion cms/pages/about/volunteers.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Volunteers
section: About
toc: true
highlight: true
include: /data/volunteers.html
include: /public/includes/_volunteers.html
featuremap: ~~Volunteers:Fragment->VolunteersData:Template~~

---
Expand Down
2 changes: 1 addition & 1 deletion cms/pages/apply/thank-you.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: no-sidenav
title: Thank you for your application.
section: Apply
aside: /includes/_aside_in_case_of_rejection.html
aside: /public/includes/_aside_in_case_of_rejection.html
featuremap: ~~ApplicationThanks:Fragment->RejectionAside:Template~~

---
Expand Down
4 changes: 2 additions & 2 deletions cms/pages/support/publisher-supporters.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: sidenav
include: /data/publisher-supporters.html
include: /public/includes/_publisher-supporters.html
title: Publisher supporter model
section: Support
sticky_sidenav: true
Expand Down Expand Up @@ -64,4 +64,4 @@ Please [contact us](/contact/) to discuss further.

## Supporting publishers, aggregators, and other organizations

<div>{% include '/data/sponsors.html' %}</div>
<div>{% include 'public/includes/_sponsors.html' %}</div>
18 changes: 17 additions & 1 deletion doajtest/testdrive/publisher_with_journal.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from portality import constants
from doajtest.testdrive.factory import TestDrive
from doajtest.fixtures.v2.journals import JournalFixtureFactory
from doajtest.fixtures.v2.applications import ApplicationFixtureFactory
from portality import models


Expand All @@ -22,17 +23,32 @@ def setup(self) -> dict:
j.bibjson().pissn = "2222-2222"
j.save()

source = ApplicationFixtureFactory.make_application_source()
a = models.Application(**source)
a.remove_current_journal()
a.remove_related_journal()
a.application_type = constants.APPLICATION_TYPE_NEW_APPLICATION
a.set_id(a.makeid())
a.set_owner(acc.id)
a.bibjson().eissn = "3333-3333"
a.bibjson().pissn = "4444-4444"
a.set_application_status(constants.APPLICATION_STATUS_IN_PROGRESS)
a.save()

return {
"account": {
"username": acc.id,
"password": pw,
"api_key": acc.api_key
},
"journals": [j.id]
"journals": [j.id],
"applications": [a.id],
}

def teardown(self, params) -> dict:
models.Account.remove_by_id(params["account"]["username"])
for jid in params["journals"]:
models.Journal.remove_by_id(jid)
for aid in params["applications"]:
models.Application.remove_by_id(aid)
return {"status": "success"}
Loading

0 comments on commit 68af124

Please sign in to comment.