diff --git a/portal-2/src/app/landingPages/dataset/dataset.component.html b/portal-2/src/app/landingPages/dataset/dataset.component.html index ccc9b3ef..51bccbd1 100644 --- a/portal-2/src/app/landingPages/dataset/dataset.component.html +++ b/portal-2/src/app/landingPages/dataset/dataset.component.html @@ -242,106 +242,10 @@
  • -
    -
    Published in
    -
    -
    - - - {{key}} - - - [{{i+1}}] - - - - - {{key}} - - - {{key}} - - -
    -
    -
    - - View less - -
    -
    ...
    -
    - - View more - -
    -
    +
  • -
    -
    Funded By
    -
    -
    - - - - {{item['funderShortname']?item['funderShortname']:item['funderName']}} - [no funder available] - | {{ item['acronym']?item['acronym']:item['title']}} - - - - - {{item['funderShortname']?item['funderShortname']:item['funderName']}} - [no funder available] - | {{ item['acronym']?item['acronym']:item['title']}} - - - - - {{item['funderShortname']?item['funderShortname']:item['funderName']}} - [no funder available] - | {{ item['acronym']?item['acronym']:item['title']}} - - - - - {{item['funderShortname']?item['funderShortname']:item['funderName']}} - [no funder available] - | {{ item['acronym']?item['acronym']:item['title']}} - - - - - - - -
    -
    -
    - - View less - -
    -
    ...
    -
    - - View more - -
    -
    +
  • diff --git a/portal-2/src/app/landingPages/dataset/dataset.component.ts b/portal-2/src/app/landingPages/dataset/dataset.component.ts index 1703ea08..0eefa691 100644 --- a/portal-2/src/app/landingPages/dataset/dataset.component.ts +++ b/portal-2/src/app/landingPages/dataset/dataset.component.ts @@ -21,7 +21,6 @@ export class DatasetComponent { public showAllCollectedFrom: boolean = false; public showAllDownloadFrom: boolean = false; public showAllPublishedIn: boolean = false; - public showAllFundedBy: boolean = false; // Metrics tab variables public metricsClicked: boolean; @@ -167,54 +166,4 @@ export class DatasetComponent { return tooltipContent; } - - public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string, - "funderShortname": string, "funderName": string, - "funding": string, "code": string, "provenanceAction":string, "inline": boolean}) { - let tooltipContent: string = "
    "; - - if(item.title) { - tooltipContent += "
    "+item.title+"
    "; - } - - if(item.code || item.funderName || item.funderShortname || item.funding) { - tooltipContent += "

    "; - } - - if(item.code) { - tooltipContent += "

    Project Code: "+item.code + "
    "; - } - - if(item.funderName || item.funderShortname) { - tooltipContent += "
    Funder: "; - if(item.funderName && item.funderShortname) { - tooltipContent += item.funderName + " ("+ item.funderShortname +")"; - } else if(item.funderName) { - tooltipContent += item.funderName; - } else { - tooltipContent += item.funderShortname; - } - - tooltipContent += "
    "; - } - - if(item.funding) { - tooltipContent += "
    Funding: "+ item.funding + "
    "; - } - - if(item.code || item.funderName || item.funderShortname || item.funding) { - tooltipContent += "

    "; - } - - if(item.provenanceAction == 'Repository') { - tooltipContent += "Provided by Repository"; - } else if(item.provenanceAction == 'Algorithm') { - tooltipContent += "Inferred by Algorithm"; - } else if(item.provenanceAction == 'USer') { - tooltipContent += "Claimed by User"; - } - - tooltipContent+="
    " - return tooltipContent; - } } diff --git a/portal-2/src/app/landingPages/landing-utils/fundedBy.component.ts b/portal-2/src/app/landingPages/landing-utils/fundedBy.component.ts new file mode 100644 index 00000000..637ff787 --- /dev/null +++ b/portal-2/src/app/landingPages/landing-utils/fundedBy.component.ts @@ -0,0 +1,131 @@ +import {Component, Input, ElementRef} from '@angular/core'; +import {OpenaireProperties} from '../../utils/properties/openaireProperties'; + +@Component({ + selector: 'fundedBy', + template: ` +
    +
    Funded By
    +
    +
    + + + + {{item['funderShortname']?item['funderShortname']:item['funderName']}} + [no funder available] + | {{ item['acronym']?item['acronym']:item['title']}} + + + + + {{item['funderShortname']?item['funderShortname']:item['funderName']}} + [no funder available] + | {{ item['acronym']?item['acronym']:item['title']}} + + + + + {{item['funderShortname']?item['funderShortname']:item['funderName']}} + [no funder available] + | {{ item['acronym']?item['acronym']:item['title']}} + + + + + {{item['funderShortname']?item['funderShortname']:item['funderName']}} + [no funder available] + | {{ item['acronym']?item['acronym']:item['title']}} + + + + + + + +
    +
    +
    + + View less + +
    +
    ...
    +
    + + View more + +
    +
    + ` + }) + +export class FundedByComponent { + @Input() fundedByProjects: { "id": string, "acronym": string, "title": string, + "funderShortname": string, "funderName": string, + "funding": string, "code": string, "provenanceAction": string, + "inline": boolean }[]; + public showAll: boolean = false; + + constructor (private element: ElementRef) {} + + ngOnInit() {} + + public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string, + "funderShortname": string, "funderName": string, + "funding": string, "code": string, "provenanceAction": string, inline: boolean}) { + let tooltipContent: string = "
    "; + + if(item.title) { + tooltipContent += "
    "+item.title+"
    "; + } + + if(item.code || item.funderName || item.funderShortname || item.funding) { + tooltipContent += "

    "; + } + + if(item.code) { + tooltipContent += "

    Project Code: "+item.code+"
    "; + } + if(item.funderName || item.funderShortname) { + tooltipContent += "
    Funder: "; + if(item.funderName && item.funderShortname) { + tooltipContent += item.funderName + " ("+ item.funderShortname +")"; + } else if(item.funderName) { + tooltipContent += item.funderName; + } else { + tooltipContent += item.funderShortname; + } + tooltipContent += "
    "; + } + + if(item.funding) { + tooltipContent += "
    Funding: "+ item.funding + "
    "; + } + + if(item.code || item.funderName || item.funderShortname || item.funding) { + tooltipContent += "

    "; + } + + if(item.provenanceAction == 'Repository') { + tooltipContent += "Provided by Repository"; + } else if(item.provenanceAction == 'Algorithm') { + tooltipContent += "Inferred by Algorithm"; + } else if(item.provenanceAction == 'USer') { + tooltipContent += "Claimed by User"; + } + + tooltipContent+="
    " + return tooltipContent; + } + + public scroll() { + console.info("scroll into view"); + if (typeof document !== 'undefined') { + this.element.nativeElement.scrollIntoView(); + } + } +} diff --git a/portal-2/src/app/landingPages/landing-utils/publishedIn.component.ts b/portal-2/src/app/landingPages/landing-utils/publishedIn.component.ts new file mode 100644 index 00000000..3a882d27 --- /dev/null +++ b/portal-2/src/app/landingPages/landing-utils/publishedIn.component.ts @@ -0,0 +1,68 @@ +import {Component, Input, ElementRef} from '@angular/core'; +import {OpenaireProperties} from '../../utils/properties/openaireProperties'; + +@Component({ + selector: 'publishedIn', + template: ` +
    +
    Published in
    +
    +
    + + + {{key}} + + + [{{i+1}}] + + + + + {{key}} + + + {{key}} + + +
    +
    +
    + + View less + +
    +
    ...
    +
    + + View more + +
    +
    + ` + }) + +export class PublishedInComponent { + //key is name + @Input() publishedIn: Map; + + public showAll: boolean = false; + + constructor (private element: ElementRef) {} + + ngOnInit() {} + + public scroll() { + console.info("scroll into view"); + if (typeof document !== 'undefined') { + this.element.nativeElement.scrollIntoView(); + } + } +} diff --git a/portal-2/src/app/landingPages/landing-utils/resultLanding.module.ts b/portal-2/src/app/landingPages/landing-utils/resultLanding.module.ts index f7c45d7d..edd543dc 100644 --- a/portal-2/src/app/landingPages/landing-utils/resultLanding.module.ts +++ b/portal-2/src/app/landingPages/landing-utils/resultLanding.module.ts @@ -8,6 +8,8 @@ import {PagingModule} from '../../utils/paging.module'; import {ShowAuthorsComponent} from './showAuthors.component'; import {ShowIdentifiersComponent} from './showIdentifiers.component'; import {ShowSubjectsComponent} from './showSubjects.component'; +import {FundedByComponent} from './fundedBy.component'; +import {PublishedInComponent} from './publishedIn.component'; import {TabTableComponent} from './tabTable.component'; @NgModule({ @@ -15,12 +17,12 @@ import {TabTableComponent} from './tabTable.component'; CommonModule, FormsModule, RouterModule, PagingModule ], declarations: [ - ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent, TabTableComponent + ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent,FundedByComponent,PublishedInComponent,TabTableComponent ], providers:[ ], exports: [ - ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent, TabTableComponent + ShowAuthorsComponent,ShowIdentifiersComponent,ShowSubjectsComponent,FundedByComponent,PublishedInComponent,TabTableComponent ] }) export class ResultLandingModule { } diff --git a/portal-2/src/app/landingPages/publication/publication.component.html b/portal-2/src/app/landingPages/publication/publication.component.html index 54715187..d2c81e45 100644 --- a/portal-2/src/app/landingPages/publication/publication.component.html +++ b/portal-2/src/app/landingPages/publication/publication.component.html @@ -488,107 +488,10 @@
  • -
    -
    Published in
    -
    -
    - - - {{key}} - - - [{{i+1}}] - - - - - {{key}} - - - {{key}} - - -
    -
    -
    - - View less - -
    -
    ...
    -
    - - View more - -
    -
    +
  • -
    -
    Funded By
    -
    -
    - - - - {{item['funderShortname']?item['funderShortname']:item['funderName']}} - [no funder available] - | {{ item['acronym']?item['acronym']:item['title']}} - - - - - {{item['funderShortname']?item['funderShortname']:item['funderName']}} - [no funder available] - | {{ item['acronym']?item['acronym']:item['title']}} - - - - - {{item['funderShortname']?item['funderShortname']:item['funderName']}} - [no funder available] - | {{ item['acronym']?item['acronym']:item['title']}} - - - - - {{item['funderShortname']?item['funderShortname']:item['funderName']}} - [no funder available] - | {{ item['acronym']?item['acronym']:item['title']}} - - - - - - - -
    -
    -
    - - View less - -
    -
    ...
    -
    - - View more - -
    - -
    +
  • diff --git a/portal-2/src/app/landingPages/publication/publication.component.ts b/portal-2/src/app/landingPages/publication/publication.component.ts index 5019c3df..3f3a8d37 100644 --- a/portal-2/src/app/landingPages/publication/publication.component.ts +++ b/portal-2/src/app/landingPages/publication/publication.component.ts @@ -24,8 +24,6 @@ export class PublicationComponent { // APP BOX variables public showAllCollectedFrom: boolean = false; public showAllDownloadFrom: boolean = false; - public showAllFundedBy: boolean = false; - public showAllPublishedIn: boolean = false; // Metrics tab variables public metricsClicked: boolean; @@ -199,53 +197,6 @@ export class PublicationComponent { return tooltipContent+= ""; } - public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string, - "funderShortname": string, "funderName": string, - "funding": string, "code": string, "provenanceAction": string, inline: boolean}) { - let tooltipContent: string = "
    "; - - if(item.title) { - tooltipContent += "
    "+item.title+"
    "; - } - - if(item.code || item.funderName || item.funderShortname || item.funding) { - tooltipContent += "

    "; - } - - if(item.code) { - tooltipContent += "

    Project Code: "+item.code+"
    "; - } - if(item.funderName || item.funderShortname) { - tooltipContent += "
    Funder: "; - if(item.funderName && item.funderShortname) { - tooltipContent += item.funderName + " ("+ item.funderShortname +")"; - } else if(item.funderName) { - tooltipContent += item.funderName; - } else { - tooltipContent += item.funderShortname; - } - tooltipContent += "
    "; - } - - if(item.funding) { - tooltipContent += "
    Funding: "+ item.funding + "
    "; - } - - if(item.code || item.funderName || item.funderShortname || item.funding) { - tooltipContent += "

    "; - } - - if(item.provenanceAction == 'Repository') { - tooltipContent += "Provided by Repository"; - } else if(item.provenanceAction == 'Algorithm') { - tooltipContent += "Inferred by Algorithm"; - } else if(item.provenanceAction == 'USer') { - tooltipContent += "Claimed by User"; - } - - tooltipContent+="
    " - return tooltipContent; - } private updateDescription(description:string){ this._meta.updateMeta("description", description); this._meta.updateProperty("og:description", description); diff --git a/portal-2/src/app/landingPages/software/software.component.html b/portal-2/src/app/landingPages/software/software.component.html index 08e024b7..dc2ae0dc 100644 --- a/portal-2/src/app/landingPages/software/software.component.html +++ b/portal-2/src/app/landingPages/software/software.component.html @@ -242,106 +242,10 @@
  • -
    -
    Published in
    -
    -
    - - - {{key}} - - - [{{i+1}}] - - - - - {{key}} - - - {{key}} - - -
    -
    -
    - - View less - -
    -
    ...
    -
    - - View more - -
    -
    +
  • -
    -
    Funded By
    -
    -
    - - - - {{item['funderShortname']?item['funderShortname']:item['funderName']}} - [no funder available] - | {{ item['acronym']?item['acronym']:item['title']}} - - - - - {{item['funderShortname']?item['funderShortname']:item['funderName']}} - [no funder available] - | {{ item['acronym']?item['acronym']:item['title']}} - - - - - {{item['funderShortname']?item['funderShortname']:item['funderName']}} - [no funder available] - | {{ item['acronym']?item['acronym']:item['title']}} - - - - - {{item['funderShortname']?item['funderShortname']:item['funderName']}} - [no funder available] - | {{ item['acronym']?item['acronym']:item['title']}} - - - - - - - -
    -
    -
    - - View less - -
    -
    ...
    -
    - - View more - -
    -
    +
  • diff --git a/portal-2/src/app/landingPages/software/software.component.ts b/portal-2/src/app/landingPages/software/software.component.ts index e03f9d0c..064a7883 100644 --- a/portal-2/src/app/landingPages/software/software.component.ts +++ b/portal-2/src/app/landingPages/software/software.component.ts @@ -21,7 +21,6 @@ export class SoftwareComponent { public showAllCollectedFrom: boolean = false; public showAllDownloadFrom: boolean = false; public showAllPublishedIn: boolean = false; - public showAllFundedBy: boolean = false; // Metrics tab variables public metricsClicked: boolean; @@ -167,54 +166,4 @@ export class SoftwareComponent { return tooltipContent; } - - public buildFundingTooltip(item: { "id": string, "acronym": string, "title": string, - "funderShortname": string, "funderName": string, - "funding": string, "code": string, "provenanceAction":string, "inline": boolean}) { - let tooltipContent: string = "
    "; - - if(item.title) { - tooltipContent += "
    "+item.title+"
    "; - } - - if(item.code || item.funderName || item.funderShortname || item.funding) { - tooltipContent += "

    "; - } - - if(item.code) { - tooltipContent += "

    Project Code: "+item.code + "
    "; - } - - if(item.funderName || item.funderShortname) { - tooltipContent += "
    Funder: "; - if(item.funderName && item.funderShortname) { - tooltipContent += item.funderName + " ("+ item.funderShortname +")"; - } else if(item.funderName) { - tooltipContent += item.funderName; - } else { - tooltipContent += item.funderShortname; - } - - tooltipContent += "
    "; - } - - if(item.funding) { - tooltipContent += "
    Funding: "+ item.funding + "
    "; - } - - if(item.code || item.funderName || item.funderShortname || item.funding) { - tooltipContent += "

    "; - } - - if(item.provenanceAction == 'Repository') { - tooltipContent += "Provided by Repository"; - } else if(item.provenanceAction == 'Algorithm') { - tooltipContent += "Inferred by Algorithm"; - } else if(item.provenanceAction == 'USer') { - tooltipContent += "Claimed by User"; - } - - tooltipContent+="
    " - return tooltipContent; - } }