diff --git a/landingPages/landing-utils/entity-metadata.component.ts b/landingPages/landing-utils/entity-metadata.component.ts index 4060446c..d27eb26e 100644 --- a/landingPages/landing-utils/entity-metadata.component.ts +++ b/landingPages/landing-utils/entity-metadata.component.ts @@ -89,7 +89,7 @@ import {RouterHelper} from "../../utils/routerHelper.class"; - {{status}} + {{status}} (M{{calcCurrentMonth}}) {{date | date: 'dd MMM yyyy': 'UTC'}} @@ -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; + } } \ No newline at end of file diff --git a/landingPages/landing-utils/landing.module.ts b/landingPages/landing-utils/landing.module.ts index 3eedae91..d97b32a0 100644 --- a/landingPages/landing-utils/landing.module.ts +++ b/landingPages/landing-utils/landing.module.ts @@ -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 { } diff --git a/landingPages/landing-utils/tabPaging.component.ts b/landingPages/landing-utils/tabPaging.component.ts deleted file mode 100644 index 1eb6bd08..00000000 --- a/landingPages/landing-utils/tabPaging.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import {Component, Input, Output, EventEmitter} from '@angular/core'; - -@Component({ - selector: 'tabPaging', - template: ` -
- -
view all {{length | number}}
-
-
- ` - }) - -export class TabPagingComponent { - @Input() showAll: boolean; - @Input() length: number; - @Output() changeShowAll: EventEmitter = new EventEmitter(); - - constructor () { - } - - ngOnInit() { - } -} diff --git a/landingPages/organization/deletedByInference/deletedByInference.module.ts b/landingPages/organization/deletedByInference/deletedByInference.module.ts index c327c902..eb09712b 100644 --- a/landingPages/organization/deletedByInference/deletedByInference.module.ts +++ b/landingPages/organization/deletedByInference/deletedByInference.module.ts @@ -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 diff --git a/landingPages/result/resultLanding.module.ts b/landingPages/result/resultLanding.module.ts index 2d7dfc11..d1792e55 100644 --- a/landingPages/result/resultLanding.module.ts +++ b/landingPages/result/resultLanding.module.ts @@ -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: [