[Trunk | Library]
1. result-preview.component.html: [Bug fix] fixes in spaces between comma separated values. 2. dataProviderInfo.ts & dataProvider.service.ts: Add and parse also acronym for "organizations". 3. searchProjects.service.ts & searchDataproviders.service.ts: If organization has no name, add "[no title available]". 4. dataProvider.component.ts: initialize "showNumOrganizations" to 20 | [Bug fix] Initialize and count all tabs no matter what the type is. 5. dataProvider.component.html: a. Show acronym for organizations and name in tooltip | b. [Bug fix] date for "Last update of records in OpenAIRE" under the card in right column of page. c. [Bug fix] In statisticsTab pass inputs for fetchSoftware and fetchOther. 6. statisticsTab.component.ts: [Bug fix] New inputs for fetchSoftware and fetchOther - pass their status in errorMessages | no checks for showing charts (needs more investigation). 7. project.component.html: a. [Bug fix] date for "Last update of records in OpenAIRE" under the card in right column of page. b. [Bug fix] For statistics check also fetchSoftware and fetchOther. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58284 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
fce59b45d8
commit
cd6642d7b2
|
@ -122,17 +122,48 @@
|
|||
</span>
|
||||
</li>
|
||||
<!-- Organizations -->
|
||||
<li *ngIf="dataProviderInfo.organizations && dataProviderInfo.organizations.length > 0" class="uk-margin-small-bottom">
|
||||
<!-- <li *ngIf="dataProviderInfo.organizations && dataProviderInfo.organizations.length > 0" class="uk-margin-small-bottom">-->
|
||||
<!-- <div class="uk-height-max-medium uk-overflow-auto">-->
|
||||
<!-- <span class="uk-text-muted">Organizations: </span>-->
|
||||
<!-- <span *ngFor="let organization of dataProviderInfo.organizations.slice(0, showNumOrganizations) let i=index">-->
|
||||
<!-- <a *ngIf="organization.id"-->
|
||||
<!-- [queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active"-->
|
||||
<!-- routerLink="/search/organization">-->
|
||||
<!-- <u>{{organization.name}}</u>-->
|
||||
<!-- </a>-->
|
||||
<!-- <span *ngIf="!organization.id">-->
|
||||
<!-- <span>{{organization.name}}</span>-->
|
||||
<!-- <span *ngIf="(i < dataProviderInfo.organizations.length-1)">,</span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span *ngIf="(i < dataProviderInfo.organizations.length-1)">, </span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span *ngIf="showNumOrganizations == thresholdOrganizations && dataProviderInfo.organizations.length > thresholdOrganizations"> ... </span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div *ngIf="showNumOrganizations == thresholdOrganizations && dataProviderInfo.organizations.length > thresholdOrganizations"-->
|
||||
<!-- class="uk-width-1-1 uk-text-right">-->
|
||||
<!-- <a (click)="showNumOrganizations = dataProviderInfo.organizations.length;">-->
|
||||
<!-- View all {{dataProviderInfo.organizations.length | number}} organizations-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div *ngIf="showNumOrganizations > thresholdOrganizations" class="uk-width-1-1 uk-text-right">-->
|
||||
<!-- <a (click)="showNumOrganizations = thresholdOrganizations;">View less organizations</a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </li>-->
|
||||
<li *ngIf="dataProviderInfo.organizations && dataProviderInfo.organizations.length > 0" class="uk-margin-bottom">
|
||||
<div class="uk-height-max-medium uk-overflow-auto">
|
||||
<span class="uk-text-muted">Organizations: </span>
|
||||
<span *ngFor="let organization of dataProviderInfo.organizations.slice(0, showNumOrganizations) let i=index">
|
||||
<span *ngFor="let organization of dataProviderInfo.organizations.slice(0, showNumOrganizations) let i=index"
|
||||
[attr.uk-tooltip]="organization.acronym && organization.name ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="organization.name">
|
||||
<a *ngIf="organization.id"
|
||||
[queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active"
|
||||
routerLink="/search/organization">
|
||||
<u>{{organization.name}}</u>
|
||||
<u>{{(organization.acronym) ? organization.acronym : ''}}</u>
|
||||
<u>{{(!organization.acronym && organization.name) ? organization.name : ''}}</u>
|
||||
</a>
|
||||
<span *ngIf="!organization.id">
|
||||
<span>{{organization.name}}</span>
|
||||
<span *ngIf="organization.acronym">{{organization.acronym}}</span>
|
||||
<span *ngIf="!organization.acronym && organization.name">{{organization.name}}</span>
|
||||
<span *ngIf="(i < dataProviderInfo.organizations.length-1)">,</span>
|
||||
</span>
|
||||
<span *ngIf="(i < dataProviderInfo.organizations.length-1)">, </span>
|
||||
|
@ -559,9 +590,9 @@
|
|||
<!-- <div></div><!– OpenAIRE Metrics –>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="uk-margin-small-top uk-text-muted uk-text-small uk-text-right">
|
||||
Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-small-top uk-text-muted uk-text-small uk-text-right">
|
||||
Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -574,7 +605,8 @@
|
|||
[properties]="properties" [entityType]="'content provider'" [fields]="feedbackFields"
|
||||
[showForm]="showFeedback" (show)="showFeedback = $event"></feedback>
|
||||
<!-- Statistics -->
|
||||
<modal-alert *ngIf="dataProviderInfo && dataProviderInfo.tabs2 && dataProviderInfo.tabs2.indexOf('Statistics') != -1"
|
||||
<!-- && dataProviderInfo.tabs2 && dataProviderInfo.tabs2.indexOf('Statistics') != -1-->
|
||||
<modal-alert *ngIf="dataProviderInfo"
|
||||
classBody="uk-width-xxlarge uk-padding-remove-right" #statisticsModal>
|
||||
<landing-header [properties]="properties" [title]="dataProviderInfo.title.name"
|
||||
[subTitle]="(dataProviderInfo.officialName
|
||||
|
@ -584,6 +616,7 @@
|
|||
</landing-header>
|
||||
<div *ngIf="statsClicked" class="uk-margin-medium-top uk-margin-medium-right">
|
||||
<statisticsTab [fetchPublications]="fetchPublications" [fetchDatasets]="fetchDatasets"
|
||||
[fetchSoftware]="fetchSoftware" [fetchOther]="fetchOrps"
|
||||
[datasourceId]="datasourceId"></statisticsTab>
|
||||
</div>
|
||||
</modal-alert>
|
||||
|
|
|
@ -96,8 +96,8 @@ export class DataProviderComponent {
|
|||
private reloadRelatedDatasources: boolean = true;
|
||||
|
||||
// Organizations variables for view more/less functionality
|
||||
public thresholdOrganizations: number = 10;
|
||||
public showNumOrganizations: number = 10;
|
||||
public thresholdOrganizations: number = 20;
|
||||
public showNumOrganizations: number = 20;
|
||||
|
||||
// Subjects variables for view more/less functionality
|
||||
public thresholdSubjects: number = 20;
|
||||
|
@ -273,7 +273,7 @@ export class DataProviderComponent {
|
|||
|
||||
private initTabs() {
|
||||
|
||||
if (this.dataProviderInfo.tabs != undefined && this.dataProviderInfo.tabs.length > 0) {
|
||||
//if (this.dataProviderInfo.tabs != undefined && this.dataProviderInfo.tabs.length > 0) {
|
||||
this.reloadPublications = true;
|
||||
this.reloadDatasets = true;
|
||||
this.reloadSoftware = true;
|
||||
|
@ -317,7 +317,7 @@ export class DataProviderComponent {
|
|||
// this.fetchAggregatorsSoftware = new FetchResearchResults(this._searchResearchResultsService);
|
||||
// this.fetchAggregatorsOrps = new FetchResearchResults(this._searchResearchResultsService);
|
||||
this.fetchAggregatorsResults = new FetchResearchResults(this._searchResearchResultsService);
|
||||
}
|
||||
//}
|
||||
// if (this.dataProviderInfo.resultsBy == "collectedFrom") {
|
||||
// //this.paramsForSearchLink = "?collectedFrom="+this.datasourceId+"&co=and";
|
||||
// this.paramsForSearchLink = this.routerHelper.createQueryParams(['f0', 'fv0'], ["collectedfromdatasourceid", this.datasourceId]);
|
||||
|
@ -346,25 +346,25 @@ export class DataProviderComponent {
|
|||
}
|
||||
|
||||
private count(page: number, size: number) {
|
||||
for (let i = 0; i < this.dataProviderInfo.tabs.length; i++) {
|
||||
let content: string = this.dataProviderInfo.tabs[i].content;
|
||||
//for (let i = 0; i < this.dataProviderInfo.tabs.length; i++) {
|
||||
//let content: string = this.dataProviderInfo.tabs[i].content;
|
||||
|
||||
if (content == 'publicationsTab') {
|
||||
//if (content == 'publicationsTab') {
|
||||
this.countPublications(page, size);
|
||||
} else if (content == 'datasetsTab') {
|
||||
//} else if (content == 'datasetsTab') {
|
||||
this.countDatasets(page, size);
|
||||
} else if (content == 'softwareTab') {
|
||||
//} else if (content == 'softwareTab') {
|
||||
this.countSoftware(page, size);
|
||||
} else if (content == 'orpsTab') {
|
||||
//} else if (content == 'orpsTab') {
|
||||
this.countOrps(page, size);
|
||||
} else if (content == 'projectsTab') {
|
||||
//} else if (content == 'projectsTab') {
|
||||
this.countProjects(page, size);
|
||||
} else if (content == 'datasourcesTab') {
|
||||
//} else if (content == 'datasourcesTab') {
|
||||
this.countDatasources(page, size);
|
||||
}// else if(content=='relatedDatasourcesTab') {
|
||||
//}// else if(content=='relatedDatasourcesTab') {
|
||||
// this.countRelatedDatasources(page, size);
|
||||
//}
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
public search(content: string, page: number, size: number) {
|
||||
|
|
|
@ -231,10 +231,21 @@ export class DataProviderService {
|
|||
countriesSet = new Set<string>();
|
||||
}
|
||||
|
||||
this.dataProviderInfo.organizations[counter] = {"name": "", "id": ""};
|
||||
this.dataProviderInfo.organizations[counter]['name'] = (mydata.legalname ? mydata.legalname : "[no title available");
|
||||
this.dataProviderInfo.organizations[counter] = {"acronym": "", "name": "", "id": ""};
|
||||
//this.dataProviderInfo.organizations[counter]['name'] = (mydata.legalname ? mydata.legalname : "[no title available");
|
||||
this.dataProviderInfo.organizations[counter]['id'] = mydata['to'].content;
|
||||
|
||||
if(mydata.hasOwnProperty("legalshortname")) {
|
||||
this.dataProviderInfo.organizations[counter]['acronym'] = mydata.legalshortname;
|
||||
}
|
||||
if(mydata.hasOwnProperty("legalname")) {
|
||||
this.dataProviderInfo.organizations[counter]['name'] = mydata.legalname;
|
||||
}
|
||||
if(!this.dataProviderInfo.organizations[counter]['acronym'] && !this.dataProviderInfo.organizations[counter]['name']){
|
||||
// acronym is displayed with link and name only in tooltip
|
||||
this.dataProviderInfo.organizations[counter]['acronym'] = "[no title available]";
|
||||
}
|
||||
|
||||
if(mydata.country != '' && mydata['country'].classname != '') {
|
||||
if(!countriesSet.has(mydata['country'].classname)) {
|
||||
this.dataProviderInfo.countries.push(mydata['country'].classname);
|
||||
|
|
|
@ -7,9 +7,14 @@ import {EnvProperties} from '../../utils/properties/env-properties';
|
|||
@Component({
|
||||
selector: 'statisticsTab',
|
||||
template: `
|
||||
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]" [type]="'statistics'" tab_error_class=true></errorMessages>
|
||||
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status,
|
||||
fetchSoftware.searchUtils.status, fetchOther.searchUtils.status]"
|
||||
[type]="'statistics'" tab_error_class=true></errorMessages>
|
||||
|
||||
<ng-container *ngIf="(fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE)">
|
||||
<!-- <ng-container *ngIf="(fetchPublications.searchUtils.status == errorCodes.DONE -->
|
||||
<!-- || fetchDatasets.searchUtils.status == errorCodes.DONE-->
|
||||
<!-- || fetchSoftware.searchUtils.status == errorCodes.DONE-->
|
||||
<!-- || fetchOther.searchUtils.status == errorCodes.DONE)">-->
|
||||
<div class="uk-padding uk-padding-remove-top">
|
||||
<span class="uk-text-bold uk-text-small">Research Results Timeline</span>
|
||||
<i-frame [url]=docsTimelineUrl ></i-frame>
|
||||
|
@ -18,21 +23,25 @@ import {EnvProperties} from '../../utils/properties/env-properties';
|
|||
<span class="uk-text-bold uk-text-small">Research Results Types</span>
|
||||
<i-frame [url]=docsTypesUrl ></i-frame>
|
||||
</div>
|
||||
</ng-container>
|
||||
<!-- </ng-container>-->
|
||||
|
||||
<div *ngIf="fetchPublications.searchUtils.totalResults > 0 || (fetchDatasets.searchUtils.totalResults > 0)"
|
||||
<!-- <div *ngIf="fetchPublications.searchUtils.totalResults > 0 || (fetchDatasets.searchUtils.totalResults > 0-->
|
||||
<!-- || fetchSoftware.searchUtils.totalResults > 0 || fetchOther.searchUtils.totalResults > 0)"-->
|
||||
<div
|
||||
class="uk-padding uk-padding-remove-top">
|
||||
<span class="uk-text-bold uk-text-small">Funders in Research Results of content provider</span>
|
||||
<i-frame [url]=docsFunderUrl ></i-frame>
|
||||
</div>
|
||||
|
||||
<div *ngIf="fetchPublications.searchUtils.totalResults > 0 "
|
||||
<!-- <div *ngIf="fetchPublications.searchUtils.totalResults > 0 "-->
|
||||
<div
|
||||
class="uk-padding uk-padding-remove-top">
|
||||
<span class="uk-text-bold uk-text-small">Projects with most Publications</span>
|
||||
<i-frame [url]=pubsProjectsUrl ></i-frame>
|
||||
</div>
|
||||
|
||||
<div *ngIf="(fetchDatasets.searchUtils.totalResults > 0)"
|
||||
<!-- <div *ngIf="(fetchDatasets.searchUtils.totalResults > 0)"-->
|
||||
<div
|
||||
class="uk-padding uk-padding-remove-top">
|
||||
<span class="uk-text-bold uk-text-small">Projects with most Research Data</span>
|
||||
<i-frame [url]=dataProjectsUrl></i-frame>
|
||||
|
@ -44,6 +53,8 @@ export class StatisticsTabComponent {
|
|||
@Input() datasourceId;
|
||||
@Input() fetchPublications : FetchResearchResults;
|
||||
@Input() fetchDatasets : FetchResearchResults;
|
||||
@Input() fetchSoftware: FetchResearchResults;
|
||||
@Input() fetchOther: FetchResearchResults;
|
||||
|
||||
private docsTimelineUrl: string;
|
||||
private docsTypesUrl:string;
|
||||
|
|
|
@ -264,7 +264,9 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="uk-margin-medium-top">
|
||||
<div *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||
class="uk-margin-medium-top">
|
||||
<div class="uk-margin-top simple-buttons uk-flex uk-flex-middle">
|
||||
<div (click)="openStatistics()" class="clickable uk-margin-right">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
|
||||
|
@ -275,9 +277,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0"
|
||||
class="uk-margin-top advanced-buttons uk-grid-small uk-child-width-1-4@s uk-child-width-1-2"
|
||||
<div class="uk-margin-top advanced-buttons uk-grid-small uk-child-width-1-4@s uk-child-width-1-2"
|
||||
uk-height-match="target: .target; row: false"
|
||||
uk-grid>
|
||||
<ng-container *ngTemplateOutlet="search_box;
|
||||
|
@ -552,7 +552,6 @@
|
|||
<!-- <option value="software">Software</option>-->
|
||||
<!-- <option value="other">Other research products</option>-->
|
||||
<!-- </select>-->
|
||||
|
||||
<div class="uk-padding-small uk-padding-remove-vertical">
|
||||
<mat-select [(value)]="share_research_results_type"
|
||||
[disableOptionCentering]="true"
|
||||
|
@ -663,9 +662,9 @@
|
|||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="uk-margin-small-top uk-text-muted uk-text-small uk-text-right">
|
||||
Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-small-top uk-text-muted uk-text-small uk-text-right">
|
||||
Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
</div>
|
||||
<modal-loading></modal-loading>
|
||||
<modal-alert #AlertModalCsvError></modal-alert>
|
||||
|
@ -687,11 +686,14 @@
|
|||
[status]="projectInfo.status">
|
||||
</landing-header>
|
||||
<div class="uk-margin-medium-top uk-margin-medium-right">
|
||||
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status]"
|
||||
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status,
|
||||
fetchSoftware.searchUtils.status, fetchOrps.searchUtils.status]"
|
||||
[type]="'statistics'" tab_error_class=true></errorMessages>
|
||||
|
||||
<div
|
||||
*ngIf="statsClicked && (fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE)">
|
||||
*ngIf="statsClicked &&
|
||||
(fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE
|
||||
|| fetchSoftware.searchUtils.status == errorCodes.DONE || fetchOrps.searchUtils.status == errorCodes.DONE)">
|
||||
<div class="uk-padding uk-padding-remove-top">
|
||||
<span class="uk-text-bold uk-text-small">Produced research results per year</span>
|
||||
<i-frame [url]=chartScientificResultsUrl></i-frame>
|
||||
|
|
|
@ -401,6 +401,9 @@ export class SearchDataprovidersService {
|
|||
} else {
|
||||
item['name'] = relation.legalname;
|
||||
}
|
||||
if(!item['name']) {
|
||||
item['name'] = "[no title available]";
|
||||
}
|
||||
item['id'] = /*OpenaireProperties.getsearchLinkToOrganization()+*/relation['to'].content;
|
||||
organizations.push(item);
|
||||
}
|
||||
|
|
|
@ -190,6 +190,9 @@ export class SearchProjectsService {
|
|||
} else {
|
||||
result['organizations'][countOrganizations]['name'] = relation.legalname;
|
||||
}
|
||||
if(!result['organizations'][countOrganizations]['name']) {
|
||||
result['organizations'][countOrganizations]['name'] = "[no title available]";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -163,7 +163,7 @@ export class DataProviderInfo {
|
|||
])
|
||||
};
|
||||
|
||||
organizations: {"name": string, "id": string}[] = [];
|
||||
organizations: {"acronym": string, "name": string, "id": string}[] = [];
|
||||
//publications: any;
|
||||
//datasets: any;
|
||||
statistics: any;
|
||||
|
|
|
@ -217,7 +217,7 @@
|
|||
<span class="uk-text-muted">Organization: </span>
|
||||
<span *ngFor="let organization of result.organizations.slice(0,10) let i=index">
|
||||
<span>{{organization.name}}</span>
|
||||
<span *ngIf="(i < result.organizations.length-1) && (i < 9)">,</span>
|
||||
<span *ngIf="(i < result.organizations.length-1) && (i < 9)">, </span>
|
||||
</span>
|
||||
<span *ngIf="result.organizations.length > 10">...</span>
|
||||
</div>
|
||||
|
@ -243,9 +243,10 @@
|
|||
<div *ngIf="showSubjects && result.subjects && result.subjects.length > 0"
|
||||
class="uk-text-small uk-margin-small-bottom">
|
||||
<span class="uk-text-muted">Subject: </span>
|
||||
<span *ngFor="let subject of result.subjects.slice(0,10) let i = index">{{subject}}
|
||||
{{(i < (result.subjects.slice(0, 10).length - 1)) ? ", " : ""}}
|
||||
{{(i == result.subjects.slice(0, 10).length - 1 && result.subjects.length > 10) ? "..." : ""}}
|
||||
<span *ngFor="let subject of result.subjects.slice(0,10) let i = index">
|
||||
<span>{{subject}}</span>
|
||||
<span>{{(i < (result.subjects.slice(0, 10).length - 1)) ? ", " : ""}}</span>
|
||||
<span>{{(i == result.subjects.slice(0, 10).length - 1 && result.subjects.length > 10) ? "..." : ""}}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue