From 53591979f7bee98555f29a2c552279987357f665 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Thu, 9 Jun 2022 16:45:39 +0300 Subject: [PATCH] [Explore & Library & openaire-theme | new-theme]: Updated parsing of classified subjects by using a vocabulary | Added parsing of instance.license in Download from | Added feedback functionality for fos and sdgs in landing | #7509 Parsing both citations and references fields | In "view all/less" links added chervon-right icon with class "view-more-less-link". 1. fos.component.ts & sdg.component.ts: Added method "urlEncodeAndQuote()" to encode and then quote a string. 2. fos.component.html & sdg.component.html: a. "Beta" badge was updated to yellow uk-text-large. b. Link to the simple search page instead of the advanced and urlEncodeAndQuote the parameter used in url. 3. link.css: Added class "view-more-less-link" to set on ::after "chevron_right" icon (not underlined on hover) - used in "view all/more/less" links. 4. dataProvider.component.html & project.component.html & fundedBy.component.ts & relatedTo.component.ts & showIdentifiers.component.ts & showAuthors.component.ts: In "view all/less" links added class "view-more-less-link" | Renamed "view more" to "view all". 5. feedback.component.html: Rename wording to be more positive: issues -> feedback, issue -> comment, report -> feedback. 6. feedback.component.ts: Added @Input() preSelectedField: string = ""; and set with it "field" on "addIssue()" (fos/sdg preselected for feedback). 7. availableOn.component.ts: a. In "view all/less" links added class "view-more-less-link". b. #7833 - Show instance.license information (as link when recognized as url, string otherwise). 8. landing-utils/fos.component.ts & landing-utils/sdg.component.ts: a. "Beta" word was updated to yellow uk-text-xsmall. b. In "view all/less" links added class "view-more-less-link". c. Added feedback functionality: link to feedback form. 9. showSubjects.component.ts: a. In "view all/less" links added class "view-more-less-link". b. Added "view all" functionality for classified subjects too. 10. resultLanding.component.html: a. In "view all/less" links added class "view-more-less-link" | Renamed "view more" to "view all" b. Added feedback functionality: link to feedback form - preselect in feedback form fos/sdg. 11. resultLanding.component.ts: a. Added public feedbackPreSelectedField: string = ""; field. b. Added method "feedbackClicked()". c. [Bug fix] In hasPrimaryInfo() added check for classifiedSubjects. d. Renamed getProvenanceVocabularyAndResultLandingInfo() to getVocabulariesAndResultLandingInfo() and call also this._vocabulariesService.getSubjectsVocabulary(). 12. parsingFunctions.class.ts: a. #7196 - Updated parsing of subjects in method "parseAllSubjects()". b. #7833 - In method "parseHostedBy_collectedFrom()", added parsing for "license" field. 13. orcid-work.component.ts: On calling method "this.resultLandingService.getResultLandingInfo()", added null parameter for subject vocabulary. 14. searchFilter.module.ts: Import IconsModule. 15. searchFilter.component.html: Removed +/- form "view all/less" links and added class "view-more-less-link". 16. result-preview.ts: Added "licence?: string" in HostedByCollectedFrom. 17. ISVocabularies.service.ts: a. Added "private subjectsVocabulary: BehaviorSubject = new BehaviorSubject(null);" field and methods "getSubjectsVocabulary()", "getSubjectsVocabularyFromService()". b. Commented this.clearSubscriptions() from "getProvenanceActionVocabularyFromServiceAsync()". 18. resultLanding.service.ts: a. On subjects parsing, use subjectsVocabulary. b. #7509- Added if/then/else case for parsing citations (new name: references). --- explore/src/app/fos/fos.component.html | 14 +++++++------- explore/src/app/fos/fos.component.ts | 7 ++++++- explore/src/app/openaireLibrary | 2 +- explore/src/app/sdg/sdg.component.html | 4 ++-- explore/src/app/sdg/sdg.component.ts | 5 +++++ explore/src/assets/openaire-theme | 2 +- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/explore/src/app/fos/fos.component.html b/explore/src/app/fos/fos.component.html index aca460f5..62edfbfd 100644 --- a/explore/src/app/fos/fos.component.html +++ b/explore/src/app/fos/fos.component.html @@ -8,7 +8,7 @@
- Beta + Beta

@@ -81,7 +81,7 @@

- {{fos[index].id}} @@ -91,13 +91,13 @@

- {{child.id}}

- {{subChild.id}} @@ -115,19 +115,19 @@

-

-

-
diff --git a/explore/src/app/fos/fos.component.ts b/explore/src/app/fos/fos.component.ts index 4311f3c2..b3c6c778 100644 --- a/explore/src/app/fos/fos.component.ts +++ b/explore/src/app/fos/fos.component.ts @@ -8,6 +8,7 @@ import {properties} from "src/environments/environment"; import {FormBuilder, FormControl} from "@angular/forms"; import {ActivatedRoute} from "@angular/router"; import {Location} from "@angular/common"; +import {StringUtils} from "../openaireLibrary/utils/string-utils.class"; @Component({ selector: 'fos', @@ -135,4 +136,8 @@ export class FosComponent implements OnInit, OnDestroy { this.keywordControl.setValue(''); this.location.go(window.location.pathname); } -} + + public urlEncodeAndQuote(str: string): string { + return StringUtils.quote(StringUtils.URIEncode(str)); + } +} \ No newline at end of file diff --git a/explore/src/app/openaireLibrary b/explore/src/app/openaireLibrary index 5e11488c..f974e91c 160000 --- a/explore/src/app/openaireLibrary +++ b/explore/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 5e11488c8ff49da0675ce58924a415964aefd968 +Subproject commit f974e91c25868f3cca8842b3a6c39cdb1e6053f1 diff --git a/explore/src/app/sdg/sdg.component.html b/explore/src/app/sdg/sdg.component.html index 921cd126..67624514 100644 --- a/explore/src/app/sdg/sdg.component.html +++ b/explore/src/app/sdg/sdg.component.html @@ -8,7 +8,7 @@