Merge remote-tracking branch 'origin/develop' into on-push-strategy
This commit is contained in:
commit
5f8988eac1
|
@ -89,7 +89,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
</ng-container>
|
||||
</span>
|
||||
<ng-container *ngIf="status">
|
||||
<span>{{status}}</span>
|
||||
<span>{{status}} <ng-container *ngIf="currentDate <= endDate && currentDate >= startDate">(M{{calcCurrentMonth}})</ng-container></span>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="date">
|
||||
<span>{{date | date: 'dd MMM yyyy': 'UTC'}}</span>
|
||||
|
@ -295,7 +295,7 @@ export class EntityMetadataComponent {
|
|||
return this.projects.map(project => {
|
||||
let value = project.funderShortname ? project.funderShortname : project.funderName;
|
||||
if (project.acronym || project.title) {
|
||||
value = value + ' | ' + (project.acronym ? project.acronym :
|
||||
value = (value ? value + ' | ' : '') + (project.acronym ? project.acronym :
|
||||
(project.title.length > 25 ? (project.title.slice(0, 25) + '...'): project.title));
|
||||
}
|
||||
// if(project.code) {
|
||||
|
@ -364,4 +364,18 @@ export class EntityMetadataComponent {
|
|||
this.projectsModal.open();
|
||||
}
|
||||
}
|
||||
|
||||
public get calcCurrentMonth() {
|
||||
let currentDate = new Date(this.currentDate);
|
||||
let startDate = new Date(this.startDate);
|
||||
|
||||
var months;
|
||||
months = (currentDate.getFullYear() - startDate.getFullYear()) * 12;
|
||||
months -= startDate.getMonth();
|
||||
months += currentDate.getMonth();
|
||||
if(startDate.getDate() > currentDate.getDate()) {
|
||||
months--;
|
||||
}
|
||||
return months <= 0 ? 0 : months+1;
|
||||
}
|
||||
}
|
|
@ -5,7 +5,6 @@ import { CommonModule } from '@angular/common';
|
|||
import { FormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
import {TabPagingComponent} from './tabPaging.component';
|
||||
import {ShowTitleComponent} from './showTitle.component';
|
||||
import {AddThisComponent} from './addThis.component';
|
||||
|
||||
|
@ -14,11 +13,11 @@ import {AddThisComponent} from './addThis.component';
|
|||
CommonModule, FormsModule, RouterModule
|
||||
],
|
||||
declarations: [
|
||||
TabPagingComponent, ShowTitleComponent, AddThisComponent
|
||||
ShowTitleComponent, AddThisComponent
|
||||
],
|
||||
providers:[],
|
||||
exports: [
|
||||
TabPagingComponent, ShowTitleComponent, AddThisComponent
|
||||
ShowTitleComponent, AddThisComponent
|
||||
]
|
||||
})
|
||||
export class LandingModule { }
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
import {Component, Input, Output, EventEmitter} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'tabPaging',
|
||||
template: `
|
||||
<div class="uk-panel" *ngIf="!showAll && length > 10">
|
||||
<a (click)="changeShowAll.emit({value: true});">
|
||||
<div class="uk-float-right">view all {{length | number}}</div>
|
||||
</a>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
||||
export class TabPagingComponent {
|
||||
@Input() showAll: boolean;
|
||||
@Input() length: number;
|
||||
@Output() changeShowAll: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
constructor () {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
}
|
|
@ -18,7 +18,7 @@ import {ResultPreviewModule} from "../../../utils/result-preview/result-preview.
|
|||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, ResultLandingUtilsModule,
|
||||
PagingModule, ErrorMessagesModule, ShowAuthorsModule, LandingModule, NoLoadPaging, ResultPreviewModule
|
||||
PagingModule, ErrorMessagesModule, ShowAuthorsModule, NoLoadPaging, ResultPreviewModule
|
||||
],
|
||||
declarations: [
|
||||
OrganizationsDeletedByInferenceComponent
|
||||
|
|
|
@ -38,6 +38,7 @@ import {SafeHtmlPipeModule} from '../../utils/pipes/safeHTMLPipe.module';
|
|||
import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.module";
|
||||
import {ResultLandingRoutingModule} from "./resultLanding-routing.module";
|
||||
import {OrcidCoreModule} from "../../orcid/orcid-core.module";
|
||||
import {SearchTabModule} from "../../utils/tabs/contents/search-tab.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
|
|
@ -33,13 +33,11 @@
|
|||
<icon *ngIf="!isEditable && showVisibility" [flex]="true"
|
||||
[name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)"
|
||||
ratio="0.6"></icon>
|
||||
<a *ngIf="isEditable && (isCurator || showVisibillity)" class="uk-link-reset uk-flex uk-flex-middle" [class.uk-disabled]="editing">
|
||||
<icon [flex]="true"
|
||||
[name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)"
|
||||
ratio="0.6"></icon>
|
||||
<a *ngIf="isEditable && (isCurator || showVisibility)" class="uk-link-reset uk-flex uk-flex-middle" [class.uk-disabled]="editing">
|
||||
<icon *ngIf="showVisibility" [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)" ratio="0.6"></icon>
|
||||
<icon [flex]="true" name="more_vert"></icon>
|
||||
</a>
|
||||
<div #element *ngIf="isEditable && (isCurator || showVisibillity)" class="uk-dropdown"
|
||||
<div #element *ngIf="isEditable && (isCurator || showVisibility)" class="uk-dropdown"
|
||||
uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0">
|
||||
<ul class="uk-nav uk-dropdown-nav">
|
||||
<ng-container *ngIf="isCurator">
|
||||
|
@ -140,13 +138,11 @@
|
|||
<icon *ngIf="!isEditable && showVisibility" [flex]="true"
|
||||
[name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)"
|
||||
ratio="0.6"></icon>
|
||||
<a *ngIf="isEditable && (isCurator || showVisibillity)" class="uk-link-reset uk-flex uk-flex-middle" [class.uk-disabled]="editing">
|
||||
<icon [flex]="true"
|
||||
[name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)"
|
||||
ratio="0.6"></icon>
|
||||
<a *ngIf="isEditable && (isCurator || showVisibility)" class="uk-link-reset uk-flex uk-flex-middle" [class.uk-disabled]="editing">
|
||||
<icon *ngIf="showVisibility" [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)" ratio="0.6"></icon>
|
||||
<icon [flex]="true" name="more_vert"></icon>
|
||||
</a>
|
||||
<div #element *ngIf="isEditable && (isCurator || showVisibillity)" class="uk-dropdown"
|
||||
<div #element *ngIf="isEditable && (isCurator || showVisibility)" class="uk-dropdown"
|
||||
uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0">
|
||||
<ul class="uk-nav uk-dropdown-nav">
|
||||
<ng-container *ngIf="isCurator">
|
||||
|
@ -280,7 +276,7 @@
|
|||
<hr class="uk-width-1-1">
|
||||
<div *ngIf="numberIndicatorPaths" formArrayName="indicatorPaths">
|
||||
<div *ngIf="stakeholderUtils.hasMultiNumberIndicatorPaths" class="uk-margin-medium-bottom">
|
||||
<ul #transitionGroup class="uk-subnav uk-subnav-pill uk-subnav-small" transition-group>
|
||||
<ul #numbersTransition class="uk-subnav uk-subnav-pill uk-subnav-small" transition-group>
|
||||
<li *ngFor="let indicatorPath of numberIndicatorPaths.controls; let i=index"
|
||||
class="uk-visible-toggle uk-flex uk-margin-small-top" transition-group-item
|
||||
[class.uk-active]="(!indicator.activePath && i == 0) || indicator.activePath === i">
|
||||
|
@ -296,14 +292,13 @@
|
|||
class="uk-flex uk-flex-column uk-flex-center uk-margin-small-left"
|
||||
[class.uk-invisible-hover]="indicator.activePath !== i"
|
||||
(click)="$event.stopPropagation();$event.preventDefault()">
|
||||
<a *ngIf="isEditable && isCurator" class="uk-link-reset uk-flex uk-flex-middle">
|
||||
<a *ngIf="isCurator" class="uk-link-reset uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" name="more_vert"></icon>
|
||||
</a>
|
||||
<div #element *ngIf="isEditable && isCurator"
|
||||
uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0; container: .uk-modal-body">
|
||||
<div #element uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0;">
|
||||
<ul class="uk-nav uk-dropdown-nav">
|
||||
<li *ngIf="i > 0">
|
||||
<a (click)="hide(element);moveIndicatorPath(numberIndicatorFb, numberIndicatorPaths, i)">
|
||||
<a (click)="hide(element);moveIndicatorPath(numberIndicatorFb, 'number', i)">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" name="west" ratio="0.6"></icon>
|
||||
<span class="uk-margin-small-left uk-width-expand">Move Left</span>
|
||||
|
@ -311,7 +306,7 @@
|
|||
</a>
|
||||
</li>
|
||||
<li *ngIf="i < numberIndicatorPaths.length - 1">
|
||||
<a (click)="hide(element);moveIndicatorPath(numberIndicatorFb, numberIndicatorPaths, i, i + 1)">
|
||||
<a (click)="hide(element);moveIndicatorPath(numberIndicatorFb, 'number', i, i + 1)">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" name="east" ratio="0.6"></icon>
|
||||
<span class="uk-margin-small-left uk-width-expand">Move Right</span>
|
||||
|
@ -483,7 +478,7 @@
|
|||
</div>
|
||||
<div *ngIf="chartIndicatorPaths" formArrayName="indicatorPaths" class="uk-width-1-1">
|
||||
<div *ngIf="stakeholderUtils.hasMultiChartIndicatorPaths" class="uk-margin-medium-bottom">
|
||||
<ul #transitionGroup class="uk-subnav uk-subnav-pill uk-subnav-small" transition-group>
|
||||
<ul #chartsTransition class="uk-subnav uk-subnav-pill uk-subnav-small" transition-group>
|
||||
<li *ngFor="let indicatorPath of chartIndicatorPaths.controls; let i=index"
|
||||
class="uk-visible-toggle uk-flex uk-margin-small-top" transition-group-item
|
||||
[class.uk-active]="(!indicator.activePath && i == 0) || indicator.activePath === i">
|
||||
|
@ -494,14 +489,13 @@
|
|||
class="uk-flex uk-flex-column uk-flex-center uk-margin-small-left"
|
||||
[class.uk-invisible-hover]="indicator.activePath !== i"
|
||||
(click)="$event.stopPropagation();$event.preventDefault()">
|
||||
<a *ngIf="isEditable && isCurator" class="uk-link-reset uk-flex uk-flex-middle">
|
||||
<a *ngIf="isCurator" class="uk-link-reset uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" name="more_vert"></icon>
|
||||
</a>
|
||||
<div #element *ngIf="isEditable && isCurator"
|
||||
uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0; container: .uk-modal-body">
|
||||
<div #element uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0;">
|
||||
<ul class="uk-nav uk-dropdown-nav">
|
||||
<li *ngIf="i > 0">
|
||||
<a (click)="hide(element);moveIndicatorPath(chartIndicatorFb, chartIndicatorPaths, i)">
|
||||
<a (click)="hide(element);moveIndicatorPath(chartIndicatorFb, 'chart', i)">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" name="west" ratio="0.6"></icon>
|
||||
<span class="uk-margin-small-left uk-width-expand">Move Left</span>
|
||||
|
@ -509,7 +503,7 @@
|
|||
</a>
|
||||
</li>
|
||||
<li *ngIf="i < chartIndicatorPaths.length - 1">
|
||||
<a (click)="hide(element);moveIndicatorPath(chartIndicatorFb, chartIndicatorPaths, i, i + 1)">
|
||||
<a (click)="hide(element);moveIndicatorPath(chartIndicatorFb, 'chart', i, i + 1)">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" name="east" ratio="0.6"></icon>
|
||||
<span class="uk-margin-small-left uk-width-expand">Move Right</span>
|
||||
|
|
|
@ -102,7 +102,8 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
@ViewChild('editChartNotify', {static: true}) editChartNotify: NotifyFormComponent;
|
||||
@ViewChild('deleteNotify', {static: true}) deleteNotify: NotifyFormComponent;
|
||||
/* Transition Groups */
|
||||
@ViewChild('transitionGroup') transitionGroup: TransitionGroupComponent;
|
||||
@ViewChild('numbersTransition') numbersTransition: TransitionGroupComponent;
|
||||
@ViewChild('chartsTransition') chartsTransition: TransitionGroupComponent;
|
||||
|
||||
public isFullscreen: boolean = false;
|
||||
|
||||
|
@ -590,7 +591,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
public removeNumberIndicatorPath(index: number) {
|
||||
this.numberIndicatorPaths.removeAt(index);
|
||||
this.indicator.indicatorPaths.splice(index, 1);
|
||||
this.transitionGroup.init();
|
||||
this.numbersTransition.init();
|
||||
if (this.indicator.activePath === index) {
|
||||
this.activeNumberIndicatorPath(Math.max(0, index - 1));
|
||||
} else if (this.indicator.activePath > index) {
|
||||
|
@ -602,7 +603,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
public removeChartIndicatorPath(index: number) {
|
||||
this.chartIndicatorPaths.removeAt(index);
|
||||
this.indicator.indicatorPaths.splice(index, 1);
|
||||
this.transitionGroup.init();
|
||||
this.chartsTransition.init();
|
||||
if (this.indicator.activePath === index) {
|
||||
this.activeChartIndicatorPath(Math.max(0, index - 1));
|
||||
} else if (this.indicator.activePath > index) {
|
||||
|
@ -612,9 +613,14 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
}
|
||||
|
||||
public moveIndicatorPath(form: FormGroup,
|
||||
indicatorPaths: FormArray, index: number,
|
||||
type: 'number' | 'chart', index: number,
|
||||
newIndex: number = index - 1) {
|
||||
this.transitionGroup.init();
|
||||
let indicatorPaths = type == 'number'?this.numberIndicatorPaths:this.chartIndicatorPaths;
|
||||
if(type == 'number') {
|
||||
this.numbersTransition.init();
|
||||
} else {
|
||||
this.chartsTransition.init();
|
||||
}
|
||||
let a = indicatorPaths.at(index);
|
||||
let b = indicatorPaths.at(newIndex);
|
||||
indicatorPaths.setControl(index, b);
|
||||
|
@ -632,7 +638,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
let paths = this.numberIndicatorPaths;
|
||||
if (index == paths.length) {
|
||||
this.addNumberIndicatorPath();
|
||||
this.transitionGroup.init();
|
||||
this.numbersTransition.init();
|
||||
}
|
||||
this.indicator.activePath = index;
|
||||
}
|
||||
|
@ -641,7 +647,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
let paths = this.chartIndicatorPaths;
|
||||
if (index == paths.length) {
|
||||
this.addChartIndicatorPath();
|
||||
this.transitionGroup.init();
|
||||
this.chartsTransition.init();
|
||||
}
|
||||
this.indicator.activePath = index;
|
||||
}
|
||||
|
|
|
@ -30,12 +30,12 @@
|
|||
(click)="$event.stopPropagation();$event.preventDefault()">
|
||||
<icon *ngIf="!isEditable && showVisibility" [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(topic.visibility)"
|
||||
ratio="0.6"></icon>
|
||||
<a *ngIf="isEditable && (isCurator || showVisibillity)" class="uk-link-reset uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(topic.visibility)"
|
||||
<a *ngIf="isEditable && (isCurator || showVisibility)" class="uk-link-reset uk-flex uk-flex-middle">
|
||||
<icon *ngIf="showVisibility" [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(topic.visibility)"
|
||||
ratio="0.6"></icon>
|
||||
<icon [flex]="true" name="more_vert"></icon>
|
||||
</a>
|
||||
<div #element *ngIf="isEditable && (isCurator || showVisibillity)"
|
||||
<div #element *ngIf="isEditable && (isCurator || showVisibility)"
|
||||
uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0; flip: false; container: body">
|
||||
<ul class="uk-nav uk-dropdown-nav">
|
||||
<ng-container *ngIf="isCurator">
|
||||
|
@ -112,7 +112,7 @@
|
|||
<icon *ngIf="!isEditable && showVisibility" [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(category.visibility)"
|
||||
ratio="0.6"></icon>
|
||||
<a *ngIf="isEditable && (isCurator || showVisibility)" class="uk-link-reset uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(category.visibility)"
|
||||
<icon *ngIf="showVisibility" [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(category.visibility)"
|
||||
ratio="0.6"></icon>
|
||||
<icon [flex]="true" name="more_vert"></icon>
|
||||
</a>
|
||||
|
@ -243,7 +243,7 @@
|
|||
<icon *ngIf="!isEditable && showVisibility" [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(subCategory.visibility)"
|
||||
ratio="0.6"></icon>
|
||||
<a *ngIf="isEditable && (isCurator || showVisibility)" class="uk-link-reset uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(subCategory.visibility)"
|
||||
<icon *ngIf="showVisibility" [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(subCategory.visibility)"
|
||||
ratio="0.6"></icon>
|
||||
<icon [flex]="true" name="more_vert"></icon>
|
||||
</a>
|
||||
|
|
|
@ -230,7 +230,8 @@ export class SearchProjectsService {
|
|||
for(let z=0; z<fundingLength; z++) {
|
||||
let fundingData = Array.isArray(resData['fundingtree']) ? resData['fundingtree'][z] : resData['fundingtree'];
|
||||
if(fundingData.hasOwnProperty("funder")) {
|
||||
result['funderShortname'] = fundingData['funder'].shortname ? fundingData['funder'].shortname : fundingData['funder'].name;
|
||||
result['funderShortname'] = fundingData['funder'].shortname;
|
||||
result['funderName'] = fundingData['funder'].name;
|
||||
result['funderId'] = fundingData['funder'].id;
|
||||
result['jurisdiction'] = (fundingData['funder']['id']['jurisdiction'] )?fundingData['funder']['id']['jurisdiction']:"";
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ export class SearchResult {
|
|||
acronym: string;
|
||||
code: string;
|
||||
// callIdentifier?: string; // currently not parsed
|
||||
funderName: string;
|
||||
funderShortname: string;
|
||||
budget?: string;
|
||||
contribution?: string;
|
||||
|
|
|
@ -95,12 +95,12 @@
|
|||
<!-- 2nd section (funders, budget, authors, PIDs, publisher etc.) -->
|
||||
<div class="uk-text-small uk-margin-small-bottom">
|
||||
<!-- Funder -->
|
||||
<div *ngIf="result.funderShortname || result.code" class="uk-margin-xsmall-bottom">
|
||||
<span *ngIf="result.funderShortname">
|
||||
<div *ngIf="(result.funderShortname || result.funderName) || result.code" class="uk-margin-xsmall-bottom">
|
||||
<span *ngIf="result.funderShortname || result.funderName">
|
||||
<span class="uk-text-meta">Funder: </span>
|
||||
{{result.funderShortname}}
|
||||
{{result.funderName ? result.funderName : result.funderShortname}}
|
||||
</span>
|
||||
<span *ngIf="result.code" [class.uk-margin-left]="result.funderShortname">
|
||||
<span *ngIf="result.code" [class.uk-margin-left]="result.funderShortname || result.funderName">
|
||||
<span class="uk-text-meta">{{openaireEntities.PROJECT}} Code: </span>
|
||||
{{result.code}}
|
||||
</span>
|
||||
|
|
|
@ -123,6 +123,7 @@ export class ResultPreview {
|
|||
acronym: string;
|
||||
code: string;
|
||||
// callIdentifier: string; // currently not parsed
|
||||
funderName: string;
|
||||
funderShortname: string;
|
||||
budget: string;
|
||||
contribution: string;
|
||||
|
@ -188,6 +189,7 @@ export class ResultPreview {
|
|||
resultPreview.acronym = result.acronym;
|
||||
resultPreview.code = result.code;
|
||||
// resultPreview.callIdentifier = result.callIdentifier; // currently not parsed
|
||||
resultPreview.funderName = result.funderName;
|
||||
resultPreview.funderShortname = result.funderShortname;
|
||||
resultPreview.budget = result.budget;
|
||||
resultPreview.contribution = result.contribution;
|
||||
|
|
Loading…
Reference in New Issue