[Trunk | Library]:
1. tabs.component.ts: If tabs are more than 2, add class (in all html) 'uk-visible@m' - <small-tabs> will be displayed instead. 2. small-tabs.component.ts: Show small tabs if they are more than 2 and add class 'uk-hidden@m'. 3. resultLanding.component & project.component & organization.component & dataProvider.component: a. Show tabs without waiting for initialization - do not calculate number of tabs. b. Show summary tab always - if no primary or secondary information, show alert message. c. Remove checks and 'uk-visible@m', 'uk-hidden@m' from calling <my-tabs> and <my-small-tabs> - chekcs are now inside components. d. Add 'uk-active' in first tab (no need to calculate which tab is first). e. resultLanding.component & project.component & dataProvider.component: Summary tab always visible - if no primary or secondary information, show alert message. f. organizations.component: projects tab always visible. g. resultLanding.component & project.component: Add margins in linking button. 4. organization.component: a. [Bug fix] Execute search queries only once for each tab. b. [Bug fix] In datasets and other tab, show appropriate view (not projects tab). c. [Bug fix] On initialization, get projects results (not just count). git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58807 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
a6a1ce1fcd
commit
ad44991cd1
|
@ -467,10 +467,12 @@
|
|||
</div>
|
||||
<div *ngIf="dataProviderInfo != null">
|
||||
|
||||
<div *ngIf="numberOfTabs > 0; else loadingBlock" class="main-tabs-div">
|
||||
<!-- *ngIf="numberOfTabs > 0; else loadingBlock"-->
|
||||
<div class="main-tabs-div">
|
||||
<ng-template #summary_tab>
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div *ngIf="hasPrimaryInfo" class="uk-width-expand uk-padding uk-inline">
|
||||
<div *ngIf="hasPrimaryInfo || (!aggregationStatusIsInitialized || hasAggregationStatusInfo)"
|
||||
class="uk-width-expand uk-padding uk-inline">
|
||||
<!-- Description -->
|
||||
<div *ngIf="dataProviderInfo.description" class="uk-margin-medium-bottom">
|
||||
<div class="uk-text-muted">Description</div>
|
||||
|
@ -515,6 +517,10 @@
|
|||
{{dataProviderInfo.aggregationStatus.lastUpdateDate | date}}
|
||||
</span>
|
||||
</div>
|
||||
<div *ngIf="!aggregationStatusIsInitialized"
|
||||
class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">
|
||||
<span class="loading-gif uk-align-center"></span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="dataProviderInfo.countries != undefined && dataProviderInfo.countries.length > 0"
|
||||
class="uk-margin-medium-bottom">
|
||||
|
@ -606,7 +612,11 @@
|
|||
<a (click)="showNumOrganizations = thresholdOrganizations;">View less organizations</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div *ngIf="!hasPrimaryInfo && (aggregationStatusIsInitialized && !hasAggregationStatusInfo) && !hasSecondaryInfo" class="uk-width-expand uk-padding">
|
||||
<div class="uk-animation-fade uk-alert uk-alert-primary" role="alert">
|
||||
No summary information available
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
@ -711,109 +721,133 @@
|
|||
</div>
|
||||
</ng-template>
|
||||
|
||||
<my-tabs [class]="numberOfTabs > 2 ? 'uk-visible@m' : ''" (selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<my-tab *ngIf="hasPrimaryInfo || hasSecondaryInfo"
|
||||
[tabTitle]="'Summary'" [tabId]="'summary'" [class]="(firstTab === 'summary')?'uk-active':''">
|
||||
<!-- [class]="numberOfTabs > 2 ? 'uk-visible@m' : ''"-->
|
||||
<my-tabs (selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
||||
<!-- [class]="(firstTab === 'summary')?'uk-active':''"-->
|
||||
<my-tab
|
||||
[tabTitle]="'Summary'" [tabId]="'summary'" class="uk-active">
|
||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'projects')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchProjects.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Projects'" [tabNumber]="fetchProjects.searchUtils.totalResults"
|
||||
[tabId]="'projects'" [class]="(firstTab === 'projects')?'uk-active':''">
|
||||
[tabId]="'projects'" >
|
||||
<ng-container *ngTemplateOutlet="projects_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'datasources')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchDataproviders.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Content Providers'" [tabNumber]="fetchDataproviders.searchUtils.totalResults"
|
||||
[tabId]="'datasources'" [class]="(firstTab === 'datasources')?'uk-active':''">
|
||||
[tabId]="'datasources'" >
|
||||
<ng-container *ngTemplateOutlet="datasources_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'relatedDatasources')?'uk-active':''"-->
|
||||
<my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||
[tabTitle]="'Related Content Providers'" [tabId]="'relatedDatasources'"
|
||||
[class]="(firstTab === 'relatedDatasources')?'uk-active':''">
|
||||
>
|
||||
<ng-container *ngTemplateOutlet="relatedDatasources_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'publications')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchPublications.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"
|
||||
[tabId]="'publications'" [class]="(firstTab === 'publications')?'uk-active':''">
|
||||
[tabId]="'publications'" >
|
||||
<ng-container *ngTemplateOutlet="publications_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'datasets')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchDatasets.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"
|
||||
[tabId]="'datasets'" [class]="(firstTab === 'datasets')?'uk-active':''">
|
||||
[tabId]="'datasets'" >
|
||||
<ng-container *ngTemplateOutlet="datasets_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'software')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchSoftware.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Software'" [tabNumber]="fetchSoftware.searchUtils.totalResults"
|
||||
[tabId]="'software'" [class]="(firstTab === 'software')?'uk-active':''">
|
||||
[tabId]="'software'">
|
||||
<ng-container *ngTemplateOutlet="software_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'other')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchOrps.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"
|
||||
[tabId]="'other'" [class]="(firstTab === 'other')?'uk-active':''">
|
||||
[tabId]="'other'">
|
||||
<ng-container *ngTemplateOutlet="other_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'statistics')?'uk-active':''"-->
|
||||
<my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||
[tabTitle]="'Statistics'" [statistics]="true" [tabId]="'statistics'"
|
||||
[class]="(firstTab === 'statistics')?'uk-active':''">
|
||||
>
|
||||
<ng-container *ngTemplateOutlet="statistics_tab;"></ng-container>
|
||||
</my-tab>
|
||||
</my-tabs>
|
||||
|
||||
<my-small-tabs *ngIf="numberOfTabs > 2" class="uk-hidden@m" (selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<my-tab *ngIf="hasPrimaryInfo || hasSecondaryInfo"
|
||||
[tabTitle]="'Summary'" [tabId]="'summary'" [class]="(firstTab === 'summary')?'uk-active':''">
|
||||
<!-- <div *ngIf="numberOfTabs() > 2">TEST!!!</div>-->
|
||||
|
||||
<!-- *ngIf="numberOfTabs > 2"-->
|
||||
<my-small-tabs (selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
||||
<!-- [class]="(firstTab === 'summary')?'uk-active':''"-->
|
||||
<my-tab
|
||||
[tabTitle]="'Summary'" [tabId]="'summary'" class="uk-active">
|
||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'projects')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchProjects.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Projects'" [tabNumber]="fetchProjects.searchUtils.totalResults"
|
||||
[tabId]="'projects'" [class]="(firstTab === 'projects')?'uk-active':''">
|
||||
[tabId]="'projects'" >
|
||||
<ng-container *ngTemplateOutlet="projects_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'datasources')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchDataproviders.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Content Providers'" [tabNumber]="fetchDataproviders.searchUtils.totalResults"
|
||||
[tabId]="'datasources'" [class]="(firstTab === 'datasources')?'uk-active':''">
|
||||
[tabId]="'datasources'" >
|
||||
<ng-container *ngTemplateOutlet="datasources_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'relatedDatasources')?'uk-active':''"-->
|
||||
<my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||
[tabTitle]="'Related Content Providers'" [tabId]="'relatedDatasources'"
|
||||
[class]="(firstTab === 'relatedDatasources')?'uk-active':''">
|
||||
>
|
||||
<ng-container *ngTemplateOutlet="relatedDatasources_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'publications')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchPublications.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"
|
||||
[tabId]="'publications'" [class]="(firstTab === 'publications')?'uk-active':''">
|
||||
[tabId]="'publications'" >
|
||||
<ng-container *ngTemplateOutlet="publications_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'datasets')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchDatasets.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"
|
||||
[tabId]="'datasets'" [class]="(firstTab === 'datasets')?'uk-active':''">
|
||||
[tabId]="'datasets'" >
|
||||
<ng-container *ngTemplateOutlet="datasets_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'software')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchSoftware.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Software'" [tabNumber]="fetchSoftware.searchUtils.totalResults"
|
||||
[tabId]="'software'" [class]="(firstTab === 'software')?'uk-active':''">
|
||||
[tabId]="'software'">
|
||||
<ng-container *ngTemplateOutlet="software_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'other')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchOrps.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"
|
||||
[tabId]="'other'" [class]="(firstTab === 'other')?'uk-active':''">
|
||||
[tabId]="'other'">
|
||||
<ng-container *ngTemplateOutlet="other_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'statistics')?'uk-active':''"-->
|
||||
<my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||
[tabTitle]="'Statistics'" [statistics]="true" [tabId]="'statistics'"
|
||||
[class]="(firstTab === 'statistics')?'uk-active':''">
|
||||
>
|
||||
<ng-container *ngTemplateOutlet="statistics_tab;"></ng-container>
|
||||
</my-tab>
|
||||
</my-small-tabs>
|
||||
</div>
|
||||
<ng-template #loadingBlock>
|
||||
<div *ngIf="!tabsAreInitialized" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">
|
||||
<span class="loading-gif uk-align-center" ></span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<!-- <ng-template #loadingBlock>-->
|
||||
<!-- <div *ngIf="!tabsAreInitialized" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">-->
|
||||
<!-- <span class="loading-gif uk-align-center" ></span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </ng-template>-->
|
||||
|
||||
<div class="uk-margin-small-top uk-flex">
|
||||
<!-- Last Index Info-->
|
||||
|
|
|
@ -658,6 +658,10 @@ export class DataProviderComponent {
|
|||
this.relatedDatasourcesModal.open();
|
||||
}
|
||||
|
||||
public scroll() {
|
||||
HelperFunctions.scroll();
|
||||
}
|
||||
|
||||
public removeUnknown(array: string[]): string[] {
|
||||
return array.filter(value => value.toLowerCase() !== 'unknown');
|
||||
}
|
||||
|
@ -738,7 +742,7 @@ export class DataProviderComponent {
|
|||
return !!this.dataProviderInfo && (
|
||||
!!this.dataProviderInfo.description ||
|
||||
this.hasJournalInfo ||
|
||||
this.hasAggregationStatusInfo ||
|
||||
//this.hasAggregationStatusInfo ||
|
||||
!!this.dataProviderInfo.countries ||
|
||||
(!!this.dataProviderInfo.subjects && this.dataProviderInfo.subjects.length > 0));
|
||||
}
|
||||
|
@ -750,62 +754,73 @@ export class DataProviderComponent {
|
|||
);
|
||||
}
|
||||
|
||||
public get numberOfTabs(): number {
|
||||
if(this.tabsAreInitialized) {
|
||||
return this._numberOfTabs;
|
||||
}
|
||||
|
||||
if(!this.dataProviderInfo || !this.aggregationStatusIsInitialized
|
||||
|| this.fetchProjects.searchUtils.status == this.errorCodes.LOADING
|
||||
|| this.fetchDataproviders.searchUtils.status == this.errorCodes.LOADING
|
||||
|| this.fetchPublications.searchUtils.status == this.errorCodes.LOADING
|
||||
|| this.fetchDatasets.searchUtils.status == this.errorCodes.LOADING
|
||||
|| this.fetchSoftware.searchUtils.status == this.errorCodes.LOADING
|
||||
|| this.fetchOrps.searchUtils.status == this.errorCodes.LOADING) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (this.hasPrimaryInfo || this.hasSecondaryInfo) {
|
||||
this.firstTab = "summary";
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
if(this.fetchProjects.searchUtils.totalResults > 0) {
|
||||
if( this._numberOfTabs == 0) {
|
||||
this.firstTab = "projects";
|
||||
this.searchProjects(1, this.searchNumber);
|
||||
}
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
if(this.fetchDataproviders.searchUtils.totalResults > 0) {
|
||||
if( this._numberOfTabs == 0) {
|
||||
this.firstTab = "datasources";
|
||||
this.searchDatasources(1, this.searchNumber);
|
||||
}
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
if(this.fetchPublications.searchUtils.totalResults > 0 || this.fetchDatasets.searchUtils.totalResults > 0
|
||||
|| this.fetchSoftware.searchUtils.totalResults > 0 || this.fetchOrps.searchUtils.totalResults > 0) {
|
||||
if( this._numberOfTabs == 0) {
|
||||
this.firstTab = "relatedDatasources";
|
||||
this.searchRelatedDatasources(1, this.searchNumber);
|
||||
}
|
||||
this._numberOfTabs += 2;
|
||||
|
||||
if(this.fetchPublications.searchUtils.totalResults > 0) {
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
if(this.fetchDatasets.searchUtils.totalResults > 0) {
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
if(this.fetchSoftware.searchUtils.totalResults > 0) {
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
if(this.fetchOrps.searchUtils.totalResults > 0) {
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
}
|
||||
this.activeTab = this.firstTab;
|
||||
this.tabsAreInitialized = true;
|
||||
return this._numberOfTabs;
|
||||
}
|
||||
// public numberOfTabs(): number {
|
||||
// if(this.tabsAreInitialized) {
|
||||
// return this._numberOfTabs;
|
||||
// }
|
||||
//
|
||||
// // if(!this.dataProviderInfo || !this.aggregationStatusIsInitialized
|
||||
// // || this.fetchProjects.searchUtils.status == this.errorCodes.LOADING
|
||||
// // || this.fetchDataproviders.searchUtils.status == this.errorCodes.LOADING
|
||||
// // || this.fetchPublications.searchUtils.status == this.errorCodes.LOADING
|
||||
// // || this.fetchDatasets.searchUtils.status == this.errorCodes.LOADING
|
||||
// // || this.fetchSoftware.searchUtils.status == this.errorCodes.LOADING
|
||||
// // || this.fetchOrps.searchUtils.status == this.errorCodes.LOADING) {
|
||||
// // return 0;
|
||||
// // }
|
||||
//
|
||||
// if(this.dataProviderInfo
|
||||
// && this.fetchProjects.searchUtils.status != this.errorCodes.LOADING
|
||||
// && this.fetchDataproviders.searchUtils.status != this.errorCodes.LOADING
|
||||
// && this.fetchPublications.searchUtils.status != this.errorCodes.LOADING
|
||||
// && this.fetchDatasets.searchUtils.status != this.errorCodes.LOADING
|
||||
// && this.fetchSoftware.searchUtils.status != this.errorCodes.LOADING
|
||||
// && this.fetchOrps.searchUtils.status != this.errorCodes.LOADING) {
|
||||
// this.tabsAreInitialized = true;
|
||||
// }
|
||||
//
|
||||
// this._numberOfTabs = 0;
|
||||
// //if (this.hasPrimaryInfo || this.hasSecondaryInfo) {
|
||||
// this.firstTab = "summary";
|
||||
// this._numberOfTabs++;
|
||||
// //}
|
||||
// if(this.fetchProjects.searchUtils.totalResults > 0) {
|
||||
// /*if( this._numberOfTabs == 0) {
|
||||
// this.firstTab = "projects";
|
||||
// this.searchProjects(1, this.searchNumber);
|
||||
// }*/
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// if(this.fetchDataproviders.searchUtils.totalResults > 0) {
|
||||
// /*if( this._numberOfTabs == 0) {
|
||||
// this.firstTab = "datasources";
|
||||
// this.searchDatasources(1, this.searchNumber);
|
||||
// }*/
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// if(this.fetchPublications.searchUtils.totalResults > 0 || this.fetchDatasets.searchUtils.totalResults > 0
|
||||
// || this.fetchSoftware.searchUtils.totalResults > 0 || this.fetchOrps.searchUtils.totalResults > 0) {
|
||||
// /*if( this._numberOfTabs == 0) {
|
||||
// this.firstTab = "relatedDatasources";
|
||||
// this.searchRelatedDatasources(1, this.searchNumber);
|
||||
// }*/
|
||||
// this._numberOfTabs += 2;
|
||||
//
|
||||
// if(this.fetchPublications.searchUtils.totalResults > 0) {
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// if(this.fetchDatasets.searchUtils.totalResults > 0) {
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// if(this.fetchSoftware.searchUtils.totalResults > 0) {
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// if(this.fetchOrps.searchUtils.totalResults > 0) {
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// }
|
||||
// //this.activeTab = this.firstTab;
|
||||
// //this.tabsAreInitialized = true;
|
||||
// return this._numberOfTabs;
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -99,12 +99,13 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="uk-padding-remove-left uk-width-1-1 uk-margin-large-top">
|
||||
<ng-template #loadingBlock>
|
||||
<div *ngIf="!tabsAreInitialized" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">
|
||||
<span class="loading-gif uk-align-center"></span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<div *ngIf="numberOfTabs > 0; else loadingBlock" class="main-tabs-div">
|
||||
<!-- <ng-template #loadingBlock>-->
|
||||
<!-- <div *ngIf="!tabsAreInitialized" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">-->
|
||||
<!-- <span class="loading-gif uk-align-center"></span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </ng-template>-->
|
||||
<!-- *ngIf="numberOfTabs > 0; else loadingBlock"-->
|
||||
<div class="main-tabs-div">
|
||||
<!--Tab Templates-->
|
||||
<ng-template #projects_tab>
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
|
@ -185,81 +186,95 @@
|
|||
<!--<div class="uk-width-1-3@m uk-width-1-1 right-column uk-padding-remove"></div>-->
|
||||
</div>
|
||||
</ng-template>
|
||||
<my-tabs [class]="numberOfTabs > 2 ? 'uk-visible@m' : ''" (selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<my-tab *ngIf="fetchProjects && fetchProjects.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchProjects.searchUtils.totalResults"
|
||||
[tabTitle]="'Funding / Projects'"
|
||||
[tabId]="'projects'" [class]="(firstTab === 'projects')?'uk-active':''">
|
||||
<!-- [class]="numberOfTabs > 2 ? 'uk-visible@m' : ''"-->
|
||||
<my-tabs (selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<my-tab
|
||||
[tabNumber]="fetchProjects.searchUtils.totalResults"
|
||||
[tabTitle]="'Funding / Projects'"
|
||||
[tabId]="'projects'" class="uk-active">
|
||||
<ng-container *ngTemplateOutlet="projects_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'dataProviders')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchDataproviders && fetchDataproviders.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchDataproviders.searchUtils.totalResults"
|
||||
[tabTitle]="'Content Providers'"
|
||||
[tabId]="'dataProviders'" [class]="(firstTab === 'dataProviders')?'uk-active':''">
|
||||
[tabId]="'dataProviders'">
|
||||
<ng-container *ngTemplateOutlet="data_providers_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'publications')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchPublications && fetchPublications.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchPublications.searchUtils.totalResults"
|
||||
[tabTitle]="'Publications'"
|
||||
[tabId]="'publications'" [class]="(firstTab === 'publications')?'uk-active':''">
|
||||
[tabId]="'publications'">
|
||||
<ng-container *ngTemplateOutlet="publications_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'datasets')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchDatasets && fetchDatasets.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchDatasets.searchUtils.totalResults"
|
||||
[tabTitle]="'Research Data'"
|
||||
[tabId]="'datasets'" [class]="(firstTab === 'datasets')?'uk-active':''">
|
||||
[tabId]="'datasets'">
|
||||
<ng-container *ngTemplateOutlet="datasets_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'software')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchSoftware && fetchSoftware.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchSoftware.searchUtils.totalResults"
|
||||
[tabTitle]="'Software'"
|
||||
[tabId]="'software'" [class]="(firstTab === 'software')?'uk-active':''">
|
||||
[tabId]="'software'">
|
||||
<ng-container *ngTemplateOutlet="software_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'other')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchOrps && fetchOrps.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchOrps.searchUtils.totalResults"
|
||||
[tabTitle]="'Other Research'"
|
||||
[tabId]="'other'" [class]="(firstTab === 'other')?'uk-active':''">
|
||||
[tabId]="'other'">
|
||||
<ng-container *ngTemplateOutlet="other_tab;"></ng-container>
|
||||
</my-tab>
|
||||
</my-tabs>
|
||||
<my-small-tabs *ngIf="numberOfTabs > 2" class="uk-hidden@m"
|
||||
<!-- *ngIf="numberOfTabs > 2" class="uk-hidden@m"-->
|
||||
<my-small-tabs
|
||||
(selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<my-tab *ngIf="fetchProjects && fetchProjects.searchUtils.totalResults > 0"
|
||||
<!-- *ngIf="fetchProjects && fetchProjects.searchUtils.totalResults > 0"-->
|
||||
<!-- [class]="(firstTab === 'projects')?'uk-active':''"-->
|
||||
<my-tab
|
||||
[tabNumber]="fetchProjects.searchUtils.totalResults"
|
||||
[tabTitle]="'Funding / Projects'"
|
||||
[tabId]="'projects'" [class]="(firstTab === 'projects')?'uk-active':''">
|
||||
[tabId]="'projects'" class="uk-active">
|
||||
<ng-container *ngTemplateOutlet="projects_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'dataProviders')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchDataproviders && fetchDataproviders.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchDataproviders.searchUtils.totalResults"
|
||||
[tabTitle]="'Content Providers'"
|
||||
[tabId]="'dataProviders'" [class]="(firstTab === 'dataProviders')?'uk-active':''">
|
||||
[tabId]="'dataProviders'">
|
||||
<ng-container *ngTemplateOutlet="data_providers_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'publications')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchPublications && fetchPublications.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchPublications.searchUtils.totalResults"
|
||||
[tabTitle]="'Publications'"
|
||||
[tabId]="'publications'" [class]="(firstTab === 'publications')?'uk-active':''">
|
||||
[tabId]="'publications'">
|
||||
<ng-container *ngTemplateOutlet="publications_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'datasets')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchDatasets && fetchDatasets.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchDatasets.searchUtils.totalResults"
|
||||
[tabTitle]="'Research Data'"
|
||||
[tabId]="'datasets'" [class]="(firstTab === 'datasets')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="projects_tab;"></ng-container>
|
||||
[tabId]="'datasets'">
|
||||
<ng-container *ngTemplateOutlet="datasets_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'software')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchSoftware && fetchSoftware.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchSoftware.searchUtils.totalResults"
|
||||
[tabTitle]="'Software'"
|
||||
[tabId]="'software'" [class]="(firstTab === 'software')?'uk-active':''">
|
||||
[tabId]="'software'">
|
||||
<ng-container *ngTemplateOutlet="software_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'other')?'uk-active':''"-->
|
||||
<my-tab *ngIf="fetchOrps && fetchOrps.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchOrps.searchUtils.totalResults"
|
||||
[tabTitle]="'Other Research'"
|
||||
[tabId]="'other'" [class]="(firstTab === 'other')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="projects_tab;"></ng-container>
|
||||
[tabId]="'other'">
|
||||
<ng-container *ngTemplateOutlet="other_tab;"></ng-container>
|
||||
</my-tab>
|
||||
</my-small-tabs>
|
||||
</div>
|
||||
|
|
|
@ -51,7 +51,14 @@ export class OrganizationComponent {
|
|||
public fetchOrps: FetchResearchResults;
|
||||
public fetchDataproviders: FetchDataproviders
|
||||
public searchNumber: number = 5;
|
||||
|
||||
|
||||
// Request results of each tab only the one time (first time tab is clicked)
|
||||
private reloadPublications: boolean = true;
|
||||
private reloadDatasets: boolean = true;
|
||||
private reloadSoftware: boolean = true;
|
||||
private reloadOrps: boolean = true;
|
||||
private reloadDataproviders: boolean = true;
|
||||
|
||||
// Active tab variable for responsiveness
|
||||
public activeTab: string = "";
|
||||
|
||||
|
@ -225,24 +232,64 @@ export class OrganizationComponent {
|
|||
this.fetchDataproviders.getNumForEntity('organization', this.organizationId, this.properties);
|
||||
}
|
||||
|
||||
private searchContentProviders() {
|
||||
this.fetchDataproviders.getResultsForEntity("organization", this.organizationId, 1, this.searchNumber, this.properties);
|
||||
// private searchContentProviders() {
|
||||
// this.fetchDataproviders.getResultsForEntity("organization", this.organizationId, 1, this.searchNumber, this.properties);
|
||||
// }
|
||||
private searchContentProviders(page: number, size: number) {
|
||||
if (this.reloadDataproviders &&
|
||||
(this.fetchDataproviders.searchUtils.status == this.errorCodes.LOADING ||
|
||||
this.fetchDataproviders.searchUtils.status == this.errorCodes.DONE)) {
|
||||
this.fetchDataproviders.getResultsForEntity("organization", this.organizationId, page, size, this.properties);
|
||||
}
|
||||
this.reloadDataproviders = false;
|
||||
}
|
||||
|
||||
private searchPublications() {
|
||||
this.fetchPublications.getResultsForEntity("publication", "organization", this.organizationId, 1, this.searchNumber, this.properties);
|
||||
// private searchPublications() {
|
||||
// this.fetchPublications.getResultsForEntity("publication", "organization", this.organizationId, 1, size, this.properties);
|
||||
// }
|
||||
private searchPublications(page: number, size: number) {
|
||||
if (this.reloadPublications &&
|
||||
(this.fetchPublications.searchUtils.status == this.errorCodes.LOADING ||
|
||||
this.fetchPublications.searchUtils.status == this.errorCodes.DONE)) {
|
||||
this.fetchPublications.getResultsForEntity("publication", "organization", this.organizationId, page, size, this.properties);
|
||||
}
|
||||
this.reloadPublications = false;
|
||||
}
|
||||
|
||||
private searchDatasets() {
|
||||
this.fetchDatasets.getResultsForEntity("dataset", "organization", this.organizationId, 1, this.searchNumber, this.properties);
|
||||
// private searchDatasets() {
|
||||
// this.fetchDatasets.getResultsForEntity("dataset", "organization", this.organizationId, 1, this.searchNumber, this.properties);
|
||||
// }
|
||||
private searchDatasets(page: number, size: number) {
|
||||
if (this.reloadDatasets &&
|
||||
(this.fetchDatasets.searchUtils.status == this.errorCodes.LOADING ||
|
||||
this.fetchDatasets.searchUtils.status == this.errorCodes.DONE)) {
|
||||
this.fetchDatasets.getResultsForEntity("dataset", "organization", this.organizationId, page, size, this.properties);
|
||||
}
|
||||
this.reloadDatasets = false;
|
||||
}
|
||||
|
||||
private searchSoftware() {
|
||||
this.fetchSoftware.getResultsForEntity("software", "organization", this.organizationId, 1, this.searchNumber, this.properties);
|
||||
|
||||
// private searchSoftware() {
|
||||
// this.fetchSoftware.getResultsForEntity("software", "organization", this.organizationId, 1, this.searchNumber, this.properties);
|
||||
// }
|
||||
private searchSoftware(page: number, size: number) {
|
||||
if (this.reloadSoftware &&
|
||||
(this.fetchSoftware.searchUtils.status == this.errorCodes.LOADING ||
|
||||
this.fetchSoftware.searchUtils.status == this.errorCodes.DONE)) {
|
||||
this.fetchSoftware.getResultsForEntity("software", "organization", this.organizationId, page, size, this.properties);
|
||||
}
|
||||
this.reloadSoftware = false;
|
||||
}
|
||||
|
||||
private searchOrps() {
|
||||
this.fetchOrps.getResultsForEntity("other", "organization", this.organizationId, 1, this.searchNumber, this.properties);
|
||||
|
||||
// private searchOrps() {
|
||||
// this.fetchOrps.getResultsForEntity("other", "organization", this.organizationId, 1, this.searchNumber, this.properties);
|
||||
// }
|
||||
private searchOrps(page: number, size: number) {
|
||||
if (this.reloadOrps &&
|
||||
(this.fetchOrps.searchUtils.status == this.errorCodes.LOADING ||
|
||||
this.fetchOrps.searchUtils.status == this.errorCodes.DONE)) {
|
||||
this.fetchOrps.getResultsForEntity("other", "organization", this.organizationId, page, size, this.properties);
|
||||
}
|
||||
this.reloadOrps = false;
|
||||
}
|
||||
|
||||
private getOrganizationInfo() {
|
||||
|
@ -275,7 +322,7 @@ export class OrganizationComponent {
|
|||
var refineFields: string [] = ["funder"];
|
||||
this.getTotalResearchResults();
|
||||
this.getTotalDataproviders();
|
||||
this.fetchProjects.getResultsForOrganizations(this.organizationId, "", 1, 0, refineFields, this.properties);
|
||||
this.fetchProjects.getResultsForOrganizations(this.organizationId, "", 1, this.searchNumber, refineFields, this.properties);
|
||||
this.showLoading = false;
|
||||
}
|
||||
},
|
||||
|
@ -564,19 +611,19 @@ export class OrganizationComponent {
|
|||
this.activeTab = 'projects';
|
||||
} else if (activeTabId == 'dataProviders') {
|
||||
this.activeTab = 'dataProviders';
|
||||
this.searchContentProviders();
|
||||
this.searchContentProviders(1, this.searchNumber);
|
||||
} else if (activeTabId == 'publications') {
|
||||
this.activeTab = 'publications';
|
||||
this.searchPublications();
|
||||
this.searchPublications(1, this.searchNumber);
|
||||
} else if (activeTabId == 'datasets') {
|
||||
this.activeTab = 'datasets';
|
||||
this.searchDatasets();
|
||||
this.searchDatasets(1, this.searchNumber);
|
||||
} else if (activeTabId == 'software') {
|
||||
this.activeTab = 'software';
|
||||
this.searchSoftware();
|
||||
this.searchSoftware(1, this.searchNumber);
|
||||
} else if (activeTabId == 'other') {
|
||||
this.activeTab = "other";
|
||||
this.searchOrps();
|
||||
this.searchOrps(1, this.searchNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -589,64 +636,64 @@ export class OrganizationComponent {
|
|||
return total;
|
||||
}
|
||||
|
||||
public get numberOfTabs(): number {
|
||||
if (this.tabsAreInitialized) {
|
||||
return this._numberOfTabs;
|
||||
}
|
||||
if (!this.organizationInfo
|
||||
|| this.fetchProjects.searchUtils.status === this.errorCodes.LOADING
|
||||
|| this.fetchDataproviders.searchUtils.status === this.errorCodes.LOADING
|
||||
|| this.fetchPublications.searchUtils.status == this.errorCodes.LOADING
|
||||
|| this.fetchDatasets.searchUtils.status == this.errorCodes.LOADING
|
||||
|| this.fetchSoftware.searchUtils.status == this.errorCodes.LOADING
|
||||
|| this.fetchOrps.searchUtils.status == this.errorCodes.LOADING) {
|
||||
return 0;
|
||||
}
|
||||
if (this.fetchProjects.searchUtils.totalResults > 0) {
|
||||
if (this._numberOfTabs == 0) {
|
||||
this.firstTab = 'projects';
|
||||
}
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
if (this.fetchDataproviders.searchUtils.totalResults > 0) {
|
||||
if (this._numberOfTabs == 0) {
|
||||
this.firstTab = 'dataProviders';
|
||||
this.searchContentProviders();
|
||||
}
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
if (this.fetchPublications.searchUtils.totalResults > 0) {
|
||||
if (this._numberOfTabs == 0) {
|
||||
this.firstTab = 'publications';
|
||||
this.searchPublications();
|
||||
}
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
if (this.fetchDatasets.searchUtils.totalResults > 0) {
|
||||
if (this._numberOfTabs == 0) {
|
||||
this.firstTab = 'datasets';
|
||||
this.searchDatasets();
|
||||
}
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
if (this.fetchSoftware.searchUtils.totalResults > 0) {
|
||||
if (this._numberOfTabs == 0) {
|
||||
this.firstTab = 'software';
|
||||
this.searchSoftware();
|
||||
}
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
if (this.fetchOrps.searchUtils.totalResults > 0) {
|
||||
if (this._numberOfTabs == 0) {
|
||||
this.firstTab = 'other';
|
||||
this.searchOrps();
|
||||
}
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
this.activeTab = this.firstTab;
|
||||
this.tabsAreInitialized = true;
|
||||
return this._numberOfTabs;
|
||||
}
|
||||
// public get numberOfTabs(): number {
|
||||
// if (this.tabsAreInitialized) {
|
||||
// return this._numberOfTabs;
|
||||
// }
|
||||
// if (!this.organizationInfo
|
||||
// || this.fetchProjects.searchUtils.status === this.errorCodes.LOADING
|
||||
// || this.fetchDataproviders.searchUtils.status === this.errorCodes.LOADING
|
||||
// || this.fetchPublications.searchUtils.status == this.errorCodes.LOADING
|
||||
// || this.fetchDatasets.searchUtils.status == this.errorCodes.LOADING
|
||||
// || this.fetchSoftware.searchUtils.status == this.errorCodes.LOADING
|
||||
// || this.fetchOrps.searchUtils.status == this.errorCodes.LOADING) {
|
||||
// return 0;
|
||||
// }
|
||||
// if (this.fetchProjects.searchUtils.totalResults > 0) {
|
||||
// if (this._numberOfTabs == 0) {
|
||||
// this.firstTab = 'projects';
|
||||
// }
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// if (this.fetchDataproviders.searchUtils.totalResults > 0) {
|
||||
// if (this._numberOfTabs == 0) {
|
||||
// this.firstTab = 'dataProviders';
|
||||
// this.searchContentProviders(1, this.searchNumber);
|
||||
// }
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// if (this.fetchPublications.searchUtils.totalResults > 0) {
|
||||
// if (this._numberOfTabs == 0) {
|
||||
// this.firstTab = 'publications';
|
||||
// this.searchPublications(1, this.searchNumber);
|
||||
// }
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// if (this.fetchDatasets.searchUtils.totalResults > 0) {
|
||||
// if (this._numberOfTabs == 0) {
|
||||
// this.firstTab = 'datasets';
|
||||
// this.searchDatasets(1, this.searchNumber);
|
||||
// }
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// if (this.fetchSoftware.searchUtils.totalResults > 0) {
|
||||
// if (this._numberOfTabs == 0) {
|
||||
// this.firstTab = 'software';
|
||||
// this.searchSoftware(1, this.searchNumber);
|
||||
// }
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// if (this.fetchOrps.searchUtils.totalResults > 0) {
|
||||
// if (this._numberOfTabs == 0) {
|
||||
// this.firstTab = 'other';
|
||||
// this.searchOrps(1, this.searchNumber);
|
||||
// }
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// this.activeTab = this.firstTab;
|
||||
// this.tabsAreInitialized = true;
|
||||
// return this._numberOfTabs;
|
||||
// }
|
||||
|
||||
private getEntityName(entityType: string, plural: boolean, full: boolean): string {
|
||||
if (entityType == "publication") {
|
||||
|
|
|
@ -647,7 +647,7 @@
|
|||
<!-- <button class="uk-modal-close-default uk-float-right" (click)='linkProjectModal.cancel()' uk-close></button>-->
|
||||
<!-- <h4 class="modal-title" id="myModalLabel">{{linkProjectModal.alertTitle}}</h4>-->
|
||||
<!-- </div>-->
|
||||
<div class="uk-padding uk-padding-remove-vertical uk-margin-mdeium-bottom uk-text-center ">
|
||||
<div class="uk-padding uk-padding-remove-vertical uk-margin-medium uk-text-center ">
|
||||
<div>
|
||||
<a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[projectId,
|
||||
'project','result'])"
|
||||
|
@ -659,7 +659,7 @@
|
|||
width="12" x="3.5" y="2.5"></rect><polyline
|
||||
fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg></span>
|
||||
</button>
|
||||
<div>Research outcomes</div>
|
||||
<div class="uk-margin-small-top">Research outcomes</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -824,7 +824,8 @@
|
|||
</div>
|
||||
|
||||
<div *ngIf="projectInfo != null">
|
||||
<div *ngIf="numberOfTabs > 0; else loadingBlock" class="main-tabs-div">
|
||||
<!-- *ngIf="numberOfTabs > 0; else loadingBlock"-->
|
||||
<div class="main-tabs-div">
|
||||
<ng-template #summary_tab>
|
||||
<!-- <my-tab [tabTitle]="'Project Summary'" [tabId]="'summary'" [active]="true">-->
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
|
@ -886,6 +887,15 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="!hasPrimaryInfo && !hasSecondaryInfo"
|
||||
class="uk-width-expand uk-padding">
|
||||
<!-- <div *ngIf="!tabsAreInitialized" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">-->
|
||||
<!-- <span class="loading-gif uk-align-center" ></span>-->
|
||||
<!-- </div>-->
|
||||
<div class="uk-animation-fade uk-alert uk-alert-primary" role="alert">
|
||||
No summary information available
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </my-tab>-->
|
||||
</ng-template>
|
||||
|
@ -1025,79 +1035,103 @@
|
|||
<!-- </my-tab>-->
|
||||
</ng-template>
|
||||
|
||||
<my-tabs [class]="numberOfTabs > 2 ? 'uk-visible@m' : ''" (selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<my-tab *ngIf="hasPrimaryInfo || hasSecondaryInfo"
|
||||
<!-- [class]="numberOfTabs > 2 ? 'uk-visible@m' : ''"-->
|
||||
<my-tabs (selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
||||
<!-- [class]="(firstTab === 'summary')?'uk-active':''">-->
|
||||
<my-tab
|
||||
[tabTitle]="'Project Summary'" [tabId]="'summary'"
|
||||
[class]="(firstTab === 'summary')?'uk-active':''">
|
||||
class="uk-active">
|
||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchPublications.searchUtils.totalResults > 0"
|
||||
<!-- *ngIf="fetchPublications.searchUtils.totalResults > 0"-->
|
||||
<!-- [class]="(firstTab === 'publications')?'uk-active':''"-->
|
||||
<my-tab
|
||||
[tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"
|
||||
[tabId]="'publications'" [class]="(firstTab === 'publications')?'uk-active':''">
|
||||
[tabId]="'publications'">
|
||||
<ng-container *ngTemplateOutlet="publications_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchDatasets.searchUtils.totalResults > 0"
|
||||
<!-- *ngIf="fetchDatasets.searchUtils.totalResults > 0"-->
|
||||
<!-- [class]="(firstTab === 'datasets')?'uk-active':''"-->
|
||||
<my-tab
|
||||
[tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"
|
||||
[tabId]="'datasets'" [class]="(firstTab === 'datasets')?'uk-active':''">
|
||||
[tabId]="'datasets'" >
|
||||
<ng-container *ngTemplateOutlet="datasets_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchSoftware.searchUtils.totalResults > 0"
|
||||
<!-- *ngIf="fetchSoftware.searchUtils.totalResults > 0"-->
|
||||
<!-- [class]="(firstTab === 'software')?'uk-active':''"-->
|
||||
<my-tab
|
||||
[tabTitle]="'Software'" [tabNumber]="fetchSoftware.searchUtils.totalResults"
|
||||
[tabId]="'software'" [class]="(firstTab === 'software')?'uk-active':''">
|
||||
[tabId]="'software'" >
|
||||
<ng-container *ngTemplateOutlet="software_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchOrps.searchUtils.totalResults > 0"
|
||||
<!-- *ngIf="fetchOrps.searchUtils.totalResults > 0"-->
|
||||
<!-- [class]="(firstTab === 'other')?'uk-active':''"-->
|
||||
<my-tab
|
||||
[tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"
|
||||
[tabId]="'other'" [class]="(firstTab === 'other')?'uk-active':''">
|
||||
[tabId]="'other'" >
|
||||
<ng-container *ngTemplateOutlet="other_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'statistics')?'uk-active':''"-->
|
||||
<my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||
[tabTitle]="'Statistics'" [statistics]="true" [tabId]="'statistics'"
|
||||
[class]="(firstTab === 'statistics')?'uk-active':''">
|
||||
>
|
||||
<ng-container *ngTemplateOutlet="statistics_tab;"></ng-container>
|
||||
</my-tab>
|
||||
</my-tabs>
|
||||
|
||||
<my-small-tabs *ngIf="numberOfTabs > 2" class="uk-hidden@m" (selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<my-tab *ngIf="hasPrimaryInfo || hasSecondaryInfo"
|
||||
<!-- *ngIf="numberOfTabs > 2"-->
|
||||
<my-small-tabs (selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
||||
<!-- [class]="(firstTab === 'summary')?'uk-active':''"-->
|
||||
<my-tab
|
||||
[tabTitle]="'Project Summary'" [tabId]="'summary'"
|
||||
[class]="(firstTab === 'summary')?'uk-active':''">
|
||||
class="uk-active">
|
||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchPublications.searchUtils.totalResults > 0"
|
||||
<!-- *ngIf="fetchPublications.searchUtils.totalResults > 0"-->
|
||||
<!-- [class]="(firstTab === 'publications')?'uk-active':''"-->
|
||||
<my-tab
|
||||
[tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"
|
||||
[tabId]="'publications'" [class]="(firstTab === 'publications')?'uk-active':''">
|
||||
[tabId]="'publications'">
|
||||
<ng-container *ngTemplateOutlet="publications_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchDatasets.searchUtils.totalResults > 0"
|
||||
<!-- *ngIf="fetchDatasets.searchUtils.totalResults > 0"-->
|
||||
<!-- [class]="(firstTab === 'datasets')?'uk-active':''"-->
|
||||
<my-tab
|
||||
[tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"
|
||||
[tabId]="'datasets'" [class]="(firstTab === 'datasets')?'uk-active':''">
|
||||
[tabId]="'datasets'" >
|
||||
<ng-container *ngTemplateOutlet="datasets_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchSoftware.searchUtils.totalResults > 0"
|
||||
<!-- *ngIf="fetchSoftware.searchUtils.totalResults > 0"-->
|
||||
<!-- [class]="(firstTab === 'software')?'uk-active':''"-->
|
||||
<my-tab
|
||||
[tabTitle]="'Software'" [tabNumber]="fetchSoftware.searchUtils.totalResults"
|
||||
[tabId]="'software'" [class]="(firstTab === 'software')?'uk-active':''">
|
||||
[tabId]="'software'" >
|
||||
<ng-container *ngTemplateOutlet="software_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchOrps.searchUtils.totalResults > 0"
|
||||
<!-- *ngIf="fetchOrps.searchUtils.totalResults > 0"-->
|
||||
<!-- [class]="(firstTab === 'other')?'uk-active':''"-->
|
||||
<my-tab
|
||||
[tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"
|
||||
[tabId]="'other'" [class]="(firstTab === 'other')?'uk-active':''">
|
||||
[tabId]="'other'" >
|
||||
<ng-container *ngTemplateOutlet="other_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(firstTab === 'statistics')?'uk-active':''"-->
|
||||
<my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||
[tabTitle]="'Statistics'" [statistics]="true" [tabId]="'statistics'"
|
||||
[class]="(firstTab === 'statistics')?'uk-active':''">
|
||||
>
|
||||
<ng-container *ngTemplateOutlet="statistics_tab;"></ng-container>
|
||||
</my-tab>
|
||||
</my-small-tabs>
|
||||
</div>
|
||||
<ng-template #loadingBlock>
|
||||
<div *ngIf="!tabsAreInitialized" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">
|
||||
<span class="loading-gif uk-align-center" ></span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<!-- <ng-template #loadingBlock>-->
|
||||
<!-- <div *ngIf="!tabsAreInitialized" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">-->
|
||||
<!-- <span class="loading-gif uk-align-center" ></span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </ng-template>-->
|
||||
|
||||
<div class="uk-margin-small-top uk-flex">
|
||||
<!-- Last Index Info-->
|
||||
|
|
|
@ -799,57 +799,57 @@ export class ProjectComponent {
|
|||
);
|
||||
}
|
||||
|
||||
public get numberOfTabs(): number {
|
||||
if(this.tabsAreInitialized) {
|
||||
return this._numberOfTabs;
|
||||
}
|
||||
|
||||
if(!this.projectInfo
|
||||
|| this.fetchPublications.searchUtils.status == this.errorCodes.LOADING
|
||||
|| this.fetchDatasets.searchUtils.status == this.errorCodes.LOADING
|
||||
|| this.fetchSoftware.searchUtils.status == this.errorCodes.LOADING
|
||||
|| this.fetchOrps.searchUtils.status == this.errorCodes.LOADING) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (this.hasPrimaryInfo || this.hasSecondaryInfo) {
|
||||
this.firstTab = "summary";
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
if(this.fetchPublications.searchUtils.totalResults > 0 || this.fetchDatasets.searchUtils.totalResults > 0
|
||||
|| this.fetchSoftware.searchUtils.totalResults > 0 || this.fetchOrps.searchUtils.totalResults > 0) {
|
||||
if(this.fetchPublications.searchUtils.totalResults > 0) {
|
||||
if(this._numberOfTabs == 0) {
|
||||
this.firstTab = 'publications';
|
||||
this.searchPublicationsInit();
|
||||
}
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
if(this.fetchDatasets.searchUtils.totalResults > 0) {
|
||||
if(this._numberOfTabs == 0) {
|
||||
this.firstTab = 'datasets';
|
||||
this.searchDatasetsInit();
|
||||
}
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
if(this.fetchSoftware.searchUtils.totalResults > 0) {
|
||||
if(this._numberOfTabs == 0) {
|
||||
this.firstTab = 'software';
|
||||
this.searchSoftwareInit();
|
||||
}
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
if(this.fetchOrps.searchUtils.totalResults > 0) {
|
||||
if(this._numberOfTabs == 0) {
|
||||
this.firstTab = 'other';
|
||||
this.searchOrpsInit();
|
||||
}
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
this._numberOfTabs++;
|
||||
}
|
||||
this.activeTab = this.firstTab;
|
||||
this.tabsAreInitialized = true;
|
||||
return this._numberOfTabs;
|
||||
}
|
||||
// public get numberOfTabs(): number {
|
||||
// if(this.tabsAreInitialized) {
|
||||
// return this._numberOfTabs;
|
||||
// }
|
||||
//
|
||||
// if(!this.projectInfo
|
||||
// || this.fetchPublications.searchUtils.status == this.errorCodes.LOADING
|
||||
// || this.fetchDatasets.searchUtils.status == this.errorCodes.LOADING
|
||||
// || this.fetchSoftware.searchUtils.status == this.errorCodes.LOADING
|
||||
// || this.fetchOrps.searchUtils.status == this.errorCodes.LOADING) {
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
// if (this.hasPrimaryInfo || this.hasSecondaryInfo) {
|
||||
// this.firstTab = "summary";
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// if(this.fetchPublications.searchUtils.totalResults > 0 || this.fetchDatasets.searchUtils.totalResults > 0
|
||||
// || this.fetchSoftware.searchUtils.totalResults > 0 || this.fetchOrps.searchUtils.totalResults > 0) {
|
||||
// if(this.fetchPublications.searchUtils.totalResults > 0) {
|
||||
// if(this._numberOfTabs == 0) {
|
||||
// this.firstTab = 'publications';
|
||||
// this.searchPublicationsInit();
|
||||
// }
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// if(this.fetchDatasets.searchUtils.totalResults > 0) {
|
||||
// if(this._numberOfTabs == 0) {
|
||||
// this.firstTab = 'datasets';
|
||||
// this.searchDatasetsInit();
|
||||
// }
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// if(this.fetchSoftware.searchUtils.totalResults > 0) {
|
||||
// if(this._numberOfTabs == 0) {
|
||||
// this.firstTab = 'software';
|
||||
// this.searchSoftwareInit();
|
||||
// }
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// if(this.fetchOrps.searchUtils.totalResults > 0) {
|
||||
// if(this._numberOfTabs == 0) {
|
||||
// this.firstTab = 'other';
|
||||
// this.searchOrpsInit();
|
||||
// }
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// this._numberOfTabs++;
|
||||
// }
|
||||
// this.activeTab = this.firstTab;
|
||||
// this.tabsAreInitialized = true;
|
||||
// return this._numberOfTabs;
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -117,7 +117,8 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div *ngIf="numberOfTabs > 0" class="uk-padding-remove-left uk-width-1-1 uk-margin-large-top">
|
||||
<!-- *ngIf="numberOfTabs > 0"-->
|
||||
<div class="uk-padding-remove-left uk-width-1-1 uk-margin-large-top">
|
||||
<div class="main-tabs-div">
|
||||
<ng-template #summary_tab>
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
|
@ -213,6 +214,12 @@
|
|||
[availableOn]="resultLandingInfo.hostedBy_collectedFrom"></availableOn>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="!hasPrimaryInfo && !hasSecondaryInfo"
|
||||
class="uk-width-expand uk-padding">
|
||||
<div class="uk-animation-fade uk-alert uk-alert-primary" role="alert">
|
||||
No summary information available
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #references_tab>
|
||||
|
@ -389,56 +396,68 @@
|
|||
<!--<div class="uk-width-1-3@m uk-width-1-1 right-column uk-padding-remove"></div>-->
|
||||
</div>
|
||||
</ng-template>
|
||||
<my-tabs [class]="numberOfTabs > 2 ? 'uk-visible@m' : ''">
|
||||
<my-tab *ngIf="hasPrimaryInfo || hasSecondaryInfo" [tabTitle]="getTypeName() + ' Summary'"
|
||||
[tabId]="'summary'" [class]="(activeTab === 'summary')?'uk-active':''">
|
||||
<my-tabs>
|
||||
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
||||
<!-- [class]="(activeTab === 'summary')?'uk-active':''"-->
|
||||
<my-tab [tabTitle]="getTypeName() + ' Summary'"
|
||||
[tabId]="'summary'" class="uk-active">
|
||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(activeTab === 'references')?'uk-active':''"-->
|
||||
<my-tab *ngIf="resultLandingInfo.references && resultLandingInfo.references.length > 0"
|
||||
[tabTitle]="'references'" [tabId]="'references'" [class]="(activeTab === 'references')?'uk-active':''"
|
||||
[tabTitle]="'references'" [tabId]="'references'"
|
||||
[tabNumber]="resultLandingInfo.references.length">
|
||||
<ng-container *ngTemplateOutlet="references_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(activeTab === 'supplementary')?'uk-active':''"-->
|
||||
<my-tab *ngIf="(resultLandingInfo.supplementaryResearchResults && resultLandingInfo.supplementaryResearchResults.length > 0) ||
|
||||
(resultLandingInfo.supplementedByResearchResults && resultLandingInfo.supplementedByResearchResults.length > 0)"
|
||||
[tabTitle]="'Supplementary outcomes'" [tabId]="'supplementary'" [class]="(activeTab === 'supplementary')?'uk-active':''"
|
||||
[tabTitle]="'Supplementary outcomes'" [tabId]="'supplementary'"
|
||||
[tabNumber]="supplementaryResults">
|
||||
<ng-container *ngTemplateOutlet="supplementary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(activeTab === 'related')?'uk-active':''"-->
|
||||
<my-tab *ngIf="(resultLandingInfo.relatedResearchResults && resultLandingInfo.relatedResearchResults.length > 0) ||
|
||||
(resultLandingInfo.similarResearchResults && resultLandingInfo.similarResearchResults.length > 0)"
|
||||
[tabTitle]="'Related outcomes'" [tabId]="'related'" [class]="(activeTab === 'related')?'uk-active':''"
|
||||
[tabTitle]="'Related outcomes'" [tabId]="'related'"
|
||||
[tabNumber]="relatedResultsNum">
|
||||
<ng-container *ngTemplateOutlet="related_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0" [class]="(activeTab === 'bioentities')?'uk-active':''"
|
||||
<!-- [class]="(activeTab === 'bioentities')?'uk-active':''"-->
|
||||
<my-tab *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0"
|
||||
[tabTitle]="'External Databases'" [tabId]="'bioentities'" [tabNumber]="bioentitiesNum">
|
||||
<ng-container *ngTemplateOutlet="bioentities_tab;"></ng-container>
|
||||
</my-tab>
|
||||
</my-tabs>
|
||||
<my-small-tabs *ngIf="numberOfTabs > 2" class="uk-hidden@m">
|
||||
<my-tab *ngIf="hasPrimaryInfo || hasSecondaryInfo" [tabTitle]="getTypeName() + ' Summary'"
|
||||
[tabId]="'summary'" [class]="(activeTab === 'summary')?'uk-active':''">
|
||||
<my-small-tabs>
|
||||
<!-- *ngIf="hasPrimaryInfo || hasSecondaryInfo"-->
|
||||
<!-- [class]="(activeTab === 'summary')?'uk-active':''"-->
|
||||
<my-tab [tabTitle]="getTypeName() + ' Summary'"
|
||||
[tabId]="'summary'" class="uk-active">
|
||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(activeTab === 'references')?'uk-active':''"-->
|
||||
<my-tab *ngIf="resultLandingInfo.references && resultLandingInfo.references.length > 0"
|
||||
[tabTitle]="'references'" [tabId]="'references'" [class]="(activeTab === 'references')?'uk-active':''"
|
||||
[tabTitle]="'references'" [tabId]="'references'"
|
||||
[tabNumber]="resultLandingInfo.references.length">
|
||||
<ng-container *ngTemplateOutlet="references_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(activeTab === 'supplementary')?'uk-active':''"-->
|
||||
<my-tab *ngIf="(resultLandingInfo.supplementaryResearchResults && resultLandingInfo.supplementaryResearchResults.length > 0) ||
|
||||
(resultLandingInfo.supplementedByResearchResults && resultLandingInfo.supplementedByResearchResults.length > 0)"
|
||||
[tabTitle]="'Supplementary outcomes'" [tabId]="'supplementary'" [class]="(activeTab === 'supplementary')?'uk-active':''"
|
||||
[tabTitle]="'Supplementary outcomes'" [tabId]="'supplementary'"
|
||||
[tabNumber]="supplementaryResults">
|
||||
<ng-container *ngTemplateOutlet="supplementary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<!-- [class]="(activeTab === 'related')?'uk-active':''"-->
|
||||
<my-tab *ngIf="(resultLandingInfo.relatedResearchResults && resultLandingInfo.relatedResearchResults.length > 0) ||
|
||||
(resultLandingInfo.similarResearchResults && resultLandingInfo.similarResearchResults.length > 0)"
|
||||
[tabTitle]="'Related outcomes'" [tabId]="'related'" [class]="(activeTab === 'related')?'uk-active':''"
|
||||
[tabTitle]="'Related outcomes'" [tabId]="'related'"
|
||||
[tabNumber]="relatedResultsNum">
|
||||
<ng-container *ngTemplateOutlet="related_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0" [class]="(activeTab === 'bioentities')?'uk-active':''"
|
||||
<!-- [class]="(activeTab === 'bioentities')?'uk-active':''"-->
|
||||
<my-tab *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0"
|
||||
[tabTitle]="'External Databases'" [tabId]="'bioentities'" [tabNumber]="bioentitiesNum">
|
||||
<ng-container *ngTemplateOutlet="bioentities_tab;"></ng-container>
|
||||
</my-tab>
|
||||
|
@ -510,7 +529,7 @@
|
|||
</modal-alert>
|
||||
<modal-alert #linkModal [classTitle]="'landing-modal-header uk-padding-small'"
|
||||
[classBody]="'uk-padding-remove landing-modal'">
|
||||
<div class="uk-grid uk-child-width-1-3 uk-flex uk-flex-middle">
|
||||
<div class="uk-grid uk-child-width-1-3 uk-flex uk-flex-middle uk-margin-medium">
|
||||
<div class="uk-text-center">
|
||||
<a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[id,type,'project'])"
|
||||
routerLinkActive="router-link-active" routerLink="/participate/direct-claim">
|
||||
|
@ -523,7 +542,7 @@
|
|||
y="6.5"></rect></svg>
|
||||
</span>
|
||||
</button>
|
||||
<div>Projects</div>
|
||||
<div class="uk-margin-small-top">Projects</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="uk-text-center">
|
||||
|
@ -537,7 +556,7 @@
|
|||
fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg>
|
||||
</span>
|
||||
</button>
|
||||
<div>Research outcomes</div>
|
||||
<div class="uk-margin-small-top">Research outcomes</div>
|
||||
</a></div>
|
||||
<div class="uk-text-center">
|
||||
<a [queryParams]="routerHelper.createQueryParams(['id','type','linkTo'],[id,type,'context'])"
|
||||
|
@ -553,7 +572,7 @@
|
|||
fill="none" stroke="#000" stroke-width="1.1"></path></svg>
|
||||
</span>
|
||||
</button>
|
||||
<div>Communities</div>
|
||||
<div class="uk-margin-small-top">Communities</div>
|
||||
</a></div>
|
||||
</div>
|
||||
</modal-alert>
|
||||
|
|
|
@ -276,27 +276,27 @@ export class ResultLandingComponent {
|
|||
}
|
||||
}
|
||||
|
||||
private get numberOfTabs(): number {
|
||||
let numberOfTabs = 0;
|
||||
if(this.hasPrimaryInfo || this.hasSecondaryInfo) {
|
||||
numberOfTabs++;
|
||||
}
|
||||
if(this.resultLandingInfo.references && this.resultLandingInfo.references.length > 0) {
|
||||
numberOfTabs++;
|
||||
}
|
||||
if((this.resultLandingInfo.supplementaryResearchResults && this.resultLandingInfo.supplementaryResearchResults.length > 0) ||
|
||||
(this.resultLandingInfo.supplementedByResearchResults && this.resultLandingInfo.supplementedByResearchResults.length > 0)) {
|
||||
numberOfTabs++;
|
||||
}
|
||||
if((this.resultLandingInfo.relatedResearchResults && this.resultLandingInfo.relatedResearchResults.length > 0) ||
|
||||
(this.resultLandingInfo.similarResearchResults && this.resultLandingInfo.similarResearchResults.length > 0)) {
|
||||
numberOfTabs++;
|
||||
}
|
||||
if(this.resultLandingInfo.bioentities && this.bioentitiesNum > 0) {
|
||||
numberOfTabs++;
|
||||
}
|
||||
return numberOfTabs;
|
||||
}
|
||||
// private get numberOfTabs(): number {
|
||||
// let numberOfTabs = 0;
|
||||
// if(this.hasPrimaryInfo || this.hasSecondaryInfo) {
|
||||
// numberOfTabs++;
|
||||
// }
|
||||
// if(this.resultLandingInfo.references && this.resultLandingInfo.references.length > 0) {
|
||||
// numberOfTabs++;
|
||||
// }
|
||||
// if((this.resultLandingInfo.supplementaryResearchResults && this.resultLandingInfo.supplementaryResearchResults.length > 0) ||
|
||||
// (this.resultLandingInfo.supplementedByResearchResults && this.resultLandingInfo.supplementedByResearchResults.length > 0)) {
|
||||
// numberOfTabs++;
|
||||
// }
|
||||
// if((this.resultLandingInfo.relatedResearchResults && this.resultLandingInfo.relatedResearchResults.length > 0) ||
|
||||
// (this.resultLandingInfo.similarResearchResults && this.resultLandingInfo.similarResearchResults.length > 0)) {
|
||||
// numberOfTabs++;
|
||||
// }
|
||||
// if(this.resultLandingInfo.bioentities && this.bioentitiesNum > 0) {
|
||||
// numberOfTabs++;
|
||||
// }
|
||||
// return numberOfTabs;
|
||||
// }
|
||||
|
||||
private getResultLandingInfo(provenanceActionVocabulary: any) {
|
||||
this.infoSub = this._resultLaningService.getResultLandingInfo(this.id, this.type, provenanceActionVocabulary, this.properties).subscribe(
|
||||
|
|
|
@ -16,47 +16,49 @@ declare var UIkit: any;
|
|||
|
||||
@Component({
|
||||
selector: 'my-small-tabs',
|
||||
template: `
|
||||
<ul class="uk-tab main-tabs uk-margin-remove uk-child-width-expand">
|
||||
<!-- *ngFor="let activeTab of activeTabs"-->
|
||||
<li [class]="'uk-active uk-padding-remove '+(activeTab.statistics ? ' statistics ' : '')">
|
||||
<a class="uk-width-1-1 uk-height-1-1">
|
||||
<div class="tab-header">{{activeTab.title}}</div>
|
||||
<div *ngIf="activeTab.num" class="number">{{activeTab.num | number}}</div>
|
||||
<div *ngIf="activeTab.statistics" class="number">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
|
||||
<path d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M10 20h4V4h-4v16zm-6 0h4v-8H4v8zM16 9v11h4V9h-4z"></path>
|
||||
template: `
|
||||
<ng-container *ngIf="tabs.toArray().length > 2">
|
||||
<ul class="uk-hidden@m uk-tab main-tabs uk-margin-remove uk-child-width-expand">
|
||||
<!-- *ngFor="let activeTab of activeTabs"-->
|
||||
<li [class]="'uk-active uk-padding-remove '+(activeTab.statistics ? ' statistics ' : '')">
|
||||
<a class="uk-width-1-1 uk-height-1-1">
|
||||
<div class="tab-header">{{activeTab.title}}</div>
|
||||
<div *ngIf="activeTab.num" class="number">{{activeTab.num | number}}</div>
|
||||
<div *ngIf="activeTab.statistics" class="number">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
|
||||
<path d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M10 20h4V4h-4v16zm-6 0h4v-8H4v8zM16 9v11h4V9h-4z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="uk-padding-remove fake-tab" uk-tooltip="title: More tabs">
|
||||
<a class="uk-text-center uk-width-1-1 uk-height-1-1 uk-icon">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="more">
|
||||
<circle cx="3" cy="10" r="2"></circle>
|
||||
<circle cx="10" cy="10" r="2"></circle>
|
||||
<circle cx="17" cy="10" r="2"></circle>
|
||||
</svg>
|
||||
</a>
|
||||
<div #drop_element uk-drop="mode: click" class="uk-drop">
|
||||
<div class="uk-card uk-card-body uk-card-default">
|
||||
<ul class="uk-list main-small-tabs" uk-switcher="connect: .small-tabs-content">
|
||||
<ng-container *ngFor="let tab of tabs.toArray()">
|
||||
<li (click)="selectTab(tab)"
|
||||
[class]="'uk-margin-top uk-margin-bottom uk-height-1-1 uk-width-1-1 ' + (tab == activeTab ? 'uk-hidden' : '')">
|
||||
<a class="uk-display-block uk-height-1-1 uk-width-1-1">{{tab.title}}</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="uk-padding-remove fake-tab" uk-tooltip="title: More tabs">
|
||||
<a class="uk-text-center uk-width-1-1 uk-height-1-1 uk-icon">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="more">
|
||||
<circle cx="3" cy="10" r="2"></circle>
|
||||
<circle cx="10" cy="10" r="2"></circle>
|
||||
<circle cx="17" cy="10" r="2"></circle>
|
||||
</svg>
|
||||
</a>
|
||||
<div #drop_element uk-drop="mode: click" class="uk-drop">
|
||||
<div class="uk-card uk-card-body uk-card-default">
|
||||
<ul class="uk-list main-small-tabs" uk-switcher="connect: .small-tabs-content">
|
||||
<ng-container *ngFor="let tab of tabs.toArray()">
|
||||
<li (click)="selectTab(tab)"
|
||||
[class]="'uk-margin-top uk-margin-bottom uk-height-1-1 uk-width-1-1 ' + (tab == activeTab ? 'uk-hidden' : '')">
|
||||
<a class="uk-display-block uk-height-1-1 uk-width-1-1">{{tab.title}}</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="uk-switcher small-tabs-content main-tabs-content">
|
||||
<ng-content></ng-content>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="uk-hidden@m uk-switcher small-tabs-content main-tabs-content">
|
||||
<ng-content></ng-content>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
`
|
||||
})
|
||||
|
|
|
@ -15,7 +15,7 @@ import { TabComponent } from './tab.component';
|
|||
@Component({
|
||||
selector: 'my-tabs',
|
||||
template: `
|
||||
<ul class="uk-tab main-tabs uk-margin-remove uk-child-width-expand"
|
||||
<ul [class]="(tabs.toArray().length > 2 ? 'uk-visible@m' : '') + ' uk-tab main-tabs uk-margin-remove uk-child-width-expand'"
|
||||
uk-tab uk-switcher="connect: .tabs-content" uk-height-match="target: .tab-header">
|
||||
<li *ngFor="let tab of tabs.toArray(); let i=index"
|
||||
[class]="'uk-padding-remove'+(tab.statistics ? ' statistics ' : '') + (i == 0?' uk-active':'')"
|
||||
|
@ -32,7 +32,7 @@ import { TabComponent } from './tab.component';
|
|||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="uk-switcher tabs-content main-tabs-content">
|
||||
<div [class]="(tabs.toArray().length > 2 ? 'uk-visible@m' : '') + ' uk-switcher tabs-content main-tabs-content'">
|
||||
<ng-content></ng-content>
|
||||
</div>
|
||||
`
|
||||
|
|
Loading…
Reference in New Issue