Publication & Dataset Landing pages: small fix of description lists in basic information | Datatable for dataproviders: small fix in keyword search | Landing pages: loading message for basic information | Open graph tags do not cause any errors in server side (location.path needed sometimes) | Query results in tabs of landing pages only if number of results > 0 | Responsive tabs in all landing pages | Publication landing page: display only tabs with > 0 results (to be done for every landing page)
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@47677 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
f960fa8970
commit
8791c050d9
|
@ -1,6 +1,7 @@
|
|||
<div class="uk-container uk-margin-top datasource">
|
||||
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
|
||||
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
|
||||
<div *ngIf="showLoading" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
|
||||
|
||||
<div *ngIf="dataProviderInfo != null" uk-grid>
|
||||
|
||||
|
@ -42,10 +43,41 @@
|
|||
[_dataproviderService]="_dataproviderService">
|
||||
</tabs-->
|
||||
<div *ngIf="showTabs">
|
||||
<ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}">
|
||||
<ul *ngIf="dataProviderInfo.tabs != undefined" class="uk-tab uk-visible@m" uk-tab="connect: #tab-content">
|
||||
<li *ngFor="let tab of dataProviderInfo.tabs; let i=index" id="{{dataProviderInfo.tabs[i].content}}">
|
||||
<a
|
||||
(click)="search(tab.content, 1, 10)">
|
||||
(click)="search(tab.content, 1, 10); activeTab=tab.name">
|
||||
{{tab.name}}
|
||||
<i *ngIf="tab.content == 'metricsTab'" class="uk-icon-line-chart"></i>
|
||||
<i *ngIf="tab.content == 'statisticsTab'" class="uk-icon-pie-chart"></i>
|
||||
|
||||
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='publicationsTab'">
|
||||
{{fetchPublications.searchUtils.totalResults}}
|
||||
</span>
|
||||
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='datasetsTab'">
|
||||
{{fetchDatasets.searchUtils.totalResults}}
|
||||
</span>
|
||||
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='projectsTab'">
|
||||
{{fetchProjects.searchUtils.totalResults}}
|
||||
</span>
|
||||
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='datasourcesTab'">
|
||||
{{fetchDataproviders.searchUtils.totalResults}}
|
||||
</span>
|
||||
<span class="uk-badge uk-badge-notification" *ngIf="tab.content=='organizationsTab'">
|
||||
{{dataProviderInfo.organizations.length}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<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>
|
||||
|
||||
<ul *ngIf="dataProviderInfo.tabs != undefined" id="toggle-small-tabs" class="uk-subnav uk-subnav-pill uk-dropdown uk-hidden@m" 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}}">
|
||||
<a
|
||||
(click)="search(tab.content, 1, 10); activeTab=tab.name">
|
||||
{{tab.name}}
|
||||
<i *ngIf="tab.content == 'metricsTab'" class="uk-icon-line-chart"></i>
|
||||
<i *ngIf="tab.content == 'statisticsTab'" class="uk-icon-pie-chart"></i>
|
||||
|
|
|
@ -37,6 +37,8 @@ export class DataProviderComponent {
|
|||
|
||||
public warningMessage = "";
|
||||
public errorMessage = "";
|
||||
public showLoading: boolean = true;
|
||||
|
||||
public relatedDataprovidersResultsType: string;
|
||||
public paramsForSearchLink = {};//: string = "";
|
||||
|
||||
|
@ -52,6 +54,7 @@ export class DataProviderComponent {
|
|||
private totalDownloads: number;
|
||||
private pageViews: number;
|
||||
|
||||
private activeTab: string = "";
|
||||
public statsClicked: boolean = false;
|
||||
private docsTimelineUrl: string;
|
||||
private docsTypesUrl:string;
|
||||
|
@ -113,6 +116,8 @@ export class DataProviderComponent {
|
|||
getDataProviderInfo(id:string) {
|
||||
this.warningMessage = '';
|
||||
this.errorMessage=""
|
||||
this.showLoading = true;
|
||||
|
||||
this.showTabs = false ;
|
||||
if(this.datasourceId==null || this.datasourceId==''){
|
||||
this.warningMessage="No valid datasource id";
|
||||
|
@ -124,11 +129,18 @@ export class DataProviderComponent {
|
|||
this.showTabs = true ;
|
||||
this.updateTitle(this.dataProviderInfo.title.name);
|
||||
this.updateDescription("Data provider, search, repositories, open access,"+this.dataProviderInfo.title.name);
|
||||
|
||||
this.showLoading = false;
|
||||
|
||||
if(this.dataProviderInfo.tabs != undefined && this.dataProviderInfo.tabs.length > 0) {
|
||||
this.activeTab = this.dataProviderInfo.tabs[0].name;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
console.log(err)
|
||||
// console.info("error");
|
||||
this.errorMessage = 'No dataProvider found';
|
||||
this.showLoading = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -243,6 +255,9 @@ export class DataProviderComponent {
|
|||
|
||||
private countPublications(page: number, size: number) {
|
||||
this.fetchPublications.getResultsForDataproviders(this.datasourceId, this.dataProviderInfo.resultsBy, page, size);
|
||||
if(this.fetchPublications.searchUtils.totalResults == 0) {
|
||||
this.reloadPublications = false;
|
||||
}
|
||||
}
|
||||
|
||||
private searchDatasets(page: number, size: number) {
|
||||
|
@ -254,6 +269,9 @@ export class DataProviderComponent {
|
|||
|
||||
private countDatasets(page: number, size: number) {
|
||||
this.fetchDatasets.getResultsForDataproviders(this.datasourceId, this.dataProviderInfo.resultsBy, page, size);
|
||||
if(this.fetchDatasets.searchUtils.totalResults == 0) {
|
||||
this.reloadDatasets = false;
|
||||
}
|
||||
}
|
||||
|
||||
private searchProjects(page: number, size: number) {
|
||||
|
@ -265,6 +283,9 @@ export class DataProviderComponent {
|
|||
|
||||
private countProjects(page: number, size: number) {
|
||||
this.fetchProjects.getResultsForDataproviders(this.datasourceId, page, size);
|
||||
if(this.fetchProjects.searchUtils.totalResults == 0) {
|
||||
this.reloadProjects = false;
|
||||
}
|
||||
}
|
||||
|
||||
private searchDatasources(page: number, size: number) {
|
||||
|
@ -278,6 +299,9 @@ export class DataProviderComponent {
|
|||
|
||||
private countDatasources(page: number, size: number) {
|
||||
this.fetchDataproviders.getResultsForDataproviders(this.datasourceId, page, size);
|
||||
if(this.fetchDataproviders.searchUtils.totalResults == 0) {
|
||||
this.reloadDataproviders = false;
|
||||
}
|
||||
}
|
||||
|
||||
private searchRelatedDatasources(page: number, size: number) {
|
||||
|
@ -289,6 +313,9 @@ export class DataProviderComponent {
|
|||
|
||||
private countRelatedDatasources(page: number, size: number) {
|
||||
this.fetchResultsAggregators.getAggregatorResults(this.datasourceId, page, size);
|
||||
if(this.fetchResultsAggregators.searchUtils.totalResults == 0) {
|
||||
this.reloadRelatedDatasources = false;
|
||||
}
|
||||
}
|
||||
|
||||
public metricsResults($event) {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
|
||||
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
|
||||
<div *ngIf="showLoading" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
|
||||
|
||||
<div *ngIf="datasetInfo != null" uk-grid>
|
||||
<div class="uk-width-3-4@l uk-width-3-4@xl uk-width-3-4@m uk-width-1-1@s">
|
||||
|
@ -33,13 +34,13 @@
|
|||
<dd *ngIf="datasetInfo.type != undefined">{{datasetInfo.type}}</dd>
|
||||
<dt *ngIf="datasetInfo.embargoEndDate">Embargo end date: </dt>
|
||||
<dd *ngIf="datasetInfo.embargoEndDate">{{datasetInfo.embargoEndDate}}</dd>
|
||||
|
||||
<showIdentifiers [identifiers]="datasetInfo.identifiers"></showIdentifiers>
|
||||
<showSubjects [subjects]="datasetInfo.subjects"
|
||||
[otherSubjects]="datasetInfo.otherSubjects"
|
||||
[classifiedSubjects]="datasetInfo.classifiedSubjects">
|
||||
</showSubjects>
|
||||
</dl>
|
||||
<showIdentifiers [identifiers]="datasetInfo.identifiers"></showIdentifiers>
|
||||
<showSubjects [subjects]="datasetInfo.subjects"
|
||||
[otherSubjects]="datasetInfo.otherSubjects"
|
||||
[classifiedSubjects]="datasetInfo.classifiedSubjects">
|
||||
</showSubjects>
|
||||
|
||||
|
||||
<blockquote *ngIf="datasetInfo.description != ''">
|
||||
<div class="uk-text-justify">{{datasetInfo.description}}</div>
|
||||
|
@ -49,8 +50,9 @@
|
|||
|
||||
<a class="uk-float-right uk-button uk-button-default" [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[datasetId,'publication','result'])" routerLinkActive="router-link-active" routerLink="/participate/direct-claim" > <span uk-icon="icon: link"></span> Links to research Results</a>
|
||||
</div>
|
||||
<ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}">
|
||||
<li class="uk-active">
|
||||
|
||||
<ul class="uk-tab uk-visible@m" uk-tab="connect: #tab-content">
|
||||
<li (click)="activeTab='Related Research Results'">
|
||||
<a>
|
||||
Related Research Results
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
|
@ -59,7 +61,7 @@
|
|||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<li (click)="activeTab='Similar Research Results'">
|
||||
<a>
|
||||
Similar Research Results
|
||||
<span *ngIf="!datasetInfo.similarResearchResults" class="uk-badge uk-badge-notification">0</span>
|
||||
|
@ -69,7 +71,38 @@
|
|||
</a>
|
||||
</li>
|
||||
|
||||
<li (click)="metricsClicked=true">
|
||||
<li (click)="metricsClicked=true; activeTab='Metrics'">
|
||||
<a>
|
||||
Metrics
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<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>
|
||||
|
||||
<ul id="toggle-small-tabs" class="uk-subnav uk-subnav-pill uk-dropdown uk-hidden@m" uk-switcher="{connect: #tab-content}" uk-dropdown="mode: click" uk-toggle="target: #toggle-small-tabs">
|
||||
<li (click)="activeTab='Related Research Results'">
|
||||
<a>
|
||||
Related Research Results
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
{{relatedResearchResultsNum}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li (click)="activeTab='Similar Research Results'">
|
||||
<a>
|
||||
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}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li (click)="metricsClicked=true; activeTab='Metrics'">
|
||||
<a>
|
||||
Metrics
|
||||
</a>
|
||||
|
|
|
@ -27,6 +27,8 @@ export class DatasetComponent {
|
|||
private datasetId : string ;
|
||||
private result ;
|
||||
sub: any;
|
||||
|
||||
private activeTab: string = "Related Research Results";
|
||||
private metricsClicked: boolean;
|
||||
private viewsFrameUrl: string;
|
||||
private downloadsFrameUrl: string;
|
||||
|
@ -38,6 +40,8 @@ export class DatasetComponent {
|
|||
|
||||
public warningMessage = "";
|
||||
public errorMessage = "";
|
||||
public showLoading: boolean = true;
|
||||
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
|
||||
constructor (private element: ElementRef,
|
||||
|
@ -86,6 +90,7 @@ export class DatasetComponent {
|
|||
getDatasetInfo(id:string) {
|
||||
this.warningMessage = '';
|
||||
this.errorMessage=""
|
||||
this.showLoading = true;
|
||||
|
||||
this._datasetService.getDatasetInfo(id).subscribe(
|
||||
data => {
|
||||
|
@ -102,12 +107,15 @@ export class DatasetComponent {
|
|||
});
|
||||
}
|
||||
this.relatedResearchResultsNum = relatedResearchResultsNum;
|
||||
|
||||
this.showLoading = false;
|
||||
},
|
||||
err => {
|
||||
console.log(err)
|
||||
console.info("error");
|
||||
|
||||
this.errorMessage = 'No dataset found';
|
||||
this.showLoading = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<div class="uk-container uk-margin-top organization">
|
||||
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
|
||||
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
|
||||
<div *ngIf="showLoading" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
|
||||
|
||||
<!--div class="container-header" >
|
||||
<div *ngIf="organizationInfo != null">
|
||||
|
@ -30,8 +31,8 @@
|
|||
<dd *ngIf="organizationInfo.country">{{organizationInfo.country}}</dd>
|
||||
</dl>
|
||||
|
||||
<ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}">
|
||||
<li class="uk-active">
|
||||
<ul class="uk-tab uk-visible@m" uk-tab="connect: #tab-content">
|
||||
<li (click)="activeTab='Publications'">
|
||||
<a>
|
||||
Publications
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
|
@ -39,7 +40,7 @@
|
|||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="projectsClicked=true;">
|
||||
<li (click)="activeTab='Projects'; projectsClicked=true;">
|
||||
<a>
|
||||
Projects
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
|
@ -48,7 +49,7 @@
|
|||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchDataprovidersInit()">
|
||||
<li (click)="activeTab='Data Providers'; searchDataprovidersInit()">
|
||||
<a>
|
||||
Data Providers
|
||||
<!--span *ngIf="organizationInfo.dataProviders == undefined" class="badge">0</span>
|
||||
|
@ -60,13 +61,45 @@
|
|||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<!--li (click)="getMetrics()">
|
||||
<a href="#metricsTab">
|
||||
Metrics
|
||||
</a>
|
||||
</li-->
|
||||
</ul>
|
||||
|
||||
<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>
|
||||
|
||||
<ul id="toggle-small-tabs" class="uk-subnav uk-subnav-pill uk-dropdown uk-hidden@m" uk-switcher="{connect: #tab-content}" uk-dropdown="mode: click" uk-toggle="target: #toggle-small-tabs">
|
||||
<li (click)="activeTab='Publications'">
|
||||
<a>
|
||||
Publications
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
{{fetchPublications.searchUtils.totalResults}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="activeTab='Projects'; projectsClicked=true;">
|
||||
<a>
|
||||
Projects
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
<!--{{(searchingProjectsTabComponent)?searchingProjectsTabComponent.fetchProjects.totalResults:0}}-->
|
||||
{{fetchProjects.searchUtils.totalResults}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="activeTab='Data Providers'; searchDataprovidersInit()">
|
||||
<a>
|
||||
Data 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}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<ul id="tab-content" class="uk-switcher uk-margin custom-tab-content">
|
||||
<li class="uk-animation-fade">
|
||||
<div *ngIf="fetchPublications.searchUtils.status == errorCodes.NONE" class="uk-alert uk-alert-primary uk-animation-fade" role="alert">There are no publications</div>
|
||||
|
@ -119,14 +152,6 @@
|
|||
</tab-result>
|
||||
</div>
|
||||
</li>
|
||||
<!--li id="metricsTab">
|
||||
<div *ngIf="metrics == undefined" class = "uk-alert uk-alert-warning">
|
||||
Metrics are currently unavailable
|
||||
</div>
|
||||
<div *ngIf="metrics != undefined" class="uk-panel uk-padding uk-background-muted">
|
||||
<b>Views: </b>{{metrics}}
|
||||
</div>
|
||||
</li-->
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ export class OrganizationComponent {
|
|||
private emptyFundersSet: boolean = true;
|
||||
public warningMessage = "";
|
||||
public errorMessage = "";
|
||||
public showLoading: boolean = true;
|
||||
|
||||
public downloadURLAPI: string;
|
||||
public csvProjectParamsHead: string;
|
||||
|
@ -41,9 +42,9 @@ export class OrganizationComponent {
|
|||
public csvParamsTail: string;
|
||||
|
||||
sub: any;
|
||||
subDataproviders: any;
|
||||
subDataprovidersCount: any;
|
||||
|
||||
public activeTab: string = "Publications";
|
||||
public reloadDataproviders: boolean = true;
|
||||
public projectsClicked: boolean = false;
|
||||
|
||||
public fetchPublications: FetchPublications;
|
||||
|
@ -108,34 +109,18 @@ export class OrganizationComponent {
|
|||
this.downloadURLAPI = OpenaireProperties.getCsvAPIURL();
|
||||
this.csvProjectParamsHead = 'format=csv&type=projects&page=0&query=( (oaftype exact project)and (funderid exact "';
|
||||
//this.csvPublicationParamsHead = 'format=csv-special&type=publications&page=0&query=((((oaftype exact result) and (resulttypeid exact publication)) and (funderid exact ';
|
||||
/*
|
||||
this.subDataprovidersCount = this.route.queryParams.subscribe(params => {
|
||||
this._searchDataprovidersService.numOfDataproviders("organizations/"+this.organizationId+"/datasources/count").subscribe(
|
||||
data => {
|
||||
this.fetchDataproviders.searchUtils.totalResults = data;
|
||||
console.info("this.fetchDataproviders.searchUtils.totalResults = "+this.fetchDataproviders.searchUtils.totalResults);
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
}
|
||||
);
|
||||
})
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
ngOnDestroy() {
|
||||
this.sub.unsubscribe();
|
||||
if(this.subDataproviders != undefined) {
|
||||
this.subDataproviders.unsubscribe();
|
||||
}
|
||||
//this.subDataprovidersCount.unsubscribe();
|
||||
}
|
||||
|
||||
private getOrganizationInfo () {
|
||||
|
||||
this.warningMessage = '';
|
||||
this.errorMessage=""
|
||||
this.showLoading = true;
|
||||
|
||||
this._organizationService.getOrganizationInfo(this.organizationId).subscribe(
|
||||
data => {
|
||||
|
@ -146,13 +131,21 @@ export class OrganizationComponent {
|
|||
this.updateTitle(this.organizationInfo.title.name);
|
||||
this.updateDescription("Organization, country, projects, search, repositories, open access"+this.organizationInfo.title.name);
|
||||
|
||||
this.fetchPublications.getResultsForEntity("organization", this.organizationId, 1, 10);
|
||||
this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications();
|
||||
//this.fetchProjects.getNumForEntity("organization", this.organizationId);
|
||||
var refineFields:string [] = ["funderid"];
|
||||
|
||||
this.searchPublications();
|
||||
//this.fetchProjects.getNumForEntity("organization", this.organizationId);
|
||||
this.fetchProjects.getResultsForOrganizations(this.organizationId, "", 1, 0,refineFields);
|
||||
if(this.fetchProjects.searchUtils.totalResults > 0) {
|
||||
//this.activeTab = "Projects";
|
||||
} else {
|
||||
//this.searchDataprovidersInit();
|
||||
}
|
||||
|
||||
this.fetchDataproviders.getNumForEntity("organization", this.organizationId);
|
||||
|
||||
this.showLoading = false;
|
||||
|
||||
/*let projectsNum = 0;
|
||||
|
||||
if(this.organizationInfo.projects != undefined) {
|
||||
|
@ -170,6 +163,7 @@ export class OrganizationComponent {
|
|||
console.log(err)
|
||||
|
||||
this.errorMessage = 'No organization found';
|
||||
this.showLoading = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -212,16 +206,31 @@ export class OrganizationComponent {
|
|||
//return this.projectsData;
|
||||
//}
|
||||
|
||||
private searchPublications() {
|
||||
this.fetchPublications.getResultsForEntity("organization", this.organizationId, 1, 10);
|
||||
this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications();// + "?project=" + this.projectId+"&pr=and";
|
||||
if(this.fetchPublications.searchUtils.totalResults > 0) {
|
||||
//this.activeTab = "Publications";
|
||||
} else {
|
||||
//this.projectsClicked = true;
|
||||
}
|
||||
}
|
||||
|
||||
private searchDataproviders() {
|
||||
this.fetchDataproviders.getResultsForEntity("organization", this.organizationId, 1, 10);
|
||||
this.linkToSearchDataproviders = OpenaireProperties.getLinkToAdvancedSearchDataProviders();
|
||||
|
||||
if(this.fetchDataproviders.searchUtils.totalResults > 0) {
|
||||
this.reloadDataproviders = false;
|
||||
//this.activeTab = "Data Providers";
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private searchDataprovidersInit() {
|
||||
if(this.subDataproviders == undefined && this.fetchDataproviders.searchUtils.totalResults > 0) {
|
||||
this.subDataproviders = this.route.queryParams.subscribe(params => {
|
||||
this.searchDataproviders();
|
||||
});
|
||||
if(this.reloadDataproviders && this.fetchDataproviders.searchUtils.totalResults > 0) {
|
||||
this.searchDataproviders();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<div class="uk-container uk-margin-top project">
|
||||
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
|
||||
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
|
||||
<div *ngIf="showLoading" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
|
||||
|
||||
<div *ngIf="projectInfo != null" uk-grid>
|
||||
<div class="uk-width-3-4@l uk-width-3-4@xl uk-width-3-4@m uk-width-1-1@s">
|
||||
|
@ -55,9 +56,8 @@
|
|||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<ul class="uk-tab" data-uk-switcher="{connect:'#tab-content'}">
|
||||
<li class="uk-active">
|
||||
<ul class="uk-tab uk-visible@m" uk-tab="connect: #tab-content">
|
||||
<li (click)="activeTab='Publications'">
|
||||
<a>
|
||||
Publications
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
|
@ -65,7 +65,7 @@
|
|||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchDatasetsInit()">
|
||||
<li (click)="activeTab='Research Data'; searchDatasetsInit()">
|
||||
<a>
|
||||
Research Data
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
|
@ -73,13 +73,13 @@
|
|||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="statsClicked=true;">
|
||||
<li (click)="activeTab='Statistics'; statsClicked=true">
|
||||
<a>
|
||||
Statistics
|
||||
<i class="uk-icon-pie-chart"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="metricsClicked=true;">
|
||||
<li (click)="activeTab='Metrics'; metricsClicked=true">
|
||||
<a>
|
||||
Metrics
|
||||
<i class="uk-icon-line-chart"></i>
|
||||
|
@ -87,6 +87,41 @@
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
<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>
|
||||
|
||||
<ul id="toggle-small-tabs" class="uk-subnav uk-subnav-pill uk-dropdown uk-hidden@m" uk-switcher="{connect: #tab-content}" uk-dropdown="mode: click" uk-toggle="target: #toggle-small-tabs">
|
||||
<li (click)="activeTab='Publications'">
|
||||
<a>
|
||||
Publications
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
{{fetchPublications.searchUtils.totalResults}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="searchDatasetsInit(); activeTab='Research Data'">
|
||||
<a>
|
||||
Research Data
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
{{fetchDatasets.searchUtils.totalResults}}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="statsClicked=true; activeTab='Statistics'">
|
||||
<a>
|
||||
Statistics
|
||||
<i class="uk-icon-pie-chart"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="metricsClicked=true; activeTab='Metrics'">
|
||||
<a>
|
||||
Metrics
|
||||
<i class="uk-icon-line-chart"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul id="tab-content" class="uk-switcher uk-margin custom-tab-content">
|
||||
<li class="uk-animation-fade">
|
||||
<!--div *ngIf="fetchPublications.searchUtils.totalResults == 0" class = "uk-alert uk-alert-primary" >
|
||||
|
|
|
@ -48,11 +48,12 @@ export class ProjectComponent{
|
|||
|
||||
public warningMessage = "";
|
||||
public errorMessage = "";
|
||||
public showLoading: boolean = true;
|
||||
|
||||
sub: any;
|
||||
subPublications: any;
|
||||
subDatasets: any;
|
||||
subDatasetsCount: any;
|
||||
|
||||
public activeTab: string = "Publications";
|
||||
public reloadDatasets: boolean = true;
|
||||
|
||||
public fetchPublications : FetchPublications;
|
||||
public linkToSearchPublications = "";
|
||||
|
@ -107,20 +108,8 @@ export class ProjectComponent{
|
|||
+ "\n</script>";
|
||||
|
||||
this.getProjectInfo(this.projectId);
|
||||
// this.subPublications = this.route.queryParams.subscribe(params => {
|
||||
this.searchPublications();
|
||||
// });
|
||||
|
||||
//this.subDatasetsCount = this._searchDatasetsService.numOfEntityDatasets(this.projectId, "projects/").subscribe(
|
||||
// data => {
|
||||
// this.fetchDatasets.searchUtils.totalResults = data;
|
||||
// },
|
||||
// err => {
|
||||
// console.log(err);
|
||||
// }
|
||||
//);
|
||||
this.fetchDatasets.getNumForEntity("project", this.projectId);
|
||||
|
||||
}else{
|
||||
this.warningMessage="No valid project id";
|
||||
}
|
||||
|
@ -140,7 +129,6 @@ export class ProjectComponent{
|
|||
|
||||
ngOnDestroy() {
|
||||
this.sub.unsubscribe();
|
||||
//this.subDatasetsCount.unsubscribe();
|
||||
}
|
||||
|
||||
createClipboard() {
|
||||
|
@ -157,22 +145,36 @@ export class ProjectComponent{
|
|||
private searchPublications() {
|
||||
this.fetchPublications.getResultsForEntity("project", this.projectId, 1, 10);
|
||||
this.linkToSearchPublications = OpenaireProperties.getLinkToAdvancedSearchPublications();// + "?project=" + this.projectId+"&pr=and";
|
||||
if(this.fetchPublications.searchUtils.totalResults > 0) {
|
||||
//this.activeTab = "Publications";
|
||||
} else {
|
||||
//this.searchDatasetsInit();
|
||||
}
|
||||
}
|
||||
|
||||
private searchDatasets() {
|
||||
this.fetchDatasets.getResultsForEntity("project", this.projectId, 1, 10);
|
||||
this.linkToSearchDatasets = OpenaireProperties.getLinkToAdvancedSearchDatasets();// + "?project=" + this.projectId+"&pr=and";
|
||||
|
||||
this.reloadDatasets = false;
|
||||
//this.activeTab = "Research Data";
|
||||
}
|
||||
|
||||
private searchDatasetsInit() {
|
||||
if(this.subDatasets == undefined && this.fetchDatasets.searchUtils.totalResults > 0) {
|
||||
console.info("searchDatasetsInit");
|
||||
if(this.reloadDatasets && this.fetchDatasets.searchUtils.totalResults > 0) {
|
||||
this.searchDatasets();
|
||||
} else if(this.fetchDatasets.searchUtils.totalResults == 0) {
|
||||
//this.statsClicked=true;
|
||||
//this.activeTab = "Statistics";
|
||||
}
|
||||
}
|
||||
|
||||
getProjectInfo (id:string) {
|
||||
this.warningMessage = '';
|
||||
this.errorMessage=""
|
||||
this.showLoading = true;
|
||||
|
||||
this._projectService.getProjectInfo(id).subscribe(
|
||||
data => {
|
||||
this.projectInfo = data;
|
||||
|
@ -198,10 +200,13 @@ console.info(this.projectInfo.title);
|
|||
this.chartScientificResultsUrl='https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"projScient","projTitle":"'+this.projectId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "spline", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Publications"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [" "], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=600&h=250';
|
||||
this.chartAccessModeUrl='https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"projOA","projTitle":"'+this.projectId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "pie", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Publications"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [" "], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=600&h=250';
|
||||
this.chartDatasourcesUrl= 'https://beta.openaire.eu/stats/chart.php?com=query&persistent=false&data={"query":"projPubsRepos","projTitle":"'+this.projectId+'", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "column", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Publications"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [" "], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=600&h=250';
|
||||
|
||||
this.showLoading = false;
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
this.errorMessage = 'No project found';
|
||||
console.log(err);
|
||||
this.errorMessage = 'No project found';
|
||||
this.showLoading = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
|
||||
<div *ngIf="errorMessage.length > 0" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
|
||||
|
||||
<div *ngIf="showLoading" class="uk-alert uk-alert-primary" role="alert">Loading...</div>
|
||||
|
||||
<div *ngIf="publicationInfo != null" uk-grid>
|
||||
<div class="uk-width-3-4@l uk-width-3-4@xl uk-width-3-4@m uk-width-1-1@s">
|
||||
|
@ -51,13 +51,13 @@
|
|||
<dd *ngIf="publicationInfo.types != undefined && publicationInfo.types.length > 0">{{publicationInfo.types}}</dd>
|
||||
<dt *ngIf="publicationInfo.embargoEndDate">Embargo end date: </dt>
|
||||
<dd *ngIf="publicationInfo.embargoEndDate">{{publicationInfo.embargoEndDate}}</dd>
|
||||
</dl>
|
||||
|
||||
<showIdentifiers [identifiers]="publicationInfo.identifiers"></showIdentifiers>
|
||||
<showSubjects [subjects]="publicationInfo.subjects"
|
||||
[otherSubjects]="publicationInfo.otherSubjects"
|
||||
[classifiedSubjects]="publicationInfo.classifiedSubjects">
|
||||
</showSubjects>
|
||||
</dl>
|
||||
<showIdentifiers [identifiers]="publicationInfo.identifiers"></showIdentifiers>
|
||||
<showSubjects [subjects]="publicationInfo.subjects"
|
||||
[otherSubjects]="publicationInfo.otherSubjects"
|
||||
[classifiedSubjects]="publicationInfo.classifiedSubjects">
|
||||
</showSubjects>
|
||||
|
||||
<blockquote *ngIf="publicationInfo.description">
|
||||
<div class="uk-text-justify">{{publicationInfo.description}}</div>
|
||||
|
@ -69,7 +69,7 @@
|
|||
</div>
|
||||
|
||||
<ul class="uk-tab uk-visible@xl" uk-tab="connect: #tab-content">
|
||||
<li (click)="activeTab='References'">
|
||||
<li *ngIf="publicationInfo.references" (click)="activeTab='References'">
|
||||
<a>
|
||||
References
|
||||
<span *ngIf="!publicationInfo.references" class="uk-badge uk-badge-notification">0</span>
|
||||
|
@ -78,7 +78,7 @@
|
|||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="activeTab='Related Research Results'">
|
||||
<li *ngIf="publicationInfo.relatedResearchResults" (click)="activeTab='Related Research Results'">
|
||||
<a>
|
||||
Related Research Results
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
|
@ -86,7 +86,7 @@
|
|||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="activeTab='Similar Research Results'">
|
||||
<li *ngIf="publicationInfo.similarResearchResults" (click)="activeTab='Similar Research Results'">
|
||||
<a>
|
||||
Similar Research Results
|
||||
<span *ngIf="!publicationInfo.similarResearchResults" class="uk-badge uk-badge-notification">0</span>
|
||||
|
@ -95,7 +95,7 @@
|
|||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="activeTab='Related Organizations'">
|
||||
<li *ngIf="publicationInfo.organizations" (click)="activeTab='Related Organizations'">
|
||||
<a>
|
||||
Related Organizations
|
||||
<span *ngIf="!publicationInfo.organizations" class="uk-badge uk-badge-notification">0</span>
|
||||
|
@ -130,7 +130,7 @@
|
|||
</button>
|
||||
|
||||
<ul 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 (click)="activeTab='References'">
|
||||
<li *ngIf="publicationInfo.references" (click)="activeTab='References'">
|
||||
<a>
|
||||
References
|
||||
<span *ngIf="!publicationInfo.references" class="uk-badge uk-badge-notification">0</span>
|
||||
|
@ -139,7 +139,7 @@
|
|||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="activeTab='Related Research Results'">
|
||||
<li *ngIf="publicationInfo.relatedResearchResults" (click)="activeTab='Related Research Results'">
|
||||
<a>
|
||||
Related Research Results
|
||||
<span class="uk-badge uk-badge-notification">
|
||||
|
@ -147,7 +147,7 @@
|
|||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="activeTab='Similar Research Results'">
|
||||
<li *ngIf="publicationInfo.similarResearchResults" (click)="activeTab='Similar Research Results'">
|
||||
<a>
|
||||
Similar Research Results
|
||||
<span *ngIf="!publicationInfo.similarResearchResults" class="uk-badge uk-badge-notification">0</span>
|
||||
|
@ -156,7 +156,7 @@
|
|||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li (click)="activeTab='Related Organizations'">
|
||||
<li *ngIf="publicationInfo.organizations" (click)="activeTab='Related Organizations'">
|
||||
<a>
|
||||
Related Organizations
|
||||
<span *ngIf="!publicationInfo.organizations" class="uk-badge uk-badge-notification">0</span>
|
||||
|
@ -185,7 +185,7 @@
|
|||
</ul>
|
||||
|
||||
<ul id="tab-content" class="uk-switcher uk-margin custom-tab-content">
|
||||
<li class="uk-animation-fade">
|
||||
<li *ngIf="publicationInfo.references" class="uk-animation-fade">
|
||||
<div *ngIf="!publicationInfo.references" class = "uk-alert uk-alert-primary" >
|
||||
There are no references
|
||||
</div>
|
||||
|
@ -225,7 +225,7 @@
|
|||
</div>
|
||||
</li>
|
||||
|
||||
<li class="uk-animation-fade">
|
||||
<li *ngIf="publicationInfo.relatedResearchResults" class="uk-animation-fade">
|
||||
<div *ngIf="!publicationInfo.relatedResearchResults" class = "uk-alert uk-alert-primary">
|
||||
There are no related research results
|
||||
</div>
|
||||
|
@ -239,7 +239,7 @@
|
|||
</li>
|
||||
|
||||
|
||||
<li class="uk-animation-fade">
|
||||
<li *ngIf="publicationInfo.similarResearchResults" class="uk-animation-fade">
|
||||
<div *ngIf="!publicationInfo.similarResearchResults" class = "uk-alert uk-alert-primary">
|
||||
There are no similar research results
|
||||
</div>
|
||||
|
@ -249,7 +249,7 @@
|
|||
</div>
|
||||
</li>
|
||||
|
||||
<li class="uk-animation-fade">
|
||||
<li *ngIf="publicationInfo.organizations" class="uk-animation-fade">
|
||||
<div *ngIf="!publicationInfo.organizations" class = "uk-alert uk-alert-primary">
|
||||
There are no related organizations
|
||||
</div>
|
||||
|
|
|
@ -47,6 +47,8 @@ export class PublicationComponent {
|
|||
|
||||
public warningMessage = "";
|
||||
public errorMessage = "";
|
||||
public showLoading: boolean = true;
|
||||
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
|
||||
public activeTab: string = "References";
|
||||
|
@ -88,6 +90,7 @@ export class PublicationComponent {
|
|||
if (typeof document !== 'undefined') {
|
||||
this.element.nativeElement.scrollIntoView();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -98,12 +101,12 @@ export class PublicationComponent {
|
|||
getPublicationInfo(id:string) {
|
||||
this.warningMessage = '';
|
||||
this.errorMessage=""
|
||||
this.showLoading = true;
|
||||
|
||||
this._publicationService.getPublicationInfo(this.articleId).subscribe(
|
||||
data => {
|
||||
this.publicationInfo = data;
|
||||
|
||||
|
||||
// this.result = []
|
||||
// this.result = {id: id, type :"dataset", source : "openaire", title: this.publicationInfo.title,url: '', result: '', accessRights: this.publicationInfo.bestlicense, embargoEndDate: ''};
|
||||
this.updateTitle(this.publicationInfo.title.name);
|
||||
|
@ -131,12 +134,32 @@ export class PublicationComponent {
|
|||
if(this.publicationInfo.identifiers != undefined && this.publicationInfo.identifiers.has('doi')) {
|
||||
this.doi = this.publicationInfo.identifiers.get('doi')[0];
|
||||
}
|
||||
|
||||
this.showLoading = false;
|
||||
|
||||
if(this.publicationInfo.references) {
|
||||
this.activeTab = "References";
|
||||
} else if(this.publicationInfo.relatedResearchResults) {
|
||||
this.activeTab = "Related Research Results";
|
||||
} else if(this.publicationInfo.similarResearchResults) {
|
||||
this.activeTab = "Similar Research Results";
|
||||
} else if(this.publicationInfo.organizations) {
|
||||
this.activeTab = "Related Organizations";
|
||||
} else if(this.publicationInfo.bioentities) {
|
||||
this.activeTab = "bioentities";
|
||||
} else if(this.publicationInfo.software) {
|
||||
this.activeTab = "Software";
|
||||
} else {
|
||||
this.activeTab = "Metrics";
|
||||
}
|
||||
console.info("activeTab is "+this.activeTab);
|
||||
},
|
||||
err => {
|
||||
console.log(err);
|
||||
console.info("error");
|
||||
|
||||
this.errorMessage = 'No publication found';
|
||||
this.showLoading = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
|||
@Component({
|
||||
selector: 'showIdentifiers',
|
||||
template: `
|
||||
<span class="uk-description-list-horizontal" *ngIf="identifiers != undefined && identifiers.size > 0">
|
||||
<dl class="uk-description-list" *ngIf="identifiers != undefined && identifiers.size > 0">
|
||||
<dt>Identifiers:</dt>
|
||||
<dd>
|
||||
<span *ngFor="let key of identifiers.keys() let i=index">
|
||||
|
@ -21,7 +21,7 @@ import {OpenaireProperties} from '../utils/properties/openaireProperties';
|
|||
</span>
|
||||
</span>
|
||||
</dd>
|
||||
</span>
|
||||
</dl>
|
||||
|
||||
`
|
||||
})
|
||||
|
|
|
@ -3,7 +3,7 @@ import {Component, Input} from '@angular/core';
|
|||
@Component({
|
||||
selector: 'showSubjects',
|
||||
template: `
|
||||
<span class="uk-description-list-horizontal" *ngIf="subjects != undefined">
|
||||
<dl class="uk-description-list" *ngIf="subjects != undefined">
|
||||
|
||||
<dt *ngIf="(subjects != undefined && subjects.length > 0) ||
|
||||
(otherSubjects != undefined && otherSubjects.size > 0)">
|
||||
|
@ -50,7 +50,7 @@ import {Component, Input} from '@angular/core';
|
|||
</div>
|
||||
</div>
|
||||
</dd>
|
||||
</span>
|
||||
</dl>
|
||||
`
|
||||
|
||||
})
|
||||
|
|
|
@ -74,7 +74,9 @@ export class AdvancedSearchPageComponent {
|
|||
ngOnInit() {
|
||||
this.updateTitle("Advanced search "+this.pageTitle);
|
||||
this.updateDescription("Openaire, search, repositories, open access, type, data provider, funder, project, "+ this.pageTitle);
|
||||
this.updateUrl(OpenaireProperties.getBaseLink()+location.pathname);
|
||||
if(typeof window !== 'undefined') {
|
||||
this.updateUrl(OpenaireProperties.getBaseLink()+location.pathname);
|
||||
}
|
||||
|
||||
this.searchUtils.baseUrl = "/" + this.searchUtils.baseUrl;
|
||||
this.updateBaseUrlWithParameters();
|
||||
|
|
|
@ -155,7 +155,9 @@ export class SearchPageComponent {
|
|||
this.defineUrlParam();
|
||||
this.updateTitle(this.pageTitle);
|
||||
this.updateDescription("Openaire, search, repositories, open access, type, data provider, funder, project, " + this.type + "," +this.pageTitle);
|
||||
//this.updateUrl(OpenaireProperties.getBaseLink()+location.pathname);
|
||||
if(typeof window !== 'undefined') {
|
||||
this.updateUrl(OpenaireProperties.getBaseLink()+location.pathname);
|
||||
}
|
||||
// console.info(this.entityType + " " + this.urlParam + this.type);
|
||||
}
|
||||
ngAfterViewChecked(){
|
||||
|
|
|
@ -171,7 +171,9 @@ export class SearchPageTableViewComponent {
|
|||
ngOnInit() {
|
||||
this.updateTitle(this.pageTitle);
|
||||
this.updateDescription("Openaire, search, repositories, open access, type, data provider, funder, project, " + this.type + "," +this.pageTitle);
|
||||
this.updateUrl(OpenaireProperties.getBaseLink()+location.pathname);
|
||||
if(typeof window !== 'undefined') {
|
||||
this.updateUrl(OpenaireProperties.getBaseLink()+location.pathname);
|
||||
}
|
||||
}
|
||||
|
||||
public sortByOrganization = (dataprovider: any) => {
|
||||
|
|
|
@ -350,7 +350,7 @@ export class SearchDataprovidersService {
|
|||
result['organizations'] = res[1];
|
||||
result['countries'] = res[0];
|
||||
result['subjects'] = this.getDataproviderSubjects(resData);
|
||||
console.log(result['subjects']);
|
||||
//console.log(result['subjects']);
|
||||
results.push(result);
|
||||
}
|
||||
|
||||
|
|
|
@ -43,17 +43,22 @@ export class ContentProvidersDatatablePipe implements PipeTransform {
|
|||
returnValue = true;
|
||||
}
|
||||
|
||||
if(row.countries.toLowerCase().indexOf(query) > -1) {
|
||||
returnValue = true;
|
||||
if(row.countries && row.countries.length > 0) {
|
||||
for(let country of row.countries) {
|
||||
if(country.toLowerCase().indexOf(query) > -1) {
|
||||
returnValue = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(row.compatibility.toLowerCase().indexOf(query) > -1) {
|
||||
returnValue = true;
|
||||
}
|
||||
|
||||
if(row.organizations > 0) {
|
||||
if(row.organizations && row.organizations.length > 0) {
|
||||
for(let organization of row.organizations) {
|
||||
if(row.organization.toLowerCase().indexOf(query) > -1) {
|
||||
if(organization.name.toLowerCase().indexOf(query) > -1) {
|
||||
returnValue = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue