[Trunk | Library]:

1. showIdentifiers.component.ts: Rename "Related identifiers" to "Identifiers".
2. organization.component.html & organization.component.ts & resultLanding.component.html & resultLanding.component.ts: Rename "Original versions" to "Other versions".
3. resultLanding.component.html & resultLanding.component.ts & resultLanding.service.ts & resultLandingInfo.ts: 
	Remove accordion "Software" from the bottom of the page (implementation of mining that used to return them, is removed).


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@57989 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2020-01-17 14:15:23 +00:00
parent 91b0b75246
commit bbc045a366
7 changed files with 9 additions and 55 deletions

View File

@ -5,7 +5,7 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class";
selector: 'showIdentifiers',
template: `
<span *ngIf="countIdentifiers() > 0" class="uk-text-bold">Related identifiers: </span>
<span *ngIf="countIdentifiers() > 0" class="uk-text-bold">Identifiers: </span>
<span *ngIf="showAll && countIdentifiers() > pageSize">
<a (click)="showAll = !showAll;">View less identifiers</a>

View File

@ -25,7 +25,7 @@
<div *ngIf="properties.environment != 'production' && organizationInfo.deletedByInferenceIds"
class="uk-text-muted uk-text-small uk-margin-bottom" (click)="openDeletedByInference()">
The following information is the result of merging
<a>{{organizationInfo.deletedByInferenceIds.length}} original versions</a>
<a>{{organizationInfo.deletedByInferenceIds.length}} other versions</a>
</div>
<div class="uk-text-large "
*ngIf="organizationInfo.title.name && organizationInfo.title.name != organizationInfo.name ">{{organizationInfo.name}}</div>

View File

@ -567,7 +567,7 @@ export class OrganizationComponent {
this.deleteByInferenceOpened = true;
this.alertModalDeletedByInference.cancelButton = false;
this.alertModalDeletedByInference.okButton = false;
this.alertModalDeletedByInference.alertTitle = "Original versions";
this.alertModalDeletedByInference.alertTitle = "Other versions";
this.alertModalDeletedByInference.open();
}
}

View File

@ -28,7 +28,7 @@
<div *ngIf="properties.environment != 'production' && resultLandingInfo.deletedByInferenceIds"
class="uk-text-muted uk-text-small uk-margin-bottom" (click)="openDeletedByInference()">
The following information is the result of merging
<a>{{resultLandingInfo.deletedByInferenceIds.length}} original versions</a>
<a>{{resultLandingInfo.deletedByInferenceIds.length}} other versions</a>
</div>
<p class="uk-text-large" *ngIf="resultLandingInfo.subtitle">
<span [innerHTML]="resultLandingInfo.subtitle"></span>
@ -291,40 +291,6 @@
</div>
</li>
<li *ngIf="resultLandingInfo.software" (click)="activeTab='Software'">
<a class="uk-accordion-title" href="#">
Software
({{resultLandingInfo.software.length | number}})
</a>
<div class="uk-accordion-content">
<div *ngIf="resultLandingInfo.software && resultLandingInfo.software.length > pageSize"
class="uk-margin-bottom">
<span class="uk-text-bold">{{resultLandingInfo.software.length | number}}
software results, page {{softwarePage | number}}
of {{totalPages(resultLandingInfo.software.length) | number}}</span>
<paging-no-load class="uk-float-right" [currentPage]="softwarePage"
[totalResults]="resultLandingInfo.software.length" [size]="pageSize"
(pageChange)="updateSoftwarePage($event)"></paging-no-load>
</div>
<table id="softwareTable" class="uk-table ">
<tbody>
<tr
*ngFor="let item of resultLandingInfo.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)="activeTab='Other Citations'"
*ngIf="resultLandingInfo.openCitations && resultLandingInfo.openCitations.length > 0">
<a class="uk-accordion-title" href="#">

View File

@ -280,8 +280,6 @@ export class ResultLandingComponent {
this.activeTab = "Related Organizations";
} else if (this.resultLandingInfo.bioentities) {
this.activeTab = "Bioentities";
} else if (this.resultLandingInfo.software) {
this.activeTab = "Software";
} else {
this.activeTab = "Metrics";
//this.metricsClicked = true;
@ -414,7 +412,7 @@ export class ResultLandingComponent {
this.deleteByInferenceOpened = true;
this.alertModalDeletedByInference.cancelButton = false;
this.alertModalDeletedByInference.okButton = false;
this.alertModalDeletedByInference.alertTitle = "Original versions";
this.alertModalDeletedByInference.alertTitle = "Other versions";
//this.alertModalDeletedByInference.message = "There was an error in csv downloading. Please try again later.";
//this.alertModalDeletedByInference.okButtonText = "OK";
this.alertModalDeletedByInference.open();

View File

@ -190,9 +190,8 @@ export class ResultLandingService {
}
if(data[3].hasOwnProperty("externalreference")) {
let externalResults: [Map<string, Map<string, string>>, { "name": string, "url": string}[]] = this.parseBioentitiesAndSoftware(data[3]);
this.resultLandingInfo.bioentities = externalResults[0];
this.resultLandingInfo.software = externalResults[1];
let externalResults: Map<string, Map<string, string>> = this.parseBioentitiesAndSoftware(data[3]);
this.resultLandingInfo.bioentities = externalResults;
}
}
@ -325,9 +324,8 @@ export class ResultLandingService {
return organizations;
}
parseBioentitiesAndSoftware(children: any) : [Map<string, Map<string, string>>, { "name": string, "url": string}[]] {
parseBioentitiesAndSoftware(children: any) : Map<string, Map<string, string>> {
let bioentities: Map<string, Map<string, string>>;
let software: {"name": string, "url": string}[];
let length = Array.isArray(children['externalreference']) ? children['externalreference'].length : 1;
@ -347,18 +345,11 @@ export class ResultLandingService {
}
bioentities.get(externalreference.sitename).set(externalreference.refidentifier, externalreference.url);
} else if(externalreference['qualifier'].classid == "software") {
if(software == undefined) {
software = new Array<{"name": string, "url": string}>();
}
software.push({"name": externalreference.sitename, "url": externalreference.url});
}
}
}
return [bioentities, software];
return bioentities;
}
getOpenCitations(id: string, properties:EnvProperties) {

View File

@ -52,7 +52,6 @@ export class ResultLandingInfo {
// PUBLICATION
bioentities: Map<string, Map<string, string>>; //<site name, <>>
software: { "name": string, "url": string}[]; //<site name, <>>
organizations: {"name": string, "shortname":string, "id": string, "websiteUrl": string, "country": string, "trust": number}[];
openCitations: {"url": string, "title": string, "year": string, "doi": string, "authors": string[]}[];