[Library | Trunk]: Add organization tabs. Add small tabs on results too
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58790 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
797401f7c1
commit
a0abd21625
|
@ -55,7 +55,7 @@ export class ProjectsInModalComponent {
|
|||
@Input() properties: EnvProperties;
|
||||
@Input() modal: AlertModal;
|
||||
public page: number = 1;
|
||||
public size: number = 10;
|
||||
public size: number = 5;
|
||||
|
||||
public routerHelper: RouterHelper = new RouterHelper();
|
||||
public errorCodes: ErrorCodes = new ErrorCodes();
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
<ng-template #search_tab let-fetch="fetch" let-type="type">
|
||||
<errorMessages [status]="[fetch.searchUtils.status]" [type]="getEntityName(type, true, true)"
|
||||
tab_error_class=true></errorMessages>
|
||||
<div *ngIf="fetch.searchUtils.status == errorCodes.DONE">
|
||||
<div *ngIf="fetch.searchUtils.totalResults > searchNumber" class="uk-inline uk-flex uk-flex-right">
|
||||
<span class="uk-text-uppercase uk-position-left uk-text-middle uk-flex-middle uk-flex">
|
||||
<span>Top {{searchNumber}}</span><span class="space uk-text-muted">{{getEntityName(type, true, true)}}</span>
|
||||
</span>
|
||||
<a [queryParams]="routerHelper.createQueryParams(['f0', 'fv0', 'type', 'qf'], ['relorganizationid', organizationId, getEntityName(type, true, false), 'false'])"
|
||||
[routerLink]="properties.searchLinkToAdvancedResults">
|
||||
<button class="uk-button uk-button-small portal-button">
|
||||
<span uk-icon="search"></span>
|
||||
View all
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
<search-result [results]="fetch.results" [status]="fetch.searchUtils.status"
|
||||
[type]="getEntityName(type, false, true)" [showLoading]="true" [properties]="properties">
|
||||
|
||||
</search-result>
|
||||
</div>
|
||||
</ng-template>
|
||||
<div id="tm-main" class="landing uk-section uk-padding-remove-top tm-middle">
|
||||
<div *ngIf="!showFeedback" class="uk-grid">
|
||||
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
|
||||
|
@ -11,9 +33,8 @@
|
|||
class="loading-gif uk-align-center"></span></div>
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
||||
[texts]="pageContents['top']"></helper>
|
||||
<div *ngIf="organizationInfo != null" class="uk-grid">
|
||||
<div
|
||||
class="uk-width-2-3@m uk-width-1-1@s uk-padding uk-padding-remove-left uk-padding-remove-vertical uk-margin-bottom">
|
||||
<div *ngIf="organizationInfo != null" class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-2-3@m uk-width-1-1@s uk-padding uk-padding-remove-left uk-padding-remove-vertical uk-margin-bottom">
|
||||
<schema2jsonld *ngIf="organizationInfo" [data]=organizationInfo
|
||||
[URL]="properties.baseLink+'/search/organization?organizationId='+organizationId"
|
||||
type="organization"></schema2jsonld>
|
||||
|
@ -22,8 +43,7 @@
|
|||
[subTitle]="(organizationInfo.name
|
||||
&& organizationInfo.title.name !== organizationInfo.name)?organizationInfo.name:null"
|
||||
[entityType]="'organization'"></landing-header>
|
||||
<div *ngIf="organizationInfo.deletedByInferenceIds"
|
||||
class="uk-text-small">
|
||||
<div *ngIf="organizationInfo.deletedByInferenceIds">
|
||||
<a (click)="openDeletedByInference()">View all {{organizationInfo.deletedByInferenceIds.length}}
|
||||
versions</a>
|
||||
</div>
|
||||
|
@ -41,92 +61,6 @@
|
|||
<span class="uk-text-muted">Country: </span>{{organizationInfo.country}}
|
||||
</li>
|
||||
</ul>
|
||||
<!-- <div class="uk-margin-medium-top">
|
||||
<div *ngIf="fetchProjects && fetchProjects.searchUtils.totalResults > 0"
|
||||
class="uk-margin-top simple-buttons uk-flex uk-flex-middle">
|
||||
<div *ngIf="fetchProjects && fetchProjects.searchUtils.totalResults > 0" (click)="openProjectsModal()"
|
||||
class="clickable uk-margin-right">
|
||||
<span class="uk-text-bold">{{fetchProjects.searchUtils.totalResults | number}}</span> Projects
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
*ngIf="total.publications > 0 || total.datasets > 0 || total.software > 0 || total.other > 0 || total.dataproviders > 0"
|
||||
class="uk-margin-top advanced-buttons uk-grid-small uk-child-width-1-4@s uk-child-width-1-2"
|
||||
uk-height-match="target: .target; row: false"
|
||||
uk-grid>
|
||||
<div *ngIf="total.publications > 0">
|
||||
<div class="uk-position-relative">
|
||||
<!– <a [queryParams]="routerHelper.createQueryParams(['organization', 'og', 'type'], [organizationId, 'and', 'publications'])"–>
|
||||
<a [queryParams]="routerHelper.createQueryParams(['f0', 'fv0', 'type', 'qf'], ['relorganizationid', organizationId, 'publications', 'false'])"
|
||||
[routerLink]="properties.searchLinkToAdvancedResults" target="_blank">
|
||||
<span
|
||||
class="custom-external uk-position-top-right uk-margin-small-right uk-margin-small-top"></span>
|
||||
<div class="header target uk-text-bold">Publications</div>
|
||||
<div class="icon uk-position-center" uk-icon="icon: search;"></div>
|
||||
<div class="footer target uk-position-relative">
|
||||
<span class="uk-text-bold uk-position-center">{{total.publications | number}}</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="total.datasets > 0">
|
||||
<div class="uk-position-relative">
|
||||
<a [queryParams]="routerHelper.createQueryParams(['f0', 'fv0', 'type', 'qf'], ['relorganizationid', organizationId, 'datasets', 'false'])"
|
||||
[routerLink]="properties.searchLinkToAdvancedResults" target="_blank">
|
||||
<span
|
||||
class="custom-external uk-position-top-right uk-margin-small-right uk-margin-small-top"></span>
|
||||
<div class="header target uk-text-bold">Research Data</div>
|
||||
<div class="icon uk-position-center" uk-icon="icon: search;"></div>
|
||||
<div class="footer target uk-position-relative">
|
||||
<span class="uk-text-bold uk-position-center">{{total.datasets | number}}</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="total.software > 0">
|
||||
<div class="uk-position-relative">
|
||||
<a [queryParams]="routerHelper.createQueryParams(['f0', 'fv0', 'type', 'qf'], ['relorganizationid', organizationId, 'software', 'false'])"
|
||||
[routerLink]="properties.searchLinkToAdvancedResults" target="_blank">
|
||||
<span
|
||||
class="custom-external uk-position-top-right uk-margin-small-right uk-margin-small-top"></span>
|
||||
<div class="header target uk-text-bold">Software</div>
|
||||
<div class="icon uk-position-center" uk-icon="icon: search;"></div>
|
||||
<div class="footer target uk-position-relative">
|
||||
<span class="uk-text-bold uk-position-center">{{total.software | number}}</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="total.other > 0">
|
||||
<div class="uk-position-relative">
|
||||
<a [queryParams]="routerHelper.createQueryParams(['f0', 'fv0', 'type', 'qf'], ['relorganizationid', organizationId, 'other', 'false'])"
|
||||
[routerLink]="properties.searchLinkToAdvancedResults" target="_blank">
|
||||
<span
|
||||
class="custom-external uk-position-top-right uk-margin-small-right uk-margin-small-top"></span>
|
||||
<div class="header target uk-text-bold">Other Research Products</div>
|
||||
<div class="icon uk-position-center" uk-icon="icon: search;"></div>
|
||||
<div class="footer target uk-position-relative">
|
||||
<span class="uk-text-bold uk-position-center">{{total.other | number}}</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="total.dataproviders > 0">
|
||||
<div class="uk-position-relative">
|
||||
<a [queryParams]="routerHelper.createQueryParams(['f0', 'fv0'], ['relorganizationid', organizationId])"
|
||||
[routerLink]="properties.searchLinkToAdvancedDataProviders" target="_blank">
|
||||
<span
|
||||
class="custom-external uk-position-top-right uk-margin-small-right uk-margin-small-top"></span>
|
||||
<div class="header target uk-text-bold">Content Providers</div>
|
||||
<div class="icon uk-position-center" uk-icon="icon: search;"></div>
|
||||
<div class="footer target uk-position-relative">
|
||||
<span class="uk-text-bold uk-position-center">{{total.dataproviders | number}}</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="uk-width-1-3@m uk-width-1-1@s uk-padding-remove">
|
||||
<ul class="user-actions uk-list uk-card uk-card-default uk-padding">
|
||||
|
@ -165,12 +99,14 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="uk-padding-remove-left uk-width-1-1 uk-margin-large-top">
|
||||
<div class="main-tabs-div">
|
||||
<my-tabs *ngIf="fetchProjects && fetchProjects.searchUtils.totalResults > 0">
|
||||
<my-tab *ngIf="fetchProjects && fetchProjects.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchProjects.searchUtils.totalResults"
|
||||
[tabTitle]="'Funding / Projects'"
|
||||
[tabId]="'projects'">
|
||||
<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">
|
||||
<!--Tab Templates-->
|
||||
<ng-template #projects_tab>
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<projectsInModal [fetchProjects]="fetchProjects"
|
||||
|
@ -180,8 +116,152 @@
|
|||
</div>
|
||||
<!--<div class="uk-width-1-3@m uk-width-1-1 right-column uk-padding-remove"></div>-->
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #data_providers_tab>
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<errorMessages [status]="[fetchDataproviders.searchUtils.status]" [type]="'content providers'"
|
||||
tab_error_class=true></errorMessages>
|
||||
<div *ngIf="fetchDataproviders.searchUtils.status == errorCodes.DONE">
|
||||
<div *ngIf="fetchDataproviders.searchUtils.totalResults > searchNumber"
|
||||
class="uk-inline uk-flex uk-flex-right">
|
||||
<span class="uk-text-uppercase uk-position-left uk-text-middle uk-flex-middle uk-flex">
|
||||
<span>Top {{searchNumber}}</span><span class="space uk-text-muted">content providers</span>
|
||||
</span>
|
||||
<a [queryParams]="routerHelper.createQueryParams(['f0', 'fv0'], ['relorganizationid', organizationId])"
|
||||
[routerLink]="properties.searchLinkToAdvancedDataProviders">
|
||||
<button class="uk-button uk-button-small portal-button">
|
||||
<span uk-icon="search"></span>
|
||||
View all
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
<search-result [results]="fetchDataproviders.results"
|
||||
[status]="fetchDataproviders.searchUtils.status"
|
||||
[type]="'content provider'" [showLoading]="true" [properties]="properties">
|
||||
</search-result>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="uk-width-1-3@m uk-width-1-1 right-column uk-padding-remove"></div>-->
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #publications_tab>
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<ng-container *ngTemplateOutlet="search_tab;
|
||||
context: { fetch: fetchPublications, type: 'publication'}">
|
||||
</ng-container>
|
||||
</div>
|
||||
<!--<div class="uk-width-1-3@m uk-width-1-1 right-column uk-padding-remove"></div>-->
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #datasets_tab>
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<ng-container *ngTemplateOutlet="search_tab;
|
||||
context: { fetch: fetchDatasets, type: 'dataset'}">
|
||||
</ng-container>
|
||||
</div>
|
||||
<!--<div class="uk-width-1-3@m uk-width-1-1 right-column uk-padding-remove"></div>-->
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #software_tab>
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<ng-container *ngTemplateOutlet="search_tab;
|
||||
context: { fetch: fetchSoftware, type: 'software'}">
|
||||
</ng-container>
|
||||
</div>
|
||||
<!--<div class="uk-width-1-3@m uk-width-1-1 right-column uk-padding-remove"></div>-->
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template #other_tab>
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<ng-container *ngTemplateOutlet="search_tab;
|
||||
context: { fetch: fetchOrps, type: 'other'}">
|
||||
</ng-container>
|
||||
</div>
|
||||
<!--<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':''">
|
||||
<ng-container *ngTemplateOutlet="projects_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchDataproviders && fetchDataproviders.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchDataproviders.searchUtils.totalResults"
|
||||
[tabTitle]="'Content Providers'"
|
||||
[tabId]="'dataProviders'" [class]="(firstTab === 'dataProviders')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="data_providers_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchPublications && fetchPublications.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchPublications.searchUtils.totalResults"
|
||||
[tabTitle]="'Publications'"
|
||||
[tabId]="'publications'" [class]="(firstTab === 'publications')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="publications_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<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="datasets_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchSoftware && fetchSoftware.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchSoftware.searchUtils.totalResults"
|
||||
[tabTitle]="'Software'"
|
||||
[tabId]="'software'" [class]="(firstTab === 'software')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="software_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<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="other_tab;"></ng-container>
|
||||
</my-tab>
|
||||
</my-tabs>
|
||||
<my-small-tabs *ngIf="numberOfTabs > 2" class="uk-hidden@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':''">
|
||||
<ng-container *ngTemplateOutlet="projects_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchDataproviders && fetchDataproviders.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchDataproviders.searchUtils.totalResults"
|
||||
[tabTitle]="'Content Providers'"
|
||||
[tabId]="'dataProviders'" [class]="(firstTab === 'dataProviders')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="data_providers_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchPublications && fetchPublications.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchPublications.searchUtils.totalResults"
|
||||
[tabTitle]="'Publications'"
|
||||
[tabId]="'publications'" [class]="(firstTab === 'publications')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="publications_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<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>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchSoftware && fetchSoftware.searchUtils.totalResults > 0"
|
||||
[tabNumber]="fetchSoftware.searchUtils.totalResults"
|
||||
[tabTitle]="'Software'"
|
||||
[tabId]="'software'" [class]="(firstTab === 'software')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="software_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<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>
|
||||
</my-tab>
|
||||
</my-small-tabs>
|
||||
</div>
|
||||
<div class="uk-margin-small-top uk-flex">
|
||||
<!-- Last Index Info-->
|
||||
|
@ -230,19 +310,49 @@
|
|||
[classBody]="'uk-padding-remove landing-modal'">
|
||||
<div class="uk-padding">
|
||||
<div class="uk-animation-slide-top-small">
|
||||
<ul *ngIf="total.results > 0" class="uk-margin-remove-bottom uk-list">
|
||||
<ng-container *ngFor="let contentType of contentTypes">
|
||||
<li [attr.uk-tooltip]="total[contentType[0]] > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
<ul *ngIf="total > 0" class="uk-margin-remove-bottom uk-list">
|
||||
<li [attr.uk-tooltip]="total > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
title="No report available">
|
||||
<a [class]="total[contentType[0]] > 0 ? 'clickable' : 'uk-disabled uk-link-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated(contentType[0]), contentType[0] + '-report')">
|
||||
<a [class]="total > 0 ? 'clickable' : 'uk-disabled uk-link-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated('results'), 'results' + '-report')">
|
||||
<span uk-icon="download"></span>
|
||||
<span class="uk-text-capitalize uk-margin-small-left">{{contentType[1]}} (CSV)</span>
|
||||
<span class="uk-text-capitalize uk-margin-small-left">all research outcomes (CSV)</span>
|
||||
</a>
|
||||
</li>
|
||||
<li [attr.uk-tooltip]="fetchPublications.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
title="No report available">
|
||||
<a [class]="fetchPublications.searchUtils.totalResults > 0 ? 'clickable' : 'uk-disabled uk-link-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated('publications'), 'publications' + '-report')">
|
||||
<span uk-icon="download"></span>
|
||||
<span class="uk-text-capitalize uk-margin-small-left">publications (CSV)</span>
|
||||
</a>
|
||||
</li>
|
||||
<li [attr.uk-tooltip]="fetchDatasets.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
title="No report available">
|
||||
<a [class]="fetchDatasets.searchUtils.totalResults > 0 ? 'clickable' : 'uk-disabled uk-link-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated('datasets'), 'datasets' + '-report')">
|
||||
<span uk-icon="download"></span>
|
||||
<span class="uk-text-capitalize uk-margin-small-left">research data (CSV)</span>
|
||||
</a>
|
||||
</li>
|
||||
<li [attr.uk-tooltip]="fetchSoftware.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
title="No report available">
|
||||
<a [class]="fetchSoftware.searchUtils.totalResults > 0 ? 'clickable' : 'uk-disabled uk-link-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated('software'), 'software' + '-report')">
|
||||
<span uk-icon="download"></span>
|
||||
<span class="uk-text-capitalize uk-margin-small-left">software (CSV)</span>
|
||||
</a>
|
||||
</li>
|
||||
<li [attr.uk-tooltip]="fetchOrps.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
title="No report available">
|
||||
<a [class]="fetchOrps.searchUtils.totalResults > 0 ? 'clickable' : 'uk-disabled uk-link-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated('other'), 'other' + '-report')">
|
||||
<span uk-icon="download"></span>
|
||||
<span class="uk-text-capitalize uk-margin-small-left">other research products (CSV)</span>
|
||||
</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
<div *ngIf="total.results == 0"
|
||||
<div *ngIf="total == 0"
|
||||
class="uk-text-muted">
|
||||
No reports available
|
||||
</div>
|
||||
|
@ -288,22 +398,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</modal-alert>
|
||||
<!-- Projects -->
|
||||
<modal-alert *ngIf="organizationInfo && fetchProjects && fetchProjects.results"
|
||||
#projectsModal classBody="uk-width-xxlarge uk-padding-remove-right">
|
||||
<landing-header [properties]="properties" [title]="organizationInfo.title.name"
|
||||
[subTitle]="(organizationInfo.name
|
||||
&& organizationInfo.title.name !== organizationInfo.name)?organizationInfo.name:null"
|
||||
[entityType]="'organization'">
|
||||
</landing-header>
|
||||
<div class="uk-margin-medium-top uk-margin-medium-right">
|
||||
<projectsInModal [fetchProjects]="fetchProjects"
|
||||
[modal]="projectsModal"
|
||||
[organizationId]="organizationId"
|
||||
[properties]=properties>
|
||||
</projectsInModal>
|
||||
</div>
|
||||
</modal-alert>
|
||||
<modal-loading></modal-loading>
|
||||
<modal-alert #AlertModalApplyAll (alertOutput)="confirmCloseApplyAll()"></modal-alert>
|
||||
<modal-alert #AlertModalCsvError></modal-alert>
|
||||
|
|
|
@ -22,15 +22,6 @@ import {Location} from "@angular/common";
|
|||
import {FetchResearchResults} from "../../utils/fetchEntitiesClasses/fetchResearchResults.class";
|
||||
import {FetchDataproviders} from "../../utils/fetchEntitiesClasses/fetchDataproviders.class";
|
||||
|
||||
interface Total {
|
||||
publications: number;
|
||||
datasets: number;
|
||||
software: number;
|
||||
other: number;
|
||||
results: number;
|
||||
dataproviders: number;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'organization',
|
||||
templateUrl: 'organization.component.html',
|
||||
|
@ -52,18 +43,7 @@ export class OrganizationComponent {
|
|||
public csvProjectParamsHead: string;
|
||||
public csvParamsTail: string;
|
||||
|
||||
// Active tab variable for responsiveness
|
||||
public activeTab: string = "Publications";
|
||||
|
||||
// Variables for publications, research data, projects, dataproviders tabs
|
||||
public total: Total = {
|
||||
publications: 0,
|
||||
datasets: 0,
|
||||
software: 0,
|
||||
other: 0,
|
||||
results: 0,
|
||||
dataproviders: 0
|
||||
};
|
||||
public fetchProjects: FetchProjects;
|
||||
public fetchPublications: FetchResearchResults;
|
||||
public fetchDatasets: FetchResearchResults;
|
||||
|
@ -72,6 +52,12 @@ export class OrganizationComponent {
|
|||
public fetchDataproviders: FetchDataproviders
|
||||
public searchNumber: number = 5;
|
||||
|
||||
// Active tab variable for responsiveness
|
||||
public activeTab: string = "";
|
||||
|
||||
public firstTab: string = "";
|
||||
public _numberOfTabs: number = 0;
|
||||
public tabsAreInitialized: boolean = false;
|
||||
|
||||
@ViewChild('downloadReportModal') downloadReportModal;
|
||||
@ViewChild('downloadFunderReportModal') downloadFunderReportModal;
|
||||
|
@ -88,7 +74,7 @@ export class OrganizationComponent {
|
|||
public divContents = null;
|
||||
|
||||
// Helper variables to specify funder in downloadPublicationsFile function
|
||||
public contentTypes: [string,string][] =[
|
||||
public contentTypes: [string, string][] = [
|
||||
['results', 'all research outcomes'],
|
||||
['publications', 'publications'],
|
||||
['datasets', 'research data'],
|
||||
|
@ -125,7 +111,6 @@ export class OrganizationComponent {
|
|||
private _searchDataprovidersService: SearchDataprovidersService,
|
||||
private _reportsService: ReportsService,
|
||||
private _searchResearchResultsService: SearchResearchResultsService,
|
||||
// private _searchDatasetsService: SearchDatasetsService,
|
||||
private _searchProjectsService: SearchProjectsService,
|
||||
private _meta: Meta,
|
||||
private _title: Title,
|
||||
|
@ -134,13 +119,18 @@ export class OrganizationComponent {
|
|||
private seoService: SEOService,
|
||||
private _location: Location) {
|
||||
this.fetchProjects = new FetchProjects(this._searchProjectsService);
|
||||
this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService);
|
||||
this.fetchPublications = new FetchResearchResults(this._searchResearchResultsService);
|
||||
this.fetchDatasets = new FetchResearchResults(this._searchResearchResultsService);
|
||||
this.fetchSoftware = new FetchResearchResults(this._searchResearchResultsService);
|
||||
this.fetchOrps = new FetchResearchResults(this._searchResearchResultsService);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data
|
||||
.subscribe((data: { envSpecific: EnvProperties }) => {
|
||||
this.properties = data.envSpecific;
|
||||
if(this.properties.lastIndexUpdate) {
|
||||
if (this.properties.lastIndexUpdate) {
|
||||
this.indexUpdateDate = new Date(this.properties.lastIndexUpdate);
|
||||
}
|
||||
//this.getDivContents();
|
||||
|
@ -225,34 +215,34 @@ export class OrganizationComponent {
|
|||
}
|
||||
|
||||
private getTotalResearchResults() {
|
||||
this._searchResearchResultsService.numOfEntityResults('publication',
|
||||
this.organizationInfo.objIdentifier, 'organization', this.properties).subscribe(total => {
|
||||
this.total.publications = total;
|
||||
this.total.results += total;
|
||||
});
|
||||
this._searchResearchResultsService.numOfEntityResults('dataset',
|
||||
this.organizationInfo.objIdentifier, 'organization', this.properties).subscribe(total => {
|
||||
this.total.datasets = total;
|
||||
this.total.results += total;
|
||||
});
|
||||
this._searchResearchResultsService.numOfEntityResults('software',
|
||||
this.organizationInfo.objIdentifier, 'organization', this.properties).subscribe(total => {
|
||||
this.total.software = total;
|
||||
this.total.results += total;
|
||||
});
|
||||
this._searchResearchResultsService.numOfEntityResults('other',
|
||||
this.organizationInfo.objIdentifier, 'organization', this.properties).subscribe(total => {
|
||||
this.total.other = total;
|
||||
this.total.results += total;
|
||||
});
|
||||
this.fetchPublications.getNumForEntity('publication', 'organization', this.organizationId, this.properties);
|
||||
this.fetchDatasets.getNumForEntity('dataset', 'organization', this.organizationId, this.properties);
|
||||
this.fetchSoftware.getNumForEntity('software', 'organization', this.organizationId, this.properties);
|
||||
this.fetchOrps.getNumForEntity('other', 'organization', this.organizationId, this.properties);
|
||||
}
|
||||
|
||||
private getTotalDataproviders() {
|
||||
this._searchDataprovidersService.numOfEntityDataproviders(
|
||||
this.organizationInfo.objIdentifier,'organization', this.properties).subscribe(
|
||||
total => {
|
||||
this.total.dataproviders = total;
|
||||
});
|
||||
this.fetchDataproviders.getNumForEntity('organization', this.organizationId, this.properties);
|
||||
}
|
||||
|
||||
private searchContentProviders() {
|
||||
this.fetchDataproviders.getResultsForEntity("organization", this.organizationId, 1, this.searchNumber, this.properties);
|
||||
}
|
||||
|
||||
private searchPublications() {
|
||||
this.fetchPublications.getResultsForEntity("publication", "organization", this.organizationId, 1, this.searchNumber, this.properties);
|
||||
}
|
||||
|
||||
private searchDatasets() {
|
||||
this.fetchDatasets.getResultsForEntity("dataset", "organization", this.organizationId, 1, this.searchNumber, this.properties);
|
||||
}
|
||||
|
||||
private searchSoftware() {
|
||||
this.fetchSoftware.getResultsForEntity("software", "organization", this.organizationId, 1, this.searchNumber, this.properties);
|
||||
}
|
||||
|
||||
private searchOrps() {
|
||||
this.fetchOrps.getResultsForEntity("other", "organization", this.organizationId, 1, this.searchNumber, this.properties);
|
||||
}
|
||||
|
||||
private getOrganizationInfo() {
|
||||
|
@ -282,7 +272,6 @@ export class OrganizationComponent {
|
|||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.piwiksub = this._piwikService.trackView(this.properties, this.organizationInfo.title.name, this.piwikSiteId).subscribe();
|
||||
}
|
||||
console.log(this.organizationInfo);
|
||||
var refineFields: string [] = ["funder"];
|
||||
this.getTotalResearchResults();
|
||||
this.getTotalDataproviders();
|
||||
|
@ -401,9 +390,9 @@ export class OrganizationComponent {
|
|||
if (!title) {
|
||||
title_index = index;
|
||||
//console.info(title_index);
|
||||
url = this.downloadURLAPI + '?format=csv-special&' + this.getTypeParam(this.funderContentType)+ '&fq=((relprojectid exact "' + projects[index].id + '"))';
|
||||
url = this.downloadURLAPI + '?format=csv-special&' + this.getTypeParam(this.funderContentType) + '&fq=((relprojectid exact "' + projects[index].id + '"))';
|
||||
} else {
|
||||
url = this.downloadURLAPI + '?format=csv-special-notitle&' + this.getTypeParam(this.funderContentType)+ '&fq=((relprojectid exact "' + projects[index].id + '"))';
|
||||
url = this.downloadURLAPI + '?format=csv-special-notitle&' + this.getTypeParam(this.funderContentType) + '&fq=((relprojectid exact "' + projects[index].id + '"))';
|
||||
}
|
||||
title = true;
|
||||
|
||||
|
@ -541,10 +530,10 @@ export class OrganizationComponent {
|
|||
}
|
||||
|
||||
public getTypeParam(type: string): string {
|
||||
if(type == 'results') {
|
||||
if (type == 'results') {
|
||||
type = 'publications&type=datasets&type=software&type=other';
|
||||
}
|
||||
return 'type='+type;
|
||||
return 'type=' + type;
|
||||
}
|
||||
|
||||
getCSVAffiliated(contentType: string): string {
|
||||
|
@ -552,7 +541,7 @@ export class OrganizationComponent {
|
|||
}
|
||||
|
||||
getFunderProjects(): string {
|
||||
return this.downloadURLAPI + '?'+this.csvProjectParamsHead+encodeURI(this.funder.id)+this.csvParamsTail;
|
||||
return this.downloadURLAPI + '?' + this.csvProjectParamsHead + encodeURI(this.funder.id) + this.csvParamsTail;
|
||||
}
|
||||
|
||||
open(value: any) {
|
||||
|
@ -574,6 +563,112 @@ export class OrganizationComponent {
|
|||
this.downloadFunderReportModal.open();
|
||||
}
|
||||
|
||||
public onSelectActiveTab(activeTabId) {
|
||||
if (this.activeTab != activeTabId) { // tab really changed
|
||||
if (activeTabId == 'projects') {
|
||||
this.activeTab = 'projects';
|
||||
} else if (activeTabId == 'dataProviders') {
|
||||
this.activeTab = 'dataProviders';
|
||||
this.searchContentProviders();
|
||||
} else if (activeTabId == 'publications') {
|
||||
this.activeTab = 'publications';
|
||||
this.searchPublications();
|
||||
} else if (activeTabId == 'datasets') {
|
||||
this.activeTab = 'datasets';
|
||||
this.searchDatasets();
|
||||
} else if (activeTabId == 'software') {
|
||||
this.activeTab = 'software';
|
||||
this.searchSoftware();
|
||||
} else if (activeTabId == 'other') {
|
||||
this.activeTab = "other";
|
||||
this.searchOrps();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public get total(): number {
|
||||
let total = this.fetchPublications.searchUtils.totalResults;
|
||||
total += this.fetchDatasets.searchUtils.totalResults;
|
||||
total += this.fetchSoftware.searchUtils.totalResults;
|
||||
total += this.fetchOrps.searchUtils.totalResults;
|
||||
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;
|
||||
}
|
||||
|
||||
private getEntityName(entityType: string, plural: boolean, full: boolean): string {
|
||||
if (entityType == "publication") {
|
||||
return "publication" + (plural ? "s" : "");
|
||||
} else if (entityType == "dataset") {
|
||||
return (full ? "research data" : ("dataset" + (plural ? "s" : "")));
|
||||
} else if (entityType == "software") {
|
||||
return "software";
|
||||
} else if (entityType == "other") {
|
||||
return (full ? ("other research product" + (plural ? "s" : "")) : "other");
|
||||
} else if (entityType == "dataprovider") {
|
||||
return (full ? ("content provider" + (plural ? "s" : "")) : "dataprovider" + (plural ? "s" : ""));
|
||||
} else {
|
||||
return entityType + (plural ? "s" : "");
|
||||
}
|
||||
}
|
||||
|
||||
public scroll() {
|
||||
HelperFunctions.scroll();
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ import {FeedbackModule} from "../feedback/feedback.module";
|
|||
import {MatSelectModule} from "@angular/material/select";
|
||||
import {TabsModule} from "../../utils/tabs/tabs.module";
|
||||
import {ModalSelectModule} from "../../utils/modal-select/modal-select.module";
|
||||
import {SearchResultsModule} from "../../searchPages/searchUtils/searchResults.module";
|
||||
|
||||
|
||||
@NgModule({
|
||||
|
@ -44,7 +45,7 @@ import {ModalSelectModule} from "../../utils/modal-select/modal-select.module";
|
|||
SearchResearchResultsServiceModule,
|
||||
ProjectsServiceModule,
|
||||
Schema2jsonldModule, SEOServiceModule, HelperModule,
|
||||
OrganizationsDeletedByInferenceModule, LandingHeaderModule, FeedbackModule, MatSelectModule, TabsModule, ModalSelectModule
|
||||
OrganizationsDeletedByInferenceModule, LandingHeaderModule, FeedbackModule, MatSelectModule, TabsModule, ModalSelectModule, SearchResultsModule
|
||||
],
|
||||
declarations: [
|
||||
OrganizationComponent,
|
||||
|
|
|
@ -117,11 +117,9 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="uk-padding-remove-left uk-width-1-1 uk-margin-large-top">
|
||||
<div *ngIf="numberOfTabs > 0" class="uk-padding-remove-left uk-width-1-1 uk-margin-large-top">
|
||||
<div class="main-tabs-div">
|
||||
<my-tabs *ngIf="activeTab">
|
||||
<my-tab *ngIf="hasPrimaryInfo || hasSecondaryInfo" [tabTitle]="getTypeName() + ' Summary'"
|
||||
[tabId]="'summary'" [class]="(activeTab === 'summary')?'uk-active':''">
|
||||
<ng-template #summary_tab>
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div *ngIf="hasPrimaryInfo" class="uk-width-expand uk-padding">
|
||||
<!-- Description -->
|
||||
|
@ -214,10 +212,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="resultLandingInfo.references && resultLandingInfo.references.length > 0"
|
||||
[tabTitle]="'references'" [tabId]="'references'" [class]="(activeTab === 'references')?'uk-active':''"
|
||||
[tabNumber]="resultLandingInfo.references.length">
|
||||
</ng-template>
|
||||
<ng-template #references_tab>
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<div>
|
||||
|
@ -250,11 +246,8 @@
|
|||
</div>
|
||||
<!--<div class="uk-width-1-3@m uk-width-1-1 right-column uk-padding-remove"></div>-->
|
||||
</div>
|
||||
</my-tab>
|
||||
<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':''"
|
||||
[tabNumber]="supplementaryResults">
|
||||
</ng-template>
|
||||
<ng-template #supplementary_tab>
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<div
|
||||
|
@ -336,11 +329,8 @@
|
|||
</div>
|
||||
<!--<div class="uk-width-1-3@m uk-width-1-1 right-column uk-padding-remove"></div>-->
|
||||
</div>
|
||||
</my-tab>
|
||||
<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':''"
|
||||
[tabNumber]="relatedResultsNum">
|
||||
</ng-template>
|
||||
<ng-template #related_tab>
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<div
|
||||
|
@ -422,9 +412,8 @@
|
|||
</div>
|
||||
<!--<div class="uk-width-1-3@m uk-width-1-1 right-column uk-padding-remove"></div>-->
|
||||
</div>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0" [class]="(activeTab === 'bioentities')?'uk-active':''"
|
||||
[tabTitle]="'External Databases'" [tabId]="'bioentities'" [tabNumber]="bioentitiesNum">
|
||||
</ng-template>
|
||||
<ng-template #bioentities_tab>
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<div>
|
||||
|
@ -459,8 +448,61 @@
|
|||
</div>
|
||||
<!--<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':''">
|
||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="resultLandingInfo.references && resultLandingInfo.references.length > 0"
|
||||
[tabTitle]="'references'" [tabId]="'references'" [class]="(activeTab === 'references')?'uk-active':''"
|
||||
[tabNumber]="resultLandingInfo.references.length">
|
||||
<ng-container *ngTemplateOutlet="references_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<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':''"
|
||||
[tabNumber]="supplementaryResults">
|
||||
<ng-container *ngTemplateOutlet="supplementary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<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':''"
|
||||
[tabNumber]="relatedResultsNum">
|
||||
<ng-container *ngTemplateOutlet="related_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0" [class]="(activeTab === 'bioentities')?'uk-active':''"
|
||||
[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':''">
|
||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="resultLandingInfo.references && resultLandingInfo.references.length > 0"
|
||||
[tabTitle]="'references'" [tabId]="'references'" [class]="(activeTab === 'references')?'uk-active':''"
|
||||
[tabNumber]="resultLandingInfo.references.length">
|
||||
<ng-container *ngTemplateOutlet="references_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<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':''"
|
||||
[tabNumber]="supplementaryResults">
|
||||
<ng-container *ngTemplateOutlet="supplementary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<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':''"
|
||||
[tabNumber]="relatedResultsNum">
|
||||
<ng-container *ngTemplateOutlet="related_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0" [class]="(activeTab === 'bioentities')?'uk-active':''"
|
||||
[tabTitle]="'External Databases'" [tabId]="'bioentities'" [tabNumber]="bioentitiesNum">
|
||||
<ng-container *ngTemplateOutlet="bioentities_tab;"></ng-container>
|
||||
</my-tab>
|
||||
</my-small-tabs>
|
||||
</div>
|
||||
<div class="uk-margin-small-top uk-flex">
|
||||
<!-- Last Index Info-->
|
||||
|
|
|
@ -288,6 +288,28 @@ 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 getResultLandingInfo(provenanceActionVocabulary: any) {
|
||||
this.infoSub = this._resultLaningService.getResultLandingInfo(this.id, this.type, provenanceActionVocabulary, this.properties).subscribe(
|
||||
data => {
|
||||
|
|
Loading…
Reference in New Issue