diff --git a/landingPages/organization/organization.component.html b/landingPages/organization/organization.component.html index 6b4d1454..4094cbb2 100644 --- a/landingPages/organization/organization.component.html +++ b/landingPages/organization/organization.component.html @@ -271,7 +271,7 @@
-
+

-
+
Funding / {{openaireEntities.PROJECTS}}

-
+
{{openaireEntities.DATASOURCES}}

-
+
{{openaireEntities.PUBLICATIONS}}

-
+
{{openaireEntities.DATASETS}}

-
+
{{openaireEntities.SOFTWARE}}

-
+
{{openaireEntities.OTHER}}
@@ -323,17 +328,46 @@
-
-
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+
@@ -361,96 +395,180 @@
-
-
- Content report -
-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
-
- No reports available -
-
-
-
- Funder report -
-
-
-
-
-
    -
  • - -
  • -
  • - -
  • -
-
-
-
- No reports available -
-
+
- + + + + +
+
+ Content report +
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+ No reports available +
+
+
+
+ Funder report +
+
+
+
+
+
    +
  • + +
  • +
  • + +
  • +
+
+
+
+ No reports available +
+
+
+ + + + + + + + + + + + + + + + +
+
Do you wish to download a CSV file? Note that this process may take a while.
+
+ + +
+
+
+ +
There was an error in csv downloading. Please try again later.
+
+ + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
diff --git a/landingPages/organization/organization.component.ts b/landingPages/organization/organization.component.ts index a073a54c..4e53a1ca 100644 --- a/landingPages/organization/organization.component.ts +++ b/landingPages/organization/organization.component.ts @@ -27,6 +27,7 @@ import {properties} from "../../../../environments/environment"; import {OpenaireEntities} from '../../utils/properties/searchFields'; import {Option} from '../../sharedComponents/input/input.component'; import {LayoutService} from '../../dashboard/sharedComponents/sidebar/layout.service'; +import {FullScreenModalComponent} from "../../utils/modal/full-screen-modal/full-screen-modal.component"; declare var ResizeObserver; @@ -69,17 +70,23 @@ export class OrganizationComponent { // Active tab variable for responsiveness public activeTab: string = ""; - - @ViewChild('downloadReportsModal') downloadReportsModal; + @ViewChild('fsModal') fsModal: FullScreenModalComponent; + + @ViewChild('downloadReportsModal') downloadReportsModal; + @ViewChild('downloadReportsFsModal') downloadReportsFsModal: FullScreenModalComponent; // @ViewChild('downloadReportModal') downloadReportModal; // @ViewChild('downloadFunderReportModal') downloadFunderReportModal; @ViewChild('addThisModal') addThisModal; + @ViewChild('addThisFsModal') addThisFsModal: FullScreenModalComponent; @ViewChild(ModalLoading) loading: ModalLoading; // Alert box when CSV: Project Publications for a funder is requested @ViewChild('AlertModalApplyAll') alertApplyAll; + @ViewChild('AlertFsModalApplyAll') alertFsApplyAll; + // Alert box when something is wrong with CSV requests @ViewChild('AlertModalCsvError') alertCsvError; + @ViewChild('AlertFsModalCsvError') alertFsCsvError; public routerHelper: RouterHelper = new RouterHelper(); public errorCodes: ErrorCodes = new ErrorCodes(); @@ -119,10 +126,13 @@ export class OrganizationComponent { public feedbackFields: string [] = ['Name', 'Country', 'Other']; @ViewChild('AlertModalDeletedByInference') alertModalDeletedByInference; + @ViewChild('AlertModalDeletedByInferenceFS') alertModalDeletedByInferenceFS; // @ViewChild('projectsModal') projectsModal; public deleteByInferenceOpened: boolean = false; public isMobile: boolean = false; + public mobileContent: "info" | "actions" = "info"; + public viewAllMobile: string = ""; constructor(private element: ElementRef, private _organizationService: OrganizationService, @@ -618,13 +628,19 @@ export class OrganizationComponent { } public confirmOpenApplyAll(contentType: string, contentFileName: string) { - this.alertApplyAll.cancelButton = true; - this.alertApplyAll.okButton = true; - this.alertApplyAll.alertTitle = "CSV FILE"; - this.alertApplyAll.message = "Do you wish to download a CSV file? Note that this process may take a while."; - this.alertApplyAll.okButtonText = "Yes"; - this.alertApplyAll.cancelButtonText = "No"; - this.alertApplyAll.open(); + if(this.isMobile) { + this.alertFsApplyAll.title = "CSV FILE"; + this.alertFsApplyAll.okButton = false; + this.alertFsApplyAll.open(); + } else { + this.alertApplyAll.cancelButton = true; + this.alertApplyAll.okButton = true; + this.alertApplyAll.alertTitle = "CSV FILE"; + this.alertApplyAll.message = "Do you wish to download a CSV file? Note that this process may take a while."; + this.alertApplyAll.okButtonText = "Yes"; + this.alertApplyAll.cancelButtonText = "No"; + this.alertApplyAll.open(); + } this.funderId = this.funder.id; this.funderCount = this.funder.number; this.funderContentType = contentType; @@ -636,12 +652,19 @@ export class OrganizationComponent { } public confirmOpenCsvError() { - this.alertCsvError.cancelButton = false; - this.alertCsvError.okButton = true; - this.alertCsvError.alertTitle = "ERROR DOWNLOADING CSV FILE"; - this.alertCsvError.message = "There was an error in csv downloading. Please try again later."; - this.alertCsvError.okButtonText = "OK"; - this.alertCsvError.open(); + if(this.isMobile) { + this.alertFsCsvError.okButton = true; + this.alertFsCsvError.okButtonText = "OK"; + this.alertFsCsvError.title = "ERROR DOWNLOADING CSV FILE"; + this.alertFsCsvError.open(); + } else { + this.alertCsvError.cancelButton = false; + this.alertCsvError.okButton = true; + this.alertCsvError.alertTitle = "ERROR DOWNLOADING CSV FILE"; + this.alertCsvError.message = "There was an error in csv downloading. Please try again later."; + this.alertCsvError.okButtonText = "OK"; + this.alertCsvError.open(); + } } encodeURI(input: string): string { @@ -676,7 +699,7 @@ export class OrganizationComponent { } openDownloadReportsModal() { - this.funder = this.fetchProjects.funders[0]; + // this.funder = this.fetchProjects.funders[0]; this.downloadReportsModal.cancelButton = false; this.downloadReportsModal.okButton = false; this.downloadReportsModal.alertTitle = "Download"; @@ -798,11 +821,18 @@ export class OrganizationComponent { for(let funder of this.fetchProjects.funders) { this.funderOptions.push({"label": funder.name, "value": funder}); } - this.funder = this.funderOptions[0]; + this.funder = this.funderOptions[0].value; } } public scroll() { HelperFunctions.scroll(); } + + public openFsModal(fsModal: FullScreenModalComponent, title: string) { + fsModal.title = title; + fsModal.okButton = false; + fsModal.stayOpenInBack = true; + fsModal.open(); + } } diff --git a/landingPages/organization/organization.module.ts b/landingPages/organization/organization.module.ts index b949b743..9d5448fa 100644 --- a/landingPages/organization/organization.module.ts +++ b/landingPages/organization/organization.module.ts @@ -31,6 +31,7 @@ import {IconsModule} from '../../utils/icons/icons.module'; import {InputModule} from '../../sharedComponents/input/input.module'; import {IconsService} from '../../utils/icons/icons.service'; import {graph, versions} from "../../utils/icons/icons"; +import {FullScreenModalModule} from "../../utils/modal/full-screen-modal/full-screen-modal.module"; @NgModule({ @@ -48,7 +49,7 @@ import {graph, versions} from "../../utils/icons/icons"; Schema2jsonldModule, SEOServiceModule, HelperModule, OrganizationsDeletedByInferenceModule, LandingHeaderModule, FeedbackModule, MatSelectModule, - TabsModule, SearchTabModule, LoadingModule, IconsModule, InputModule + TabsModule, SearchTabModule, LoadingModule, IconsModule, InputModule, FullScreenModalModule ], declarations: [ OrganizationComponent, diff --git a/utils/modal/loading.component.ts b/utils/modal/loading.component.ts index 7dcd3ed9..114961ff 100644 --- a/utils/modal/loading.component.ts +++ b/utils/modal/loading.component.ts @@ -15,7 +15,7 @@ declare var UIkit: any; template: ` -
+
@@ -23,9 +23,7 @@ declare var UIkit: any;

{{message}}

- +
@@ -34,6 +32,24 @@ declare var UIkit: any;
+ +
+
+
+
+

{{title}}

+
+
+
+
+

{{message}}

+ + +
+
+
+
@@ -66,8 +82,11 @@ export class ModalLoading{ private static MODAL_LOADING_COUNTER: number = 0; id: string = "modal-loading"; + title: string; -@Input() public message:string ="Loading"; + @Input() isMobile: boolean = false; + @Input() classTitle: string = "uk-background-primary uk-light"; + @Input() public message:string ="Loading"; @ViewChild('loading_element') element: ElementRef; /** diff --git a/utils/modal/loadingModal.module.ts b/utils/modal/loadingModal.module.ts index 6edf5c4a..d552964d 100644 --- a/utils/modal/loadingModal.module.ts +++ b/utils/modal/loadingModal.module.ts @@ -4,11 +4,12 @@ import { FormsModule } from '@angular/forms'; import {ModalLoading} from './loading.component'; import {ModalModule} from './modal.module'; +import {LoadingModule} from "../loading/loading.module"; //helpers @NgModule({ - imports: [ CommonModule, FormsModule,ModalModule ], + imports: [CommonModule, FormsModule, ModalModule, LoadingModule], declarations: [ ModalLoading ], diff --git a/utils/tabs/contents/search-tab.component.ts b/utils/tabs/contents/search-tab.component.ts index daa12d88..cbeb4a1d 100644 --- a/utils/tabs/contents/search-tab.component.ts +++ b/utils/tabs/contents/search-tab.component.ts @@ -11,7 +11,7 @@ import {StringUtils} from "../../string-utils.class"; [queryParams]="params" [routerLink]="searchLinkToAdvancedPage"> -
+
Recent {{getEntityName(resultType)}} @@ -53,6 +53,7 @@ import {StringUtils} from "../../string-utils.class"; }) export class SearchTabComponent { + @Input() public isMobile: boolean = false; @Input() public fetch; @Input() public resultType: string; @Input() public params: any;