progress on org landing and some other tweaks

This commit is contained in:
Alex Martzios 2022-05-05 09:32:18 +03:00
parent 83984ddf79
commit 06e8eb29dd
4 changed files with 117 additions and 125 deletions

View File

@ -21,21 +21,11 @@
</span> </span>
</a> </a>
</li> </li>
<!-- Download content lists --> <!-- Download -->
<li class="uk-text-center" <li class="uk-text-center"
[title]="'Download content lists'" [title]="'Download reports'"
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'"> [attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'">
<a class="uk-link-text uk-text-bold uk-text-uppercase" (click)="openDownloadReportModal()"> <a class="uk-link-text uk-text-bold uk-text-uppercase" (click)="openDownloadReportsModal()">
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
<icon name="download" visuallyHidden="download"></icon>
</span>
</a>
</li>
<!-- Download project lists -->
<li class="uk-text-center"
[title]="'Download project lists'"
[attr.uk-tooltip]="'pos: right; cls: uk-active landing-action-tooltip landing-action-tooltip-portal uk-text-small uk-padding-small'">
<a class="uk-link-text uk-text-bold uk-text-uppercase" (click)="openDownloadFunderReportModal()">
<span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal"> <span class="uk-icon-button uk-icon landing-action-button landing-action-button-portal">
<icon name="download" visuallyHidden="download"></icon> <icon name="download" visuallyHidden="download"></icon>
</span> </span>
@ -53,8 +43,8 @@
<!-- Last Index Info--> <!-- Last Index Info-->
<div class="uk-width-2-3@m uk-width-1-2 graph"> <div class="uk-width-2-3@m uk-width-1-2 graph">
<icon name="graph" customClass="uk-text-primary"></icon> <icon name="graph" customClass="uk-text-primary"></icon>
<span class="uk-margin-small-left uk-text-baseline uk-text-meta"> <span class="uk-margin-small-left uk-text-baseline">
Powered by <a href="https://graph.openaire.eu" target="_blank" class="uk-text-primary">OpenAIRE Research Graph</a> <span class="uk-text-meta">Powered by </span><a href="https://graph.openaire.eu" target="_blank">OpenAIRE Research Graph</a>
</span> </span>
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-meta"> <span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-meta">
. Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} . Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
@ -113,28 +103,28 @@
<div class="uk-padding uk-padding-remove-horizontal uk-padding-remove-bottom"> <div class="uk-padding uk-padding-remove-horizontal uk-padding-remove-bottom">
<showTitle *ngIf="stickyHeader" [titleName]="organizationInfo.title.name" classNames="uk-margin-remove-bottom" class="uk-visible@m"></showTitle> <showTitle *ngIf="stickyHeader" [titleName]="organizationInfo.title.name" classNames="uk-margin-remove-bottom" class="uk-visible@m"></showTitle>
<my-tabs (selectedActiveTab)="onSelectActiveTab($event)" [offsetForSticky]="offset" [(isSticky)]="stickyHeader"> <my-tabs (selectedActiveTab)="onSelectActiveTab($event)" [offsetForSticky]="offset" [(isSticky)]="stickyHeader">
<my-tab [active]="true" [tabTitle]="'Funding / Projects'" [tabId]="'projects'" <my-tab [active]="true" [tabTitle]="'Funding / ' +openaireEntities.PROJECTS" [tabId]="'projects'"
[tabNumber]="fetchProjects.searchUtils.totalResults > 0 ? fetchProjects.searchUtils.totalResults : ''"> [tabNumber]="fetchProjects.searchUtils.totalResults > 0 ? fetchProjects.searchUtils.totalResults : ''">
</my-tab> </my-tab>
<my-tab *ngIf="fetchDataproviders && fetchDataproviders.searchUtils.totalResults > 0" <my-tab *ngIf="fetchDataproviders && fetchDataproviders.searchUtils.totalResults > 0"
[tabTitle]="'Content Providers'" [tabId]="'dataProviders'" [tabTitle]="openaireEntities.DATASOURCES" [tabId]="'dataProviders'"
[tabNumber]="fetchDataproviders.searchUtils.totalResults"> [tabNumber]="fetchDataproviders.searchUtils.totalResults">
</my-tab> </my-tab>
<my-tab *ngIf="fetchPublications && fetchPublications.searchUtils.totalResults > 0" <my-tab *ngIf="fetchPublications && fetchPublications.searchUtils.totalResults > 0"
[tabNumber]="fetchPublications.searchUtils.totalResults" [tabNumber]="fetchPublications.searchUtils.totalResults"
[tabTitle]="'Publications'" [tabId]="'publications'"> [tabTitle]="openaireEntities.PUBLICATIONS" [tabId]="'publications'">
</my-tab> </my-tab>
<my-tab *ngIf="fetchDatasets && fetchDatasets.searchUtils.totalResults > 0" <my-tab *ngIf="fetchDatasets && fetchDatasets.searchUtils.totalResults > 0"
[tabNumber]="fetchDatasets.searchUtils.totalResults" [tabNumber]="fetchDatasets.searchUtils.totalResults"
[tabTitle]="'Research Data'" [tabId]="'datasets'"> [tabTitle]="openaireEntities.DATASETS" [tabId]="'datasets'">
</my-tab> </my-tab>
<my-tab *ngIf="fetchSoftware && fetchSoftware.searchUtils.totalResults > 0" <my-tab *ngIf="fetchSoftware && fetchSoftware.searchUtils.totalResults > 0"
[tabNumber]="fetchSoftware.searchUtils.totalResults" [tabNumber]="fetchSoftware.searchUtils.totalResults"
[tabTitle]="'Software'" [tabId]="'software'"> [tabTitle]="openaireEntities.SOFTWARE" [tabId]="'software'">
</my-tab> </my-tab>
<my-tab *ngIf="fetchOrps && fetchOrps.searchUtils.totalResults > 0" <my-tab *ngIf="fetchOrps && fetchOrps.searchUtils.totalResults > 0"
[tabNumber]="fetchOrps.searchUtils.totalResults" [tabNumber]="fetchOrps.searchUtils.totalResults"
[tabTitle]="'Other Research'" [tabId]="'other'"> [tabTitle]="openaireEntities.OTHER" [tabId]="'other'">
</my-tab> </my-tab>
</my-tabs> </my-tabs>
</div> </div>
@ -187,6 +177,13 @@
</search-tab> </search-tab>
</div> </div>
</div> </div>
<div class="uk-text-xsmall uk-hidden@m">
<ng-container *ngTemplateOutlet="graph_and_feedback_template"></ng-container>
</div>
<!-- Helper -->
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']">
</helper>
</div> </div>
</div> </div>
</div> </div>
@ -212,11 +209,15 @@
<modal-alert #addThisModal classBody="uk-flex uk-flex-center uk-flex-middle"> <modal-alert #addThisModal classBody="uk-flex uk-flex-center uk-flex-middle">
<addThis></addThis> <addThis></addThis>
</modal-alert> </modal-alert>
<!-- Download content lists --> <!-- Download -->
<modal-alert #downloadReportModal> <modal-alert #downloadReportsModal large="true">
<div class="uk-padding-small uk-margin-small-left uk-margin-small-right"> <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-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="uk-animation-slide-top-small">
<div class="subtitle">
<span class="uk-text-nowrap">Content report</span>
</div>
<ul class="uk-list uk-margin-remove-bottom" *ngIf="total > 0"> <ul class="uk-list uk-margin-remove-bottom" *ngIf="total > 0">
<li [attr.uk-tooltip]="total > 0 ? 'cls: uk-invisible' : 'cls: uk-active'" <li [attr.uk-tooltip]="total > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
title="No report available"> title="No report available">
@ -224,7 +225,7 @@
[class]="total > 0 ? '' : 'uk-disabled uk-text-muted'" [class]="total > 0 ? '' : 'uk-disabled uk-text-muted'"
(click)="downloadFile(getCSVAffiliated('results'), 'results' + '-report')"> (click)="downloadFile(getCSVAffiliated('results'), 'results' + '-report')">
<icon name="download" flex="true" class="uk-margin-small-right"></icon> <icon name="download" flex="true" class="uk-margin-small-right"></icon>
all research outcomes (CSV) all {{openaireEntities.RESULTS}} (CSV)
</div> </div>
</li> </li>
<li [attr.uk-tooltip]="fetchPublications.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'" <li [attr.uk-tooltip]="fetchPublications.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
@ -233,7 +234,7 @@
[class]="fetchPublications.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'" [class]="fetchPublications.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'"
(click)="downloadFile(getCSVAffiliated('publications'), 'publications' + '-report')"> (click)="downloadFile(getCSVAffiliated('publications'), 'publications' + '-report')">
<icon name="download" flex="true" class="uk-margin-small-right"></icon> <icon name="download" flex="true" class="uk-margin-small-right"></icon>
publications (CSV) {{openaireEntities.PUBLICATIONS}} (CSV)
</div> </div>
</li> </li>
<li [attr.uk-tooltip]="fetchDatasets.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'" <li [attr.uk-tooltip]="fetchDatasets.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
@ -242,7 +243,7 @@
[class]="fetchDatasets.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'" [class]="fetchDatasets.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'"
(click)="downloadFile(getCSVAffiliated('datasets'), 'datasets' + '-report')"> (click)="downloadFile(getCSVAffiliated('datasets'), 'datasets' + '-report')">
<icon name="download" flex="true" class="uk-margin-small-right"></icon> <icon name="download" flex="true" class="uk-margin-small-right"></icon>
research data (CSV) {{openaireEntities.DATASETS}} (CSV)
</div> </div>
</li> </li>
<li [attr.uk-tooltip]="fetchSoftware.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'" <li [attr.uk-tooltip]="fetchSoftware.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
@ -251,7 +252,7 @@
[class]="fetchSoftware.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'" [class]="fetchSoftware.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'"
(click)="downloadFile(getCSVAffiliated('software'), 'software' + '-report')"> (click)="downloadFile(getCSVAffiliated('software'), 'software' + '-report')">
<icon name="download" flex="true" class="uk-margin-small-right"></icon> <icon name="download" flex="true" class="uk-margin-small-right"></icon>
software (CSV) {{openaireEntities.SOFTWARE}} (CSV)
</div> </div>
</li> </li>
<li [attr.uk-tooltip]="fetchOrps.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'" <li [attr.uk-tooltip]="fetchOrps.searchUtils.totalResults > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
@ -260,7 +261,7 @@
[class]="fetchOrps.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'" [class]="fetchOrps.searchUtils.totalResults > 0 ? '' : 'uk-disabled uk-text-muted'"
(click)="downloadFile(getCSVAffiliated('other'), 'other' + '-report')"> (click)="downloadFile(getCSVAffiliated('other'), 'other' + '-report')">
<icon name="download" flex="true" class="uk-margin-small-right"></icon> <icon name="download" flex="true" class="uk-margin-small-right"></icon>
other research products (CSV) {{openaireEntities.OTHER}} (CSV)
</div> </div>
</li> </li>
</ul> </ul>
@ -268,22 +269,20 @@
No reports available No reports available
</div> </div>
</div> </div>
<div *ngIf="fetchProjects.funders && fetchProjects.funders.length > 0">
<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]="fetchProjects.funders" [(value)]="funder">
</div> </div>
</div> </div>
</modal-alert> <div class="uk-animation-slide-top-small uk-margin-top" *ngIf="funder && funder != ''">
<!-- Download project lists -->
<modal-alert #downloadFunderReportModal>
<div class="uk-padding-small uk-margin-small-left uk-margin-small-right">
<div class="uk-padding-small uk-padding-remove-vertical" *ngIf="fetchProjects.funders && fetchProjects.funders.length > 0">
<div input type="select" placeholder="Select a funder to download report" inputClass="flat x-small"
[options]="fetchProjects.funders" [(value)]="funder"></div>
<div class="uk-animation-slide-top-small uk-margin-medium-top" *ngIf="funder && funder != ''">
<ul class="uk-list uk-margin-remove-bottom"> <ul class="uk-list uk-margin-remove-bottom">
<li> <li>
<div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal" <div class="uk-flex uk-flex-middle uk-button uk-button-link uk-text-normal"
(click)="downloadFile(getFunderProjects(), funder.name + '-projects-report')"> (click)="downloadFile(getFunderProjects(), funder.name + '-projects-report')">
<icon name="download" flex="true" class="uk-margin-small-right"></icon> <icon name="download" flex="true" class="uk-margin-small-right"></icon>
projects (CSV) {{openaireEntities.PROJECTS}} (CSV)
</div> </div>
</li> </li>
<li *ngFor="let contentType of contentTypes"> <li *ngFor="let contentType of contentTypes">
@ -297,6 +296,8 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
</modal-alert> </modal-alert>
<modal-alert #AlertModalApplyAll (alertOutput)="confirmCloseApplyAll()"></modal-alert> <modal-alert #AlertModalApplyAll (alertOutput)="confirmCloseApplyAll()"></modal-alert>
<modal-alert #AlertModalCsvError></modal-alert> <modal-alert #AlertModalCsvError></modal-alert>

