[Library | Trunk]: Fix redirect URL of research-outcomes. Fix orcid-popup to have research-outcomes button.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58352 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2020-03-30 08:45:08 +00:00
parent fe4178cdca
commit feac1a83b0
5 changed files with 60 additions and 83 deletions

View File

@ -6,35 +6,38 @@ import {ResultLandingInfo} from "../../utils/entities/resultLandingInfo";
@Component({
selector: 'b2note',
template: `
<form ngNoForm
action="https://b2note-dev.bsc.es/widget/"
method="post"
target="b2note_iframe"
class="uk-padding-small uk-padding-remove-vertical">
<!--URL of the annotated record-->
<input
type="hidden"
name="recordurl_tofeed"
[value]="url">
<!--URL of the record contents for downloading-->
<input
type="hidden"
name="subject_tofeed"
[value]="url">
<!--PID of the annotated record-->
<input
type="hidden"
name="pid_tofeed"
[value]="pid">
<!--URL of the record contents for downloading-->
<button class="uk-button uk-button-secondary uk-width-1-1"
(click)="toggleAnnotation($event)"
type="submit"
value="Annotate"
title="Click to annotate file using B2Note.">
Annotate
</button>
</form>
<div class="sideInfoTitle uk-margin-small-bottom">Annotations</div>
<div class="b2note">
<form ngNoForm
action="https://b2note-dev.bsc.es/widget/"
method="post"
target="b2note_iframe"
class="uk-padding-small uk-padding-remove-vertical">
<!--URL of the annotated record-->
<input
type="hidden"
name="recordurl_tofeed"
[value]="url">
<!--URL of the record contents for downloading-->
<input
type="hidden"
name="subject_tofeed"
[value]="url">
<!--PID of the annotated record-->
<input
type="hidden"
name="pid_tofeed"
[value]="pid">
<!--URL of the record contents for downloading-->
<button class="uk-flex uk-flex-middle"
(click)="toggleAnnotation($event)"
type="submit"
title="Click to annotate this page using B2Note.">
<img src="assets/common-assets/b2note.png" width="48" height="24">
<span>add annotation</span>
</button>
</form>
</div>
<div [class.uk-hidden]="!visible" class="widget-container">
<!--Close button, should be bound to hide the widget-->
<button type="button" class="close" aria-label="Close" (click)="toggleAnnotation($event)">
@ -92,7 +95,7 @@ export class AnnotationComponent implements OnInit, OnDestroy {
public toggleAnnotation(event) {
if (this.visible) {
event.preventDefault()
event.preventDefault();
}
this.visible = !this.visible;
}

View File

@ -1,6 +1,7 @@
.widget-container {
position: absolute;
right: 0;
right: 30px;
top:40%;
z-index: 1050;
padding: 19px;
margin-bottom: 20px;

View File

@ -17,7 +17,8 @@
<schema2jsonld *ngIf="resultLandingInfo.record" [data]=resultLandingInfo.record
[URL]="properties.baseLink+linkToLandingPage+id"></schema2jsonld>
<landing-header [properties]="properties" [title]="resultLandingInfo.title"
[subTitle]="resultLandingInfo.subtitle" [underCuration]="resultLandingInfo.underCurationMessage"
[subTitle]="resultLandingInfo.subtitle"
[underCuration]="resultLandingInfo.underCurationMessage"
[entityType]="getTypeName()" [types]="resultLandingInfo.types"
[year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate">
</landing-header>
@ -56,7 +57,8 @@
</span>
<span *ngIf="resultLandingInfo.programmingLanguages && resultLandingInfo.programmingLanguages.length > 0">
<ng-container *ngFor="let programmingLanguage of resultLandingInfo.programmingLanguages">
<span class="uk-label custom-label label-language" title="Programming Language">{{programmingLanguage}}</span>
<span class="uk-label custom-label label-language"
title="Programming Language">{{programmingLanguage}}</span>
{{' '}}
</ng-container>
</span>
@ -79,7 +81,8 @@
</li>
<!-- Identifiers -->
<li *ngIf="resultLandingInfo.identifiers && resultLandingInfo.identifiers.size > 0">
<showIdentifiers [identifiers]="resultLandingInfo.identifiers" [properties]="properties"></showIdentifiers>
<showIdentifiers [identifiers]="resultLandingInfo.identifiers"
[properties]="properties"></showIdentifiers>
</li>
</ul>
<!-- Description -->
@ -188,6 +191,10 @@
<span
class="uk-margin-small-left uk-text-small uk-text-baseline uk-text-muted">Powered by OpenAIRE Open Research Graph</span>
</div>
<div *ngIf=" properties.environment === 'development' && resultLandingInfo" class="uk-margin-medium-top">
<b2note [id]="id"
[landingInfo]="resultLandingInfo"></b2note>
</div>
<!--<ul #accordions class="custom-accordion" uk-accordion>
<li *ngIf="resultLandingInfo.references" (click)="activeTab='References'">
<a class="uk-accordion-title" href="#">
@ -437,8 +444,6 @@
<div class="uk-card uk-card-default uk-padding-small">
<div *ngIf="isRouteAvailable('participate/direct-claim')">
<div class="uk-margin-auto uk-width-3-4">
<!-- <b2note *ngIf=" properties.environment === 'development' && resultLandingInfo" [id]="id"
[landingInfo]="resultLandingInfo"></b2note>-->
<button class="uk-button uk-width-1-1 portal-button">
<span uk-icon="link"></span>
Link this <span *ngIf="type != 'orp'">{{title.toLowerCase()}}</span><span
@ -572,7 +577,8 @@
<modal-alert *ngIf="resultLandingInfo && resultLandingInfo.references"
classBody="uk-width-xxlarge uk-padding-remove-right" #referencesModal>
<landing-header [properties]="properties" [title]="resultLandingInfo.title"
[subTitle]="resultLandingInfo.subtitle" [authorLimit]="10" [showAllAuthors]="false" [modal]="referencesModal"
[subTitle]="resultLandingInfo.subtitle" [authorLimit]="10" [showAllAuthors]="false"
[modal]="referencesModal"
[entityType]="getTypeName()" [authors]="resultLandingInfo.authors" [types]="resultLandingInfo.types"
[year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate">
</landing-header>
@ -588,8 +594,10 @@
{{item.name}}
<ng-container *ngIf="item.ids && item.ids.length > 0">
<span *ngFor="let id of item.ids">
[<a *ngIf="id.type !== 'openaire'" href="{{getReferenceUrl(id)}}" target="_blank">{{getReferenceIdName(id)}}</a>
<a *ngIf="id.type === 'openaire'" [routerLink]="'/search/result'" [queryParams]="{id: id.value}" target="_blank">OpenAIRE</a>]
[<a *ngIf="id.type !== 'openaire'" href="{{getReferenceUrl(id)}}"
target="_blank">{{getReferenceIdName(id)}}</a>
<a *ngIf="id.type === 'openaire'" [routerLink]="'/search/result'" [queryParams]="{id: id.value}"
target="_blank">OpenAIRE</a>]
</span>
</ng-container>
</p>

View File

@ -48,8 +48,7 @@ import {AlertModal} from "../modal/alert";
<div class="uk-margin-top">
Search <b>{{author.fullName}}</b> by <b>ORCID</b> in OpenAIRE's
</div>
<div *ngIf="properties.environment === 'development'"
class="uk-text-center uk-margin-small uk-margin-large-left uk-margin-large-right">
<div class="uk-text-center uk-margin-small uk-margin-large-left uk-margin-large-right">
<a class="uk-button uk-button-small portal-button uk-padding uk-padding-remove-top uk-padding-remove-bottom uk-width-1-1"
(click)="onClick()"
[queryParams]="routerHelper.createQueryParams(['orcid','oc'],[author['orcid'],'and'])"
@ -57,40 +56,6 @@ import {AlertModal} from "../modal/alert";
Research outcomes
</a>
</div>
<ng-container *ngIf="properties.environment !== 'development'">
<div class="uk-text-center uk-margin-small uk-margin-large-left uk-margin-large-right">
<a class="uk-button uk-button-small portal-button uk-padding uk-padding-remove-top uk-padding-remove-bottom uk-width-1-1"
(click)="onClick()"
[queryParams]="routerHelper.createQueryParams(['orcid','oc'],[author['orcid'],'and'])"
routerLinkActive="router-link-active" routerLink="/search/advanced/publications">
Publications
</a>
</div>
<div class="uk-text-center uk-margin-small uk-margin-large-left uk-margin-large-right">
<a class="uk-button uk-button-small portal-button uk-padding uk-padding-remove-top uk-padding-remove-bottom uk-width-1-1"
(click)="onClick()"
[queryParams]="routerHelper.createQueryParams(['orcid','oc'],[author['orcid'],'and'])"
routerLinkActive="router-link-active" routerLink="/search/advanced/datasets">
Research Data
</a>
</div>
<div class="uk-text-center uk-margin-small uk-margin-large-left uk-margin-large-right">
<a class="uk-button uk-button-small portal-button uk-padding uk-padding-remove-top uk-padding-remove-bottom uk-width-1-1"
(click)="onClick()"
[queryParams]="routerHelper.createQueryParams(['orcid','oc'],[author['orcid'],'and'])"
routerLinkActive="router-link-active" routerLink="/search/advanced/software">
Software
</a>
</div>
<div class="uk-text-center uk-margin-small uk-margin-large-left uk-margin-large-right">
<a class="uk-button uk-button-small portal-button uk-padding uk-padding-remove-top uk-padding-remove-bottom uk-width-1-1"
(click)="onClick()"
[queryParams]="routerHelper.createQueryParams(['orcid','oc'],[author['orcid'],'and'])"
routerLinkActive="router-link-active" routerLink="/search/advanced/other">
Other Research Products
</a>
</div>
</ng-container>
</div>
<span>;{{" "}}</span>
</span>

View File

@ -25,28 +25,28 @@ export class PageURLResolverComponent {
navigateTO(url:string){
if( url == "/search/find/publications" ){
this.parameters["type"]="publications";
this.router.navigate(["/search/find/research-results"],{queryParams:this.parameters})
this.router.navigate(["/search/find/research-outcomes"],{queryParams:this.parameters})
}else if( url == "/search/find/datasets" ){
this.parameters["type"]="datasets";
this.router.navigate(["/search/find/research-results"],{queryParams:this.parameters})
this.router.navigate(["/search/find/research-outcomes"],{queryParams:this.parameters})
}else if( url == "/search/find/software" ){
this.parameters["type"]="software";
this.router.navigate(["/search/find/research-results"],{queryParams:this.parameters})
this.router.navigate(["/search/find/research-outcomes"],{queryParams:this.parameters})
}else if( url == "/search/find/other" ){
this.parameters["type"]="other";
this.router.navigate(["/search/find/research-results"],{queryParams:this.parameters})
this.router.navigate(["/search/find/research-outcomes"],{queryParams:this.parameters})
}else if( url == "/search/advanced/publications" ){
this.parameters["type"]="publications";
this.router.navigate(["/search/advanced/research-results"],{queryParams:this.parameters})
this.router.navigate(["/search/advanced/research-outcomes"],{queryParams:this.parameters})
}else if( url == "/search/advanced/datasets" ){
this.parameters["type"]="datasets";
this.router.navigate(["/search/advanced/research-results"],{queryParams:this.parameters})
this.router.navigate(["/search/advanced/research-outcomes"],{queryParams:this.parameters})
}else if( url == "/search/advanced/software" ){
this.parameters["type"]="software";
this.router.navigate(["/search/advanced/research-results"],{queryParams:this.parameters})
this.router.navigate(["/search/advanced/research-outcomes"],{queryParams:this.parameters})
}else if( url == "/search/advanced/other" ){
this.parameters["type"]="other";
this.router.navigate(["/search/advanced/research-results"],{queryParams:this.parameters})
this.router.navigate(["/search/advanced/research-outcomes"],{queryParams:this.parameters})
}
}
}