Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop
This commit is contained in:
commit
9e9332f1a3
|
@ -89,7 +89,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</span>
|
</span>
|
||||||
<ng-container *ngIf="status">
|
<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>
|
||||||
<ng-container *ngIf="date">
|
<ng-container *ngIf="date">
|
||||||
<span>{{date | date: 'dd MMM yyyy': 'UTC'}}</span>
|
<span>{{date | date: 'dd MMM yyyy': 'UTC'}}</span>
|
||||||
|
@ -364,4 +364,18 @@ export class EntityMetadataComponent {
|
||||||
this.projectsModal.open();
|
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 { FormsModule } from '@angular/forms';
|
||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
|
|
||||||
import {TabPagingComponent} from './tabPaging.component';
|
|
||||||
import {ShowTitleComponent} from './showTitle.component';
|
import {ShowTitleComponent} from './showTitle.component';
|
||||||
import {AddThisComponent} from './addThis.component';
|
import {AddThisComponent} from './addThis.component';
|
||||||
|
|
||||||
|
@ -14,11 +13,11 @@ import {AddThisComponent} from './addThis.component';
|
||||||
CommonModule, FormsModule, RouterModule
|
CommonModule, FormsModule, RouterModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
TabPagingComponent, ShowTitleComponent, AddThisComponent
|
ShowTitleComponent, AddThisComponent
|
||||||
],
|
],
|
||||||
providers:[],
|
providers:[],
|
||||||
exports: [
|
exports: [
|
||||||
TabPagingComponent, ShowTitleComponent, AddThisComponent
|
ShowTitleComponent, AddThisComponent
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class LandingModule { }
|
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({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule, FormsModule, ResultLandingUtilsModule,
|
CommonModule, FormsModule, ResultLandingUtilsModule,
|
||||||
PagingModule, ErrorMessagesModule, ShowAuthorsModule, LandingModule, NoLoadPaging, ResultPreviewModule
|
PagingModule, ErrorMessagesModule, ShowAuthorsModule, NoLoadPaging, ResultPreviewModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
OrganizationsDeletedByInferenceComponent
|
OrganizationsDeletedByInferenceComponent
|
||||||
|
|
|
@ -38,6 +38,7 @@ import {SafeHtmlPipeModule} from '../../utils/pipes/safeHTMLPipe.module';
|
||||||
import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.module";
|
import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.module";
|
||||||
import {ResultLandingRoutingModule} from "./resultLanding-routing.module";
|
import {ResultLandingRoutingModule} from "./resultLanding-routing.module";
|
||||||
import {OrcidCoreModule} from "../../orcid/orcid-core.module";
|
import {OrcidCoreModule} from "../../orcid/orcid-core.module";
|
||||||
|
import {SearchTabModule} from "../../utils/tabs/contents/search-tab.module";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
|
Loading…
Reference in New Issue