1. Landing pages: tabs changed to 'uk-accordion' with custom css.

2. Remove 'uk-animation-fade' class from tabResult.component.
3. When errorMessages.component is used in landing pages' tabs, remove 'uk-animation-fade' class and add 'uk-margin-top' class.
4. First tab with extra query is closed too -> count query first -> add method in fetchPublications.class and case in searchPublications.service.


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@52401 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2018-06-08 11:21:42 +00:00
parent 51ec98b9c7
commit 03b8781720
22 changed files with 818 additions and 585 deletions

View File

@ -60,77 +60,7 @@
<li *ngIf="dataProviderInfo.countries != undefined && dataProviderInfo.countries.length > 0"><span class="uk-text-bold">Countries: </span>{{dataProviderInfo.countries.join(", ")}}</li>
</ul>
<!--tabs [id] = "datasourceId"
[name] = "dataProviderInfo.title['name']"
[resultsBy] = "dataProviderInfo.resultsBy"
[tabs]="dataProviderInfo.tabs"
[statistics]="dataProviderInfo.statistics"
[organizations]="dataProviderInfo.organizations"
[_dataproviderService]="_dataproviderService">
</tabs-->
<div *ngIf="showTabs">
<!--ul *ngIf="dataProviderInfo.tabs != undefined" class="uk-tab uk-visible@xl" uk-tab="connect: #tab-content">
<li *ngFor="let tab of dataProviderInfo.tabs; let i=index" id="{{dataProviderInfo.tabs[i].content}}"
[class]="activeTab==tab.name?'uk-active':''">
<a
(click)="search(tab.content, 1, 10); activeTab=tab.name">
{{tab.name}}
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='publicationsTab'">
{{fetchPublications.searchUtils.totalResults | number}}
</span>
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='datasetsTab'">
{{fetchDatasets.searchUtils.totalResults | number}}
</span>
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='softwareTab'">
{{fetchSoftware.searchUtils.totalResults | number}}
</span>
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='projectsTab'">
{{fetchProjects.searchUtils.totalResults | number}}
</span>
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='datasourcesTab'">
{{fetchDataproviders.searchUtils.totalResults | number}}
</span>
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='organizationsTab'">
{{dataProviderInfo.organizations.length | number}}
</span>
</a>
</li>
</ul>
<button class="uk-button uk-button-default uk-hidden@xl" type="button">
<span uk-navbar-toggle-icon></span> <span class="uk-margin-small-left">{{activeTab}}</span>
</button>
<ul *ngIf="dataProviderInfo.tabs != undefined" id="toggle-small-tabs" class="uk-subnav uk-subnav-pill uk-dropdown uk-hidden@xl" uk-switcher="connect: #tab-content" uk-dropdown="mode: click" uk-toggle="target: #toggle-small-tabs">
<li *ngFor="let tab of dataProviderInfo.tabs; let i=index" id="{{dataProviderInfo.tabs[i].content}}"
[class]="activeTab==tab.name?'uk-active':''">
<a
(click)="search(tab.content, 1, 10); activeTab=tab.name">
{{tab.name}}
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='publicationsTab'">
{{fetchPublications.searchUtils.totalResults | number}}
</span>
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='datasetsTab'">
{{fetchDatasets.searchUtils.totalResults | number}}
</span>
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='softwareTab'">
{{fetchSoftware.searchUtils.totalResults | number}}
</span>
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='projectsTab'">
{{fetchProjects.searchUtils.totalResults | number}}
</span>
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='datasourcesTab'">
{{fetchDataproviders.searchUtils.totalResults | number}}
</span>
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='organizationsTab'">
{{dataProviderInfo.organizations.length | number}}
</span>
</a>
</li>
</ul-->
<ul class="custom-accordion" uk-accordion *ngIf="dataProviderInfo.tabs2 != undefined">
<li *ngIf="dataProviderInfo.tabs2.indexOf('Publications') != -1" (click)="search('publicationsTab', 1, 10); activeTab='Publications'">
@ -147,19 +77,27 @@
</div>
</li>
<li *ngIf="dataProviderInfo.tabs2.indexOf('Research Data') != -1" (click)="search('datasetsTab', 1, 10); activeTab='Research Data'">
<a class="uk-accordion-title" href="#">Research Data</a>
<a class="uk-accordion-title" href="#">Research Data
<span class="uk-badge uk-badge-notification">
{{fetchDatasets.searchUtils.totalResults | number}}
</span>
</a>
<div class="uk-accordion-content">
<p>
<datasetsTab *ngIf="activeTab=='Research Data'"
[paramsForSearchLink]="paramsForSearchLink"
[fetchDatasets]="fetchDatasets" [(properties)]=properties>
[paramsForSearchLink]="paramsForSearchLink"
[fetchDatasets]="fetchDatasets" [(properties)]=properties>
</datasetsTab>
</p>
</div>
</li>
<li *ngIf="dataProviderInfo.tabs2.indexOf('Software') != -1" (click)="search('softwareTab', 1, 10); activeTab='Software'">
<a class="uk-accordion-title" href="#">Software</a>
<a class="uk-accordion-title" href="#">Software
<span class="uk-badge uk-badge-notification">
{{fetchSoftware.searchUtils.totalResults | number}}
</span>
</a>
<div class="uk-accordion-content">
<softwareTab *ngIf="activeTab=='Software'"
[paramsForSearchLink]="paramsForSearchLink"
@ -168,7 +106,11 @@
</div>
</li>
<li *ngIf="dataProviderInfo.tabs2.indexOf('Projects') != -1" (click)="search('projectsTab', 1, 10); activeTab='Projects'">
<a class="uk-accordion-title" href="#">Projects</a>
<a class="uk-accordion-title" href="#">Projects
<span class="uk-badge uk-badge-notification">
{{fetchProjects.searchUtils.totalResults | number}}
</span>
</a>
<div class="uk-accordion-content">
<projectsTab *ngIf="activeTab=='Projects'"
[paramsForSearchLink]="paramsForSearchLink"
@ -177,7 +119,11 @@
</div>
</li>
<li *ngIf="dataProviderInfo.tabs2.indexOf('Content Providers') != -1" (click)="search('datasourcesTab', 1, 10); activeTab='Content Providers'">
<a class="uk-accordion-title" href="#">Content Providers</a>
<a class="uk-accordion-title" href="#">Content Providers
<span class="uk-badge uk-badge-notification">
{{fetchDataproviders.searchUtils.totalResults | number}}
</span>
</a>
<div class="uk-accordion-content">
<datasourcesTab *ngIf="activeTab=='Content Providers'"
[paramsForSearchLink]="paramsForSearchLink"
@ -186,7 +132,11 @@
</div>
</li>
<li *ngIf="dataProviderInfo.tabs2.indexOf('Organizations') != -1" (click)="search('organizationsTab', 1, 10); activeTab='Organizations'">
<a class="uk-accordion-title" href="#">Organizations</a>
<a class="uk-accordion-title" href="#">Organizations
<span class="uk-badge uk-badge-notification">
{{dataProviderInfo.organizations.length | number}}
</span>
</a>
<div class="uk-accordion-content">
<organizationsTab *ngIf="activeTab=='Organizations'"
[organizations]="dataProviderInfo.organizations">
@ -210,7 +160,7 @@
<div class="uk-accordion-content">
<div *ngIf="activeTab=='Statistics' && statsClicked">
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]" [type]="'statistics'"></errorMessages>
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]" [type]="'statistics'" tab_error_class=true></errorMessages>
<div *ngIf="(fetchPublications.searchUtils.totalResults != 0 || fetchDatasets.searchUtils.totalResults != 0)">
<p class="uk-text-bold">Latest Research Result Timeline</p>
@ -259,85 +209,7 @@
</li>
</ul>
<!--div *ngIf="dataProviderInfo.tabs != undefined" class="uk-margin custom-tab-content">
<div class="uk-animation-fade">
<publicationsTab *ngIf="activeTab=='Publications'"
[paramsForSearchLink]="paramsForSearchLink"
[fetchPublications] = "fetchPublications" [(properties)]=properties>
</publicationsTab>
<datasetsTab *ngIf="activeTab=='Research Data'"
[paramsForSearchLink]="paramsForSearchLink"
[fetchDatasets]="fetchDatasets" [(properties)]=properties>
</datasetsTab>
<softwareTab *ngIf="activeTab=='Software'"
[paramsForSearchLink]="paramsForSearchLink"
[fetchSoftware]="fetchSoftware" [(properties)]=properties>
</softwareTab>
<projectsTab *ngIf="activeTab=='Projects'"
[paramsForSearchLink]="paramsForSearchLink"
[fetchProjects]="fetchProjects" [(properties)]=properties>
</projectsTab>
<datasourcesTab *ngIf="activeTab=='Content Providers'"
[paramsForSearchLink]="paramsForSearchLink"
[fetchDataproviders]="fetchDataproviders" [(properties)]=properties>
</datasourcesTab>
<organizationsTab *ngIf="activeTab=='Organizations'"
[organizations]="dataProviderInfo.organizations">
</organizationsTab>
<relatedDatasourcesTab *ngIf="activeTab=='Related Content Providers'"
[dataproviderId]="datasourceId"
[results]="dataProviderInfo.relatedDatasources"
[loading]="loadingRelatedDatasources"
[fetchPublications]="fetchAggregatorsPublications"
[fetchDatasets]="fetchAggregatorsDatasets" [(properties)]=properties>
</relatedDatasourcesTab>
<div *ngIf="activeTab=='Statistics' && statsClicked">
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]" [type]="'statistics'"></errorMessages>
<div *ngIf="(fetchPublications.searchUtils.totalResults != 0 || fetchDatasets.searchUtils.totalResults != 0)">
<p class="uk-text-bold">Latest Research Result Timeline</p>
<i-frame [url]=docsTimelineUrl width="800" height="350"></i-frame>
<p class="uk-text-bold">Research Result Types</p>
<i-frame [url]=docsTypesUrl width="800" height="350"></i-frame>
</div>
<div *ngIf="fetchPublications.searchUtils.totalResults > 0 || (fetchDatasets.searchUtils.totalResults > 0)">
<p class="uk-text-bold">Funders in Research Results of content provider</p>
<i-frame [url]=docsFunderUrl width="800" height="350"></i-frame>
</div>
<div *ngIf="fetchPublications.searchUtils.totalResults > 0 ">
<p class="uk-text-bold">Projects with most Publications</p>
<i-frame [url]=pubsProjectsUrl width="800" height="350"></i-frame>
</div>
<div *ngIf="(fetchDatasets.searchUtils.totalResults > 0)">
<div>
<p class="uk-text-bold">Projects with most Research Data</p>
<i-frame [url]=dataProjectsUrl width="800" height="350"></i-frame>
</div>
</div>
</div>
<metrics *ngIf="activeTab=='Metrics'" [pageViews]="pageViews"
[id]="datasourceId" [entityType]="'datasources'" [entity]="'Content Provider'"
(metricsResults)="metricsResults($event)" [(properties)] = properties>
</metrics>
<i-frame *ngIf="activeTab=='Metrics' && metricsClicked && totalViews > 0"
[url]=viewsFrameUrl width="100%" height="250">
</i-frame>
<i-frame *ngIf="activeTab=='Metrics' && metricsClicked && totalDownloads > 0"
[url]=downloadsFrameUrl width="100%" height="250">
</i-frame>
</div>
</div-->
</div>
</div>
</div>
<div class="uk-width-large@m uk-width-1-1@s">
@ -346,9 +218,9 @@
Share - Bookmark<addThis ></addThis>
</div>
<metrics [pageViews]="pageViews" shortView=true
[id]="datasourceId" [entityType]="'datasources'" [entity]="'Content Provider'"
(metricsResults)="metricsResults($event)" [(properties)] = properties>
</metrics>
[id]="datasourceId" [entityType]="'datasources'" [entity]="'Content Provider'"
(metricsResults)="metricsResults($event)" [(properties)] = properties>
</metrics>
</div>
</div>
</div>

