[Library|Trunk]

- Remove inline argument for parsed contexts, projects, remove unused code with <mark> tag


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@61002 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2021-05-13 15:21:46 +00:00
parent bbdf705ea8
commit 6eed709019
6 changed files with 13 additions and 27 deletions

View File

@ -8,15 +8,8 @@ import {properties} from "../../../../environments/environment";
template: `
<div class="uk-text-muted">Funded by</div>
<span *ngFor="let item of fundedByProjects.slice(0, showNum) let i=index">
<a>
<mark *ngIf="item.inline">
<span
*ngIf="item['funderShortname'] || item['funderName']">{{item['funderShortname'] ? item['funderShortname'] : item['funderName']}}</span>
<span *ngIf="!item['funderShortname'] && !item['funderName']">[no funder available]</span>
<span
*ngIf="item['acronym'] || item['title']">| {{ item['acronym'] ? item['acronym'] : item['title']}}</span>
</mark>
<span *ngIf="!item.inline">
<a>
<span>
<span
*ngIf="item['funderShortname'] || item['funderName']">{{item['funderShortname'] ? item['funderShortname'] : item['funderName']}}</span>
<span *ngIf="!item['funderShortname'] && !item['funderName']">[no funder available]</span>

View File

@ -21,7 +21,7 @@ export class ParsingFunctions {
let fundedByProject: Project = {
"id": "", "acronym": "", "title": "",
"funderShortname": "", "funderName": "",
"funding": "", "code": "", "provenanceAction": "", "inline": false
"funding": "", "code": "", "provenanceAction": ""
};
if (relation.title != 'unidentified') {
@ -545,12 +545,12 @@ export class ParsingFunctions {
parseContexts(_contexts: any): {
"labelContext": string, "idContext": string,
"labelCategory": string, "idCategory": string,
"labelConcept": string, "idConcept": string, inline: boolean
"labelConcept": string, "idConcept": string
}[] {
let contexts = new Array<{
"labelContext": string, "idContext": string,
"labelCategory": string, "idCategory": string,
"labelConcept": string, "idConcept": string, inline: boolean
"labelConcept": string, "idConcept": string
}>();
let position = 0;
@ -574,7 +574,7 @@ export class ParsingFunctions {
contexts[position] = {"labelContext": "", "idContext": "",
"labelCategory": "", "idCategory": "",
"labelConcept": "", "idConcept": "", inline: false};
"labelConcept": "", "idConcept": ""};
contexts[position]['labelContext'] = context.label;
contexts[position]['idContext'] = context.id;
contexts[position]['labelCategory'] = category.label;
@ -587,7 +587,7 @@ export class ParsingFunctions {
} else {
contexts[position] = {"labelContext": "", "idContext": "",
"labelCategory": "", "idCategory": "",
"labelConcept": "", "idConcept": "", inline: false};
"labelConcept": "", "idConcept": ""};
contexts[position]['labelContext'] = context.label;
contexts[position]['idContext'] = context.id;
contexts[position]['labelCategory'] = category.label;
@ -600,7 +600,7 @@ export class ParsingFunctions {
} else {
contexts[position] = {"labelContext": "", "idContext": "",
"labelCategory": "", "idCategory": "",
"labelConcept": "", "idConcept": "", inline: false};
"labelConcept": "", "idConcept": ""};
contexts[position]['labelContext'] = context.label;
contexts[position]['idContext'] = context.id;
contexts[position]['labelCategory'] = null;

View File

@ -6,18 +6,12 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class";
template: `
<div class="uk-text-muted">Communities</div>
<div class="uk-margin-small-left" *ngFor="let item of contexts.slice(0, showNum); let i=index">
<span *ngIf="!item['inline']">
<span>
<span>{{item['labelContext']}}</span>
<span *ngIf="item['labelCategory']"><span
uk-icon="icon: arrow-right"></span>{{item['labelCategory']}}</span>
<span *ngIf="item['labelConcept']">: {{item['labelConcept']}}</span>
</span>
<mark *ngIf="item['inline']">
<span>{{item['labelContext']}}</span>
<span *ngIf="item['labelCategory']"><span
uk-icon="icon: arrow-right"></span>{{item['labelCategory']}}</span>
<span *ngIf="item['labelConcept']">: {{item['labelConcept']}}</span>
</mark>
</span>
</div>
<div *ngIf="showNum > threshold" class="uk-text-right">
<a (click)="showNum = threshold; scroll()">
@ -33,7 +27,7 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class";
})
export class RelatedToComponent {
@Input() contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string, "inline": boolean }[];
@Input() contexts: { "labelContext": string, "labelCategory": string, "labelConcept": string }[];
public threshold: number = 5;
public showNum: number = 5;

View File

@ -74,7 +74,7 @@
<span *ngIf="result['projects'].length > 15">...</span>
</div>
<mark *ngIf="result.embargoEndDate != undefined && result.embargoEndDate != ''">Embargo End Date: {{result.embargoEndDate}}</mark>
<span *ngIf="result.embargoEndDate != undefined && result.embargoEndDate != ''">Embargo End Date: {{result.embargoEndDate}}</span>
<div *ngIf="result.startYear && result.endYear"> Start year: {{result.startYear}} - End year: {{result.endYear}}</div>
<div *ngIf="showOrganizations && result['organizations'] != undefined && result['organizations'].length > 0">

View File

@ -61,7 +61,7 @@ export class ResultLandingInfo {
contexts: { "labelContext": string, "idContext": string,
"labelCategory": string, "idCategory": string,
"labelConcept": string, "idConcept": string, "inline": boolean }[];
"labelConcept": string, "idConcept": string}[];
deletedByInferenceIds: string[];

View File

@ -46,7 +46,6 @@ export interface Project {
contribution?: string;
currency?: string;
provenanceAction?: string;
inline?: boolean
}
export interface Author {