diff --git a/claims/claim-utils/claimResultSearchForm.component.html b/claims/claim-utils/claimResultSearchForm.component.html index b2e66b11..fe0ab300 100644 --- a/claims/claim-utils/claimResultSearchForm.component.html +++ b/claims/claim-utils/claimResultSearchForm.component.html @@ -1,14 +1,16 @@ -
- -
-
-
-
-
-
+
+
+ +
+
+
+
+
+
+
diff --git a/claims/claim-utils/displayClaims/displayClaims.component.html b/claims/claim-utils/displayClaims/displayClaims.component.html index 2c5dd4eb..bdcc74b3 100644 --- a/claims/claim-utils/displayClaims/displayClaims.component.html +++ b/claims/claim-utils/displayClaims/displayClaims.component.html @@ -63,7 +63,7 @@
+ [externalPortalUrl]=externalPortalUrl [source]="true" [linkAvailable]="isClaimAvailable(claim)">
Link to: + path="/search/result" [externalPortalUrl]=externalPortalUrl [linkAvailable]="linkAvailable">

{{entity.title?entity.title:"[No title available]"}} - {{entity.title?entity.title:"[No title available]"}} + [routerLink]="path" class="uk-link uk-link-heading" [class.uk-disabled]="!linkAvailable">{{entity.title?entity.title:"[No title available]"}} + {{entity.title?entity.title:"[No title available]"}}

@@ -23,5 +23,6 @@ export class PublicationTitleFormatter { @Input() path: string; @Input() entity: any; @Input() externalPortalUrl: string = null; + @Input() linkAvailable: boolean = true; public routerHelper: RouterHelper = new RouterHelper(); } diff --git a/claims/linking/linkingGeneric.component.html b/claims/linking/linkingGeneric.component.html index 7f394dd2..16cb04bf 100644 --- a/claims/linking/linkingGeneric.component.html +++ b/claims/linking/linkingGeneric.component.html @@ -73,11 +73,11 @@
-
+
-
+
-
+

Link source to

