[Trunk | Connect]: community.component & community.module:
Use fetchResearchResults.getResultsForCommunity & fetchResearchResults.getNumForCommunity | Use <search-tab> instead of <results-comp> | Show <small-tabs> on small screens. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@58811 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
18c69b9983
commit
65974a5f8d
|
@ -8,14 +8,13 @@
|
|||
</div>
|
||||
|
||||
<ng-template #tab_content
|
||||
let-resultType="resultType" let-results="results" let-totalResults="totalResults" let-type="type" let-typeName="typeName">
|
||||
let-resultType="resultType" let-fetch="fetch" let-searchLinkToAdvancedPage="searchLinkToAdvancedPage"
|
||||
let-params="params" let-type="type" let-typeName="typeName">
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<results-comp [results]=results [total]=totalResults [resultType]=resultType
|
||||
[community]=community [params]=params [showLoading]="showLoading"
|
||||
[properties]="properties"
|
||||
class="">
|
||||
</results-comp>
|
||||
<search-tab [fetch]="fetch" [resultType]="resultType" [params]="params"
|
||||
[searchLinkToAdvancedPage]="searchLinkToAdvancedPage" [properties]="properties">
|
||||
</search-tab>
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
@ -164,12 +163,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf=" allowedEntities &&
|
||||
statisticsSum && allowedCharts && statisticsSum[entity] &&
|
||||
allowedCharts[entity] && statisticsSum[entity].total>0 &&
|
||||
allowedCharts[entity].length>0">
|
||||
<div class="uk-margin-top portal-hr"></div>
|
||||
</div>
|
||||
<!-- <div *ngIf=" allowedEntities &&-->
|
||||
<!-- statisticsSum && allowedCharts && statisticsSum[entity] &&-->
|
||||
<!-- allowedCharts[entity] && statisticsSum[entity].total>0 &&-->
|
||||
<!-- allowedCharts[entity].length>0">-->
|
||||
<!-- <div class="uk-margin-top portal-hr"></div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div *ngIf="showIn == 'showInMonitor'" class="uk-grid uk-child-width-1-2@l uk-child-width-1-1@m ">
|
||||
<div *ngFor="let chart of allowedCharts[entity]" class="uk-clearfix uk-margin-bottom">
|
||||
|
@ -256,69 +255,24 @@
|
|||
<!-- </div>-->
|
||||
<div>
|
||||
<div class="main-tabs-div">
|
||||
<ul uk-tab class="uk-tab uk-text-truncate main-tabs uk-margin-remove uk-child-width-expand uk-width-3-4" uk-switcher="connect: .main-tabs-content">
|
||||
<li class="uk-padding-remove uk-active">
|
||||
<a class="uk-width-1-1 uk-height-1-1">
|
||||
<div class="tab-header">Summary</div>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngIf="publicationTotal && publicationTotal > 0 && isEntityEnabled('publication')"
|
||||
class="uk-padding-remove" (click)="show='overview'; searchResearchResults('publication', publicationTotal, publicationResults)">
|
||||
<a class="uk-width-1-1 uk-height-1-1">
|
||||
<div class="tab-header">Publications</div><div class="number">{{publicationTotal|number}}</div>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngIf="researchDataTotal && researchDataTotal > 0 && isEntityEnabled('dataset')"
|
||||
class="uk-padding-remove" (click)="show='overview'; searchResearchResults('dataset', researchDataTotal, researchDataResults)">
|
||||
<a class="uk-width-1-1 uk-height-1-1">
|
||||
<div class="tab-header">Research Data</div><div class="number">{{researchDataTotal|number}}</div>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngIf="softwareTotal && softwareTotal > 0 && isEntityEnabled('software')"
|
||||
class="uk-padding-remove" (click)="show='overview'; searchResearchResults('software', softwareTotal, softwareResults)">
|
||||
<a class="uk-width-1-1 uk-height-1-1">
|
||||
<div class="tab-header">Software</div><div class="number">{{softwareTotal|number}}</div>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngIf="orpTotal && orpTotal > 0 && isEntityEnabled('orp')"
|
||||
class="uk-padding-remove" (click)="show='overview'; searchResearchResults('other', orpTotal, orpResults)">
|
||||
<a class="uk-width-1-1 uk-height-1-1">
|
||||
<div class="tab-header">Other Research</div><div class="number">{{orpTotal|number}}</div></a>
|
||||
</li>
|
||||
<!-- <li *ngIf="statistics && statistics.statisticsDisplay && statistics.statisticsDisplay.isActive"-->
|
||||
<li *ngIf="showAnalyticsTab()"
|
||||
class="uk-padding-remove statistics" (click)="show='analysis'; activeTab='analytics'; analyticsChecked=true">
|
||||
<a class="uk-width-1-1 uk-height-1-1">
|
||||
<div class="tab-header">Analytics</div>
|
||||
<div 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>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="uk-switcher main-tabs-content">
|
||||
<li class="uk-active">
|
||||
<ng-template #summary_tab>
|
||||
<div *ngIf="community" class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding uk-inline">
|
||||
<div *ngIf="community.description"
|
||||
class="uk-margin-bottom ">
|
||||
<!-- [class]="'uk-margin-bottom '+ ((subscribeComponent && subscribeComponent.subscribers > 0) || community.date ? 'uk-margin-top' : '')">-->
|
||||
class="uk-margin-bottom ">
|
||||
<!-- [class]="'uk-margin-bottom '+ ((subscribeComponent && subscribeComponent.subscribers > 0) || community.date ? 'uk-margin-top' : '')">-->
|
||||
<div *ngIf="!showAllDescription" class="">
|
||||
{{community.description.substring(0, thresholdDescription)}}{{community.description.length > thresholdDescription ? '...' : ''}}</div>
|
||||
<div *ngIf="showAllDescription" class="uk-overflow-auto">
|
||||
<div class="uk-height-max-medium">{{community.description}}</div>
|
||||
</div>
|
||||
<!-- uk-padding uk-padding-remove-top uk-position-bottom-right-->
|
||||
<!-- uk-padding uk-padding-remove-top uk-position-bottom-right-->
|
||||
<div *ngIf="!showAllDescription && community.description.length > thresholdDescription "
|
||||
class="uk-animation-fade uk-margin-small-top uk-text-right">
|
||||
<a (click)="showAllDescription = !showAllDescription;">Read more
|
||||
</a>
|
||||
</div>
|
||||
<!-- uk-padding uk-padding-remove-top uk-position-bottom-right-->
|
||||
<!-- uk-padding uk-padding-remove-top uk-position-bottom-right-->
|
||||
<div *ngIf="showAllDescription"
|
||||
class="uk-animation-fade uk-margin-small-top uk-text-right">
|
||||
<a (click)="showAllDescription = !showAllDescription;">
|
||||
|
@ -387,7 +341,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div *ngIf="isRouteEnabled('/subjects') && community.subjects && community.subjects.length > 0"
|
||||
class="uk-width-1-3 uk-padding right-column uk-inline">
|
||||
class="uk-width-1-3@m uk-padding right-column uk-inline">
|
||||
<div class="uk-margin-bottom">
|
||||
<div class="uk-text-muted uk-margin-small-bottom">Subjects</div>
|
||||
<span *ngFor="let subject of community.subjects.slice(0,20) let i=index">
|
||||
|
@ -408,122 +362,193 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li *ngIf="publicationTotal && publicationTotal > 0 && isEntityEnabled('publication')">
|
||||
</ng-template>
|
||||
<ng-template #publications_tab>
|
||||
<ng-container *ngTemplateOutlet="tab_content; context: {
|
||||
resultType: 'publication', results: publicationResults, totalResults: publicationTotal, type: 'publication', typeName: 'publication'}">
|
||||
resultType: 'publication', fetch: fetchPublications,
|
||||
searchLinkToAdvancedPage: properties.searchLinkToAdvancedResults,
|
||||
params: getParamsForSearchLink('publications'),
|
||||
type: 'publication', typeName: 'publication'}">
|
||||
</ng-container>
|
||||
</li>
|
||||
<li *ngIf="researchDataTotal && researchDataTotal > 0 && isEntityEnabled('dataset')">
|
||||
</ng-template>
|
||||
<ng-template #datasets_tab>
|
||||
<ng-container *ngTemplateOutlet="tab_content; context: {
|
||||
resultType: 'dataset', results: researchDataResults, totalResults: researchDataTotal, type: 'dataset', typeName: 'research fata'}">
|
||||
resultType: 'dataset', fetch: fetchDatasets,
|
||||
searchLinkToAdvancedPage: properties.searchLinkToAdvancedResults,
|
||||
params: getParamsForSearchLink('datasets'),
|
||||
type: 'dataset', typeName: 'research data'}">
|
||||
</ng-container>
|
||||
</li>
|
||||
<li *ngIf="softwareTotal && softwareTotal > 0 && isEntityEnabled('software')">
|
||||
</ng-template>
|
||||
<ng-template #software_tab>
|
||||
<ng-container *ngTemplateOutlet="tab_content; context: {
|
||||
resultType: 'software', results: softwareResults, totalResults: softwareTotal, type: 'software', typeName: 'software'}">
|
||||
resultType: 'software', fetch: fetchSoftware,
|
||||
searchLinkToAdvancedPage: properties.searchLinkToAdvancedResults,
|
||||
params: getParamsForSearchLink('software'),
|
||||
type: 'software', typeName: 'software'}">
|
||||
</ng-container>
|
||||
</li>
|
||||
<li *ngIf="orpTotal && orpTotal > 0 && isEntityEnabled('orp')">
|
||||
</ng-template>
|
||||
<ng-template #other_tab>
|
||||
<ng-container *ngTemplateOutlet="tab_content; context: {
|
||||
resultType: 'other', results: orpResults, totalResults: orpTotal, type: 'orp', typeName: 'other products'}">
|
||||
resultType: 'other', fetch: fetchOrps,
|
||||
searchLinkToAdvancedPage: properties.searchLinkToAdvancedResults,
|
||||
params: getParamsForSearchLink('other'),
|
||||
type: 'orp', typeName: 'other products'}">
|
||||
</ng-container>
|
||||
</li>
|
||||
<li *ngIf="statistics && statistics.statisticsDisplay && statistics.statisticsDisplay.isActive"
|
||||
class="uk-overflow-auto">
|
||||
<div *ngIf="statistics && activeTab=='analytics'" class="uk-width-expand uk-padding">
|
||||
</ng-template>
|
||||
<ng-template #analytics_tab>
|
||||
<div *ngIf="statistics && statistics.statisticsDisplay && statistics.statisticsDisplay.isActive"
|
||||
class="content-overflow uk-overflow-auto">
|
||||
<div *ngIf="statistics && activeTab=='analytics'" class="uk-width-expand uk-padding">
|
||||
|
||||
<div class="uk-text-center">
|
||||
<button *ngIf="isEntityEnabled('publication')
|
||||
&& statistics.statisticsSum && statistics.statisticsDisplay && statistics.statisticsSum['publication'].total>0
|
||||
&&
|
||||
( statistics.statisticsDisplay.entities['publication'].numbers.map['total']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['publication'].numbers.map['project']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['publication'].numbers.map['open']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['publication'].numbers.map['closed']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['publication'].numbers.map['embargo']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['publication'].numbers.map['restricted']['showInMonitor']
|
||||
|| ( statistics.allowedEntitiesMode['showInMonitor'] && statistics.statisticsSum
|
||||
&& statistics.allowedChartsMode['showInMonitor'] && statistics.statisticsSum['publication']
|
||||
&& statistics.allowedChartsMode['showInMonitor']['publication'] && statistics.statisticsSum['publication'].total > 0
|
||||
&& statistics.allowedChartsMode['showInMonitor']['publication'].length > 0))"
|
||||
[class]="(analyticsActiveTab == 'publication' ? 'active ' : '')+' publicationAnalytics uk-icon uk-icon-button uk-margin-right'"
|
||||
uk-tooltip="title: Publications" (click)="analyticsActiveTab = 'publication'">
|
||||
<!-- <svg height="20" ratio="1" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><rect style="stroke: var(--portal-main-color);" fill="none" height="16" stroke="#000" width="12" x="3.5" y="2.5"></rect><polyline style="stroke: var(--portal-main-color);" fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg>-->
|
||||
<img src="assets/connect-assets/home/entities/publication.svg">
|
||||
</button>
|
||||
<button *ngIf="isEntityEnabled('dataset')
|
||||
&& statistics.statisticsSum && statistics.statisticsDisplay && statistics.statisticsSum['dataset'].total>0
|
||||
&&
|
||||
( statistics.statisticsDisplay.entities['dataset'].numbers.map['total']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['dataset'].numbers.map['project']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['dataset'].numbers.map['open']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['dataset'].numbers.map['closed']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['dataset'].numbers.map['embargo']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['dataset'].numbers.map['restricted']['showInMonitor']
|
||||
|| ( statistics.allowedEntitiesMode['showInMonitor'] && statistics.statisticsSum
|
||||
&& statistics.allowedChartsMode['showInMonitor'] && statistics.statisticsSum['dataset']
|
||||
&& statistics.allowedChartsMode['showInMonitor']['dataset'] && statistics.statisticsSum['dataset'].total > 0
|
||||
&& statistics.allowedChartsMode['showInMonitor']['dataset'].length > 0))"
|
||||
[class]="(analyticsActiveTab == 'dataset' ? 'active ' : '')+' datasetAnalytics uk-icon uk-icon-button uk-margin-right'"
|
||||
uk-tooltip="title: Research Data" (click)="analyticsActiveTab = 'dataset'">
|
||||
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="database"><ellipse style="stroke: var(--portal-main-color);" fill="none" stroke="#000" cx="10" cy="4.64" rx="7.5" ry="3.14"></ellipse><path style="stroke: var(--portal-main-color);" fill="none" stroke="#000" d="M17.5,8.11 C17.5,9.85 14.14,11.25 10,11.25 C5.86,11.25 2.5,9.84 2.5,8.11"></path><path style="stroke: var(--portal-main-color);"fill="none" stroke="#000" d="M17.5,11.25 C17.5,12.99 14.14,14.39 10,14.39 C5.86,14.39 2.5,12.98 2.5,11.25"></path><path style="stroke: var(--portal-main-color);" fill="none" stroke="#000" d="M17.49,4.64 L17.5,14.36 C17.5,16.1 14.14,17.5 10,17.5 C5.86,17.5 2.5,16.09 2.5,14.36 L2.5,4.64"></path></svg>-->
|
||||
<img src="assets/connect-assets/home/entities/dataset.svg">
|
||||
</button>
|
||||
<button *ngIf="isEntityEnabled('software')
|
||||
&& statistics.statisticsSum && statistics.statisticsDisplay && statistics.statisticsSum['software'].total>0
|
||||
&&
|
||||
( statistics.statisticsDisplay.entities['software'].numbers.map['total']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['software'].numbers.map['project']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['software'].numbers.map['open']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['software'].numbers.map['closed']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['software'].numbers.map['embargo']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['software'].numbers.map['restricted']['showInMonitor']
|
||||
|| ( statistics.allowedEntitiesMode['showInMonitor'] && statistics.statisticsSum
|
||||
&& statistics.allowedChartsMode['showInMonitor'] && statistics.statisticsSum['software']
|
||||
&& statistics.allowedChartsMode['showInMonitor']['software'] && statistics.statisticsSum['software'].total > 0
|
||||
&& statistics.allowedChartsMode['showInMonitor']['software'].length > 0))"
|
||||
[class]="(analyticsActiveTab == 'software' ? 'active ' : '')+' softwareAnalytics uk-icon uk-icon-button uk-margin-right'"
|
||||
uk-tooltip="title: Software" (click)="analyticsActiveTab = 'software'">
|
||||
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="cog"><circle style="stroke: var(--portal-main-color);" fill="none" stroke="#000" cx="9.997" cy="10" r="3.31"></circle><path style="stroke: var(--portal-main-color);" fill="none" stroke="#000" d="M18.488,12.285 L16.205,16.237 C15.322,15.496 14.185,15.281 13.303,15.791 C12.428,16.289 12.047,17.373 12.246,18.5 L7.735,18.5 C7.938,17.374 7.553,16.299 6.684,15.791 C5.801,15.27 4.655,15.492 3.773,16.237 L1.5,12.285 C2.573,11.871 3.317,10.999 3.317,9.991 C3.305,8.98 2.573,8.121 1.5,7.716 L3.765,3.784 C4.645,4.516 5.794,4.738 6.687,4.232 C7.555,3.722 7.939,2.637 7.735,1.5 L12.263,1.5 C12.072,2.637 12.441,3.71 13.314,4.22 C14.206,4.73 15.343,4.516 16.225,3.794 L18.487,7.714 C17.404,8.117 16.661,8.988 16.67,10.009 C16.672,11.018 17.415,11.88 18.488,12.285 L18.488,12.285 Z"></path></svg>-->
|
||||
<img src="assets/connect-assets/home/entities/software.svg">
|
||||
</button>
|
||||
<button *ngIf="isEntityEnabled('orp')
|
||||
&& statistics.statisticsSum && statistics.statisticsDisplay && statistics.statisticsSum['orp'].total>0
|
||||
&&
|
||||
( statistics.statisticsDisplay.entities['orp'].numbers.map['total']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['orp'].numbers.map['project']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['orp'].numbers.map['open']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['orp'].numbers.map['closed']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['orp'].numbers.map['embargo']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['orp'].numbers.map['restricted']['showInMonitor']
|
||||
|| ( statistics.allowedEntitiesMode['showInMonitor'] && statistics.statisticsSum
|
||||
&& statistics.allowedChartsMode['showInMonitor'] && statistics.statisticsSum['orp']
|
||||
&& statistics.allowedChartsMode['showInMonitor']['orp'] && statistics.statisticsSum['orp'].total > 0
|
||||
&& statistics.allowedChartsMode['showInMonitor']['orp'].length > 0))"
|
||||
[class]="(analyticsActiveTab == 'orp' ? 'active ' : '')+' otherAnalytics uk-icon uk-icon-button'"
|
||||
uk-tooltip="title: Other Research Products" (click)="analyticsActiveTab = 'orp'">
|
||||
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="world"><path style="stroke: var(--portal-main-color);" fill="none" stroke="#000" d="M1,10.5 L19,10.5"></path><path style="stroke: var(--portal-main-color);" fill="none" stroke="#000" d="M2.35,15.5 L17.65,15.5"></path><path style="stroke: var(--portal-main-color);" fill="none" stroke="#000" d="M2.35,5.5 L17.523,5.5"></path><path style="stroke: var(--portal-main-color);" fill="none" stroke="#000" d="M10,19.46 L9.98,19.46 C7.31,17.33 5.61,14.141 5.61,10.58 C5.61,7.02 7.33,3.83 10,1.7 C10.01,1.7 9.99,1.7 10,1.7 L10,1.7 C12.67,3.83 14.4,7.02 14.4,10.58 C14.4,14.141 12.67,17.33 10,19.46 L10,19.46 L10,19.46 L10,19.46 Z"></path><circle style="stroke: var(--portal-main-color);" fill="none" stroke="#000" cx="10" cy="10.5" r="9"></circle></svg>-->
|
||||
<img src="assets/connect-assets/home/entities/other.svg">
|
||||
</button>
|
||||
<div class="uk-text-center">
|
||||
<button *ngIf="isEntityEnabled('publication')
|
||||
&& statistics.statisticsSum && statistics.statisticsDisplay && statistics.statisticsSum['publication'].total>0
|
||||
&& statistics.statisticsSum && statistics.statisticsDisplay && statistics.statisticsSum['publication'].total>0
|
||||
&&
|
||||
( statistics.statisticsDisplay.entities['publication'].numbers.map['total']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['publication'].numbers.map['project']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['publication'].numbers.map['open']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['publication'].numbers.map['closed']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['publication'].numbers.map['embargo']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['publication'].numbers.map['restricted']['showInMonitor']
|
||||
|| ( statistics.allowedEntitiesMode['showInMonitor'] && statistics.statisticsSum
|
||||
&& statistics.allowedChartsMode['showInMonitor'] && statistics.statisticsSum['publication']
|
||||
&& statistics.allowedChartsMode['showInMonitor']['publication'] && statistics.statisticsSum['publication'].total > 0
|
||||
&& statistics.allowedChartsMode['showInMonitor']['publication'].length > 0))"
|
||||
[class]="(analyticsActiveTab == 'publication' ? 'active ' : '')+' publicationAnalytics uk-icon uk-icon-button uk-margin-right'"
|
||||
uk-tooltip="title: Publications" (click)="analyticsActiveTab = 'publication'">
|
||||
<!-- <svg height="20" ratio="1" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><rect style="stroke: var(--portal-main-color);" fill="none" height="16" stroke="#000" width="12" x="3.5" y="2.5"></rect><polyline style="stroke: var(--portal-main-color);" fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg>-->
|
||||
<img src="assets/connect-assets/home/entities/publication.svg">
|
||||
</button>
|
||||
<button *ngIf="isEntityEnabled('dataset')
|
||||
&& statistics.statisticsSum && statistics.statisticsDisplay && statistics.statisticsSum['dataset'].total>0
|
||||
&&
|
||||
( statistics.statisticsDisplay.entities['dataset'].numbers.map['total']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['dataset'].numbers.map['project']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['dataset'].numbers.map['open']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['dataset'].numbers.map['closed']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['dataset'].numbers.map['embargo']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['dataset'].numbers.map['restricted']['showInMonitor']
|
||||
|| ( statistics.allowedEntitiesMode['showInMonitor'] && statistics.statisticsSum
|
||||
&& statistics.allowedChartsMode['showInMonitor'] && statistics.statisticsSum['dataset']
|
||||
&& statistics.allowedChartsMode['showInMonitor']['dataset'] && statistics.statisticsSum['dataset'].total > 0
|
||||
&& statistics.allowedChartsMode['showInMonitor']['dataset'].length > 0))"
|
||||
[class]="(analyticsActiveTab == 'dataset' ? 'active ' : '')+' datasetAnalytics uk-icon uk-icon-button uk-margin-right'"
|
||||
uk-tooltip="title: Research Data" (click)="analyticsActiveTab = 'dataset'">
|
||||
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="database"><ellipse style="stroke: var(--portal-main-color);" fill="none" stroke="#000" cx="10" cy="4.64" rx="7.5" ry="3.14"></ellipse><path style="stroke: var(--portal-main-color);" fill="none" stroke="#000" d="M17.5,8.11 C17.5,9.85 14.14,11.25 10,11.25 C5.86,11.25 2.5,9.84 2.5,8.11"></path><path style="stroke: var(--portal-main-color);"fill="none" stroke="#000" d="M17.5,11.25 C17.5,12.99 14.14,14.39 10,14.39 C5.86,14.39 2.5,12.98 2.5,11.25"></path><path style="stroke: var(--portal-main-color);" fill="none" stroke="#000" d="M17.49,4.64 L17.5,14.36 C17.5,16.1 14.14,17.5 10,17.5 C5.86,17.5 2.5,16.09 2.5,14.36 L2.5,4.64"></path></svg>-->
|
||||
<img src="assets/connect-assets/home/entities/dataset.svg">
|
||||
</button>
|
||||
<button *ngIf="isEntityEnabled('software')
|
||||
&& statistics.statisticsSum && statistics.statisticsDisplay && statistics.statisticsSum['software'].total>0
|
||||
&&
|
||||
( statistics.statisticsDisplay.entities['software'].numbers.map['total']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['software'].numbers.map['project']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['software'].numbers.map['open']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['software'].numbers.map['closed']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['software'].numbers.map['embargo']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['software'].numbers.map['restricted']['showInMonitor']
|
||||
|| ( statistics.allowedEntitiesMode['showInMonitor'] && statistics.statisticsSum
|
||||
&& statistics.allowedChartsMode['showInMonitor'] && statistics.statisticsSum['software']
|
||||
&& statistics.allowedChartsMode['showInMonitor']['software'] && statistics.statisticsSum['software'].total > 0
|
||||
&& statistics.allowedChartsMode['showInMonitor']['software'].length > 0))"
|
||||
[class]="(analyticsActiveTab == 'software' ? 'active ' : '')+' softwareAnalytics uk-icon uk-icon-button uk-margin-right'"
|
||||
uk-tooltip="title: Software" (click)="analyticsActiveTab = 'software'">
|
||||
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="cog"><circle style="stroke: var(--portal-main-color);" fill="none" stroke="#000" cx="9.997" cy="10" r="3.31"></circle><path style="stroke: var(--portal-main-color);" fill="none" stroke="#000" d="M18.488,12.285 L16.205,16.237 C15.322,15.496 14.185,15.281 13.303,15.791 C12.428,16.289 12.047,17.373 12.246,18.5 L7.735,18.5 C7.938,17.374 7.553,16.299 6.684,15.791 C5.801,15.27 4.655,15.492 3.773,16.237 L1.5,12.285 C2.573,11.871 3.317,10.999 3.317,9.991 C3.305,8.98 2.573,8.121 1.5,7.716 L3.765,3.784 C4.645,4.516 5.794,4.738 6.687,4.232 C7.555,3.722 7.939,2.637 7.735,1.5 L12.263,1.5 C12.072,2.637 12.441,3.71 13.314,4.22 C14.206,4.73 15.343,4.516 16.225,3.794 L18.487,7.714 C17.404,8.117 16.661,8.988 16.67,10.009 C16.672,11.018 17.415,11.88 18.488,12.285 L18.488,12.285 Z"></path></svg>-->
|
||||
<img src="assets/connect-assets/home/entities/software.svg">
|
||||
</button>
|
||||
<button *ngIf="isEntityEnabled('orp')
|
||||
&& statistics.statisticsSum && statistics.statisticsDisplay && statistics.statisticsSum['orp'].total>0
|
||||
&&
|
||||
( statistics.statisticsDisplay.entities['orp'].numbers.map['total']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['orp'].numbers.map['project']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['orp'].numbers.map['open']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['orp'].numbers.map['closed']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['orp'].numbers.map['embargo']['showInMonitor']
|
||||
|| statistics.statisticsDisplay.entities['orp'].numbers.map['restricted']['showInMonitor']
|
||||
|| ( statistics.allowedEntitiesMode['showInMonitor'] && statistics.statisticsSum
|
||||
&& statistics.allowedChartsMode['showInMonitor'] && statistics.statisticsSum['orp']
|
||||
&& statistics.allowedChartsMode['showInMonitor']['orp'] && statistics.statisticsSum['orp'].total > 0
|
||||
&& statistics.allowedChartsMode['showInMonitor']['orp'].length > 0))"
|
||||
[class]="(analyticsActiveTab == 'orp' ? 'active ' : '')+' otherAnalytics uk-icon uk-icon-button'"
|
||||
uk-tooltip="title: Other Research Products" (click)="analyticsActiveTab = 'orp'">
|
||||
<!-- <svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="world"><path style="stroke: var(--portal-main-color);" fill="none" stroke="#000" d="M1,10.5 L19,10.5"></path><path style="stroke: var(--portal-main-color);" fill="none" stroke="#000" d="M2.35,15.5 L17.65,15.5"></path><path style="stroke: var(--portal-main-color);" fill="none" stroke="#000" d="M2.35,5.5 L17.523,5.5"></path><path style="stroke: var(--portal-main-color);" fill="none" stroke="#000" d="M10,19.46 L9.98,19.46 C7.31,17.33 5.61,14.141 5.61,10.58 C5.61,7.02 7.33,3.83 10,1.7 C10.01,1.7 9.99,1.7 10,1.7 L10,1.7 C12.67,3.83 14.4,7.02 14.4,10.58 C14.4,14.141 12.67,17.33 10,19.46 L10,19.46 L10,19.46 L10,19.46 Z"></path><circle style="stroke: var(--portal-main-color);" fill="none" stroke="#000" cx="10" cy="10.5" r="9"></circle></svg>-->
|
||||
<img src="assets/connect-assets/home/entities/other.svg">
|
||||
</button>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<ng-container *ngTemplateOutlet="analytics_tab_content; context: {
|
||||
type: 'publication', typeName: 'publications'}">
|
||||
</ng-container>
|
||||
<ng-container *ngTemplateOutlet="analytics_tab_content; context: {
|
||||
type: 'dataset', typeName: 'research data'}">
|
||||
</ng-container>
|
||||
<ng-container *ngTemplateOutlet="analytics_tab_content; context: {
|
||||
type: 'software', typeName: 'software'}">
|
||||
</ng-container>
|
||||
<ng-container *ngTemplateOutlet="analytics_tab_content; context: {
|
||||
type: 'orp', typeName: 'other products'}">
|
||||
</ng-container>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<ng-container *ngTemplateOutlet="analytics_tab_content; context: {
|
||||
type: 'publication', typeName: 'publications'}">
|
||||
</ng-container>
|
||||
<ng-container *ngTemplateOutlet="analytics_tab_content; context: {
|
||||
type: 'dataset', typeName: 'research data'}">
|
||||
</ng-container>
|
||||
<ng-container *ngTemplateOutlet="analytics_tab_content; context: {
|
||||
type: 'software', typeName: 'software'}">
|
||||
</ng-container>
|
||||
<ng-container *ngTemplateOutlet="analytics_tab_content; context: {
|
||||
type: 'orp', typeName: 'other products'}">
|
||||
</ng-container>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</ng-template>
|
||||
|
||||
<my-tabs (selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<my-tab
|
||||
[tabTitle]="'Summary'" [tabId]="'summary'" class="uk-active">
|
||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchPublications.searchUtils.totalResults > 0 && isEntityEnabled('publication')"
|
||||
[tabTitle]="'Publications'" [tabId]="'publications'"
|
||||
[tabNumber]="fetchPublications.searchUtils.totalResults">
|
||||
<ng-container *ngTemplateOutlet="publications_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchDatasets.searchUtils.totalResults > 0 && isEntityEnabled('dataset')"
|
||||
[tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults" [tabId]="'datasets'">
|
||||
<ng-container *ngTemplateOutlet="datasets_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchSoftware.searchUtils.totalResults > 0 && isEntityEnabled('software')"
|
||||
[tabTitle]="'Software'" [tabNumber]="fetchSoftware.searchUtils.totalResults" [tabId]="'software'">
|
||||
<ng-container *ngTemplateOutlet="software_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchOrps.searchUtils.totalResults > 0 && isEntityEnabled('orp')"
|
||||
[tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults" [tabId]="'other'">
|
||||
<ng-container *ngTemplateOutlet="other_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="showAnalyticsTab()"
|
||||
[tabTitle]="'Analytics'" [statistics]="true" [tabId]="'analytics'">
|
||||
<ng-container *ngTemplateOutlet="analytics_tab;"></ng-container>
|
||||
</my-tab>
|
||||
</my-tabs>
|
||||
|
||||
<my-small-tabs (selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<my-tab
|
||||
[tabTitle]="'Summary'" [tabId]="'summary'" class="uk-active">
|
||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchPublications.searchUtils.totalResults > 0 && isEntityEnabled('publication')"
|
||||
[tabTitle]="'Publications'" [tabId]="'publications'"
|
||||
[tabNumber]="fetchPublications.searchUtils.totalResults">
|
||||
<ng-container *ngTemplateOutlet="publications_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchDatasets.searchUtils.totalResults > 0 && isEntityEnabled('dataset')"
|
||||
[tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults" [tabId]="'datasets'">
|
||||
<ng-container *ngTemplateOutlet="datasets_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchSoftware.searchUtils.totalResults > 0 && isEntityEnabled('software')"
|
||||
[tabTitle]="'Software'" [tabNumber]="fetchSoftware.searchUtils.totalResults" [tabId]="'software'">
|
||||
<ng-container *ngTemplateOutlet="software_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchOrps.searchUtils.totalResults > 0 && isEntityEnabled('orp')"
|
||||
[tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults" [tabId]="'other'">
|
||||
<ng-container *ngTemplateOutlet="other_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="showAnalyticsTab()"
|
||||
[tabTitle]="'Analytics'" [statistics]="true" [tabId]="'analytics'">
|
||||
<ng-container *ngTemplateOutlet="analytics_tab;"></ng-container>
|
||||
</my-tab>
|
||||
</my-small-tabs>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-3-5@m uk-width-1-1@s">
|
||||
<div>
|
||||
|
|
|
@ -23,6 +23,8 @@ import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
|
|||
import {UserManagementService} from "../openaireLibrary/services/user-management.service";
|
||||
import {SubscribeComponent} from "../utils/subscribe/subscribe.component";
|
||||
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {FetchResearchResults} from "../openaireLibrary/utils/fetchEntitiesClasses/fetchResearchResults.class";
|
||||
import {ErrorCodes} from "../openaireLibrary/utils/properties/errorCodes";
|
||||
|
||||
@Component({
|
||||
selector: 'community',
|
||||
|
@ -36,10 +38,10 @@ export class CommunityComponent {
|
|||
public piwiksub: any;
|
||||
public subfunders: any;
|
||||
|
||||
public publicationTotal = null;
|
||||
public researchDataTotal = null;
|
||||
public softwareTotal = null;
|
||||
public orpTotal = null;
|
||||
// public publicationTotal = null;
|
||||
// public researchDataTotal = null;
|
||||
// public softwareTotal = null;
|
||||
// public orpTotal = null;
|
||||
public projectTotal = null;
|
||||
public contentProviderTotal = null;
|
||||
public organizationTotal = null;
|
||||
|
@ -50,10 +52,25 @@ export class CommunityComponent {
|
|||
params: any = {};
|
||||
properties: EnvProperties;
|
||||
|
||||
public publicationResults = null;
|
||||
public researchDataResults = null;
|
||||
public softwareResults = null;
|
||||
public orpResults = null;
|
||||
public errorCodes: ErrorCodes = new ErrorCodes();
|
||||
|
||||
// public publicationResults = null;
|
||||
// public researchDataResults = null;
|
||||
// public softwareResults = null;
|
||||
// public orpResults = null;
|
||||
|
||||
// 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;
|
||||
|
||||
// Variables for publications, research data, projects, content providers, related content providers tabs
|
||||
public fetchPublications: FetchResearchResults;
|
||||
public fetchDatasets: FetchResearchResults;
|
||||
public fetchSoftware: FetchResearchResults;
|
||||
public fetchOrps: FetchResearchResults;
|
||||
public searchNumber: number = 5;
|
||||
|
||||
@Input() communityId = null;
|
||||
public community = null;
|
||||
|
@ -124,6 +141,10 @@ export class CommunityComponent {
|
|||
this._meta.updateTag({content: title}, "property='og:title'");
|
||||
this._title.setTitle(title);
|
||||
|
||||
this.fetchPublications = new FetchResearchResults(this._searchResearchResultsService);
|
||||
this.fetchDatasets = new FetchResearchResults(this._searchResearchResultsService);
|
||||
this.fetchSoftware = new FetchResearchResults(this._searchResearchResultsService);
|
||||
this.fetchOrps = new FetchResearchResults(this._searchResearchResultsService);
|
||||
}
|
||||
|
||||
public ngOnInit() {
|
||||
|
@ -247,38 +268,107 @@ export class CommunityComponent {
|
|||
});
|
||||
}
|
||||
|
||||
public countResearchResults(resultType: string) {
|
||||
this._searchResearchResultsService.countTotalResults(resultType, this.properties, "&fq=communityid=" + this.communityId).subscribe(
|
||||
researchResultsTotal => {
|
||||
this.setTotal(resultType, researchResultsTotal);
|
||||
if (resultType == "publication") {
|
||||
//this.searchResearchResults(resultType, this.publicationTotal, this.publicationResults);
|
||||
}
|
||||
},
|
||||
error => {
|
||||
this.handleError("Error getting number of " + this.getEntityName(resultType, true, true) + " for community with id: " + this.communityId, error);
|
||||
}
|
||||
);
|
||||
}
|
||||
private searchPublications(page: number, size: number) {
|
||||
this.setActiveTab("publication");
|
||||
|
||||
public searchResearchResults(resultType: string, resultsTotal: number, results: Array<any>) {
|
||||
this.setActiveTab(resultType);
|
||||
|
||||
if (resultsTotal > 0 && results == null) {
|
||||
this.showLoading = true;
|
||||
|
||||
this._searchResearchResultsService.search(resultType, "", "&fq=communityid=" + this.communityId, 1, 5, "resultdateofacceptance,descending", [], this.properties).subscribe(
|
||||
researchResults => {
|
||||
this.setResults(resultType, researchResults[1]);
|
||||
this.showLoading = false;
|
||||
},
|
||||
error => {
|
||||
this.handleError("Error getting " + this.getEntityName(resultType, true, true) + " for community with id: " + this.communityId, error);
|
||||
}
|
||||
);
|
||||
if (this.reloadPublications &&
|
||||
(this.fetchPublications.searchUtils.status == this.errorCodes.LOADING ||
|
||||
(this.fetchPublications.searchUtils.status == this.errorCodes.DONE && this.fetchPublications.searchUtils.totalResults > 0)
|
||||
)
|
||||
) {
|
||||
this.fetchPublications.getResultsForCommunity("publication", this.communityId, page, size, this.properties);
|
||||
}
|
||||
this.reloadPublications = false;
|
||||
}
|
||||
|
||||
private searchDatasets(page: number, size: number) {
|
||||
this.setActiveTab("dataset");
|
||||
|
||||
if (this.reloadDatasets &&
|
||||
(this.fetchDatasets.searchUtils.status == this.errorCodes.LOADING ||
|
||||
(this.fetchDatasets.searchUtils.status == this.errorCodes.DONE && this.fetchDatasets.searchUtils.totalResults > 0)
|
||||
)
|
||||
) {
|
||||
this.fetchDatasets.getResultsForCommunity("dataset", this.communityId, page, size, this.properties);
|
||||
}
|
||||
this.reloadDatasets = false;
|
||||
}
|
||||
|
||||
private searchSoftware(page: number, size: number) {
|
||||
this.setActiveTab("software");
|
||||
|
||||
if (this.reloadSoftware &&
|
||||
(this.fetchSoftware.searchUtils.status == this.errorCodes.LOADING ||
|
||||
(this.fetchSoftware.searchUtils.status == this.errorCodes.DONE && this.fetchSoftware.searchUtils.totalResults > 0)
|
||||
)
|
||||
) {
|
||||
this.fetchSoftware.getResultsForCommunity("software", this.communityId, page, size, this.properties);
|
||||
}
|
||||
this.reloadSoftware = false;
|
||||
}
|
||||
|
||||
private searchOrps(page: number, size: number) {
|
||||
this.setActiveTab("other");
|
||||
|
||||
if (this.reloadOrps &&
|
||||
(this.fetchOrps.searchUtils.status == this.errorCodes.LOADING ||
|
||||
(this.fetchOrps.searchUtils.status == this.errorCodes.DONE && this.fetchOrps.searchUtils.totalResults > 0)
|
||||
)
|
||||
) {
|
||||
this.fetchOrps.getResultsForCommunity("other", this.communityId, page, size, this.properties);
|
||||
}
|
||||
this.reloadOrps = false;
|
||||
}
|
||||
|
||||
private countResearchResults(resultType: string) {
|
||||
let fetch: FetchResearchResults;
|
||||
|
||||
if (resultType == "publication") {
|
||||
fetch = this.fetchPublications;
|
||||
} else if (resultType == "dataset") {
|
||||
fetch = this.fetchDatasets;
|
||||
} else if (resultType == "software") {
|
||||
fetch = this.fetchSoftware;
|
||||
} else if (resultType == "other") {
|
||||
fetch = this.fetchOrps;
|
||||
}
|
||||
|
||||
fetch.getNumForCommunity(resultType, this.communityId, this.properties);
|
||||
}
|
||||
|
||||
|
||||
// public countResearchResults(resultType: string) {
|
||||
// this._searchResearchResultsService.countTotalResults(resultType, this.properties, "&fq=communityid=" + this.communityId).subscribe(
|
||||
// researchResultsTotal => {
|
||||
// this.setTotal(resultType, researchResultsTotal);
|
||||
// if (resultType == "publication") {
|
||||
// //this.searchResearchResults(resultType, this.publicationTotal, this.publicationResults);
|
||||
// }
|
||||
// },
|
||||
// error => {
|
||||
// this.handleError("Error getting number of " + this.getEntityName(resultType, true, true) + " for community with id: " + this.communityId, error);
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// public searchResearchResults(resultType: string, resultsTotal: number, results: Array<any>) {
|
||||
// this.setActiveTab(resultType);
|
||||
//
|
||||
// if (resultsTotal > 0 && results == null) {
|
||||
// this.showLoading = true;
|
||||
//
|
||||
// this._searchResearchResultsService.search(resultType, "", "&fq=communityid=" + this.communityId, 1, 5, "resultdateofacceptance,descending", [], this.properties).subscribe(
|
||||
// researchResults => {
|
||||
// this.setResults(resultType, researchResults[1]);
|
||||
// this.showLoading = false;
|
||||
// },
|
||||
// error => {
|
||||
// this.handleError("Error getting " + this.getEntityName(resultType, true, true) + " for community with id: " + this.communityId, error);
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
public ngOnDestroy() {
|
||||
if (this.piwiksub) {
|
||||
this.piwiksub.unsubscribe();
|
||||
|
@ -354,27 +444,37 @@ export class CommunityComponent {
|
|||
}
|
||||
}
|
||||
|
||||
private setResults(entityType: string, results: Array<any>) {
|
||||
if (entityType == "publication") {
|
||||
this.publicationResults = results;
|
||||
} else if (entityType == "dataset") {
|
||||
this.researchDataResults = results;
|
||||
} else if (entityType == "software") {
|
||||
this.softwareResults = results;
|
||||
} else if (entityType == "other") {
|
||||
this.orpResults = results;
|
||||
}
|
||||
}
|
||||
// private setResults(entityType: string, results: Array<any>) {
|
||||
// if (entityType == "publication") {
|
||||
// this.publicationResults = results;
|
||||
// } else if (entityType == "dataset") {
|
||||
// this.researchDataResults = results;
|
||||
// } else if (entityType == "software") {
|
||||
// this.softwareResults = results;
|
||||
// } else if (entityType == "other") {
|
||||
// this.orpResults = results;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private setTotal(entityType: string, total: number) {
|
||||
// if (entityType == "publication") {
|
||||
// this.publicationTotal = total;
|
||||
// console.log(this.publicationTotal);
|
||||
// } else if (entityType == "dataset") {
|
||||
// this.researchDataTotal = total;
|
||||
// } else if (entityType == "software") {
|
||||
// this.softwareTotal = total;
|
||||
// } else if (entityType == "other") {
|
||||
// this.orpTotal = total;
|
||||
// }
|
||||
// }
|
||||
|
||||
private setTotal(entityType: string, total: number) {
|
||||
if (entityType == "publication") {
|
||||
this.publicationTotal = total;
|
||||
} else if (entityType == "dataset") {
|
||||
this.researchDataTotal = total;
|
||||
} else if (entityType == "software") {
|
||||
this.softwareTotal = total;
|
||||
} else if (entityType == "other") {
|
||||
this.orpTotal = total;
|
||||
|
||||
public getParamsForSearchLink(type: string = "") {
|
||||
if(type) {
|
||||
return this.routerHelper.createQueryParams(['type', 'qf', 'sortBy'], [type, 'false', 'resultdateofacceptance,descending']);
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -536,4 +636,28 @@ export class CommunityComponent {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public onSelectActiveTab(activeTabId) {
|
||||
if(this.activeTab != "activaTabId") { // tab really changed
|
||||
if (activeTabId == 'summary') {
|
||||
this.activeTab = 'summary';
|
||||
} else if (activeTabId == 'publications') {
|
||||
this.show = 'overview';
|
||||
this.searchPublications(1, this.searchNumber);
|
||||
} else if (activeTabId == 'datasets') {
|
||||
this.show = 'overview';
|
||||
this.searchDatasets(1, this.searchNumber);
|
||||
} else if (activeTabId == 'software') {
|
||||
this.show = 'overview';
|
||||
this.searchSoftware(1, this.searchNumber);
|
||||
} else if (activeTabId == 'other') {
|
||||
this.show='overview';
|
||||
this.searchOrps(1, this.searchNumber);
|
||||
} else if (activeTabId == 'analytics') {
|
||||
this.show = 'analysis';
|
||||
this.activeTab = 'analytics';
|
||||
this.analyticsChecked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ import {CommonModule} from '@angular/common';
|
|||
import {FormsModule} from '@angular/forms';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {CommunityComponent} from './community.component';
|
||||
import {ResultsComponent} from '../searchEntries/results/results.component';
|
||||
import {SearchTabComponent} from '../openaireLibrary/utils/tabs/contents/search-tab.component';
|
||||
|
||||
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
|
||||
import {CommunityService} from '../openaireLibrary/connect/community/community.service';
|
||||
|
@ -28,6 +28,9 @@ import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2js
|
|||
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
|
||||
import {MatSelectModule} from "@angular/material";
|
||||
import {EntitiesSelectionModule} from "../openaireLibrary/searchPages/searchUtils/entitiesSelection.module";
|
||||
import {TabsModule} from "../openaireLibrary/utils/tabs/tabs.module";
|
||||
import {SearchTabModule} from "../openaireLibrary/utils/tabs/contents/search-tab.module";
|
||||
import {ErrorMessagesModule} from "../openaireLibrary/utils/errorMessages.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -35,10 +38,11 @@ import {EntitiesSelectionModule} from "../openaireLibrary/searchPages/searchUtil
|
|||
SubscribeModule, StatisticsModule, ManageModule, InviteModule,
|
||||
SearchZenodoCommunitiesServiceModule, ZenodoCommunitiesServiceModule, SearchFormModule, SearchDataprovidersServiceModule, SearchProjectsServiceModule,
|
||||
SearchResearchResultsServiceModule, SearchResultsModule, CuratorsModule, AffiliationsModule,
|
||||
Schema2jsonldModule, SEOServiceModule, MatSelectModule, EntitiesSelectionModule
|
||||
Schema2jsonldModule, SEOServiceModule, MatSelectModule, EntitiesSelectionModule,
|
||||
TabsModule, SearchTabModule, ErrorMessagesModule
|
||||
],
|
||||
declarations: [
|
||||
CommunityComponent, ResultsComponent
|
||||
CommunityComponent
|
||||
],
|
||||
providers:[
|
||||
FreeGuard, PreviousRouteRecorder,
|
||||
|
|
Loading…
Reference in New Issue