+
+
Description
+
{{projectInfo.description.substring(0, showNumDescription)}}
thresholdDescription">...
+ projectInfo.description.length > thresholdDescription">...
thresholdDescription" class="uk-text-right">
@@ -811,135 +825,142 @@
-
-
+
![](assets/common-assets/graph.svg)
-
Powered by OpenAIRE Open Research Graph
-
- Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
+ Powered by OpenAIRE Open Research Graph
+
+ . Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
-
+
Any information missing or wrong?
Report an Issue
@@ -1035,3 +1130,6 @@
[properties]="properties" [entityType]="'project'" [title]="projectName" [fields]="feedbackFields"
[showForm]="showFeedback" (show)="showFeedback = $event">
+
+
+
\ No newline at end of file
diff --git a/landingPages/project/project.component.ts b/landingPages/project/project.component.ts
index 7cd08bf3..5a978549 100644
--- a/landingPages/project/project.component.ts
+++ b/landingPages/project/project.component.ts
@@ -73,7 +73,11 @@ export class ProjectComponent {
public showLoading: boolean = true;
// Active tab variable for responsiveness
- public activeTab: string = "Publications";
+ public activeTab: string = "";
+
+ public firstTab: string = "";
+ public _numberOfTabs: number = 0;
+ public tabsAreInitialized: boolean = false;
@ViewChild('statisticsModal') statisticsModal;
@@ -88,7 +92,7 @@ export class ProjectComponent {
private reloadOrps: boolean = true;
// Variables for entity selections on the right column
- public share_research_results_type: string = "";
+ public share_research_results_type: string = "results";
public download_research_results_type: string = "";
// Variables for publications, research data, software tabs
@@ -493,6 +497,10 @@ export class ProjectComponent {
}
public openDownloadReportModal() {
+ if(this.fetchPublications.searchUtils.totalResults > 0 || this.fetchDatasets.searchUtils.totalResults > 0 ||
+ this.fetchSoftware.searchUtils.totalResults > 0 || this.fetchOrps.searchUtils.totalResults > 0) {
+ this.download_research_results_type = "results";
+ }
this.downloadReportModal.cancelButton = false;
this.downloadReportModal.okButton = false;
this.downloadReportModal.alertTitle = "Download report";
@@ -770,4 +778,70 @@ export class ProjectComponent {
public scroll() {
HelperFunctions.scroll();
}
+
+ public get hasPrimaryInfo(): boolean {
+ return !!this.projectInfo && (
+ !!this.projectInfo.description
+ );
+ }
+
+ public get hasSecondaryInfo(): boolean {
+ return !!this.projectInfo && (
+ (!!this.projectInfo.organizations && this.projectInfo.organizations.length > 0)
+ );
+ }
+
+ 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;
+ }
}