Skip to content

Commit 23751a2

Browse files
KasinhouMatus Kasak
andauthored
Mendelu/UI adjustments (#1279)
* Align message under citation, rename Sherpa/RoMEO * Align message below citation * ui alignment * Renamed sherpa variable to openpolicyfinder --------- Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk>
1 parent 3623e2a commit 23751a2

6 files changed

Lines changed: 29 additions & 26 deletions

File tree

src/app/item-page/full/full-item-page.component.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ describe('FullItemPageComponent', () => {
383383
metadataLinkService.getExtraLinks.and.callFake((key: string, value: string) => {
384384
if (key === 'dc.identifier.issn') {
385385
return of([
386-
{ label: 'Sherpa/RoMEO', href: `https://openpolicyfinder.jisc.ac.uk/search?search=${encodeURIComponent(value)}` },
386+
{ label: 'Open policy finder', href: `https://openpolicyfinder.jisc.ac.uk/search?search=${encodeURIComponent(value)}` },
387387
{ label: 'JCR', href: `https://jcr.clarivate.com/jcr/browse-journals?search=${encodeURIComponent(value)}` },
388388
]);
389389
}
@@ -428,12 +428,12 @@ describe('FullItemPageComponent', () => {
428428
expect(rightsLink.nativeElement.getAttribute('target')).toBe('_blank');
429429
});
430430

431-
it('should render Sherpa/RoMEO and JCR badges for ISSN', () => {
431+
it('should render Open policy finder and JCR badges for ISSN', () => {
432432
const badges = fixture.debugElement.queryAll(By.css('table .badge'));
433-
const sherpaLink = badges.find(l => l.nativeElement.textContent.includes('Sherpa/RoMEO'));
433+
const openPolicyFinderLink = badges.find(l => l.nativeElement.textContent.includes('Open policy finder'));
434434
const jcrLink = badges.find(l => l.nativeElement.textContent.includes('JCR'));
435-
expect(sherpaLink).toBeTruthy();
436-
expect(sherpaLink.nativeElement.getAttribute('href')).toContain('openpolicyfinder.jisc.ac.uk');
435+
expect(openPolicyFinderLink).toBeTruthy();
436+
expect(openPolicyFinderLink.nativeElement.getAttribute('href')).toContain('openpolicyfinder.jisc.ac.uk');
437437
expect(jcrLink).toBeTruthy();
438438
expect(jcrLink.nativeElement.getAttribute('href')).toContain('jcr.clarivate.com');
439439
});
Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
@if ((citaceProStatus$ | async) && (citaceProURL$ | async); as citaceProURL) {
2-
<iframe
3-
height="200px"
4-
width="100%"
5-
style="border: none;"
6-
[src]="citaceProURL"
7-
></iframe>
8-
<p class="text-muted small mt-1 mb-4">
9-
<em>{{ 'item.page.citace-pro.disclaimer' | translate }}</em>
10-
</p>
2+
<div class="mb-5 pb-4">
3+
<iframe
4+
class="d-block"
5+
height="150px"
6+
width="100%"
7+
style="border: none;"
8+
[src]="citaceProURL"
9+
></iframe>
10+
<p class="text-muted small mt-1 mb-0">
11+
{{ 'item.page.citace-pro.disclaimer' | translate }}
12+
</p>
13+
</div>
1114
}

src/app/shared/utils/metadata-link.service.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,21 +146,21 @@ describe('MetadataLinkService', () => {
146146
});
147147

148148
describe('getExtraLinks', () => {
149-
it('should return Sherpa/RoMEO and JCR links for dc.identifier.issn', (done) => {
149+
it('should return Open policy finder and JCR links for dc.identifier.issn', (done) => {
150150
service.getExtraLinks('dc.identifier.issn', '1234-5678').subscribe(extras => {
151151
expect(extras.length).toBe(2);
152-
expect(extras[0].label).toBe('Sherpa/RoMEO');
152+
expect(extras[0].label).toBe('Open policy finder');
153153
expect(extras[0].href).toBe('https://openpolicyfinder.jisc.ac.uk/search?search=1234-5678');
154154
expect(extras[1].label).toBe('JCR');
155155
expect(extras[1].href).toBe('https://jcr.clarivate.com/jcr/browse-journals?search=1234-5678');
156156
done();
157157
});
158158
});
159159

160-
it('should return Sherpa/RoMEO and JCR links for local.identifier.e-issn', (done) => {
160+
it('should return Open policy finder and JCR links for local.identifier.e-issn', (done) => {
161161
service.getExtraLinks('local.identifier.e-issn', '8765-4321').subscribe(extras => {
162162
expect(extras.length).toBe(2);
163-
expect(extras[0].label).toBe('Sherpa/RoMEO');
163+
expect(extras[0].label).toBe('Open policy finder');
164164
expect(extras[1].label).toBe('JCR');
165165
done();
166166
});

src/app/shared/utils/metadata-link.service.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const RESOLVER_PROPERTIES = {
2121
doi: 'identifier.doi.resolver',
2222
scopus: 'identifier.scopus.resolver',
2323
wos: 'identifier.wos.resolver',
24-
sherpa: 'identifier.sherpa.resolver',
24+
openPolicyFinder: 'identifier.sherpa.resolver',
2525
jcr: 'identifier.jcr.resolver',
2626
};
2727

@@ -34,7 +34,7 @@ interface ResolverConfig {
3434
doi: string | null;
3535
scopus: string | null;
3636
wos: string | null;
37-
sherpa: string | null;
37+
openPolicyFinder: string | null;
3838
jcr: string | null;
3939
}
4040

@@ -85,7 +85,7 @@ export class MetadataLinkService {
8585
doi: fetch('doi'),
8686
scopus: fetch('scopus'),
8787
wos: fetch('wos'),
88-
sherpa: fetch('sherpa'),
88+
openPolicyFinder: fetch('openPolicyFinder'),
8989
jcr: fetch('jcr'),
9090
}).pipe(
9191
shareReplay({ bufferSize: 1, refCount: true }),
@@ -138,7 +138,7 @@ export class MetadataLinkService {
138138

139139
/**
140140
* For ISSN fields (dc.identifier.issn, local.identifier.e-issn), return
141-
* extra links to Sherpa/RoMEO and JCR displayed next to the plain ISSN value.
141+
* extra links to Open policy finder and JCR displayed next to the plain ISSN value.
142142
*
143143
* Returns an empty array for non-ISSN fields.
144144
*/
@@ -151,7 +151,7 @@ export class MetadataLinkService {
151151
if (key === 'dc.identifier.issn' || key === 'local.identifier.e-issn') {
152152
return this.resolvers$.pipe(
153153
map(r => [
154-
...(r.sherpa ? [{ label: 'Sherpa/RoMEO', href: `${r.sherpa}${encodeURIComponent(trimmed)}` }] : []),
154+
...(r.openPolicyFinder ? [{ label: 'Open policy finder', href: `${r.openPolicyFinder}${encodeURIComponent(trimmed)}` }] : []),
155155
...(r.jcr ? [{ label: 'JCR', href: `${r.jcr}${encodeURIComponent(trimmed)}` }] : []),
156156
]),
157157
);

src/assets/i18n/cs.json5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4388,8 +4388,8 @@
43884388
// "item.page.authors": "Authors",
43894389
"item.page.authors": "Autoři",
43904390

4391-
// "item.page.citace-pro.disclaimer": "These citations were generated by software and may contain errors. The citation provided does not comply with the ČSN ISO 690:2011 standard.",
4392-
"item.page.citace-pro.disclaimer": "Tyto citace vytvořil software a mohou obsahovat chyby. Uvedená citace není v souladu s normou ČSN ISO 690:2011.",
4391+
// "item.page.citace-pro.disclaimer": "These citations were generated by software and may contain errors. The citation provided may not comply with the ČSN ISO 690 standard.",
4392+
"item.page.citace-pro.disclaimer": "Tyto citace vytvořil software a mohou obsahovat chyby. Uvedená citace nemusí být v souladu s normou ČSN ISO 690.",
43934393

43944394
// "item.page.citation": "Citation",
43954395
"item.page.citation": "Citace",

src/assets/i18n/en.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2925,7 +2925,7 @@
29252925

29262926
"item.page.authors": "Authors",
29272927

2928-
"item.page.citace-pro.disclaimer": "These citations were generated by software and may contain errors. The citation provided does not comply with the ČSN ISO 690:2011 standard.",
2928+
"item.page.citace-pro.disclaimer": "These citations were generated by software and may contain errors. The citation provided may not comply with the ČSN ISO 690 standard.",
29292929

29302930
"item.page.citation": "Citation",
29312931

0 commit comments

Comments
 (0)