View File

@ -7,16 +7,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
@Component({
selector: 'datasetsTab',
template: `
<!--div *ngIf="fetchDatasets.searchUtils.status == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><img class="loading-gif uk-align-center" ></div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No research data available</div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service temprorarily unavailable. Please try again later.</div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.NOT_FOUND" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">No research data found</div-->
<errorMessages [status]="[fetchDatasets.searchUtils.status]" [type]="'research data'"></errorMessages>
<!--div *ngIf="fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert">
No research data available
</div-->
<errorMessages [status]="[fetchDatasets.searchUtils.status]" [type]="'research data'" tab_error_class=true></errorMessages>
<div *ngIf="fetchDatasets.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10" >
@ -25,9 +16,9 @@ import{EnvProperties} from '../../utils/properties/env-properties';
View all {{fetchDatasets.searchUtils.totalResults | number}} results
</a>
</div>
<tab-result [(results)]="fetchDatasets.results"
[(status)]= "fetchDatasets.searchUtils.status"
type="dataset" urlParam="datasetId">
<tab-result [(results)]="fetchDatasets.results"
[(status)]= "fetchDatasets.searchUtils.status"
type="dataset" urlParam="datasetId">
</tab-result>
</div>
`

View File

@ -7,16 +7,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
@Component({
selector: 'datasourcesTab',
template: `
<!--div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><img class="loading-gif uk-align-center" ></div>
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No content providers available</div>
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service temprorarily unavailable. Please try again later.</div>
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.NOT_FOUND" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">No content providers found</div-->
<errorMessages [status]="[fetchDataproviders.searchUtils.status]" [type]="'content providers'"></errorMessages>
<!--div *ngIf="fetchDataproviders.searchUtils.totalResults == 0" class = "uk-alert">
No content providers available
</div-->
<errorMessages [status]="[fetchDataproviders.searchUtils.status]" [type]="'content providers'" tab_error_class=true></errorMessages>
<div *ngIf="fetchDataproviders.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10">

View File

@ -13,16 +13,16 @@ import {Component, Input} from '@angular/core';
<paging-no-load class="uk-float-right" [currentPage]="organizationsPage" [totalResults]="organizations.length" [size]="pageSize" (pageChange)="updateOrganizationsPage($event)"></paging-no-load>
</div>
<div *ngFor="let item of organizations.slice((organizationsPage-1)*pageSize, organizationsPage*pageSize)" class="uk-h4">
<p *ngIf=" item != undefined && item['id'] != undefined">
<div *ngFor="let item of organizations.slice((organizationsPage-1)*pageSize, organizationsPage*pageSize)">
<h4 *ngIf=" item != undefined && item['id'] != undefined">
<!--a href="{{item['url']}}"-->
<a [queryParams]="{organizationId: item.id}" routerLinkActive="router-link-active" routerLink="/search/organization">
{{item['name']}}
<p>{{item['name']}}</p>
</a>
</p>
<p *ngIf="item['id'] == undefined">
{{item['name']}}
</p>
</h4>
<h4 *ngIf="item['id'] == undefined">
<p>{{item['name']}}</p>
</h4>
</div>
</div>
`

View File

@ -8,15 +8,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
@Component({
selector: 'projectsTab',
template: `
<!--div *ngIf="fetchProjects.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No projects available</div>
<div *ngIf="fetchProjects.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchProjects.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchProjects.searchUtils.status == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><img class="loading-gif uk-align-center" ></div-->
<errorMessages [status]="[fetchProjects.searchUtils.status]" [type]="'projects'"></errorMessages>
<!--div *ngIf="fetchProjects.searchUtils.totalResults == 0" class = "uk-alert">
No projects available
</div-->
<errorMessages [status]="[fetchProjects.searchUtils.status]" [type]="'projects'" tab_error_class=true></errorMessages>
<div *ngIf="fetchProjects.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResults > 10">

View File

@ -7,21 +7,10 @@ import{EnvProperties} from '../../utils/properties/env-properties';
@Component({
selector: 'publicationsTab',
template: `
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No publications available</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.LOADING" class="uk-animation-fade uk-width-1-1" role="alert"><img class="loading-gif uk-align-center" ></div>
<!--errorMessages [status]="[fetchPublications.searchUtils.status]" [type]="'publications'"></errorMessages>
{{fetchPublications.searchUtils.status}}-->
<!--div *ngIf="fetchPublications.searchUtils.totalResults == 0" class = "uk-alert">
No publications available
</div-->
<errorMessages [status]="[fetchPublications.searchUtils.status]" [type]="'publications'" tab_error_class=true></errorMessages>
<div *ngIf="fetchPublications.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10">
<!--a [href] = "linkToSearchPublications">
View all {{fetchPublications.searchUtils.totalResults}} results
</a-->
<a [queryParams]="paramsForSearchLink"
routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications" class="uk-button uk-button-text">
View all {{fetchPublications.searchUtils.totalResults | number}} results

View File

@ -11,23 +11,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
@Component({
selector: 'relatedDatasourcesTab',
template: `
<!--div *ngIf="fetchPublications.searchUtils.status == errorCodes.NONE && fetchDatasets.searchUtils.status == errorCodes.NONE"
class="uk-alert uk-alert-primary uk-animation-fade" role="alert">
No related content providers available
</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.ERROR && fetchDatasets.searchUtils.status == errorCodes.ERROR"
class="uk-alert uk-alert-warning uk-animation-fade" role="alert">
An Error Occured
</div-->
<!--div *ngIf="fetchPublications.searchUtils.status == errorCodes.NOT_AVAILABLE && fetchDatasets.searchUtils.status == errorCodes.NOT_AVAILABLE"
class="uk-alert uk-alert-danger uk-animation-fade" role="alert">
Service not available
</div-->
<!--div *ngIf="fetchPublications.searchUtils.status == errorCodes.LOADING || fetchDatasets.searchUtils.status == errorCodes.LOADING || loading"
class="uk-animation-fade uk-width-1-1" role="alert"><img class="loading-gif uk-align-center" >
</div-->
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]" [type]="'related content providers'"></errorMessages>
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]" [type]="'related content providers'" tab_error_class=true></errorMessages>
<div *ngIf="(fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE) && !loading">
<div *ngIf="results && results.size > pageSize" class="uk-margin">

View File

@ -7,16 +7,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
@Component({
selector: 'softwareTab',
template: `
<!--div *ngIf="fetchDatasets.searchUtils.status == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><img class="loading-gif uk-align-center" ></div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No research data available</div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service temprorarily unavailable. Please try again later.</div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.NOT_FOUND" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">No research data found</div-->
<errorMessages [status]="[fetchSoftware.searchUtils.status]" [type]="'software'"></errorMessages>
<!--div *ngIf="fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert">
No research data available
</div-->
<errorMessages [status]="[fetchSoftware.searchUtils.status]" [type]="'software'" tab_error_class=true></errorMessages>
<div *ngIf="fetchSoftware.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchSoftware.searchUtils.totalResults > 10" >

View File

@ -7,19 +7,8 @@ import { ErrorCodes} from '../../utils/properties/errorCodes';
selector: 'statisticsTab',
template: `
<div *ngIf="show">
<!--div *ngIf="searchPublicationsComponent.searchUtils.status == errorCodes.NONE && DatasetsComponent.searchUtils.status == errorCodes.NONE"
class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No statistics available</div>
<div *ngIf="searchPublicationsComponent.searchUtils.status == errorCodes.ERROR || DatasetsComponent.searchUtils.status == errorCodes.ERROR"
class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="searchPublicationsComponent.searchUtils.status == errorCodes.NOT_AVAILABLE || DatasetsComponent.searchUtils.status == errorCodes.NOT_AVAILABLE"
class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="searchPublicationsComponent.searchUtils.status == errorCodes.LOADING || DatasetsComponent.searchUtils.status == errorCodes.LOADING"
class="uk-animation-fade uk-width-1-1" role="alert"><img class="loading-gif uk-align-center" ></div-->
<errorMessages [status]="[searchPublicationsComponent.searchUtils.status, DatasetsComponent.searchUtils.status]" [type]="'statistics'"></errorMessages>
<errorMessages [status]="[searchPublicationsComponent.searchUtils.status, DatasetsComponent.searchUtils.status]" [type]="'statistics'" tab_error_class=true></errorMessages>
<!--div *ngIf="searchPublicationsComponent.searchUtils.totalResults == 0 && searchDatasetsComponent.searchUtils.totalResults == 0" class = "uk-alert">
No statistics available
</div-->
<div *ngIf="searchPublicationsComponent.searchUtils.totalResults != 0 || searchDatasetsComponent.searchUtils.totalResults != 0">
<p class="uk-text-bold">Latest Documents Timeline</p>
<i-frame [url]=docsTimelineUrl width="800" height="350"></i-frame>

View File

@ -76,8 +76,77 @@
</div>
</div></div> -->
<ul class="custom-accordion" uk-accordion>
<ul class="uk-tab uk-visible@m" uk-tab="connect: #tab-content">
<li *ngIf="datasetInfo.relatedResearchResults" (click)="activeTab='Related Research Results'">
<a class="uk-accordion-title" href="#">
Related Research Results
<!-- <span *ngIf="!datasetInfo.relatedResearchResults" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="datasetInfo.relatedResearchResults" class="uk-badge uk-badge-notification">
{{relatedResearchResultsNum | number}}
</span> -->
<span class="uk-badge uk-badge-notification">
{{relatedResearchResultsNum | number}}
</span>
</a>
<div class="uk-accordion-content">
<!-- <div *ngIf="!datasetInfo.relatedResearchResults" class = "uk-alert uk-alert-primary">
No related research results available
</div>
<div *ngIf="datasetInfo.relatedResearchResults"> -->
<div>
<div *ngFor="let provenanceaction of getKeys(datasetInfo.relatedResearchResults)">
<div class="uk-text-large uk-margin-bottom">{{provenanceaction}}</div>
<tabTable [percentageName]="trust" [info]="datasetInfo.relatedResearchResults.get(provenanceaction)" [(properties)]=properties></tabTable>
</div>
</div>
</div>
</li>
<li *ngIf="datasetInfo.similarResearchResults" (click)="activeTab='Similar Research Results'">
<a class="uk-accordion-title" href="#">
Similar Research Results
<!-- <span *ngIf="!datasetInfo.similarResearchResults" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="datasetInfo.similarResearchResults" class="uk-badge uk-badge-notification">
{{datasetInfo.similarResearchResults.length | number}}
</span> -->
<span class="uk-badge uk-badge-notification">
{{datasetInfo.similarResearchResults.length | number}}
</span>
</a>
<div class="uk-accordion-content">
<!-- <div *ngIf="!datasetInfo.similarResearchResults" class = "uk-alert uk-alert-primary" >
No similar research results available
</div>
<div *ngIf="datasetInfo.similarResearchResults"> -->
<div>
<tabTable [percentageName]="similarity" [info]="datasetInfo.similarResearchResults" [(properties)]=properties></tabTable>
</div>
</div>
</li>
<li (click)="metricsClicked=true; activeTab='Metrics'">
<a class="uk-accordion-title" href="#">
Metrics
</a>
<div class="uk-accordion-content">
<metrics [pageViews]="pageViews"
[id]="datasetId" [entityType]="'results'" [entity]="'Research Data'"
(metricsResults)="metricsResults($event)" [(properties)] = properties>
</metrics>
<i-frame *ngIf="metricsClicked && totalViews > 0"
[url]=viewsFrameUrl width="100%" height="250">
</i-frame>
<i-frame *ngIf="metricsClicked && totalDownloads > 0"
[url]=downloadsFrameUrl width="100%" height="250">
</i-frame>
</div>
</li>
</ul>
<!-- <ul class="uk-tab uk-visible@m" uk-tab="connect: #tab-content">
<li (click)="activeTab='Related Research Results'"
[class]="activeTab == 'Related Research Results'?'uk-active':''">
<a>
@ -102,14 +171,12 @@
<li (click)="metricsClicked=true; activeTab='Metrics'"
[class]="activeTab == 'Metrics'?'uk-active':''">
<a>
Metrics <!--i class="icon-line-chart"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 36 36" style="fill:currentColor;">
<path d="M4.415 31.713h31.704v4.529h-36.233v-36.233h4.529zM10.077 29.447c-1.877 0-3.396-1.521-3.396-3.396s1.521-3.396 3.396-3.396c0.101 0 0.199 0.006 0.297 0.014l3.652-6.086c-0.348-0.534-0.551-1.171-0.551-1.855 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 0.685-0.203 1.321-0.551 1.855l3.652 6.086c0.098-0.009 0.196-0.014 0.297-0.014 0.076 0 0.151 0.004 0.225 0.009l6.028-10.549c-0.373-0.546-0.592-1.204-0.592-1.916 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 1.877-1.521 3.396-3.396 3.396-0.076 0-0.151-0.004-0.225-0.009l-6.028 10.549c0.373 0.546 0.592 1.204 0.592 1.916 0 1.877-1.521 3.396-3.396 3.396s-3.396-1.521-3.396-3.396c0-0.684 0.203-1.321 0.551-1.855l-3.652-6.086c-0.098 0.009-0.196 0.014-0.297 0.014s-0.199-0.006-0.297-0.014l-3.652 6.086c0.348 0.534 0.551 1.171 0.551 1.855 0 1.877-1.521 3.396-3.396 3.396z"></path>
</svg></i-->
Metrics
</a>
</li>
</ul>
</ul> -->
<button class="uk-button uk-button-default uk-hidden@m" type="button">
<!-- <button class="uk-button uk-button-default uk-hidden@m" type="button">
<span uk-navbar-toggle-icon></span> <span class="uk-margin-small-left">{{activeTab}}</span>
</button>
@ -138,15 +205,12 @@
<li (click)="metricsClicked=true; activeTab='Metrics'"
[class]="activeTab == 'Metrics'?'uk-active':''">
<a>
Metrics<!--i class="icon-line-chart"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 36 36" style="fill:currentColor;">
<path d="M4.415 31.713h31.704v4.529h-36.233v-36.233h4.529zM10.077 29.447c-1.877 0-3.396-1.521-3.396-3.396s1.521-3.396 3.396-3.396c0.101 0 0.199 0.006 0.297 0.014l3.652-6.086c-0.348-0.534-0.551-1.171-0.551-1.855 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 0.685-0.203 1.321-0.551 1.855l3.652 6.086c0.098-0.009 0.196-0.014 0.297-0.014 0.076 0 0.151 0.004 0.225 0.009l6.028-10.549c-0.373-0.546-0.592-1.204-0.592-1.916 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 1.877-1.521 3.396-3.396 3.396-0.076 0-0.151-0.004-0.225-0.009l-6.028 10.549c0.373 0.546 0.592 1.204 0.592 1.916 0 1.877-1.521 3.396-3.396 3.396s-3.396-1.521-3.396-3.396c0-0.684 0.203-1.321 0.551-1.855l-3.652-6.086c-0.098 0.009-0.196 0.014-0.297 0.014s-0.199-0.006-0.297-0.014l-3.652 6.086c0.348 0.534 0.551 1.171 0.551 1.855 0 1.877-1.521 3.396-3.396 3.396z"></path>
</svg></i-->
Metrics
</a>
</li>
</ul>
</ul> -->
<!--ul id="tab-content" class="uk-switcher uk-margin custom-tab-content"-->
<div class="uk-margin custom-tab-content">
<!-- <div class="uk-margin custom-tab-content">
<div *ngIf="activeTab=='Related Research Results'" class="uk-animation-fade">
<div *ngIf="!datasetInfo.relatedResearchResults" class = "uk-alert uk-alert-primary" >
No related research results available
@ -170,7 +234,6 @@
</div>
</div>
<div *ngIf="activeTab=='Metrics'" class="uk-animation-fade">
<!-- Page Views: {{pageViews}} -->
<metrics [pageViews]="pageViews"
[id]="datasetId" [entityType]="'results'" [entity]="'Research Data'"
(metricsResults)="metricsResults($event)" [(properties)] = properties>
@ -182,8 +245,7 @@
[url]=downloadsFrameUrl width="100%" height="250">
</i-frame>
</div>
<!--/ul-->
</div>
</div> -->
</div>
<div class="uk-width-large@m uk-width-1-1@s">
@ -224,6 +286,13 @@
</li>
<li>
<metrics [pageViews]="pageViews" shortView=true
[id]="datasetId" [entityType]="'results'" [entity]="'Research Data'"
(metricsResults)="metricsResults($event)" [(properties)] = properties>
</metrics>
</li>
<li>
<ul uk-accordion class="uk-padding-remove citation-accordion">
<li>

View File

@ -10,68 +10,68 @@ import{EnvProperties} from '../../utils/properties/env-properties';
selector: 'metrics',
template: `
<div *ngIf="!shortView">
<errorMessages [status]="[status]" [type]="'metrics'"></errorMessages>
<div *ngIf="metrics != undefined" class="uk-child-width-1-3@m uk-grid-small uk-grid-match uk-grid" uk-grid="">
<div *ngIf="entityType == 'projects'" class="uk-width-1-1 uk-text-center uk-text-meta uk-margin">Project metrics are derived from aggregating individual research results metrics.</div>
<div class="metrics-openaire uk-first-column">
<div class="uk-tile uk-tile-default uk-padding-small">
<div class="uk-text-center">{{pageViews | number}}</div>
<div class="uk-text-center">views in OpenAIRE</div>
<errorMessages [status]="[status]" [type]="'metrics'" tab_error_class=true></errorMessages>
<div *ngIf="metrics != undefined" class="uk-child-width-1-3@m uk-grid-small uk-grid-match uk-grid" uk-grid="">
<div *ngIf="entityType == 'projects'" class="uk-width-1-1 uk-text-center uk-text-meta uk-margin">Project metrics are derived from aggregating individual research results metrics.</div>
<div class="metrics-openaire uk-first-column">
<div class="uk-tile uk-tile-default uk-padding-small">
<div class="uk-text-center">{{pageViews | number}}</div>
<div class="uk-text-center">views in OpenAIRE</div>
</div>
</div>
</div>
<div class="metrics-views">
<div class="uk-tile uk-tile-muted uk-padding-small">
<div class="uk-text-center"> {{metrics.totalViews | number}}
<span *ngIf="metrics.totalViews > 0 && metrics.totalOpenaireViews > 0">
( {{metrics.totalOpenaireViews | number}} from OpenAIRE )
</span></div>
<div class="uk-text-center">views in local repository</div>
<div class="metrics-views">
<div class="uk-tile uk-tile-muted uk-padding-small">
<div class="uk-text-center"> {{metrics.totalViews | number}}
<span *ngIf="metrics.totalViews > 0 && metrics.totalOpenaireViews > 0">
( {{metrics.totalOpenaireViews | number}} from OpenAIRE )
</span></div>
<div class="uk-text-center">views in local repository</div>
</div>
</div>
</div>
<div class="metrics-downloads">
<div class="uk-tile uk-tile-primary uk-padding-small">
<div class="uk-text-center"> {{metrics.totalDownloads | number}}
<span *ngIf="metrics.totalDownloads > 0 && metrics.totalOpenaireDownloads > 0">
( {{metrics.totalOpenaireDownloads | number}} from OpenAIRE )
</span></div>
<div class="uk-text-center">downloads in local repository</div>
<div class="metrics-downloads">
<div class="uk-tile uk-tile-primary uk-padding-small">
<div class="uk-text-center"> {{metrics.totalDownloads | number}}
<span *ngIf="metrics.totalDownloads > 0 && metrics.totalOpenaireDownloads > 0">
( {{metrics.totalOpenaireDownloads | number}} from OpenAIRE )
</span></div>
<div class="uk-text-center">downloads in local repository</div>
</div>
</div>
</div>
</div>
<p *ngIf="metrics != undefined && metrics.infos.size > 0" >The information is available from the following content providers: </p>
<table *ngIf="metrics != undefined && metrics.infos.size > 0"
class="uk-table uk-table-striped">
<thead>
<tr>
<th class="uk-text-center uk-text-bold">From</th>
<th class="uk-text-center uk-text-bold">Number Of Views</th>
<th class="uk-text-center uk-text-bold">Number Of Downloads</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let key of metrics.infos.keys()">
<td class="uk-text-center">
<a href="{{metrics.infos.get(key).url}}">
{{metrics.infos.get(key).name}}
</a>
</td>
<td class="uk-text-center">
{{metrics.infos.get(key).numOfViews | number}}
<span *ngIf="metrics.infos.get(key).numOfViews > 0 && metrics.infos.get(key).openaireViews > 0">
( {{metrics.infos.get(key).openaireViews | number}} from OpenAIRE )
</span>
</td>
<td class="uk-text-center">
{{metrics.infos.get(key).numOfDownloads | number}}
<span *ngIf="metrics.infos.get(key).numOfDownloads > 0 && metrics.infos.get(key).openaireDownloads > 0">
( {{metrics.infos.get(key).openaireDownloads | number}} from OpenAIRE )
</span>
</td>
</tr>
</tbody>
</table>
<p *ngIf="metrics != undefined && metrics.infos.size > 0" >The information is available from the following content providers: </p>
<table *ngIf="metrics != undefined && metrics.infos.size > 0"
class="uk-table uk-table-striped">
<thead>
<tr>
<th class="uk-text-center uk-text-bold">From</th>
<th class="uk-text-center uk-text-bold">Number Of Views</th>
<th class="uk-text-center uk-text-bold">Number Of Downloads</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let key of getKeys(metrics.infos)">
<td class="uk-text-center">
<a href="{{metrics.infos.get(key).url}}">
{{metrics.infos.get(key).name}}
</a>
</td>
<td class="uk-text-center">
{{metrics.infos.get(key).numOfViews | number}}
<span *ngIf="metrics.infos.get(key).numOfViews > 0 && metrics.infos.get(key).openaireViews > 0">
( {{metrics.infos.get(key).openaireViews | number}} from OpenAIRE )
</span>
</td>
<td class="uk-text-center">
{{metrics.infos.get(key).numOfDownloads | number}}
<span *ngIf="metrics.infos.get(key).numOfDownloads > 0 && metrics.infos.get(key).openaireDownloads > 0">
( {{metrics.infos.get(key).openaireDownloads | number}} from OpenAIRE )
</span>
</td>
</tr>
</tbody>
</table>
</div>
<div *ngIf="shortView">
<dl *ngIf="metrics" class="uk-description-list-line">
@ -159,4 +159,8 @@ export class MetricsComponent {
}
);
}
public getKeys( map) {
return Array.from(map.keys());
}
}

View File

@ -12,14 +12,7 @@ import{EnvProperties} from '../../utils/properties/env-properties';
@Component({
selector: 'searchingProjectsTab',
template: `
<!--div *ngIf="fetchProjects.searchUtils.totalResults == 0" class = "uk-alert">
No projects available
</div-->
<!--div *ngIf="fetchProjects.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No projects available</div>
<div *ngIf="fetchProjects.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchProjects.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchProjects.searchUtils.status == errorCodes.LOADING" class="uk-animation-fade uk-margin-large-top uk-width-1-1" role="alert"><img class="loading-gif uk-align-center" ></div-->
<errorMessages [status]="[fetchProjects.searchUtils.status]" [type]="'projects'"></errorMessages>
<errorMessages [status]="[fetchProjects.searchUtils.status]" [type]="'projects'" tab_error_class=true></errorMessages>
<div *ngIf="fetchProjects.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchProjects.searchUtils.totalResultsNoFilters > 10">

View File

@ -14,6 +14,73 @@
<span class="uk-label custom-label label-blue label-organization" title="Type">Organization</span>
<span *ngIf="organizationInfo.country" class="uk-label custom-label label-country " title="Country">{{organizationInfo.country}}</span>
<ul class="custom-accordion" uk-accordion>
<li (click)="activeTab='Publications'; searchPublicationsInit()">
<a class="uk-accordion-title" href="#">
Publications
<span class="uk-badge uk-badge-notification">
{{fetchPublications.searchUtils.totalResults | number}}
</span>
</a>
<div class="uk-accordion-content">
<errorMessages [status]="[fetchPublications.searchUtils.status]" [type]="'publications'" tab_error_class=true></errorMessages>
<div *ngIf="fetchPublications.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['organization', 'or'], [organizationId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications" class="uk-button uk-button-text">
View all {{fetchPublications.searchUtils.totalResults | number}} results
</a>
</div>
<tab-result [(results)]="fetchPublications.results"
[(status)]= "fetchPublications.status"
type="publication" urlParam="articleId">
</tab-result>
</div>
</div>
</li>
<li (click)="activeTab='Projects'; projectsClicked=true;">
<a class="uk-accordion-title" href="#">
Projetcs
<span class="uk-badge uk-badge-notification">
{{fetchProjects.searchUtils.totalResultsNoFilters | number}}
</span>
</a>
<div class="uk-accordion-content">
<searchingProjectsTab *ngIf="projectsClicked" [(fetchProjects)]="fetchProjects" [organizationId]="organizationId" [(properties)]=properties></searchingProjectsTab>
</div>
</li>
<li (click)="activeTab='Content Providers'; searchDataprovidersInit()">
<a class="uk-accordion-title" href="#">
Content Providers
<span class="uk-badge uk-badge-notification">
{{fetchDataproviders.searchUtils.totalResults | number}}
</span>
</a>
<div class="uk-accordion-content">
<errorMessages [status]="[fetchDataproviders.searchUtils.status]" [type]="'content providers'" tab_error_class=true></errorMessages>
<div *ngIf="fetchDataproviders.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['organization', 'or'], [organizationId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchDataproviders" class="uk-button uk-button-text">
View all {{fetchDataproviders.searchUtils.totalResults | number}} results
</a>
</div>
<tab-result [(results)]="fetchDataproviders.results"
[(status)]= "fetchDataproviders.status"
type="dataprovider" urlParam="datasourceId">
</tab-result>
</div>
</div>
</li>
</ul>
<!--
<ul class="uk-tab uk-visible@m" uk-tab="connect: #tab-content">
<li (click)="activeTab='Publications'" [class]="activeTab == 'Publications'?'uk-active':''">
<a>
@ -28,7 +95,6 @@
<a>
Projects
<span class="uk-badge uk-badge-notification">
<!--{{(searchingProjectsTabComponent)?searchingProjectsTabComponent.fetchProjects.totalResults:0}}-->
{{fetchProjects.searchUtils.totalResultsNoFilters | number}}
</span>
</a>
@ -37,18 +103,14 @@
[class]="activeTab == 'Content Providers'?'uk-active':''">
<a>
Content Providers
<!--span *ngIf="organizationInfo.dataProviders == undefined" class="badge">0</span>
<span *ngIf="organizationInfo.dataProviders != undefined" class="badge">
{{organizationInfo.dataProviders.length}}
</span-->
<span class="uk-badge uk-badge-notification">
{{fetchDataproviders.searchUtils.totalResults | number}}
</span>
</a>
</li>
</ul>
</ul> -->
<div class="uk-hidden@m uk-margin-top">
<!-- <div class="uk-hidden@m uk-margin-top">
<button class="uk-button uk-button-default" type="button">
<span uk-navbar-toggle-icon></span> <span class="uk-margin-small-left">{{activeTab}}</span>
</button>
@ -81,16 +143,11 @@
</span>
</a>
</li>
</ul>
</ul> -->
<!--ul id="tab-content" class="uk-switcher uk-margin custom-tab-content"-->
<div class="uk-margin custom-tab-content">
<!-- <div class="uk-margin custom-tab-content">
<div *ngIf="activeTab=='Publications'" class="uk-animation-fade">
<!--div *ngIf="fetchPublications.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No publications available</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><img class="loading-gif uk-align-center" ></div-->
<errorMessages [status]="[fetchPublications.searchUtils.status]" [type]="'publications'"></errorMessages>
<div *ngIf="fetchPublications.searchUtils.totalResults > 0">
@ -111,23 +168,11 @@
</div>
<div *ngIf="activeTab=='Content Providers'" class="uk-animation-fade">
<!--showDataProviders [dataProviders]="organizationInfo.dataProviders"></showDataProviders-->
<!--div *ngIf="fetchDataproviders.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary">
No content providers available
</div-->
<!--div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No content providers available</div>
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><img class="loading-gif uk-align-center" ></div-->
<errorMessages [status]="[fetchDataproviders.searchUtils.status]" [type]="'content providers'"></errorMessages>
<div *ngIf="fetchDataproviders.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchDataproviders.searchUtils.totalResults > 10">
<!--a [href] = "linkToSearchDataproviders">
View all {{fetchDataproviders.searchUtils.totalResults}} results
</a-->
<a [queryParams]="routerHelper.createQueryParams(['organization', 'or'], [organizationId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchDataproviders" class="uk-button uk-button-text">
View all {{fetchDataproviders.searchUtils.totalResults | number}} results
@ -139,8 +184,7 @@
</tab-result>
</div>
</div>
<!--/ul-->
</div>
</div> -->
</div>
<div class="uk-width-large@m uk-width-1-1@s">

View File

@ -74,7 +74,8 @@ export class OrganizationComponent {
//private fundersSet: Set<string>;
//private emptyFundersSet: boolean = true;
// Request results for content providers only the one time (first time tab is clicked)
// Request results for publications and content providers only the one time (first time tab is clicked)
private reloadPublications: boolean = true;
private reloadDataproviders: boolean = true;
// Helper variables to specify funder in downloadPublicationsFile function
@ -197,8 +198,8 @@ export class OrganizationComponent {
}
var refineFields:string [] = ["funder"];
this.searchPublications();
//this.searchPublications();
this.fetchPublications.getNumForEntity("organization", this.organizationId, this.properties);
this.fetchProjects.getResultsForOrganizations(this.organizationId, "", 1, 0,refineFields,this.properties);
this.fetchDataproviders.getNumForEntity("organization", this.organizationId,this.properties);
@ -257,23 +258,30 @@ export class OrganizationComponent {
private searchPublications() {
this.fetchPublications.getResultsForEntity("organization", this.organizationId, 1, 10,this.properties);
this.linkToSearchPublications = this.properties.searchLinkToAdvancedPublications;
if(this.fetchPublications.searchUtils.totalResults > 0) {
//if(this.fetchPublications.searchUtils.totalResults > 0) {
this.reloadPublications = false;
//this.activeTab = "Publications";
} else {
//} else {
//this.projectsClicked = true;
}
//}
}
private searchDataproviders() {
this.fetchDataproviders.getResultsForEntity("organization", this.organizationId, 1, 10,this.properties);
this.linkToSearchDataproviders = this.properties.searchLinkToAdvancedDataProviders;
if(this.fetchDataproviders.searchUtils.totalResults > 0) {
//if(this.fetchDataproviders.searchUtils.totalResults > 0) {
this.reloadDataproviders = false;
//this.activeTab = "Content Providers";
} else {
//} else {
}
//}
}
public searchPublicationsInit() {
if(this.reloadPublications && this.fetchPublications.searchUtils.totalResults > 0) {
this.searchPublications();
}
}
public searchDataprovidersInit() {

View File

@ -78,7 +78,127 @@
</div>
</div></div> -->
<ul class="uk-tab uk-visible@m" uk-tab="connect: #tab-content">
<ul class="custom-accordion" uk-accordion>
<li (click)="activeTab='Publications'; searchPublicationsInit()">
<a class="uk-accordion-title" href="#">
Publications
<span class="uk-badge uk-badge-notification">
{{fetchPublications.searchUtils.totalResults | number}}
</span>
</a>
<div class="uk-accordion-content">
<errorMessages [status]="[fetchPublications.searchUtils.status]" [type]="'publications'" tab_error_class=true></errorMessages>
<div *ngIf="fetchPublications.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchPublications.searchUtils.totalResults > 10" >
<a [queryParams]="routerHelper.createQueryParams(['project', 'pr'], [projectId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications" class="uk-button uk-button-text">
View all {{fetchPublications.searchUtils.totalResults | number}} results
</a>
</div>
<tab-result [(results)]="fetchPublications.results"
[(status)]= "fetchPublications.searchUtils.status"
type="publication" urlParam="articleId">
</tab-result>
</div>
</div>
</li>
<li (click)="activeTab='Research Data'; searchDatasetsInit()">
<a class="uk-accordion-title" href="#">
Research Data
<span class="uk-badge uk-badge-notification">
{{fetchDatasets.searchUtils.totalResults | number}}
</span>
</a>
<div class="uk-accordion-content">
<errorMessages [status]="[fetchDatasets.searchUtils.status]" [type]="'research data'" tab_error_class=true></errorMessages>
<div *ngIf="fetchDatasets.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchDatasets.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['project', 'pr'], [projectId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchDatasets" class="uk-button uk-button-text">
View all {{fetchDatasets.searchUtils.totalResults | number}} results
</a>
</div>
<tab-result [(results)]="fetchDatasets.results"
[(status)]= "fetchDatasets.searchUtils.status"
type="dataset" urlParam="datasetId">
</tab-result>
</div>
</div>
</li>
<li (click)="activeTab='Software'; searchSoftwareInit()">
<a class="uk-accordion-title" href="#">
Software
<span class="uk-badge uk-badge-notification">
{{fetchSoftware.searchUtils.totalResults | number}}
</span>
</a>
<div class="uk-accordion-content">
<errorMessages [status]="[fetchSoftware.searchUtils.status]" [type]="'software'" tab_error_class=true></errorMessages>
<div *ngIf="fetchSoftware.searchUtils.totalResults > 0">
<div class = "uk-text-right" *ngIf = "fetchSoftware.searchUtils.totalResults > 10">
<a [queryParams]="routerHelper.createQueryParams(['project', 'pr'], [projectId, 'and'])"
routerLinkActive="router-link-active" [routerLink]="linkToSearchSoftware" class="uk-button uk-button-text">
View all {{fetchSoftware.searchUtils.totalResults | number}} results
</a>
</div>
<tab-result [(results)]="fetchSoftware.results"
[(status)]= "fetchSoftware.searchUtils.status"
type="software" urlParam="softwareId">
</tab-result>
</div>
</div>
</li>
<li (click)="activeTab='Statistics'; statsClicked=true">
<a class="uk-accordion-title" href="#">
Statistics
</a>
<div class="uk-accordion-content">
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]" [type]="'statistics'" tab_error_class=true></errorMessages>
<div *ngIf="statsClicked && (fetchPublications.searchUtils.totalResults != 0 || fetchDatasets.searchUtils.totalResults != 0)">
<div>
<p class="uk-text-bold">Research Results</p>
<i-frame [url]=chartScientificResultsUrl width="800" height="350"></i-frame>
<p class="uk-text-bold">Access Mode of Research Results</p>
<i-frame [url]=chartAccessModeUrl width="800" height="350"></i-frame>
<p class="uk-text-bold">By Datasource of Research Results</p>
<i-frame [url]=chartDatasourcesUrl width="800" height="350"></i-frame>
</div>
</div>
</div>
</li>
<li (click)="metricsClicked=true; activeTab='Metrics'">
<a class="uk-accordion-title" href="#">
Metrics
</a>
<div class="uk-accordion-content">
<metrics [pageViews]="pageViews"
[id]="projectId" [entityType]="'projects'" [entity]="'Project'"
(metricsResults)="metricsResults($event)" [(properties)] = properties>
</metrics>
<i-frame *ngIf="metricsClicked && totalViews > 0"
[url]=viewsFrameUrl width="100%" height="250">
</i-frame>
<i-frame *ngIf="metricsClicked && totalDownloads > 0"
[url]=downloadsFrameUrl width="100%" height="250">
</i-frame>
</div>
</li>
</ul>
<!-- <ul class="uk-tab uk-visible@m" uk-tab="connect: #tab-content">
<li (click)="activeTab='Publications'" [class]="activeTab == 'Publications'?'uk-active':''">
<a>
Publications
@ -116,14 +236,11 @@
[class]="activeTab == 'Metrics'?'uk-active':''">
<a>
Metrics
<!--i class="icon-line-chart"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 36 36" style="fill:currentColor;">
<path d="M4.415 31.713h31.704v4.529h-36.233v-36.233h4.529zM10.077 29.447c-1.877 0-3.396-1.521-3.396-3.396s1.521-3.396 3.396-3.396c0.101 0 0.199 0.006 0.297 0.014l3.652-6.086c-0.348-0.534-0.551-1.171-0.551-1.855 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 0.685-0.203 1.321-0.551 1.855l3.652 6.086c0.098-0.009 0.196-0.014 0.297-0.014 0.076 0 0.151 0.004 0.225 0.009l6.028-10.549c-0.373-0.546-0.592-1.204-0.592-1.916 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 1.877-1.521 3.396-3.396 3.396-0.076 0-0.151-0.004-0.225-0.009l-6.028 10.549c0.373 0.546 0.592 1.204 0.592 1.916 0 1.877-1.521 3.396-3.396 3.396s-3.396-1.521-3.396-3.396c0-0.684 0.203-1.321 0.551-1.855l-3.652-6.086c-0.098 0.009-0.196 0.014-0.297 0.014s-0.199-0.006-0.297-0.014l-3.652 6.086c0.348 0.534 0.551 1.171 0.551 1.855 0 1.877-1.521 3.396-3.396 3.396z"></path>
</svg></i-->
</a>
</li>
</ul>
</ul> -->
<button class="uk-button uk-button-default uk-hidden@m" type="button">
<!-- <button class="uk-button uk-button-default uk-hidden@m" type="button">
<span uk-navbar-toggle-icon></span> <span class="uk-margin-small-left">{{activeTab}}</span>
</button>
@ -164,24 +281,13 @@
[class]="activeTab == 'Metrics'?'uk-active':''">
<a>
Metrics
<!--i class="icon-line-chart"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 36 36" style="fill:currentColor;">
<path d="M4.415 31.713h31.704v4.529h-36.233v-36.233h4.529zM10.077 29.447c-1.877 0-3.396-1.521-3.396-3.396s1.521-3.396 3.396-3.396c0.101 0 0.199 0.006 0.297 0.014l3.652-6.086c-0.348-0.534-0.551-1.171-0.551-1.855 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 0.685-0.203 1.321-0.551 1.855l3.652 6.086c0.098-0.009 0.196-0.014 0.297-0.014 0.076 0 0.151 0.004 0.225 0.009l6.028-10.549c-0.373-0.546-0.592-1.204-0.592-1.916 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 1.877-1.521 3.396-3.396 3.396-0.076 0-0.151-0.004-0.225-0.009l-6.028 10.549c0.373 0.546 0.592 1.204 0.592 1.916 0 1.877-1.521 3.396-3.396 3.396s-3.396-1.521-3.396-3.396c0-0.684 0.203-1.321 0.551-1.855l-3.652-6.086c-0.098 0.009-0.196 0.014-0.297 0.014s-0.199-0.006-0.297-0.014l-3.652 6.086c0.348 0.534 0.551 1.171 0.551 1.855 0 1.877-1.521 3.396-3.396 3.396z"></path>
</svg></i-->
</a>
</li>
</ul>
</ul> -->
<!--ul id="tab-content" class="uk-switcher uk-margin custom-tab-content"-->
<div class="uk-margin custom-tab-content">
<!-- <div class="uk-margin custom-tab-content">
<div *ngIf="activeTab=='Publications'" class="uk-animation-fade">
<!--div *ngIf="fetchPublications.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary" >
No publications available
</div-->
<!--div *ngIf="fetchPublications.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No publications available</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div*ngIf="fetchPublications.searchUtils.status == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><img class="loading-gif uk-align-center" ></div-->
<errorMessages [status]="[fetchPublications.searchUtils.status]" [type]="'publications'"></errorMessages>
<div *ngIf="fetchPublications.searchUtils.totalResults > 0">
@ -199,13 +305,6 @@
</div>
<div *ngIf="activeTab == 'Research Data'" class="uk-animation-fade">
<!--div *ngIf="fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary">
No research data available
</div-->
<!--div *ngIf="fetchDatasets.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No research data available</div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.ERROR" class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchDatasets.searchUtils.status == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><img class="loading-gif uk-align-center" ></div-->
<errorMessages [status]="[fetchDatasets.searchUtils.status]" [type]="'research data'"></errorMessages>
<div *ngIf="fetchDatasets.searchUtils.totalResults > 0">
@ -240,17 +339,6 @@
</div>
</div>
<div *ngIf="activeTab == 'Statistics'" class="uk-animation-fade">
<!--div *ngIf="fetchPublications.searchUtils.totalResults == 0 && fetchDatasets.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary">
No statistics available
</div-->
<!--div *ngIf="fetchPublications.searchUtils.status == errorCodes.NONE && fetchDatasets.searchUtils.status == errorCodes.NONE"
class="uk-alert uk-alert-primary uk-animation-fade" role="alert">No statistics available</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.ERROR || fetchDatasets.searchUtils.status == errorCodes.ERROR"
class="uk-alert uk-alert-warning uk-animation-fade" role="alert">An Error Occured</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.NOT_AVAILABLE || fetchDatasets.searchUtils.status == errorCodes.NOT_AVAILABLE"
class="uk-alert uk-alert-danger uk-animation-fade" role="alert">Service not available</div>
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.LOADING || fetchDatasets.searchUtils.status == errorCodes.LOADING"
class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><img class="loading-gif uk-align-center" ></div-->
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]" [type]="'statistics'"></errorMessages>
<div *ngIf="statsClicked && (fetchPublications.searchUtils.totalResults != 0 || fetchDatasets.searchUtils.totalResults != 0)">
@ -267,12 +355,10 @@
</div>
<div *ngIf="activeTab=='Metrics'" class="uk-animation-fade">
<!--[name]="projectName"-->
<metrics [pageViews]="pageViews"
[id]="projectId" [entityType]="'projects'" [entity]="'Project'"
(metricsResults)="metricsResults($event)" [(properties)] = properties>
</metrics>
<!--i-frame *ngIf="metricsClicked" [url]=viewsFrameUrl width="800" height="350"></i-frame-->
<i-frame *ngIf="metricsClicked && totalViews > 0"
[url]=viewsFrameUrl width="100%" height="250">
</i-frame>
@ -280,8 +366,7 @@
[url]=downloadsFrameUrl width="100%" height="250">
</i-frame>
</div>
<!--/ul-->
</div>
</div> -->
</div>
<div class="uk-width-large@m uk-width-1-1@s">
@ -388,7 +473,10 @@
</li>
</ul-->
</div>
<metrics [pageViews]="pageViews" shortView=true
[id]="projectId" [entityType]="'projects'" [entity]="'Project'"
(metricsResults)="metricsResults($event)" [(properties)] = properties>
</metrics>
</div>
</div>
</div>

View File

@ -71,7 +71,8 @@ export class ProjectComponent{
// Active tab variable for responsiveness
public activeTab: string = "Publications";
// Request results for research data and software only the one time (first time tab is clicked)
// Request results for publications, research data and software only the one time (first time tab is clicked)
private reloadPublications: boolean = true;
private reloadDatasets: boolean = true;
private reloadSoftware: boolean = true;
@ -186,7 +187,8 @@ actionsAfterLoadId(){
+ "\n</script>";
this.getProjectInfo(this.projectId);
this.searchPublications();
//this.searchPublications();
this.fetchPublications.getNumForEntity("project", this.projectId, this.properties);
this.fetchDatasets.getNumForEntity("project", this.projectId, this.properties);
this.fetchSoftware.getNumForEntity("project", this.projectId, this.properties);
}
@ -218,11 +220,12 @@ actionsAfterLoadId(){
private searchPublications() {
this.fetchPublications.getResultsForEntity("project", this.projectId, 1, 10, this.properties);
this.linkToSearchPublications = this.properties.searchLinkToAdvancedPublications;// + "?project=" + this.projectId+"&pr=and";
if(this.fetchPublications.searchUtils.totalResults > 0) {
//if(this.fetchPublications.searchUtils.totalResults > 0) {
//this.activeTab = "Publications";
} else {
//} else {
//this.searchDatasetsInit();
}
//}
this.reloadPublications = false;
}
private searchDatasets() {
@ -239,6 +242,16 @@ actionsAfterLoadId(){
this.reloadSoftware = false;
}
public searchPublicationsInit() {
console.info("searchPublicationsInit");
if(this.reloadPublications && this.fetchPublications.searchUtils.totalResults > 0) {
this.searchPublications();
} else if(this.fetchPublications.searchUtils.totalResults == 0) {
//this.statsClicked=true;
//this.activeTab = "Statistics";
}
}
public searchDatasetsInit() {
console.info("searchDatasetsInit");
if(this.reloadDatasets && this.fetchDatasets.searchUtils.totalResults > 0) {

View File

@ -104,15 +104,253 @@
<ul class="custom-accordion" uk-accordion>
<li *ngIf="publicationInfo.references" (click)="activeTab='References'">
<a class="uk-accordion-title" href="#">
References
<!-- <span *ngIf="!publicationInfo.references" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.references" class="uk-badge uk-badge-notification">
{{publicationInfo.references.length | number}}
</span> -->
<span class="uk-badge uk-badge-notification">
{{publicationInfo.references.length | number}}
</span>
</a>
<div class="uk-accordion-content">
<!-- <div *ngIf="!publicationInfo.references" class = "uk-alert uk-alert-primary" >
No references available
</div>
<div *ngIf="publicationInfo.references"> -->
<div>
<div *ngIf="publicationInfo.references.length > pageSize" class="uk-margin-bottom">
<span class="uk-h6">{{publicationInfo.references.length | number}} references, page {{referencesPage | number}} of {{totalPages(publicationInfo.references.length) | number}}</span>
<paging-no-load class="uk-float-right" [currentPage]="referencesPage" [totalResults]="publicationInfo.references.length" [size]="pageSize" (pageChange)="updateReferencesPage($event)"></paging-no-load>
</div>
<ul class="uk-tab uk-visible@l" uk-tab="connect: #tab-content">
<div *ngFor="let item of publicationInfo.references.slice((referencesPage-1)*pageSize, referencesPage*pageSize)">
<p *ngIf=" item && item['url']"
class="custom-external custom-icon">
<a href="{{item['url']}}" target="_blank">
{{item['name']}}
</a>
</p>
<p *ngIf="!item['url']" class="pseudo-external custom-icon">
{{item['name']}}
</p>
</div>
</div>
</div>
</li>
<li *ngIf="publicationInfo.relatedResearchResults" (click)="activeTab='Related Research Results'">
<a class="uk-accordion-title" href="#">
Related Research Results
<!-- <span *ngIf="!publicationInfo.relatedResearchResults" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.relatedResearchResults" class="uk-badge uk-badge-notification">
{{relatedResearchResultsNum | number}}
</span> -->
<span class="uk-badge uk-badge-notification">
{{relatedResearchResultsNum | number}}
</span>
</a>
<div class="uk-accordion-content">
<!-- <div *ngIf="!publicationInfo.relatedResearchResults" class = "uk-alert uk-alert-primary">
No related research results available
</div>
<div *ngIf="publicationInfo.relatedResearchResults"> -->
<div>
<div *ngFor="let provenanceaction of getKeys(publicationInfo.relatedResearchResults)">
<div class="uk-text-large uk-margin-bottom">{{provenanceaction}}</div>
<tabTable [percentageName]="trust" [info]="publicationInfo.relatedResearchResults.get(provenanceaction)" [(properties)]=properties></tabTable>
</div>
</div>
</div>
</li>
<li *ngIf="publicationInfo.similarResearchResults" (click)="activeTab='Similar Research Results'">
<a class="uk-accordion-title" href="#">
Similar Research Results
<!-- <span *ngIf="!publicationInfo.similarResearchResults" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.similarResearchResults" class="uk-badge uk-badge-notification">
{{publicationInfo.similarResearchResults.length | number}}
</span> -->
<span class="uk-badge uk-badge-notification">
{{publicationInfo.similarResearchResults.length | number}}
</span>
</a>
<div class="uk-accordion-content">
<!-- <div *ngIf="!publicationInfo.similarResearchResults" class = "uk-alert uk-alert-primary" >
No similar research results available
</div>
<div *ngIf="publicationInfo.similarResearchResults"> -->
<div>
<tabTable [percentageName]="similarity" [info]="publicationInfo.similarResearchResults" [(properties)]=properties></tabTable>
</div>
</div>
</li>
<li *ngIf="publicationInfo.organizations" (click)="activeTab='Related Organizations'">
<a class="uk-accordion-title" href="#">
Related Organizations
<!-- <span *ngIf="!publicationInfo.organizations" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.organizations" class="uk-badge uk-badge-notification">
{{publicationInfo.organizations.length | number}}
</span> -->
<span class="uk-badge uk-badge-notification">
{{publicationInfo.organizations.length | number}}
</span>
</a>
<div class="uk-accordion-content">
<!-- <div *ngIf="!publicationInfo.organizations" class = "uk-alert uk-alert-primary">
No related organizations available
</div>
<div *ngIf="publicationInfo.organizations"> -->
<div>
<div *ngIf="publicationInfo.organizations.length > pageSize" class="uk-margin-bottom">
<span class="uk-text-bold">{{publicationInfo.organizations.length | number}} organizations, page {{organizationsPage | number}} of {{totalPages(publicationInfo.organizations.length) | number}}</span>
<paging-no-load class="uk-float-right" [currentPage]="organizationsPage" [totalResults]="publicationInfo.organizations.length" [size]="pageSize" (pageChange)="updateOrganizationsPage($event)"></paging-no-load>
</div>
<table class="uk-table uk-table-small uk-table-divider uk-table-middle ">
<tbody>
<tr *ngFor="let organization of publicationInfo.organizations.slice((organizationsPage-1)*pageSize, organizationsPage*pageSize)">
<td>
<a *ngIf="(organization['id']) && ((organization['name']) || (organization['shortname']))"
[queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active" routerLink="/search/organization">
{{organization['name']}}
<span *ngIf="organization.name && organization.shortname"> ( </span>
<span *ngIf="organization.shortname">{{organization.shortname}}</span>
<span *ngIf="organization.name && organization.shortname"> ) </span>
</a>
<p *ngIf="(!organization['id']) && ((organization['name']) || (organization['shortname']))">
{{organization['name']}}
<span *ngIf="organization.name && organization.shortname"> ( </span>
<span *ngIf="organization.shortname">{{organization.shortname}}</span>
<span *ngIf="organization.name && organization.shortname"> ) </span>
</p>
<div *ngIf="organization.country">{{organization.country}}</div>
<div *ngIf="organization.websiteUrl">Website url:
<a href="{{organization.websiteUrl}}" target="_blank">{{organization.websiteUrl}}</a>
</div>
</td>
<td>
<div *ngIf="organization['trust']" title="{{organization['trust']}}%" >
<div class="uk-text-center">{{organization['trust']}}%</div>
<progress class="uk-progress uk-margin-remove" value="{{organization['trust']}}" max="100"></progress>
</div>
<div *ngIf="!organization['trust']">
<p>no trust available</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</li>
<li *ngIf="publicationInfo.bioentities" (click)="activeTab='Bioentities'">
<a class="uk-accordion-title" href="#">
Bioentities
<!-- <span *ngIf="!publicationInfo.bioentities" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.bioentities" class="uk-badge uk-badge-notification">
{{publicationInfo.bioentitiesNum | number}}
</span> -->
<span class="uk-badge uk-badge-notification">
{{publicationInfo.bioentitiesNum | number}}
</span>
</a>
<div class="uk-accordion-content">
<div *ngIf="publicationInfo.bioentities && bioentitiesNum > pageSize" class="uk-margin-bottom">
<span class="uk-text-bold"> {{bioentitiesNum | number}} bioentities, page {{bioentitiesPage | number}} of {{totalPages(bioentitiesNum) | number}}</span>
<paging-no-load class="uk-float-right" [currentPage]="bioentitiesPage" [totalResults]="bioentitiesNum" [size]="pageSize" (pageChange)="updateBioentitiesPage($event)"></paging-no-load>
</div>
<table id="bioentitiesTable" class="uk-table ">
<tbody>
<ng-container *ngFor="let key of getKeys(publicationInfo.bioentities) let i=index">
<tr *ngFor="let keyIn of keysToArray(publicationInfo.bioentities.get(key)).slice((bioentitiesPage-1)*pageSize, bioentitiesPage*pageSize)">
<td class="uk-text-center" *ngIf="keyIn">
<span class="custom-external custom-icon">
<a href="{{publicationInfo.bioentities.get(key).get(keyIn)}}"
target="_blank">
{{keyIn}}
</a>
</span>
</td>
<td class="uk-text-center">
{{key}}
</td>
</tr>
</ng-container>
</tbody>
</table>
</div>
</li>
<li *ngIf="publicationInfo.software" (click)="activeTab='Software'">
<a class="uk-accordion-title" href="#">
Software
<!-- <span *ngIf="!publicationInfo.software" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.software" class="uk-badge uk-badge-notification">
{{publicationInfo.software.length | number}}
</span> -->
<span class="uk-badge uk-badge-notification">
{{publicationInfo.software.length | number}}
</span>
</a>
<div class="uk-accordion-content">
<div *ngIf="publicationInfo.software && publicationInfo.software.length > pageSize" class="uk-margin-bottom">
<span class="uk-text-bold">{{publicationInfo.software.length | number}} software results, page {{softwarePage | number}} of {{totalPages(publicationInfo.software.length) | number}}</span>
<paging-no-load class="uk-float-right" [currentPage]="softwarePage" [totalResults]="publicationInfo.software.length" [size]="pageSize" (pageChange)="updateSoftwarePage($event)"></paging-no-load>
</div>
<table id="softwareTable" class="uk-table ">
<tbody>
<tr *ngFor="let item of publicationInfo.software.slice((softwarePage-1)*pageSize, softwarePage*pageSize)" class="uk-text-center">
<td>
<span class="custom-external custom-icon">
<a href="{{item.url}}" target="_blank">
{{item.name}}
</a>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</li>
<li (click)="metricsClicked=true; activeTab='Metrics'">
<a class="uk-accordion-title" href="#">
Metrics
</a>
<div class="uk-accordion-content">
<metrics [pageViews]="pageViews"
[id]="articleId" [entityType]="'results'" [entity]="'Publication'"
(metricsResults)="metricsResults($event)" [(properties)] = properties>
</metrics>
<!--i-frame *ngIf="metricsClicked" [url]=viewsFrameUrl width="100%" height="250"></i-frame-->
<i-frame *ngIf="metricsClicked && totalViews>0"
[url]=viewsFrameUrl width="100%" height="250">
</i-frame>
<i-frame *ngIf="metricsClicked && totalDownloads>0"
[url]=downloadsFrameUrl width="100%" height="250">
</i-frame>
</div>
</li>
</ul>
<!-- <ul class="uk-tab uk-visible@l" uk-tab="connect: #tab-content">
<li *ngIf="publicationInfo.references" (click)="activeTab='References'"
[class]="activeTab == 'References'?'uk-active':''">
<a>
References
<span *ngIf="!publicationInfo.references" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="publicationInfo.references" class="uk-badge uk-badge-notification">
{{publicationInfo.references.length | number}}
</span>
@ -165,15 +403,11 @@
[class]="activeTab == 'Metrics'?'uk-active':''">
<a>
Metrics
<!--i class="icon-line-chart"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 36 36" style="fill:currentColor;">
<path d="M4.415 31.713h31.704v4.529h-36.233v-36.233h4.529zM10.077 29.447c-1.877 0-3.396-1.521-3.396-3.396s1.521-3.396 3.396-3.396c0.101 0 0.199 0.006 0.297 0.014l3.652-6.086c-0.348-0.534-0.551-1.171-0.551-1.855 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 0.685-0.203 1.321-0.551 1.855l3.652 6.086c0.098-0.009 0.196-0.014 0.297-0.014 0.076 0 0.151 0.004 0.225 0.009l6.028-10.549c-0.373-0.546-0.592-1.204-0.592-1.916 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 1.877-1.521 3.396-3.396 3.396-0.076 0-0.151-0.004-0.225-0.009l-6.028 10.549c0.373 0.546 0.592 1.204 0.592 1.916 0 1.877-1.521 3.396-3.396 3.396s-3.396-1.521-3.396-3.396c0-0.684 0.203-1.321 0.551-1.855l-3.652-6.086c-0.098 0.009-0.196 0.014-0.297 0.014s-0.199-0.006-0.297-0.014l-3.652 6.086c0.348 0.534 0.551 1.171 0.551 1.855 0 1.877-1.521 3.396-3.396 3.396z"></path>
</svg></i-->
</a>
</li>
</ul>
</ul> -->
<!--span uk-icon="icon: menu"></span> {{activeTab}}<-->
<button class="uk-button uk-button-default uk-hidden@l" type="button">
<!-- <button class="uk-button uk-button-default uk-hidden@l" type="button">
<span uk-navbar-toggle-icon></span> <span class="uk-margin-small-left">{{activeTab}}</span>
</button>
@ -234,15 +468,12 @@
<li (click)="metricsClicked=true; activeTab='Metrics'"
[class]="activeTab == 'Metrics'?'uk-active':''">
<a>
Metrics<!--i class="icon-line-chart"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 36 36" style="fill:currentColor;">
<path d="M4.415 31.713h31.704v4.529h-36.233v-36.233h4.529zM10.077 29.447c-1.877 0-3.396-1.521-3.396-3.396s1.521-3.396 3.396-3.396c0.101 0 0.199 0.006 0.297 0.014l3.652-6.086c-0.348-0.534-0.551-1.171-0.551-1.855 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 0.685-0.203 1.321-0.551 1.855l3.652 6.086c0.098-0.009 0.196-0.014 0.297-0.014 0.076 0 0.151 0.004 0.225 0.009l6.028-10.549c-0.373-0.546-0.592-1.204-0.592-1.916 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 1.877-1.521 3.396-3.396 3.396-0.076 0-0.151-0.004-0.225-0.009l-6.028 10.549c0.373 0.546 0.592 1.204 0.592 1.916 0 1.877-1.521 3.396-3.396 3.396s-3.396-1.521-3.396-3.396c0-0.684 0.203-1.321 0.551-1.855l-3.652-6.086c-0.098 0.009-0.196 0.014-0.297 0.014s-0.199-0.006-0.297-0.014l-3.652 6.086c0.348 0.534 0.551 1.171 0.551 1.855 0 1.877-1.521 3.396-3.396 3.396z"></path>
</svg></i-->
Metrics
</a>
</li>
</ul>
</ul> -->
<!--ul id="tab-content" class="uk-switcher uk-margin custom-tab-content"-->
<div class="uk-margin custom-tab-content">
<!-- <div class="uk-margin custom-tab-content">
<div *ngIf="activeTab == 'References'" class="uk-animation-fade">
<div *ngIf="!publicationInfo.references" class = "uk-alert uk-alert-primary" >
No references available
@ -250,7 +481,6 @@
<div *ngIf="publicationInfo.references">
<!--tabPaging [showAll]="showAllReferences" [length]="publicationInfo.references.length" (changeShowAll)="showChange($event)"></tabPaging-->
<div *ngIf="publicationInfo.references && publicationInfo.references.length > pageSize" class="uk-margin-bottom">
<span class="uk-h6">{{publicationInfo.references.length | number}} references, page {{referencesPage | number}} of {{totalPages(publicationInfo.references.length) | number}}</span>
<paging-no-load class="uk-float-right" [currentPage]="referencesPage" [totalResults]="publicationInfo.references.length" [size]="pageSize" (pageChange)="updateReferencesPage($event)"></paging-no-load>
@ -267,23 +497,6 @@
{{item['name']}}
</p>
</div>
<!--div *ngIf="showAllReferences">
<div *ngFor="let item of publicationInfo.references.slice(10)">
<p *ngIf=" item && item['url']"
class="custom-external custom-icon">
<a href="{{item['url']}}" target="_blank">
{{item['name']}}
</a>
</p>
<p *ngIf="!item['url']">
{{item['name']}}
</p>
</div>
</div-->
<!--tabPaging [showAll]="showAllReferences" [length]="publicationInfo.references.length" (changeShowAll)="showChange($event)"></tabPaging-->
</div>
</div>
@ -322,12 +535,6 @@
</div>
<table class="uk-table uk-table-small uk-table-divider uk-table-middle ">
<!--thead>
<tr>
<th>Organization</th>
<th>Trust</th>
</tr>
</thead-->
<tbody>
<tr *ngFor="let organization of publicationInfo.organizations.slice((organizationsPage-1)*pageSize, organizationsPage*pageSize)">
<td>
@ -373,15 +580,8 @@
</div>
<table id="bioentitiesTable" class="uk-table ">
<!--thead>
<tr>
<th class="uk-text-center">Bio Entity</th>
<th class="uk-text-center">Site Name</th>
</tr>
</thead-->
<tbody>
<ng-container *ngFor="let key of getKeys(publicationInfo.bioentities) let i=index">
<!--ng-container *ngIf="stop(i, bioentitiesPage) - start(i, bioentitiesPage) > 0"-->
<tr *ngFor="let keyIn of keysToArray(publicationInfo.bioentities.get(key)).slice((bioentitiesPage-1)*pageSize, bioentitiesPage*pageSize)">
<td class="uk-text-center" *ngIf="keyIn">
<span class="custom-external custom-icon">
@ -396,7 +596,6 @@
</td>
</tr>
</ng-container>
<!--/ng-container-->
</tbody>
</table>
</div>
@ -407,11 +606,6 @@
</div>
<table id="softwareTable" class="uk-table ">
<!--thead>
<tr>
<th class="uk-text-center">Site Name</th>
</tr>
</thead-->
<tbody>
<tr *ngFor="let item of publicationInfo.software.slice((softwarePage-1)*pageSize, softwarePage*pageSize)" class="uk-text-center">
<td>
@ -426,12 +620,10 @@
</table>
</div>
<div *ngIf="activeTab == 'Metrics'" class="uk-animation-fade">
<!-- Page Views: {{pageViews}} -->
<metrics [pageViews]="pageViews"
[id]="articleId" [entityType]="'results'" [entity]="'Publication'"
(metricsResults)="metricsResults($event)" [(properties)] = properties>
</metrics>
<!--i-frame *ngIf="metricsClicked" [url]=viewsFrameUrl width="100%" height="250"></i-frame-->
<i-frame *ngIf="metricsClicked && totalViews>0"
[url]=viewsFrameUrl width="100%" height="250">
</i-frame>
@ -439,8 +631,7 @@
[url]=downloadsFrameUrl width="100%" height="250">
</i-frame>
</div>
<!--/ul-->
</div>
</div> -->
</div>
<div class="uk-width-large@m uk-width-1-1@s">
@ -453,56 +644,6 @@
id="{{publicationInfo.identifiers.get('doi')[0]}}" type="doi">
</altmetrics>
<ul class="uk-list">
<!-- <li *ngIf="publicationInfo.downloadFrom && publicationInfo.downloadFrom.size > 0">
<dl class="uk-description-list-line">
<dt class="title">Download from</dt>
<dd class="line"
*ngFor="let key of getKeys(publicationInfo.downloadFrom) let i=index" >
<div *ngIf="i<5 || showAllDownloadFrom"
class="{{publicationInfo.downloadFrom.get(key)['bestAccessMode']}}">
<span [class]="publicationInfo.downloadFrom.get(key)['url'].length > 0 ? 'custom-external custom-icon' : ''">
<span *ngIf="publicationInfo.downloadFrom.get(key)['url'].length > 1">
{{key}}
<span *ngFor="let url of publicationInfo.downloadFrom.get(key)['url']; let i=index;">
<a href="{{url}}" target="_blank"
[attr.uk-tooltip]="publicationInfo.downloadFrom.get(key)['accessMode'][i] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
[title]="publicationInfo.downloadFrom.get(key)['accessMode'][i]">
[{{i+1}}]
</a>
</span>
</span>
<a *ngIf="publicationInfo.downloadFrom.get(key)['url'].length == 1"
href="{{publicationInfo.downloadFrom.get(key)['url']}}"
target="_blank"
[attr.uk-tooltip]="publicationInfo.downloadFrom.get(key)['bestAccessMode'] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
[title]="publicationInfo.downloadFrom.get(key)['bestAccessMode']">
{{key}}
</a>
<span *ngIf="publicationInfo.downloadFrom.get(key)['url'].length == 0"
[attr.uk-tooltip]="publicationInfo.downloadFrom.get(key)['bestAccessMode'] ? 'pos:right; delay:10' : 'cls: uk-invisible'"
[title]="publicationInfo.downloadFrom.get(key)['bestAccessMode']">
{{key}}
</span>
</span>
</div>
</dd>
<dd *ngIf="showAllDownloadFrom" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllDownloadFrom = !showAllDownloadFrom;">
View less
</a>
</dd>
<dd *ngIf="!showAllDownloadFrom && publicationInfo.downloadFrom.size > 5">...</dd>
<dd *ngIf="!showAllDownloadFrom && publicationInfo.downloadFrom.size > 5" class="uk-text-right">
<a class="uk-text-muted" (click)="showAllDownloadFrom = !showAllDownloadFrom;">
View more
</a>
</dd>
</dl>
</li> -->
<!-- <li *ngIf="publicationInfo.publishedIn && publicationInfo.publishedIn.size > 0">
<publishedIn [publishedIn]="publicationInfo.publishedIn"></publishedIn>
</li> -->
<li *ngIf="publicationInfo.hostedBy_collectedFrom && publicationInfo.hostedBy_collectedFrom.length > 0">
<availableOn [availableOn]="publicationInfo.hostedBy_collectedFrom"></availableOn>
</li>
@ -528,6 +669,12 @@
</dl>
</li>
<li>
<metrics [pageViews]="pageViews" shortView=true
[id]="articleId" [entityType]="'results'" [entity]="'Publication'"
(metricsResults)="metricsResults($event)" [(properties)] = properties>
</metrics>
</li>
<li>
<ul uk-accordion class="uk-padding-remove citation-accordion">
<li>
@ -541,50 +688,6 @@
</ul>
</li>
<!--li>
<ul uk-accordion class="uk-padding-remove">
<li>
<button class="uk-button uk-button-primary uk-accordion-title link-to-button uk-width-1-1" type="button">
<span class="uk-icon" >
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="link" ratio="1"><path fill="none" stroke="#000" stroke-width="1.1" d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375"></path><path fill="none" stroke="#000" stroke-width="1.1" d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375"></path><path fill="none" stroke="#000" stroke-width="1.1" d="M7.925,11.875 L11.925,7.975"></path></svg></span>
<span class="uk-margin-right">Link this publication to</span>
</button>
<div class="uk-accordion-content">
<ul class="uk-nav uk-dropdown-nav uk-padding-small" >
<li><a class="uk-width-1-1" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','project'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" >
Projects</a></li>
<li><a class="uk-width-1-1"[queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','context'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" >
Communities</a></li>
<li><a class="uk-width-1-1" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','result'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" >
Other research results</a></li>
</ul>
</div>
<!--button class="uk-button uk-button-small uk-button-default">
<span class="uk-icon" >
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="link" ratio="1"><path fill="none" stroke="#000" stroke-width="1.1" d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375"></path><path fill="none" stroke="#000" stroke-width="1.1" d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375"></path><path fill="none" stroke="#000" stroke-width="1.1" d="M7.925,11.875 L11.925,7.975"></path></svg></span>
Link this publication to
</button>
<div class="uk-inline">
<button class="uk-button uk-button-small uk-button-default" type="button">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="triangle-down" ratio="1"><polygon points="5 7 15 7 10 12"></polygon></svg></span>
</button>
<div uk-dropdown="mode: click; boundary: ! .uk-button-group; boundary-align: true;"
class="uk-dropdown uk-dropdown-boundary uk-dropdown-bottom-left" style="top: 40px; left: -236.5px;">
<ul class="uk-nav uk-dropdown-nav uk-padding-small" >
<li><a class="uk-width-1-1" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','project'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" >
Projects</a></li>
<li><a class="uk-width-1-1" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','context'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" >
Communities</a></li>
<li><a class="uk-width-1-1" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[articleId,'publication','result'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" >
Other research results</a></li>
</ul>
</div>
</div-->
<!--/li>
</ul>
</li-->
</ul>
</div>
</div>

View File

@ -78,8 +78,77 @@
</div>
</div></div> -->
<ul class="custom-accordion" uk-accordion>
<ul class="uk-tab uk-visible@m" uk-tab="connect: #tab-content">
<li *ngIf="softwareInfo.relatedResearchResults" (click)="activeTab='Related Research Results'">
<a class="uk-accordion-title" href="#">
Related Research Results
<!-- <span *ngIf="!softwareInfo.relatedResearchResults" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="softwareInfo.relatedResearchResults" class="uk-badge uk-badge-notification">
{{relatedResearchResultsNum | number}}
</span> -->
<span class="uk-badge uk-badge-notification">
{{relatedResearchResultsNum | number}}
</span>
</a>
<div class="uk-accordion-content">
<!-- <div *ngIf="!softwareInfo.relatedResearchResults" class = "uk-alert uk-alert-primary">
No related research results available
</div>
<div *ngIf="softwareInfo.relatedResearchResults"> -->
<div>
<div *ngFor="let provenanceaction of getKeys(softwareInfo.relatedResearchResults)">
<div class="uk-text-large uk-margin-bottom">{{provenanceaction}}</div>
<tabTable [percentageName]="trust" [info]="softwareInfo.relatedResearchResults.get(provenanceaction)" [(properties)]=properties></tabTable>
</div>
</div>
</div>
</li>
<li *ngIf="softwareInfo.similarResearchResults" (click)="activeTab='Similar Research Results'">
<a class="uk-accordion-title" href="#">
Similar Research Results
<!-- <span *ngIf="!softwareInfo.similarResearchResults" class="uk-badge uk-badge-notification">0</span>
<span *ngIf="softwareInfo.similarResearchResults" class="uk-badge uk-badge-notification">
{{softwareInfo.similarResearchResults.length | number}}
</span> -->
<span class="uk-badge uk-badge-notification">
{{softwareInfo.similarResearchResults.length | number}}
</span>
</a>
<div class="uk-accordion-content">
<!-- <div *ngIf="!softwareInfo.similarResearchResults" class = "uk-alert uk-alert-primary" >
No similar research results available
</div>
<div *ngIf="softwareInfo.similarResearchResults"> -->
<div>
<tabTable [percentageName]="similarity" [info]="softwareInfo.similarResearchResults" [(properties)]=properties></tabTable>
</div>
</div>
</li>
<li (click)="metricsClicked=true; activeTab='Metrics'">
<a class="uk-accordion-title" href="#">
Metrics
</a>
<div class="uk-accordion-content">
<metrics [pageViews]="pageViews"
[id]="softwareId" [entityType]="'results'" [entity]="'Software'"
(metricsResults)="metricsResults($event)" [(properties)] = properties>
</metrics>
<i-frame *ngIf="metricsClicked && totalViews > 0"
[url]=viewsFrameUrl width="100%" height="250">
</i-frame>
<i-frame *ngIf="metricsClicked && totalDownloads > 0"
[url]=downloadsFrameUrl width="100%" height="250">
</i-frame>
</div>
</li>
</ul>
<!-- <ul class="uk-tab uk-visible@m" uk-tab="connect: #tab-content">
<li (click)="activeTab='Related Research Results'"
[class]="activeTab == 'Related Research Results'?'uk-active':''">
<a>
@ -104,14 +173,12 @@
<li (click)="metricsClicked=true; activeTab='Metrics'"
[class]="activeTab == 'Metrics'?'uk-active':''">
<a>
Metrics <!--i class="icon-line-chart"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 36 36" style="fill:currentColor;">
<path d="M4.415 31.713h31.704v4.529h-36.233v-36.233h4.529zM10.077 29.447c-1.877 0-3.396-1.521-3.396-3.396s1.521-3.396 3.396-3.396c0.101 0 0.199 0.006 0.297 0.014l3.652-6.086c-0.348-0.534-0.551-1.171-0.551-1.855 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 0.685-0.203 1.321-0.551 1.855l3.652 6.086c0.098-0.009 0.196-0.014 0.297-0.014 0.076 0 0.151 0.004 0.225 0.009l6.028-10.549c-0.373-0.546-0.592-1.204-0.592-1.916 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 1.877-1.521 3.396-3.396 3.396-0.076 0-0.151-0.004-0.225-0.009l-6.028 10.549c0.373 0.546 0.592 1.204 0.592 1.916 0 1.877-1.521 3.396-3.396 3.396s-3.396-1.521-3.396-3.396c0-0.684 0.203-1.321 0.551-1.855l-3.652-6.086c-0.098 0.009-0.196 0.014-0.297 0.014s-0.199-0.006-0.297-0.014l-3.652 6.086c0.348 0.534 0.551 1.171 0.551 1.855 0 1.877-1.521 3.396-3.396 3.396z"></path>
</svg></i-->
Metrics
</a>
</li>
</ul>
</ul> -->
<button class="uk-button uk-button-default uk-hidden@m" type="button">
<!-- <button class="uk-button uk-button-default uk-hidden@m" type="button">
<span uk-navbar-toggle-icon></span> <span class="uk-margin-small-left">{{activeTab}}</span>
</button>
@ -140,15 +207,12 @@
<li (click)="metricsClicked=true; activeTab='Metrics'"
[class]="activeTab == 'Metrics'?'uk-active':''">
<a>
Metrics<!--i class="icon-line-chart"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 36 36" style="fill:currentColor;">
<path d="M4.415 31.713h31.704v4.529h-36.233v-36.233h4.529zM10.077 29.447c-1.877 0-3.396-1.521-3.396-3.396s1.521-3.396 3.396-3.396c0.101 0 0.199 0.006 0.297 0.014l3.652-6.086c-0.348-0.534-0.551-1.171-0.551-1.855 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 0.685-0.203 1.321-0.551 1.855l3.652 6.086c0.098-0.009 0.196-0.014 0.297-0.014 0.076 0 0.151 0.004 0.225 0.009l6.028-10.549c-0.373-0.546-0.592-1.204-0.592-1.916 0-1.877 1.521-3.396 3.396-3.396s3.396 1.521 3.396 3.396c0 1.877-1.521 3.396-3.396 3.396-0.076 0-0.151-0.004-0.225-0.009l-6.028 10.549c0.373 0.546 0.592 1.204 0.592 1.916 0 1.877-1.521 3.396-3.396 3.396s-3.396-1.521-3.396-3.396c0-0.684 0.203-1.321 0.551-1.855l-3.652-6.086c-0.098 0.009-0.196 0.014-0.297 0.014s-0.199-0.006-0.297-0.014l-3.652 6.086c0.348 0.534 0.551 1.171 0.551 1.855 0 1.877-1.521 3.396-3.396 3.396z"></path>
</svg></i-->
Metrics
</a>
</li>
</ul>
</ul> -->
<!--ul id="tab-content" class="uk-switcher uk-margin custom-tab-content"-->
<div class="uk-margin custom-tab-content">
<!-- <div class="uk-margin custom-tab-content">
<div *ngIf="activeTab=='Related Research Results'" class="uk-animation-fade">
<div *ngIf="!softwareInfo.relatedResearchResults" class = "uk-alert uk-alert-primary" >
No related research results available
@ -171,7 +235,6 @@
</div>
</div>
<div *ngIf="activeTab=='Metrics'" class="uk-animation-fade">
<!-- Page Views: {{pageViews}} -->
<metrics [pageViews]="pageViews"
[id]="softwareId" [entityType]="'results'" [entity]="'Software'"
(metricsResults)="metricsResults($event)" [(properties)] = properties>
@ -183,8 +246,7 @@
[url]=downloadsFrameUrl width="100%" height="250">
</i-frame>
</div>
<!--/ul-->
</div>
</div> -->
</div>
<div class="uk-width-large@m uk-width-1-1@s">
@ -224,6 +286,14 @@
</dl>
</li>
<li>
<metrics [pageViews]="pageViews" shortView=true
[id]="softwareId" [entityType]="'results'" [entity]="'Software'"
(metricsResults)="metricsResults($event)" [(properties)] = properties>
</metrics>
</li>
<li>
<ul uk-accordion class="uk-padding-remove">
<li>

View File

@ -1,5 +1,5 @@
<ul class="uk-list uk-list-divider uk-margin">
<li *ngFor="let result of results" class="uk-animation-fade">
<li *ngFor="let result of results">
<!-- <div class = "uk-h4 {{result.title.accessMode}} {{result.title.sc39}}" [title] = result.title.accessMode >
<a [queryParams]="routerHelper.createQueryParam(urlParam,result.id)" routerLinkActive="router-link-active" routerLink="/search/{{type}}">
<span *ngIf="result['title'].name || result.acronym">

View File

@ -440,6 +440,8 @@ export class SearchPublicationsService {
var parameters: string = "";
if(entity == "project") {
parameters = "projects/"+id+"/publications/count";
} else if(entity == "organization") {
parameters = "organizations/"+id+"/publications/count";
}
let url = properties.searchAPIURLLAst+parameters+"?format=json";
return this.numOfPublications(url, properties);

View File

@ -4,30 +4,34 @@ import {ErrorCodes} from './properties/errorCodes';
@Component({
selector: 'errorMessages',
template: `
<div *ngIf="status.some(checkErroCode(errorCodes.LOADING))" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert"><img class="loading-gif uk-align-center" ></div>
<div *ngIf="status.every(checkErroCode(errorCodes.NONE))" class="uk-animation-fade uk-alert uk-alert-primary" role="alert">No {{type}} available</div>
<div *ngIf="status.some(checkErroCode(errorCodes.LOADING))"
[class]="(tab_error_class ? '' : 'uk-animation-fade') + ' uk-margin-top uk-width-1-1'" role="alert"><img class="loading-gif uk-align-center" ></div>
<div *ngIf="status.every(checkErroCode(errorCodes.NONE))"
[class]="(tab_error_class ? 'uk-margin-top' : 'uk-animation-fade') + ' uk-alert uk-alert-primary'" role="alert">No {{type}} available</div>
<div *ngIf="status.every(checkErroCode(errorCodes.ERROR)) ||
(status.some(checkErroCode(errorCodes.ERROR)) && (!status.every(checkErroCode(errorCodes.DONE)) || !status.every(checkErroCode(errorCodes.LOADING))))"
class="uk-animation-fade uk-alert uk-alert-warning" role="alert">
[class]="(tab_error_class ? 'uk-margin-top' : 'uk-animation-fade') + ' uk-alert uk-alert-warning'" role="alert">
An Error Occured
</div>
<div *ngIf="status.every(checkErroCode(errorCodes.NOT_AVAILABLE)) ||
(status.some(checkErroCode(errorCodes.NOT_AVAILABLE)) && (!status.every(checkErroCode(errorCodes.DONE)) || !status.every(checkErroCode(errorCodes.LOADING))))"
class="uk-animation-fade uk-alert uk-alert-warning" role="alert">
[class]="(tab_error_class ? 'uk-margin-top' : 'uk-animation-fade') + ' uk-alert uk-alert-warning'" role="alert">
Service temprorarily unavailable. Please try again later.
</div>
<div *ngIf="status.every(checkErroCode(errorCodes.NOT_FOUND)) ||
(status.some(checkErroCode(errorCodes.NOT_FOUND)) && (!status.every(checkErroCode(errorCodes.DONE)) || !status.every(checkErroCode(errorCodes.LOADING))))"
class="uk-animation-fade uk-alert uk-alert-warning" role="alert">
[class]="(tab_error_class ? 'uk-margin-top' : 'uk-animation-fade') + ' uk-alert uk-alert-warning'" role="alert">
No {{type}} found
</div>
<div *ngIf="status.every(checkErroCode(errorCodes.OUT_OF_BOUND))" class="uk-animation-fade uk-alert uk-alert-warning" role="alert">Requested page out of bounds</div>
<div *ngIf="status.every(checkErroCode(errorCodes.OUT_OF_BOUND))"
[class]="(tab_error_class ? 'uk-margin-top' : 'uk-animation-fade') + ' uk-alert uk-alert-warning'" role="alert">Requested page out of bounds</div>
`
})
export class ErrorMessagesComponent {
@Input() status: Array<number>;
@Input() type: string;
@Input() tab_error_class: boolean = false;
public errorCodes:ErrorCodes;

View File

@ -100,6 +100,42 @@ export class FetchPublications {
);
}
public getNumForEntity(entity:string, id:string, properties:EnvProperties){
//var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = this.errorCodes.LOADING;
if(id != "" && entity != "") {
this._searchPublicationsService.numOfEntityPublications(id, entity, properties).subscribe(
data => {
this.searchUtils.totalResults = data;
//var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = this.errorCodes.DONE;
if(this.searchUtils.totalResults == 0 ){
this.searchUtils.status = this.errorCodes.NONE;
}
},
err => {
console.log(err);
//TODO check erros (service not available, bad request)
// if( ){
// this.searchUtils.status = ErrorCodes.ERROR;
// }
//var errorCodes:ErrorCodes = new ErrorCodes();
//this.searchUtils.status = errorCodes.ERROR;
if(err.status == '404') {
this.searchUtils.status = this.errorCodes.NOT_FOUND;
} else if(err.status == '500') {
this.searchUtils.status = this.errorCodes.ERROR;
} else {
this.searchUtils.status = this.errorCodes.NOT_AVAILABLE;
}
}
);
}
}
public getResultsForEntity(entity:string, id:string, page: number, size: number, properties:EnvProperties){
//var errorCodes:ErrorCodes = new ErrorCodes();
this.searchUtils.status = this.errorCodes.LOADING;