[Library | explore-redesign]: Mobile redesign for organization landing complete and functional.
1. loadingModal.module.ts: Imported LoadingModule. 2. loading.component.ts: a. [Bug fix] loading icon (spinner) was not visible. b. Added inputs title: string, @Input() isMobile: boolean = false, @Input() classTitle: string = "uk-background-primary uk-light". c. Added html for small screens (mobile) when isMobile. 3. search-tab.component.ts: Added @Input() public isMobile: boolean = false and [class.uk-flex-column]="isMobile" to not show title and view all link in the same row when isMobile. 4. organization.module.ts: Imported FullScreenModalModule. 5. organization.component.ts & organization.component.html: Mobile redesign complete and functional.
This commit is contained in:
parent
be1a0ac7fa
commit
4aa350ff2b
|
@ -271,7 +271,7 @@
|
|||
<!-- Mobile view -->
|
||||
<div *ngIf="isMobile" class="uk-hidden@m uk-position-relative landing">
|
||||
<ng-container *ngIf="organizationInfo">
|
||||
<div class="uk-container uk-section">
|
||||
<div *ngIf="mobileContent == 'info'" class="uk-container uk-section">
|
||||
<landing-header [properties]="properties" [title]="organizationInfo.title.name"
|
||||
[subTitle]="(organizationInfo.name
|
||||
&& organizationInfo.title.name !== organizationInfo.name)?organizationInfo.name:null"
|
||||
|
@ -280,42 +280,47 @@
|
|||
<div class="uk-section uk-margin-top uk-text-large uk-text-empashis uk-text-bold">
|
||||
<hr>
|
||||
<ng-container>
|
||||
<div class="clickable uk-flex uk-flex-middle uk-flex-between">
|
||||
<div class="clickable uk-flex uk-flex-middle uk-flex-between" (click)="openFsModal(fsModal, 'Funding / '+openaireEntities.PROJECTS); onSelectActiveTab('projects')">
|
||||
<span>Funding / {{openaireEntities.PROJECTS}}</span>
|
||||
<icon name="chevron_right" [ratio]="1.5" [flex]="true"></icon>
|
||||
</div>
|
||||
<hr>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="fetchDataproviders && fetchDataproviders.searchUtils.totalResults > 0">
|
||||
<div class="clickable uk-flex uk-flex-middle uk-flex-between">
|
||||
<div class="clickable uk-flex uk-flex-middle uk-flex-between"
|
||||
(click)="openFsModal(fsModal, openaireEntities.DATASOURCES); onSelectActiveTab('dataProviders')">
|
||||
<span>{{openaireEntities.DATASOURCES}}</span>
|
||||
<icon name="chevron_right" [ratio]="1.5" [flex]="true"></icon>
|
||||
</div>
|
||||
<hr>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="fetchPublications && fetchPublications.searchUtils.totalResults > 0">
|
||||
<div class="clickable uk-flex uk-flex-middle uk-flex-between">
|
||||
<div class="clickable uk-flex uk-flex-middle uk-flex-between"
|
||||
(click)="openFsModal(fsModal, openaireEntities.PUBLICATIONS); onSelectActiveTab('publications')">
|
||||
<span>{{openaireEntities.PUBLICATIONS}}</span>
|
||||
<icon name="chevron_right" [ratio]="1.5" [flex]="true"></icon>
|
||||
</div>
|
||||
<hr>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="fetchDatasets && fetchDatasets.searchUtils.totalResults > 0">
|
||||
<div class="clickable uk-flex uk-flex-middle uk-flex-between">
|
||||
<div class="clickable uk-flex uk-flex-middle uk-flex-between"
|
||||
(click)="openFsModal(fsModal, openaireEntities.DATASETS); onSelectActiveTab('datasets')">
|
||||
<span>{{openaireEntities.DATASETS}}</span>
|
||||
<icon name="chevron_right" [ratio]="1.5" [flex]="true"></icon>
|
||||
</div>
|
||||
<hr>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="fetchSoftware && fetchSoftware.searchUtils.totalResults > 0">
|
||||
<div class="clickable uk-flex uk-flex-middle uk-flex-between">
|
||||
<div class="clickable uk-flex uk-flex-middle uk-flex-between"
|
||||
(click)="openFsModal(fsModal, openaireEntities.SOFTWARE); onSelectActiveTab('software')">
|
||||
<span>{{openaireEntities.SOFTWARE}}</span>
|
||||
<icon name="chevron_right" [ratio]="1.5" [flex]="true"></icon>
|
||||
</div>
|
||||
<hr>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="fetchOrps && fetchOrps.searchUtils.totalResults > 0">
|
||||
<div class="clickable uk-flex uk-flex-middle uk-flex-between">
|
||||
<div class="clickable uk-flex uk-flex-middle uk-flex-between"
|
||||
(click)="openFsModal(fsModal, openaireEntities.OTHER); onSelectActiveTab('other')">
|
||||
<span>{{openaireEntities.OTHER}}</span>
|
||||
<icon name="chevron_right" [ratio]="1.5" [flex]="true"></icon>
|
||||
</div>
|
||||
|
@ -323,17 +328,46 @@
|
|||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
<div class="landing-action-bar-mobile uk-background-default">
|
||||
<div class="uk-container uk-flex uk-flex-middle uk-flex-between uk-text-xsmall uk-text-meta">
|
||||
<div *ngIf="mobileContent == 'actions'" class="uk-container uk-section">
|
||||
<ng-container *ngIf="organizationInfo?.deletedByInferenceIds">
|
||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
||||
(click)="deleteByInferenceOpened = true; openFsModal(alertModalDeletedByInferenceFS, 'Other versions')">
|
||||
<icon [flex]="true" name="versions" visuallyHidden="versions"></icon>
|
||||
<span class="uk-margin-small-left">
|
||||
View all {{organizationInfo.deletedByInferenceIds.length}} versions
|
||||
</span>
|
||||
</div>
|
||||
<hr class="uk-margin-remove">
|
||||
</ng-container>
|
||||
<ng-container>
|
||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
||||
(click)="openFsModal(addThisFsModal, 'Share this '+openaireEntities.ORGANIZATION+' in your social networks')">
|
||||
<icon [flex]="true" name="share" visuallyHidden="share"></icon>
|
||||
<span class="uk-margin-small-left">Share</span>
|
||||
</div>
|
||||
<hr class="uk-margin-remove">
|
||||
</ng-container>
|
||||
<ng-container>
|
||||
<div class="clickable uk-button-link uk-flex uk-flex-middle uk-h6 uk-margin-remove uk-padding-small uk-padding-remove-horizontal"
|
||||
(click)="buildFunderOptions(); openFsModal(downloadReportsFsModal, 'Download')">
|
||||
<icon [flex]="true" name="download" visuallyHidden="download"></icon>
|
||||
<span class="uk-margin-small-left">Download</span>
|
||||
</div>
|
||||
<hr class="uk-margin-remove">
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<div class="landing-action-bar-mobile uk-background-default">
|
||||
<div class="uk-container uk-grid uk-flex-middle uk-child-width-1-2 uk-text-xsmall uk-text-meta">
|
||||
<div>
|
||||
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset">
|
||||
<icon name="corporate_fare" type="outlined" [flex]="true" [ratio]="2"></icon>
|
||||
<span>Organization</span>
|
||||
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'info'">
|
||||
<icon name="corporate_fare" type="outlined" [flex]="true" [ratio]="2" [ngClass]="mobileContent == 'info' ? 'uk-text-primary': ''"></icon>
|
||||
<span>{{openaireEntities.ORGANIZATION}}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset">
|
||||
<icon name="pending" type="outlined" [flex]="true" [ratio]="2"></icon>
|
||||
<a class="uk-flex uk-flex-column uk-flex-middle uk-flex-center uk-link-reset" (click)="mobileContent = 'actions'">
|
||||
<icon name="pending" type="outlined" [flex]="true" [ratio]="2" [ngClass]="mobileContent == 'actions' ? 'uk-text-primary': ''"></icon>
|
||||
<span>Actions</span>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -361,96 +395,180 @@
|
|||
<div class="uk-padding-small uk-margin-small-left uk-margin-small-right">
|
||||
<div class="uk-padding-small uk-padding-remove-vertical">
|
||||
<div class="uk-grid uk-grid-divider uk-child-width-1-2@m" uk-grid uk-height-match=".subtitle">
|
||||
<div class="uk-animation-slide-top-small">
|
||||
<div class="subtitle uk-flex uk-flex-middle">
|
||||
<span class="uk-text-nowrap">Content report</span>
|
||||
</div>
|
||||
<ul class="uk-list uk-margin-remove-bottom" *ngIf="total > 0">
|
||||
<li [attr.uk-tooltip]="total > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
title="No report available">
|
||||
<div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal"
|
||||
[class]="total > 0 ? '' : 'uk-disabled uk-text-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated('results'), openaireEntities.RESULTS_FILE + '-report')">
|
||||
<icon name="download" flex="true" class="uk-margin-small-right"></icon>
|
||||
all {{openaireEntities.RESULTS}} (CSV)
|
||||
</div>
|
||||
</li>
|
||||
<li [attr.uk-tooltip]="fetchPublications.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
title="No report available">
|
||||
<div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal"
|
||||
[class]="fetchPublications.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated('publications'), openaireEntities.PUBLICATIONS_FILE + '-report')">
|
||||
<icon name="download" flex="true" class="uk-margin-small-right"></icon>
|
||||
{{openaireEntities.PUBLICATIONS}} (CSV)
|
||||
</div>
|
||||
</li>
|
||||
<li [attr.uk-tooltip]="fetchDatasets.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
title="No report available">
|
||||
<div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal"
|
||||
[class]="fetchDatasets.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated('datasets'), openaireEntities.DATASETS_FILE + '-report')">
|
||||
<icon name="download" flex="true" class="uk-margin-small-right"></icon>
|
||||
{{openaireEntities.DATASETS}} (CSV)
|
||||
</div>
|
||||
</li>
|
||||
<li [attr.uk-tooltip]="fetchSoftware.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
title="No report available">
|
||||
<div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal"
|
||||
[class]="fetchSoftware.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated('software'), openaireEntities.SOFTWARE_FILE + '-report')">
|
||||
<icon name="download" flex="true" class="uk-margin-small-right"></icon>
|
||||
{{openaireEntities.SOFTWARE}} (CSV)
|
||||
</div>
|
||||
</li>
|
||||
<li [attr.uk-tooltip]="fetchOrps.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
title="No report available">
|
||||
<div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal"
|
||||
[class]="fetchOrps.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated('other'), openaireEntities.OTHER_FILE + '-report')">
|
||||
<icon name="download" flex="true" class="uk-margin-small-right"></icon>
|
||||
{{openaireEntities.OTHER}} (CSV)
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div *ngIf="total == 0" class="uk-text-muted uk-margin-top">
|
||||
No reports available
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="subtitle uk-flex uk-flex-middle">
|
||||
<span class="uk-text-nowrap">Funder report</span>
|
||||
<div input type="select" placeholder="Select a funder to download report" inputClass="flat x-small" class="uk-width-1-1 uk-margin-small-left"
|
||||
[options]="funderOptions" [(value)]="funder" *ngIf="fetchProjects.funders && fetchProjects.funders.length > 0">
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="fetchProjects.funders && fetchProjects.funders.length > 0">
|
||||
<div class="uk-animation-slide-top-small uk-margin-top" *ngIf="funder && funder != ''">
|
||||
<ul class="uk-list uk-margin-remove-bottom">
|
||||
<li>
|
||||
<div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal"
|
||||
(click)="downloadFile(getFunderProjects(), funder.name + '-'+openaireEntities.PROJECTS_FILE+'-report')">
|
||||
<icon name="download" flex="true" class="uk-margin-small-right"></icon>
|
||||
{{openaireEntities.PROJECTS}} (CSV)
|
||||
</div>
|
||||
</li>
|
||||
<li *ngFor="let contentType of contentTypes">
|
||||
<div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal"
|
||||
(click)="confirmOpenApplyAll(contentType[0], contentType[2])">
|
||||
<icon name="download" flex="true" class="uk-margin-small-right"></icon>
|
||||
{{contentType[1]}} (CSV)
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="!fetchProjects.funders || fetchProjects.funders.length == 0" class="uk-text-muted uk-margin-top">
|
||||
No reports available
|
||||
</div>
|
||||
</div>
|
||||
<ng-container *ngTemplateOutlet="downloadOptions"></ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</modal-alert>
|
||||
<modal-alert #AlertModalApplyAll (alertOutput)="confirmCloseApplyAll()"></modal-alert>
|
||||
<modal-alert #AlertModalCsvError></modal-alert>
|
||||
<modal-loading></modal-loading>
|
||||
<modal-loading [isMobile]="isMobile" classTitle="uk-tile-default uk-border-bottom"></modal-loading>
|
||||
|
||||
|
||||
<ng-template #downloadOptions>
|
||||
<div class="uk-animation-slide-top-small">
|
||||
<div class="subtitle uk-flex uk-flex-middle">
|
||||
<span class="uk-text-nowrap">Content report</span>
|
||||
</div>
|
||||
<ul class="uk-list uk-margin-remove-bottom" *ngIf="total > 0">
|
||||
<li [attr.uk-tooltip]="total > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
title="No report available">
|
||||
<div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal"
|
||||
[class]="total > 0 ? '' : 'uk-disabled uk-text-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated('results'), openaireEntities.RESULTS_FILE + '-report')">
|
||||
<icon name="download" flex="true" class="uk-margin-small-right"></icon>
|
||||
all {{openaireEntities.RESULTS}} (CSV)
|
||||
</div>
|
||||
</li>
|
||||
<li [attr.uk-tooltip]="fetchPublications.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
title="No report available">
|
||||
<div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal"
|
||||
[class]="fetchPublications.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated('publications'), openaireEntities.PUBLICATIONS_FILE + '-report')">
|
||||
<icon name="download" flex="true" class="uk-margin-small-right"></icon>
|
||||
{{openaireEntities.PUBLICATIONS}} (CSV)
|
||||
</div>
|
||||
</li>
|
||||
<li [attr.uk-tooltip]="fetchDatasets.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
title="No report available">
|
||||
<div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal"
|
||||
[class]="fetchDatasets.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated('datasets'), openaireEntities.DATASETS_FILE + '-report')">
|
||||
<icon name="download" flex="true" class="uk-margin-small-right"></icon>
|
||||
{{openaireEntities.DATASETS}} (CSV)
|
||||
</div>
|
||||
</li>
|
||||
<li [attr.uk-tooltip]="fetchSoftware.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
title="No report available">
|
||||
<div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal"
|
||||
[class]="fetchSoftware.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated('software'), openaireEntities.SOFTWARE_FILE + '-report')">
|
||||
<icon name="download" flex="true" class="uk-margin-small-right"></icon>
|
||||
{{openaireEntities.SOFTWARE}} (CSV)
|
||||
</div>
|
||||
</li>
|
||||
<li [attr.uk-tooltip]="fetchOrps.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
|
||||
title="No report available">
|
||||
<div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal"
|
||||
[class]="fetchOrps.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'"
|
||||
(click)="downloadFile(getCSVAffiliated('other'), openaireEntities.OTHER_FILE + '-report')">
|
||||
<icon name="download" flex="true" class="uk-margin-small-right"></icon>
|
||||
{{openaireEntities.OTHER}} (CSV)
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div *ngIf="total == 0" class="uk-text-muted uk-margin-top">
|
||||
No reports available
|
||||
</div>
|
||||
</div>
|
||||
<div [ngClass]="isMobile ? 'uk-margin-large-top' : ''">
|
||||
<div class="subtitle" [ngClass]="isMobile ? '' : 'uk-flex uk-flex-middle'">
|
||||
<span class="uk-text-nowrap">Funder report</span>
|
||||
<div input type="select" placeholder="Select a funder to download report" inputClass="flat x-small"
|
||||
class="uk-width-1-1" [ngClass]="isMobile ? 'uk-margin-top' : 'uk-margin-small-left'"
|
||||
[options]="funderOptions" [(value)]="funder" *ngIf="fetchProjects.funders && fetchProjects.funders.length > 0">
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="fetchProjects.funders && fetchProjects.funders.length > 0">
|
||||
<div class="uk-animation-slide-top-small uk-margin-top" *ngIf="funder && funder != ''">
|
||||
<ul class="uk-list uk-margin-remove-bottom">
|
||||
<li>
|
||||
<div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal"
|
||||
(click)="downloadFile(getFunderProjects(), funder.name + '-'+openaireEntities.PROJECTS_FILE+'-report')">
|
||||
<icon name="download" flex="true" class="uk-margin-small-right"></icon>
|
||||
{{openaireEntities.PROJECTS}} (CSV)
|
||||
</div>
|
||||
</li>
|
||||
<li *ngFor="let contentType of contentTypes">
|
||||
<div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal"
|
||||
(click)="confirmOpenApplyAll(contentType[0], contentType[2])">
|
||||
<icon name="download" flex="true" class="uk-margin-small-right"></icon>
|
||||
{{contentType[1]}} (CSV)
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="!fetchProjects.funders || fetchProjects.funders.length == 0" class="uk-text-muted uk-margin-top">
|
||||
No reports available
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<!--Mobile actions-->
|
||||
<fs-modal #AlertModalDeletedByInferenceFS *ngIf="organizationInfo && organizationInfo.deletedByInferenceIds" classTitle="uk-tile-default uk-border-bottom">
|
||||
<organizationsDeletedByInference *ngIf="deleteByInferenceOpened"
|
||||
[id]="organizationInfo.objIdentifier"
|
||||
[ids]="organizationInfo.deletedByInferenceIds"
|
||||
[type]="'organizations'">
|
||||
</organizationsDeletedByInference>
|
||||
</fs-modal>
|
||||
<!-- Share -->
|
||||
<fs-modal *ngIf="organizationInfo" #addThisFsModal classTitle="uk-tile-default uk-border-bottom" classBody="uk-flex uk-flex-center uk-flex-middle">
|
||||
<addThis></addThis>
|
||||
</fs-modal>
|
||||
|
||||
<fs-modal *ngIf="organizationInfo" #downloadReportsFsModal classTitle="uk-tile-default uk-border-bottom">
|
||||
<ng-container *ngTemplateOutlet="downloadOptions"></ng-container>
|
||||
</fs-modal>
|
||||
|
||||
<fs-modal #AlertFsModalApplyAll classTitle="uk-tile-default uk-border-bottom">
|
||||
<div class="uk-margin-large-top">
|
||||
<div class="uk-text-center">Do you wish to download a CSV file? Note that this process may take a while.</div>
|
||||
<div class="uk-margin-medium-top uk-flex uk-flex-middle uk-flex-center">
|
||||
<button class="uk-button uk-button-primary" (click)="confirmCloseApplyAll()">Yes</button>
|
||||
<button class="uk-button uk-button-default uk-margin-left" (click)="alertFsApplyAll.cancel()">No</button>
|
||||
</div>
|
||||
</div>
|
||||
</fs-modal>
|
||||
<fs-modal #AlertFsModalCsvError classTitle="uk-tile-default uk-border-bottom">
|
||||
<div class="uk-margin-large-top uk-text-center">There was an error in csv downloading. Please try again later.</div>
|
||||
</fs-modal>
|
||||
|
||||
<fs-modal *ngIf="isMobile" #fsModal classTitle="uk-tile-default uk-border-bottom">
|
||||
<div *ngIf="activeTab == 'projects'" class="landing-section landing-section-height-auto uk-padding uk-padding-remove-horizontal">
|
||||
<projectsInModal [fetchProjects]="fetchProjects"
|
||||
[organizationId]="organizationId" [properties]=properties>
|
||||
</projectsInModal>
|
||||
</div>
|
||||
<div *ngIf="activeTab == 'dataProviders' && fetchDataproviders && fetchDataproviders.searchUtils.totalResults > 0"
|
||||
class="landing-section uk-padding uk-padding-remove-horizontal">
|
||||
<search-tab [fetch]="fetchDataproviders" resultType="dataprovider"
|
||||
[params]="getParamsForSearchLink()"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedDataProviders"
|
||||
[properties]="properties" [isMobile]="true">
|
||||
</search-tab>
|
||||
</div>
|
||||
<div *ngIf="activeTab == 'publications' && fetchPublications && fetchPublications.searchUtils.totalResults > 0"
|
||||
class="landing-section uk-padding uk-padding-remove-horizontal">
|
||||
<search-tab [fetch]="fetchPublications" resultType="publication"
|
||||
[params]="getParamsForSearchLink('publications')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties" [isMobile]="true">
|
||||
</search-tab>
|
||||
</div>
|
||||
<div *ngIf="activeTab == 'datasets' && fetchDatasets && fetchDatasets.searchUtils.totalResults > 0"
|
||||
class="landing-section uk-padding uk-padding-remove-horizontal">
|
||||
<search-tab [fetch]="fetchDatasets" resultType="dataset"
|
||||
[params]="getParamsForSearchLink('datasets')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties" [isMobile]="true">
|
||||
</search-tab>
|
||||
</div>
|
||||
<div *ngIf="activeTab == 'software' && fetchSoftware && fetchSoftware.searchUtils.totalResults > 0"
|
||||
class="landing-section uk-padding uk-padding-remove-horizontal">
|
||||
<search-tab [fetch]="fetchSoftware" resultType="software"
|
||||
[params]="getParamsForSearchLink('software')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties" [isMobile]="true">
|
||||
</search-tab>
|
||||
</div>
|
||||
<div *ngIf="activeTab == 'other' && fetchOrps && fetchOrps.searchUtils.totalResults > 0"
|
||||
class="landing-section uk-padding uk-padding-remove-horizontal">
|
||||
<search-tab [fetch]="fetchOrps" resultType="other"
|
||||
[params]="getParamsForSearchLink('other')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties" [isMobile]="true">
|
||||
</search-tab>
|
||||
</div>
|
||||
</fs-modal>
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -15,7 +15,7 @@ declare var UIkit: any;
|
|||
template: `
|
||||
<!-- uk-modal="center:true"-->
|
||||
<!-- <div [class]="(!isOpen)?'uk-modal ':'uk-modal uk-open uk-animation-fade'" [open]="!isOpen" uk-modal tabindex="-1" role="dialog" >-->
|
||||
<div #loading_element class="uk-modal" [id]="id" uk-modal="container: #modal-container">
|
||||
<div *ngIf="!isMobile" #loading_element class="uk-modal" [id]="id" uk-modal="container: #modal-container">
|
||||
<div class="uk-modal-dialog" role="">
|
||||
<!--div class="modal-content"-->
|
||||
|
||||
|
@ -23,9 +23,7 @@ declare var UIkit: any;
|
|||
<div >
|
||||
<h4 class="text-center" >{{message}}</h4>
|
||||
<!-- <div class="uk-spinner"></div>-->
|
||||
<div class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">
|
||||
<span class="loading-gif uk-align-center" ></span>
|
||||
</div>
|
||||
<loading></loading>
|
||||
<ng-content></ng-content>
|
||||
|
||||
</div>
|
||||
|
@ -34,6 +32,24 @@ declare var UIkit: any;
|
|||
</div>
|
||||
<!--/div-->
|
||||
</div>
|
||||
|
||||
<div *ngIf="isMobile" #loading_element class="uk-modal-full" [id]="id" uk-modal="container: #modal-container">
|
||||
<div class="uk-modal-dialog">
|
||||
<div #header class="uk-modal-header uk-flex uk-flex-middle" [ngClass]="classTitle">
|
||||
<div [class.uk-invisible]="!title"
|
||||
class="uk-width-expand uk-padding-small uk-padding-remove-vertical uk-flex uk-flex-center">
|
||||
<h4 class="uk-margin-remove">{{title}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div #body class="uk-modal-body uk-overflow-auto">
|
||||
<div class="uk-container uk-height-1-1">
|
||||
<h4 class="text-center">{{message}}</h4>
|
||||
<loading></loading>
|
||||
<ng-content></ng-content>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
],
|
||||
|
|
|
@ -11,7 +11,7 @@ import {StringUtils} from "../../string-utils.class";
|
|||
[queryParams]="params" [routerLink]="searchLinkToAdvancedPage"></a>
|
||||
|
||||
<ng-container> <!-- *ngIf="fetch.searchUtils.status != errorCodes.LOADING" -->
|
||||
<div class="uk-flex uk-flex-between uk-flex-middle uk-margin-bottom">
|
||||
<div class="uk-flex uk-flex-between uk-flex-middle uk-margin-bottom" [class.uk-flex-column]="isMobile">
|
||||
<div class="uk-text-meta uk-text-large uk-text-uppercase">
|
||||
<span *ngIf="!customTitle && resultType"><span *ngIf="resultType != 'organization' && resultType != 'dataprovider' && resultType != 'project'">Recent</span>
|
||||
{{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;
|
||||
|
|
Loading…
Reference in New Issue