[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<any> = new BehaviorSubject<any>(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).
angular-12
Konstantina Galouni 2 years ago
parent 8e056f5f4e
commit 53591979f7

@ -8,7 +8,7 @@
<div class="uk-grid uk-grid-large uk-grid-stack uk-padding-small" uk-grid>
<div class="uk-width-3-5@m uk-width-1-1@s uk-flex uk-flex-column uk-flex-center">
<span class="uk-align-left uk-margin-remove-bottom">
<span uk-scrollspy-class class="uk-badge beta">Beta</span>
<span uk-scrollspy-class class="uk-text-large" style="color: #EEB204">Beta</span>
</span>
<div style="max-width: 600px;">
<h1 uk-scrollspy-class class="uk-h1 uk-margin-remove-top">
@ -81,7 +81,7 @@
<div *ngIf="fos[index]" class="uk-width-3-4">
<div class="uk-text-capitalize">
<h2 class="uk-h4 uk-margin-remove">
<a [routerLink]="properties.searchLinkToAdvancedResults" [queryParams]="{f0: 'fos', fv0: fos[index].id}"
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(fos[index].id)}"
class="uk-link-text">
{{fos[index].id}}
</a>
@ -91,13 +91,13 @@
<div *ngFor="let child of fos[index].children">
<div class="whole-child uk-text-capitalize">
<h3 class="uk-h6 uk-margin-small-bottom">
<a [routerLink]="properties.searchLinkToAdvancedResults" [queryParams]="{f0: 'fos', fv0: child.id}"
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(child.id)}"
class="uk-link-text">
{{child.id}}
</a>
</h3>
<div *ngFor="let subChild of child.children" style="margin-bottom: 5px;">
<a [routerLink]="properties.searchLinkToAdvancedResults" [queryParams]="{f0: 'fos', fv0: subChild.id}"
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(subChild.id)}"
class="uk-link-text">
{{subChild.id}}
</a>
@ -115,19 +115,19 @@
<div
class="uk-margin-large-bottom uk-padding uk-padding-remove-top uk-padding-remove-horizontal uk-text-capitalize custom-bottom-border">
<h2 class="uk-h4 uk-margin-remove">
<a [routerLink]="properties.searchLinkToAdvancedResults" [queryParams]="{f0: 'fos', fv0: item.id}"
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(item.id)}"
class="uk-link-text" [innerHTML]="highlightKeyword(item.id)">
</a>
</h2>
<div class="uk-grid uk-child-width-1-3 uk-margin-large-top uk-margin-medium-bottom" uk-grid="masonry: false">
<div *ngFor="let subItem of item.children">
<h3 class="uk-h6 uk-margin-small-bottom">
<a [routerLink]="properties.searchLinkToAdvancedResults" [queryParams]="{f0: 'fos', fv0: subItem.id}"
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(subItem.id)}"
class="uk-link-text" [innerHTML]="highlightKeyword(subItem.id)">
</a>
</h3>
<div *ngFor="let subSubItem of subItem.children" style="margin-bottom: 5px;">
<a [routerLink]="properties.searchLinkToAdvancedResults" [queryParams]="{f0: 'fos', fv0: subSubItem.id}"
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'fos': urlEncodeAndQuote(subSubItem.id)}"
class="uk-link-text" [innerHTML]="highlightKeyword(subSubItem.id)">
</a>
</div>

@ -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));
}
}

@ -1 +1 @@
Subproject commit 5e11488c8ff49da0675ce58924a415964aefd968
Subproject commit f974e91c25868f3cca8842b3a6c39cdb1e6053f1

@ -8,7 +8,7 @@
<div class="uk-grid uk-grid-large uk-grid-stack uk-padding-small" uk-grid>
<div class="uk-width-3-5@m uk-width-1-1@s uk-flex uk-flex-column uk-flex-center">
<span class="uk-align-left uk-margin-remove-bottom">
<span uk-scrollspy-class class="uk-badge beta">Beta</span>
<span uk-scrollspy-class class="uk-text-large" style="color: #EEB204">Beta</span>
</span>
<h1 uk-scrollspy-class class="uk-h1 uk-margin-remove-top">
<span>Science for UN Sustainable <br> Development Goals<span class="custom-sdg-dot"></span></span>
@ -44,7 +44,7 @@
<div *ngIf="!loading">
<div *ngIf="displayedSdgs && displayedSdgs.length" class="uk-padding-small uk-margin-auto@m uk-grid uk-child-width-1-4@xl uk-child-width-1-4@l uk-child-width-1-3@m uk-child-width-1-2@s" uk-grid>
<div *ngFor="let sdg of displayedSdgs">
<a [routerLink]="properties.searchLinkToAdvancedResults" [queryParams]="{f0: 'sdg', fv0: sdg.id}"
<a [routerLink]="properties.searchLinkToResults" [queryParams]="{'sdg': urlEncodeAndQuote(sdg.id)}"
class="uk-link-reset">
<div class="uk-card uk-card-default uk-card-hover" [class]="'sdg-card sdg-' + sdg.code">
<div class="uk-height-1-1 uk-flex uk-flex-column uk-flex-between">

@ -7,6 +7,7 @@ import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties"
import {properties} from "src/environments/environment";
import {RefineFieldResultsService} from "../openaireLibrary/services/refineFieldResults.service";
import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields";
import {StringUtils} from "../openaireLibrary/utils/string-utils.class";
@Component({
selector: 'sdg',
@ -54,4 +55,8 @@ export class SdgComponent implements OnInit, OnDestroy {
sub.unsubscribe();
}
}
public urlEncodeAndQuote(str: string): string {
return StringUtils.quote(StringUtils.URIEncode(str));
}
}

@ -1 +1 @@
Subproject commit accd757bca96e58296a5ab4863bddae73e650aba
Subproject commit b425623fb92df9d99221ab8e2f466935f1acc670
Loading…
Cancel
Save