-
+
-
+
Source
@@ -145,7 +145,7 @@
-
+
-
+
diff --git a/landingPages/annotation/annotation.component.ts b/landingPages/annotation/annotation.component.ts deleted file mode 100644 index 90a26f9c..00000000 --- a/landingPages/annotation/annotation.component.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { - Component, - ElementRef, - EventEmitter, - HostListener, - Input, - OnDestroy, - OnInit, - Output, - ViewChild -} from "@angular/core"; -import {Annotation, AnnotationService} from "./annotation.service"; -import {ResultLandingInfo} from "../../utils/entities/resultLandingInfo"; -import {EnvProperties} from "../../utils/properties/env-properties"; -import {properties} from "../../../../environments/environment"; -import {UserManagementService} from "../../services/user-management.service"; -import {COOKIE, Session, User} from "../../login/utils/helper.class"; -import {Subscriber} from "rxjs"; - -@Component({ - selector: 'b2note', - template: ` -
Annotations
-
-
- - - - -
- - -
- -
-
-
-
- - -
-
`, - styleUrls: ['annotation.css'] -}) -export class AnnotationComponent implements OnInit, OnDestroy { - - @Input() - public landingInfo: ResultLandingInfo = null; - @Input() - public id: string = null; - public properties: EnvProperties = properties; - public url: string = null; - public pid: string = null; - public keywords: string[] = []; - public visible: boolean = false; - public annotations: Annotation[] = []; - public annotationSize: number = 10; - public isLoggedIn: boolean = Session.isLoggedIn(); - public visibleAnnotations: number; - public loading: boolean = false; - public submitted: boolean = false; - @Output() - public pidEmitter: EventEmitter = new EventEmitter(); - @ViewChild('iframe') iframe: ElementRef; - @ViewChild('form') form: ElementRef; - private subscriptions: any[] = []; - - constructor(private annotationService: AnnotationService) { - } - - @HostListener('window:message', ['$event']) - public onChange(event) { - if (this.properties.b2noteAPIURL.includes(event.origin)) { - if (event.data === "B2NOTE loaded") { - let token = COOKIE.getCookie('AccessToken'); - this.iframe.nativeElement.contentWindow.postMessage({token: token}, this.properties.b2noteAPIURL); - } else { - this.getAnnotations(); - } - } - } - - ngOnInit(): void { - this.visibleAnnotations = this.annotationSize; - if (typeof window !== "undefined") { - let id = this.id; - this.url = window.location.href; - if (this.landingInfo.deletedByInferenceIds) { - id = this.landingInfo.deletedByInferenceIds[0]; - this.url = this.url.replace(this.id, id); - } - if (this.landingInfo.identifiers && this.landingInfo.identifiers.size > 0) { - if (this.landingInfo.identifiers.get('doi')) { - this.pid = this.landingInfo.identifiers.get('doi')[0]; - } else { - const key: string = this.landingInfo.identifiers.keys().next().value; - if (key) { - this.pid = this.landingInfo.identifiers.get(key)[0]; - } - } - } - if (this.pid) { - this.getAnnotations(); - } - this.pidEmitter.emit(this.pid); - } - } - - public get enabled(): boolean { - return this.pid && this.isLoggedIn; - } - - private clearSubscriptions() { - this.subscriptions.forEach(subscription => { - if (subscription instanceof Subscriber) { - subscription.unsubscribe(); - } - }); - this.subscriptions = []; - } - - private getAnnotations() { - if (!this.annotations || this.annotations.length === 0) { - this.loading = true; - } - this.subscriptions.push(this.annotationService.getAllAnnotations(this.pid).subscribe(annotations => { - this.annotations.forEach((annotation, index) => { - if (!annotations.find(element => element.type === annotation.type && element.text === annotation.text)) { - this.annotations.splice(index, 1); - } - }); - annotations.forEach(annotation => { - if (!this.annotations.find(element => element.type === annotation.type && element.text === annotation.text)) { - annotation.targetSize = 3; - this.annotationService.getAnnotationTargets(annotation.text, annotation.type).subscribe(targets => { - annotation.targets = targets.filter(target => target.id !== this.pid); - }); - this.annotations.push(annotation); - } - }); - this.annotations = this.sort(this.annotations); - this.loading = false; - }, error => { - this.loading = false; - })); - } - - public sort(annotations: Annotation[]): Annotation[] { - return annotations.sort((a, b) => { - if (a.type === b.type) { - return 1; - } else if (a.type === 'semantic') { - return -1; - } else if (b.type === 'semantic') { - return 1; - } else if (a.type === 'keyword') { - return -1; - } else if (b.type === 'keyword') { - return 1; - } - }); - } - - public searchPid(pid: string): { [k: string]: any; } { - return { - pid: pid - } - } - - ngOnDestroy() { - this.clearSubscriptions(); - } - - toggleAnnotation(event) { - if (this.visible) { - event.preventDefault(); - } else if(!this.submitted) { - this.form.nativeElement.submit(); - this.submitted = true; - } - this.visible = !this.visible; - } - - open(i: number) { - this.annotations.forEach((annotation, index) => { - if (index != i) { - annotation.targetSize = 3; - } else { - annotation.targetSize = annotation.targets.length - } - }); - } -} diff --git a/landingPages/annotation/annotation.css b/landingPages/annotation/annotation.css deleted file mode 100644 index 4a2961d3..00000000 --- a/landingPages/annotation/annotation.css +++ /dev/null @@ -1,41 +0,0 @@ -.widget-container { - position: fixed; - left: 50%; - top: 50%; - z-index: 1000; - padding: 19px; - margin-left: -167px; - margin-top: -311px; - box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), - 0 2px 2px 0 rgba(0, 0, 0, 0.14), - 0 1px 5px 0 rgba(0, 0, 0, 0.12); - border: 1px solid #e3e3e3; - border-radius: 4px; - outline: 0; - min-height: 20px; - background-color: #f5f5f5; - cursor: move; -} - -.widget-container:hover, .widget-container:active{ - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), - 0 8px 10px 1px rgba(0, 0, 0, 0.14), - 0 3px 14px 2px rgba(0, 0, 0, 0.12); -} - -.close { - float: right; - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - font-size: 21px; - font-weight: bold; - opacity: 0.2; -} - -.b2note-iframe { - width: 100%; - height: 600px; - border: 1px solid #dddddd; -} diff --git a/landingPages/annotation/annotation.module.ts b/landingPages/annotation/annotation.module.ts deleted file mode 100644 index cca05c28..00000000 --- a/landingPages/annotation/annotation.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {NgModule} from "@angular/core"; -import {AnnotationComponent} from "./annotation.component"; -import {CommonModule} from "@angular/common"; -import {DragDropModule} from "@angular/cdk/drag-drop"; -import {RouterModule} from "@angular/router"; -import {LoadingModule} from "../../utils/loading/loading.module"; - -@NgModule({ - imports: [CommonModule, DragDropModule, RouterModule, LoadingModule], - declarations: [AnnotationComponent], - exports: [AnnotationComponent] -}) -export class AnnotationModule {} diff --git a/landingPages/annotation/annotation.service.ts b/landingPages/annotation/annotation.service.ts deleted file mode 100644 index 992f9044..00000000 --- a/landingPages/annotation/annotation.service.ts +++ /dev/null @@ -1,95 +0,0 @@ -import {Injectable} from "@angular/core"; -import {HttpClient} from "@angular/common/http"; -import {Observable} from "rxjs"; -import {EnvProperties} from "../../utils/properties/env-properties"; -import {map} from "rxjs/operators"; -import {properties} from "../../../../environments/environment"; - -export interface AnnotationTarget { - id: string; - url: string; -} - -export interface Annotation { - text: string; - type: 'semantic' | 'keyword' | 'comment'; - targets?: AnnotationTarget[]; - targetSize?: number; -} - -@Injectable({ - providedIn: "root" -}) -export class AnnotationService { - - api = 'api/'; - - constructor(private http: HttpClient) { - } - - getAllAnnotations(source: string): Observable { - let url = properties.b2noteAPIURL + this.api + 'annotations?target-id[]=' + encodeURIComponent(source); - return this.http.get(url).pipe(map((response: any[]) => { - return this.parseAnnotations(response); - })); - } - - getAnnotationTargets(value: string, type: 'semantic' | 'keyword' | 'comment'): Observable { - let url = properties.b2noteAPIURL + this.api + 'annotations?value=' + encodeURIComponent(value) + '&type[]=' + type; - return this.http.get(url).pipe(map((response: any[]) => { - return this.parseAnnotationTargets(response); - })); - } - - private parseAnnotations(response: any[]): Annotation[] { - let annotations: Annotation[] = []; - if (response && response.length > 0) { - response.forEach(value => { - if (value.visibility === 'public') { - let body = value.body; - if (body.type === 'TextualBody') { - if (body.purpose === 'tagging') { - annotations.push({ - text: body.value, - type: "keyword" - }); - } else { - annotations.push({ - text: body.value, - type: "comment" - }); - } - } else { - let items = body.items; - let text: string = null; - items.forEach(item => { - if (item.type === 'TextualBody') { - text = item.value; - } - }); - annotations.push({ - text: text, - type: "semantic" - }); - } - } - }); - } - return annotations; - } - - private parseAnnotationTargets(response: any[]): AnnotationTarget[] { - let targets: AnnotationTarget[] = []; - if (response && response.length > 0) { - response.forEach(value => { - if (value.visibility === 'public') { - targets.push({ - id: value.target.id, - url: value.target.source - }); - } - }); - } - return targets; - } -} diff --git a/landingPages/result/deletedByInference/deletedByInference.service.ts b/landingPages/result/deletedByInference/deletedByInference.service.ts index 41d6e312..5b812e8f 100644 --- a/landingPages/result/deletedByInference/deletedByInference.service.ts +++ b/landingPages/result/deletedByInference/deletedByInference.service.ts @@ -145,6 +145,15 @@ export class DeletedByInferenceService { if(author.orcid_pending) { author.orcid_pending = author.orcid_pending.toUpperCase(); } + + if(result['authors'][author.rank] && results['authors'][author.rank].fullName == author.content) { + if(!author.orcid && result['authors'][author.rank].orcid) { + author.orcid = result['authors'][author.rank].orcid; + } else if(!author.orcid_pending && result['authors'][author.rank].orcid_pending) { + author.orcid_pending = result['authors'][author.rank].orcid_pending; + } + } + result['authors'][author.rank] = {"fullName": author.content, "orcid": author.orcid, "orcid_pending": author.orcid_pending}; } } diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index 3d64e748..64174526 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -567,7 +567,7 @@
- OA Routes + Access Routes
diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts index bc25c014..ad3d0311 100644 --- a/landingPages/result/resultLanding.component.ts +++ b/landingPages/result/resultLanding.component.ts @@ -134,7 +134,6 @@ export class ResultLandingComponent { public isLoggedIn: boolean = false; public pid: string; - // @ViewChild("annotation") annotation: AnnotationComponent; public contextsWithLink: any; public relatedClassFilters: Option[]=[{"label": "All relations", "value": ""}]; diff --git a/landingPages/result/resultLanding.module.ts b/landingPages/result/resultLanding.module.ts index 3803a598..247c8a99 100644 --- a/landingPages/result/resultLanding.module.ts +++ b/landingPages/result/resultLanding.module.ts @@ -20,7 +20,6 @@ import {ShowAuthorsModule} from "../../utils/authors/showAuthors.module"; import {HelperModule} from "../../utils/helper/helper.module"; import {ResultLandingUtilsModule} from "../landing-utils/resultLandingUtils.module"; import {AlertModalModule} from "../../utils/modal/alertModal.module"; -import {AnnotationModule} from "../annotation/annotation.module"; import {LandingHeaderModule} from "../landing-utils/landing-header/landing-header.module"; import {NoLoadPaging} from "../../searchPages/searchUtils/no-load-paging.module"; import {ResultPreviewModule} from "../../utils/result-preview/result-preview.module"; @@ -45,7 +44,7 @@ import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.mod CiteThisModule, PagingModule, IFrameModule, AltMetricsModule, Schema2jsonldModule, SEOServiceModule, DeletedByInferenceModule, ShowAuthorsModule, HelperModule, ResultLandingUtilsModule, AlertModalModule, - AnnotationModule, LandingHeaderModule, NoLoadPaging, ResultPreviewModule, FeedbackModule, TabsModule, LoadingModule, + LandingHeaderModule, NoLoadPaging, ResultPreviewModule, FeedbackModule, TabsModule, LoadingModule, OrcidModule, IconsModule, InputModule, EGIDataTransferModule, RecaptchaModule, SdgFosSuggestModule, FullScreenModalModule, SafeHtmlPipeModule, EntityActionsModule ], diff --git a/landingPages/result/resultLanding.service.ts b/landingPages/result/resultLanding.service.ts index ad8bec01..6c9b1d1d 100644 --- a/landingPages/result/resultLanding.service.ts +++ b/landingPages/result/resultLanding.service.ts @@ -396,6 +396,15 @@ export class ResultLandingService { if (author.orcid_pending) { author.orcid_pending = author.orcid_pending.toUpperCase(); } + + if(this.resultLandingInfo['authors'][author.rank] && this.resultLandingInfo['authors'][author.rank].fullName == author.content) { + if(!author.orcid && this.resultLandingInfo['authors'][author.rank].orcid) { + author.orcid = this.resultLandingInfo['authors'][author.rank].orcid; + } else if(!author.orcid_pending && this.resultLandingInfo['authors'][author.rank].orcid_pending) { + author.orcid_pending = this.resultLandingInfo['authors'][author.rank].orcid_pending; + } + } + this.resultLandingInfo['authors'][author.rank] = { "fullName": author.content, "orcid": author.orcid, diff --git a/monitor-admin/manageStakeholders/manageStakeholders.component.less b/monitor-admin/manageStakeholders/manageStakeholders.component.less index df782d1d..ee7a7aaa 100644 --- a/monitor-admin/manageStakeholders/manageStakeholders.component.less +++ b/monitor-admin/manageStakeholders/manageStakeholders.component.less @@ -2,7 +2,7 @@ @import (optional) "~src/assets/extend-theme/less/color.less"; .setType(@color) { - border-bottom: 4px solid fade(@color, 30%); + border-bottom: 4px solid if(@color = none, none, fade(@color, 30%)); & .type { color: @color; diff --git a/services/searchResearchResults.service.ts b/services/searchResearchResults.service.ts index 17719ce9..37969439 100644 --- a/services/searchResearchResults.service.ts +++ b/services/searchResearchResults.service.ts @@ -348,6 +348,15 @@ export class SearchResearchResultsService { if (author.orcid_pending) { author.orcid_pending = author.orcid_pending.toUpperCase(); } + + if(result['authors'][author.rank] && result['authors'][author.rank].fullName == author.content) { + if(!author.orcid && result['authors'][author.rank].orcid) { + author.orcid = result['authors'][author.rank].orcid; + } else if(!author.orcid_pending && result['authors'][author.rank].orcid_pending) { + author.orcid_pending = result['authors'][author.rank].orcid_pending; + } + } + result['authors'][author.rank] = { "fullName": author.content, "orcid": author.orcid, diff --git a/utils/properties/environments/environment.ts b/utils/properties/environments/environment.ts index 6005b3d9..f462caeb 100644 --- a/utils/properties/environments/environment.ts +++ b/utils/properties/environments/environment.ts @@ -10,7 +10,7 @@ export let common: EnvProperties = { searchOrcidURL: "https://pub.orcid.org/v2.1/", orcidURL: "https://orcid.org/", orcidAPIURL: "https://services.openaire.eu/uoa-orcid-service/", - orcidTokenURL : "https://orcid.org/oauth/authorize?", + orcidTokenURL: "https://orcid.org/oauth/authorize?", orcidClientId: "APP-IN0O56SBVVTB7NN4", doiURL: "https://doi.org/", pmcURL: "http://europepmc.org/articles/", @@ -80,22 +80,20 @@ export let common: EnvProperties = { footerGrantText: "OpenAIRE has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No. 777541 and 101017452", //connect - enermapsURL:"https://lab.idiap.ch/enermaps", + enermapsURL: "https://lab.idiap.ch/enermaps", zenodoCommunities: 'https://zenodo.org/api/communities', shareInZenodoPage: '/participate/deposit/zenodo', afterLoginRedirectLink: '/myCommunities', searchLinkToCommunities: '/search/find/communities', - - openOrgsUrl:"https://beta.orgs.openaire.eu" - + openOrgsUrl:"https://beta.orgs.openaire.eu", } export let commonDev: EnvProperties = { environment: "development", pdfStatisticsAPIURL: "https://beta.services.openaire.eu/pdf-stats", - statisticsAPIURL: "http://vatopedi.di.uoa.gr:8080/stats/", + statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/", statisticsFrameAPIURL: "https://beta.openaire.eu/stats/", - statisticsFrameNewAPIURL: "https://stats.madgik.di.uoa.gr/stats-api/", + statisticsFrameNewAPIURL: "https://beta.services.openaire.eu/stats-tool/", claimsAPIURL: "http://scoobydoo.di.uoa.gr:8880/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/", searchAPIURLLAst: "http://beta.services.openaire.eu/search/v2/api/", searchResourcesAPIURL: "https://beta.services.openaire.eu/search/v2/api/resources", @@ -103,7 +101,7 @@ export let commonDev: EnvProperties = { openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=", csvAPIURL: "https://beta.services.openaire.eu/search/v2/api/reports", orcidAPIURL: "http://duffy.di.uoa.gr:19480/uoa-orcid-service/", - orcidTokenURL : "https://sandbox.orcid.org/oauth/authorize?", + orcidTokenURL: "https://sandbox.orcid.org/oauth/authorize?", orcidClientId: "APP-A5M3KTX6NCN67L91", utilsService: "http://mpagasas.di.uoa.gr:8000", vocabulariesAPI: "https://dev-openaire.d4science.org/provision/mvc/vocabularies/", @@ -203,7 +201,7 @@ export let commonBeta: EnvProperties = { export let commonProd: EnvProperties = { environment: "production", pdfStatisticsAPIURL: "https://services.openaire.eu/pdf-stats", - statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/", + statisticsAPIURL: "https://services.openaire.eu/stats-api/", statisticsFrameAPIURL: "https://www.openaire.eu/stats/", statisticsFrameNewAPIURL: "https://services.openaire.eu/stats-tool/", claimsAPIURL: "https://services.openaire.eu/claims-new/rest/claimsService/", diff --git a/utils/result-preview/result-preview.component.html b/utils/result-preview/result-preview.component.html index 016ca66e..306d2128 100644 --- a/utils/result-preview/result-preview.component.html +++ b/utils/result-preview/result-preview.component.html @@ -222,7 +222,7 @@ - OA Routes + Access Routes
diff --git a/utils/staticAutoComplete/ISVocabularies.service.ts b/utils/staticAutoComplete/ISVocabularies.service.ts index 074afa4e..7a880f44 100644 --- a/utils/staticAutoComplete/ISVocabularies.service.ts +++ b/utils/staticAutoComplete/ISVocabularies.service.ts @@ -143,28 +143,49 @@ export class ISVocabulariesService { parseFOS(data: any): AutoCompleteValue[] { let array: AutoCompleteValue[] = [] - for (let fos of data) { + let children = data.reverse(); + while(children && children.length > 0) { + let fos = children.pop(); let value: AutoCompleteValue = new AutoCompleteValue(); value.id = fos.id;//data[i].code; value.label = fos.label; array.push(value); - if(fos.children) { - for (let fos2 of fos.children) { - let value: AutoCompleteValue = new AutoCompleteValue(); - value.id = fos2.id;//data[i].code; - value.label = fos2.label; - array.push(value); - if(fos2.children) { - for (let fos3 of fos2.children) { - let value: AutoCompleteValue = new AutoCompleteValue(); - value.id = fos3.id;//data[i].code; - value.label = fos3.label; - array.push(value); - } - } + if(fos.children && fos.children.length > 0) { + for (let i=fos.children.length-1; i>=0; i--) { + children.push(fos.children[i]); } } } + // for (let fos of data) { + // let value: AutoCompleteValue = new AutoCompleteValue(); + // value.id = fos.id;//data[i].code; + // value.label = fos.label; + // array.push(value); + // if(fos.children) { + // for (let fos2 of fos.children) { + // let value: AutoCompleteValue = new AutoCompleteValue(); + // value.id = fos2.id;//data[i].code; + // value.label = fos2.label; + // array.push(value); + // if(fos2.children) { + // for (let fos3 of fos2.children) { + // let value: AutoCompleteValue = new AutoCompleteValue(); + // value.id = fos3.id;//data[i].code; + // value.label = fos3.label; + // array.push(value); + // // if(fos3.children) { + // // for (let fos4 of fos3.children) { + // // let value: AutoCompleteValue = new AutoCompleteValue(); + // // value.id = fos4.id;//data[i].code; + // // value.label = fos4.label; + // // array.push(value); + // // } + // // } + // } + // } + // } + // } + // } return array; }