Skip to content

Commit e95de9c

Browse files
140040: replaced all referenced to sherpa with jisc
(cherry picked from commit 5ce7c48)
1 parent 5cb1f59 commit e95de9c

66 files changed

Lines changed: 2896 additions & 3260 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/app/core/submission/models/sherpa-policies-details.model.ts renamed to src/app/core/submission/models/opf-policies-details.model.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
/**
22
* An interface to represent an access condition.
33
*/
4-
export class SherpaPoliciesDetailsObject {
4+
export class JiscOpfPoliciesDetailsObject {
55

66
/**
7-
* The sherpa policies error
7+
* The Jisc Open Policy Finder policies error
88
*/
99
error: boolean;
1010

1111
/**
12-
* The sherpa policies journal details
12+
* The Jisc Open Policy Finder policies journal details
1313
*/
1414
journals: Journal[];
1515

1616
/**
17-
* The sherpa policies message
17+
* The Jisc Open Policy Finder policies message
1818
*/
1919
message: string;
2020

2121
/**
22-
* The sherpa policies metadata
22+
* The Jisc Open Policy Finder policies metadata
2323
*/
2424
metadata: Metadata;
2525

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { JiscOpfPoliciesDetailsObject } from './opf-policies-details.model';
2+
3+
/**
4+
* An interface to represent the submission's item accesses condition.
5+
*/
6+
export interface WorkspaceitemSectionJiscOpfPoliciesObject {
7+
8+
/**
9+
* The access condition id
10+
*/
11+
id: string;
12+
13+
/**
14+
* The Jisc Open Policy Finder policies retrievalTime
15+
*/
16+
retrievalTime: string;
17+
18+
/**
19+
* The Jisc Open Policy Finder policies details
20+
*/
21+
opfResponse: JiscOpfPoliciesDetailsObject;
22+
}

src/app/core/submission/models/workspaceitem-section-sherpa-policies.model.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/app/core/submission/models/workspaceitem-sections.model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { WorkspaceitemSectionDuplicatesObject } from './workspaceitem-section-du
44
import { WorkspaceitemSectionFormObject } from './workspaceitem-section-form.model';
55
import { WorkspaceitemSectionIdentifiersObject } from './workspaceitem-section-identifiers.model';
66
import { WorkspaceitemSectionLicenseObject } from './workspaceitem-section-license.model';
7-
import { WorkspaceitemSectionSherpaPoliciesObject } from './workspaceitem-section-sherpa-policies.model';
7+
import { WorkspaceitemSectionJiscOpfPoliciesObject } from './workspaceitem-section-opf-policies.model';
88
import { WorkspaceitemSectionUploadObject } from './workspaceitem-section-upload.model';
99

1010
/**
@@ -24,7 +24,7 @@ export type WorkspaceitemSectionDataType
2424
| WorkspaceitemSectionLicenseObject
2525
| WorkspaceitemSectionCcLicenseObject
2626
| WorkspaceitemSectionAccessesObject
27-
| WorkspaceitemSectionSherpaPoliciesObject
27+
| WorkspaceitemSectionJiscOpfPoliciesObject
2828
| WorkspaceitemSectionIdentifiersObject
2929
| WorkspaceitemSectionDuplicatesObject
3030
| string;

src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ describe('DsDynamicLookupRelationModalComponent', () => {
7575
hierarchical: false,
7676
}),
7777
Object.assign(new ExternalSource(), {
78-
id: 'sherpaPublisher',
79-
name: 'sherpaPublisher',
78+
id: 'opfPublisher',
79+
name: 'opfPublisher',
8080
hierarchical: false,
8181
}),
8282
];
@@ -102,7 +102,7 @@ describe('DsDynamicLookupRelationModalComponent', () => {
102102
relationshipType: 'isAuthorOfPublication',
103103
nameVariants: true,
104104
searchConfiguration: 'personConfig',
105-
externalSources: ['orcidV2', 'sherpaPublisher'],
105+
externalSources: ['orcidV2', 'opfPublisher'],
106106
});
107107
nameVariant = 'Doe, J.';
108108
metadataField = 'dc.contributor.author';
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
import { WorkspaceitemSectionJiscOpfPoliciesObject } from '../../core/submission/models/workspaceitem-section-opf-policies.model';
2+
3+
export const OpfDataResponse = {
4+
'id': 'opfPolicies',
5+
'retrievalTime': '2022-04-20T09:44:39.870+00:00',
6+
'opfResponse':
7+
{
8+
'error': false,
9+
'message': null,
10+
'metadata': {
11+
'id': 23803,
12+
'uri': 'http://v2.sherpa.ac.uk/id/publication/23803',
13+
'dateCreated': '2012-11-20 14:51:52',
14+
'dateModified': '2020-03-06 11:25:54',
15+
'inDOAJ': false,
16+
'publiclyVisible': true,
17+
},
18+
'journals': [{
19+
'titles': ['The Lancet', 'Lancet'],
20+
'url': 'http://www.thelancet.com/journals/lancet/issue/current',
21+
'issns': ['0140-6736', '1474-547X'],
22+
'romeoPub': 'Elsevier: The Lancet',
23+
'zetoPub': 'Elsevier: The Lancet',
24+
'publisher': {
25+
'name': 'Elsevier',
26+
'relationshipType': null,
27+
'country': null,
28+
'uri': 'http://www.elsevier.com/',
29+
'identifier': null,
30+
'publicationCount': 0,
31+
'paidAccessDescription': 'Open access',
32+
'paidAccessUrl': 'https://www.elsevier.com/about/open-science/open-access',
33+
},
34+
'publishers': [{
35+
'name': 'Elsevier',
36+
'relationshipType': null,
37+
'country': null,
38+
'uri': 'http://www.elsevier.com/',
39+
'identifier': null,
40+
'publicationCount': 0,
41+
'paidAccessDescription': 'Open access',
42+
'paidAccessUrl': 'https://www.elsevier.com/about/open-science/open-access',
43+
}],
44+
'policies': [{
45+
'id': 0,
46+
'openAccessPermitted': false,
47+
'uri': null,
48+
'internalMoniker': 'Lancet',
49+
'permittedVersions': [{
50+
'articleVersion': 'submitted',
51+
'option': 1,
52+
'conditions': ['Upon publication publisher copyright and source must be acknowledged', 'Upon publication must link to publisher version'],
53+
'prerequisites': [],
54+
'locations': ['Author\'s Homepage', 'Preprint Repository'],
55+
'licenses': [],
56+
'embargo': null,
57+
}, {
58+
'articleVersion': 'accepted',
59+
'option': 1,
60+
'conditions': ['Publisher copyright and source must be acknowledged', 'Must link to publisher version'],
61+
'prerequisites': [],
62+
'locations': ['Author\'s Homepage', 'Institutional Website'],
63+
'licenses': ['CC BY-NC-ND'],
64+
'embargo': null,
65+
}, {
66+
'articleVersion': 'accepted',
67+
'option': 2,
68+
'conditions': ['Publisher copyright and source must be acknowledged', 'Must link to publisher version'],
69+
'prerequisites': ['If Required by Funder'],
70+
'locations': ['Non-Commercial Repository'],
71+
'licenses': ['CC BY-NC-ND'],
72+
'embargo': { amount: 6, units: 'Months' },
73+
}, {
74+
'articleVersion': 'accepted',
75+
'option': 3,
76+
'conditions': ['Publisher copyright and source must be acknowledged', 'Must link to publisher version'],
77+
'prerequisites': [],
78+
'locations': ['Non-Commercial Repository'],
79+
'licenses': [],
80+
'embargo': null,
81+
}],
82+
'urls': {
83+
'http://download.thelancet.com/flatcontentassets/authors/lancet-information-for-authors.pdf': 'Guidelines for Authors',
84+
'http://www.thelancet.com/journals/lancet/article/PIIS0140-6736%2813%2960720-5/fulltext': 'The Lancet journals welcome a new open access policy',
85+
'http://www.thelancet.com/lancet-information-for-authors/after-publication': 'What happens after publication?',
86+
'http://www.thelancet.com/lancet/information-for-authors/disclosure-of-results': 'Disclosure of results before publication',
87+
'https://www.elsevier.com/__data/assets/pdf_file/0005/78476/external-embargo-list.pdf': 'Journal Embargo Period List',
88+
'https://www.elsevier.com/__data/assets/pdf_file/0011/78473/UK-Embargo-Periods.pdf': 'Journal Embargo List for UK Authors',
89+
},
90+
'openAccessProhibited': false,
91+
'publicationCount': 0,
92+
'preArchiving': 'can',
93+
'postArchiving': 'can',
94+
'pubArchiving': 'cannot',
95+
}],
96+
'inDOAJ': false,
97+
}],
98+
},
99+
} as WorkspaceitemSectionJiscOpfPoliciesObject;

src/app/shared/mocks/section-sherpa-policies.service.mock.ts

Lines changed: 0 additions & 99 deletions
This file was deleted.

src/app/submission/objects/submission-objects.effects.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -465,11 +465,11 @@ export class SubmissionObjectEffects {
465465
mappedActions.push(new UpdateSectionDataAction(submissionId, sectionId, sectionData, filteredErrors, sectionErrors));
466466
}
467467

468-
// Sherpa Policies section needs to be updated when the rest response section is empty
469-
const sherpaPoliciesSectionId = findKey(currentState.sections, (section) => section.sectionType === SectionsType.SherpaPolicies);
470-
if (isNotUndefined(sherpaPoliciesSectionId) && isNotEmpty(currentState.sections[sherpaPoliciesSectionId]?.data)
471-
&& isEmpty(sections[sherpaPoliciesSectionId])) {
472-
mappedActions.push(new UpdateSectionDataAction(submissionId, sherpaPoliciesSectionId, null, [], []));
468+
// Opf Policies section needs to be updated when the rest response section is empty
469+
const opfPoliciesSectionId = findKey(currentState.sections, (section) => section.sectionType === SectionsType.OpfPolicies);
470+
if (isNotUndefined(opfPoliciesSectionId) && isNotEmpty(currentState.sections[opfPoliciesSectionId]?.data)
471+
&& isEmpty(sections[opfPoliciesSectionId])) {
472+
mappedActions.push(new UpdateSectionDataAction(submissionId, opfPoliciesSectionId, null, [], []));
473473
}
474474

475475
// When Duplicate Detection step is enabled, add it only if there are duplicates in the response section data

src/app/submission/sections/container/section-container.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
(panelChange)="sectionRef.sectionChange($event)" activeIds="{{ sectionData.id }}" [destroyOnHide]="false">
88
<ngb-panel id="{{ sectionData.id }}" [type]="sectionRef.isInfo() ? 'info' : ''">
99
<ng-template ngbPanelTitle class="d-flex">
10-
<span [ngClass]="{ 'text-white' : sectionRef.isInfo()}" class="flex-grow-1 section-title" tabindex="0">{{
10+
<span [ngClass]="{'text-info' : sectionRef.isInfo()}" class="flex-grow-1 section-title" tabindex="0">{{
1111
'submission.sections.'+sectionData.header | translate
1212
}}</span>
1313
<div class="d-inline-block">
@@ -30,7 +30,7 @@
3030
[attr.aria-label]="'submission.sections.status.valid.aria' | translate"></i>
3131
}
3232
@if (sectionRef.isInfo()) {
33-
<i class="fas fa-info-circle me-3 text-white"
33+
<i class="fas fa-info-circle me-3 text-info"
3434
title="{{'submission.sections.status.info.title' | translate}}" role="img"
3535
[attr.aria-label]="'submission.sections.status.info.aria' | translate"></i>
3636
}

0 commit comments

Comments
 (0)