View File

@ -24,6 +24,7 @@ import {FetchDataproviders} from "../../utils/fetchEntitiesClasses/fetchDataprov
import {IndexInfoService} from "../../utils/indexInfo.service"; import {IndexInfoService} from "../../utils/indexInfo.service";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment"; import {properties} from "../../../../environments/environment";
import {OpenaireEntities} from '../../utils/properties/searchFields';
@Component({ @Component({
selector: 'organization', selector: 'organization',
@ -52,7 +53,7 @@ export class OrganizationComponent {
public fetchDatasets: FetchResearchResults; public fetchDatasets: FetchResearchResults;
public fetchSoftware: FetchResearchResults; public fetchSoftware: FetchResearchResults;
public fetchOrps: FetchResearchResults; public fetchOrps: FetchResearchResults;
public fetchDataproviders: FetchDataproviders public fetchDataproviders: FetchDataproviders;
public searchNumber: number = 5; public searchNumber: number = 5;
// Request results of each tab only the one time (first time tab is clicked) // Request results of each tab only the one time (first time tab is clicked)
@ -65,6 +66,7 @@ export class OrganizationComponent {
// Active tab variable for responsiveness // Active tab variable for responsiveness
public activeTab: string = ""; public activeTab: string = "";
@ViewChild('downloadReportsModal') downloadReportsModal;
@ViewChild('downloadReportModal') downloadReportModal; @ViewChild('downloadReportModal') downloadReportModal;
@ViewChild('downloadFunderReportModal') downloadFunderReportModal; @ViewChild('downloadFunderReportModal') downloadFunderReportModal;
@ViewChild('addThisModal') addThisModal; @ViewChild('addThisModal') addThisModal;
@ -82,11 +84,11 @@ export class OrganizationComponent {
// Helper variables to specify funder in downloadPublicationsFile function // Helper variables to specify funder in downloadPublicationsFile function
public contentTypes: [string, string][] = [ public contentTypes: [string, string][] = [
['results', 'all research outcomes'], ['results', 'all ' + OpenaireEntities.RESULTS],
['publications', 'publications'], ['publications', OpenaireEntities.PUBLICATIONS],
['datasets', 'research data'], ['datasets', OpenaireEntities.DATASETS],
['software', 'software'], ['software', OpenaireEntities.SOFTWARE],
['other', 'other research products'], ['other', OpenaireEntities.OTHER],
]; ];
public funderContentType: string = ''; public funderContentType: string = '';
public funder: any = ""; public funder: any = "";
@ -101,6 +103,7 @@ export class OrganizationComponent {
subscriptions = []; subscriptions = [];
innerReportSubscriptions = []; innerReportSubscriptions = [];
properties: EnvProperties; properties: EnvProperties;
public openaireEntities = OpenaireEntities
public indexUpdateDate: Date; public indexUpdateDate: Date;
public showFeedback: boolean = false; public showFeedback: boolean = false;
public feedbackFields: string [] = ['Name', 'Country', 'Other']; public feedbackFields: string [] = ['Name', 'Country', 'Other'];
@ -545,8 +548,7 @@ export class OrganizationComponent {
} }
private openLoading() { private openLoading() {
this.closeDownloadReportModal(); this.closeDownloadReportsModal();
this.closeDownloadFunderReportModal();
if (this.loading) { if (this.loading) {
this.loading.open(); this.loading.open();
@ -626,27 +628,16 @@ export class OrganizationComponent {
console.log(value); console.log(value);
} }
openDownloadReportModal() { openDownloadReportsModal() {
this.downloadReportModal.cancelButton = false;
this.downloadReportModal.okButton = false;
this.downloadReportModal.alertTitle = "Download content report";
this.downloadReportModal.open();
}
closeDownloadReportModal() {
this.downloadReportModal.cancel();
}
openDownloadFunderReportModal() {
this.funder = this.fetchProjects.funders[0]; this.funder = this.fetchProjects.funders[0];
this.downloadFunderReportModal.cancelButton = false; this.downloadReportsModal.cancelButton = false;
this.downloadFunderReportModal.okButton = false; this.downloadReportsModal.okButton = false;
this.downloadFunderReportModal.alertTitle = "Download funder report"; this.downloadReportsModal.alertTitle = "Download";
this.downloadFunderReportModal.open(); this.downloadReportsModal.open();
} }
closeDownloadFunderReportModal() { closeDownloadReportsModal() {
this.downloadFunderReportModal.cancel(); this.downloadReportsModal.cancel();
} }
public openAddThisModal() { public openAddThisModal() {

View File

@ -155,7 +155,7 @@
</div> </div>
<schema2jsonld *ngIf="url" [URL]="url" type="search" [name]=pageTitleWithFilters <schema2jsonld *ngIf="url" [URL]="url" type="search" [name]=pageTitleWithFilters
[searchAction]=false [description]="metaDescription"></schema2jsonld> [searchAction]=false [description]="metaDescription"></schema2jsonld>
<div id="tm-main" class="uk-margin-large-top" [class.uk-margin-top]="stickyForm"> <div id="tm-main" class="uk-margin-medium-top" [class.uk-margin-top]="stickyForm">
<ng-template #loading> <ng-template #loading>
<loading></loading> <loading></loading>
</ng-template> </ng-template>
@ -211,7 +211,7 @@
search search
</a> </a>
</div> </div>
<div class="uk-grid uk-margin-medium-top uk-margin-large-bottom" uk-grid> <div class="uk-grid uk-margin-large-top uk-margin-large-bottom" uk-grid>
<div *ngIf="showRefine && (results.length > 0 <div *ngIf="showRefine && (results.length > 0
|| (searchUtils.refineStatus == errorCodes.LOADING && searchUtils.status != errorCodes.LOADING) || (searchUtils.refineStatus == errorCodes.LOADING && searchUtils.status != errorCodes.LOADING)
|| (!hideFilters && || (!hideFilters &&

View File

@ -11,7 +11,7 @@ import {OpenaireEntities} from "../../utils/properties/searchFields";
@Component({ @Component({
selector: 'quick-selections', selector: 'quick-selections',
template: ` template: `
<div *ngIf="quickFilter" class="uk-margin-small-bottom"> <div *ngIf="quickFilter" class="uk-margin-bottom">
<mat-slide-toggle name="qf" [(ngModel)]="quickFilter.selected" (ngModelChange)="quickFilterChanged()"> <mat-slide-toggle name="qf" [(ngModel)]="quickFilter.selected" (ngModelChange)="quickFilterChanged()">
<span class="uk-text-bold">{{quickFilter.value}}</span> <span class="uk-text-bold">{{quickFilter.value}}</span>
</mat-slide-toggle> </mat-slide-toggle>