[Trunk | Library]: project.component:
1. Add fields 'firstTab' (to add 'uk-active' in active tab on start), '_numberOfTabs' (to count existing tabs - checks for showing tabs/ small tabs), 'tabsAreInitialized'. 2. Selects have first option selected by default. 3. Add methods 'public get hasPrimaryInfo(): boolean', 'public get hasSecondaryInfo(): boolean', 'public get numberOfTabs(): number' for checking when and how to show tabs. 4. Do not use 'square-button' button. 5. Use svg version for linking icon | Rename 'Research results' to 'Research outcomes'. 6. Add checks for tabs (when and how to show them) | Loading until tabs are initialized | In small screens use <small-tabs>. 7. Update 'Powered by OpenAIRE graph' and 'Last update date' to be the same as in resultLanding.component. 8. Update margins and paddings. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58788 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
eeca3648eb
commit
9a59027576
|
@ -14,11 +14,11 @@
|
|||
<div id="dynamic_content_id">
|
||||
<pre class="box-content uk-padding-remove-bottom uk-margin-remove-bottom"><code
|
||||
id="clipboard">{{dynamic_content}}</code></pre>
|
||||
<div class="uk-grid">
|
||||
<div class="uk-grid uk-margin-small-top">
|
||||
<a
|
||||
class="clipboard_btn uk-padding-remove-left uk-margin-small-left uk-text-right uk-width-1-1"
|
||||
data-clipboard-target="#clipboard" title="Copy to clipboard">
|
||||
<button class="uk-button uk-button-small uk-button-secondary square-button uk-icon">
|
||||
<button class="uk-button uk-button-small uk-button-secondary uk-icon">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="copy" ratio="1">
|
||||
<rect fill="none" stroke="#000" x="3.5" y="2.5" width="12" height="16"></rect>
|
||||
<polyline fill="none" stroke="#000" points="5 0.5 17.5 0.5 17.5 17"></polyline>
|
||||
|
@ -96,14 +96,13 @@
|
|||
tab_error_class=true></errorMessages>
|
||||
|
||||
<div *ngIf="fetch.searchUtils.status == errorCodes.DONE">
|
||||
<div class="uk-inline uk-flex uk-flex-right">
|
||||
<div *ngIf="fetch.searchUtils.totalResults > searchNumber" class="uk-inline uk-flex uk-flex-right">
|
||||
<span class="uk-text-uppercase uk-position-left uk-text-middle uk-flex-middle uk-flex">
|
||||
<span>Top {{searchNumber}}</span><span class="space uk-text-muted">{{getEntityName(type, true, true)}}</span>
|
||||
</span>
|
||||
<a [queryParams]="routerHelper.createQueryParams(['f0', 'fv0', 'type', 'qf'], ['relprojectid', projectId, getEntityName(type, true, false), 'false'])"
|
||||
[routerLink]="properties.searchLinkToAdvancedResults" target="_blank">
|
||||
<button *ngIf="fetch.searchUtils.totalResults > searchNumber"
|
||||
class="uk-button uk-button-small portal-button">
|
||||
[routerLink]="properties.searchLinkToAdvancedResults">
|
||||
<button class="uk-button uk-button-small portal-button">
|
||||
<span uk-icon="search"></span>
|
||||
View all
|
||||
</button>
|
||||
|
@ -138,7 +137,7 @@
|
|||
class="loading-gif uk-align-center"></span></div>
|
||||
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
|
||||
[texts]="pageContents['top']"></helper>
|
||||
<div *ngIf="projectInfo != null" class="uk-grid uk-margin-remove-left uk-margin-medium-bottom">
|
||||
<div *ngIf="projectInfo != null" class="uk-grid uk-margin-remove-left uk-margin-large-bottom">
|
||||
<div class="uk-width-2-3@m uk-width-1-1@s uk-margin-bottom uk-padding uk-padding-remove-left uk-padding-remove-vertical">
|
||||
<schema2jsonld *ngIf="projectInfo" [data]=projectInfo
|
||||
[URL]="properties.baseLink+properties.searchLinkToProject+projectId"
|
||||
|
@ -605,11 +604,20 @@
|
|||
<li><addThis></addThis></li>
|
||||
<li *ngIf="isRouteAvailable('participate/direct-claim')">
|
||||
<a class="uk-link-text uk-text-bold uk-text-uppercase" (click)="openLinkProjectModal()">
|
||||
<span class="uk-icon-button portal-button" uk-icon="link"></span>
|
||||
<span class="uk-margin-small-left">Link this project to research results</span>
|
||||
<span class="uk-icon-button portal-button uk-icon">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="link"><path
|
||||
fill="none" stroke="#000" stroke-width="1.1"
|
||||
d="M10.625,12.375 L7.525,15.475 C6.825,16.175 5.925,16.175 5.225,15.475 L4.525,14.775 C3.825,14.074 3.825,13.175 4.525,12.475 L7.625,9.375"></path><path
|
||||
fill="none" stroke="#000" stroke-width="1.1"
|
||||
d="M9.325,7.375 L12.425,4.275 C13.125,3.575 14.025,3.575 14.724,4.275 L15.425,4.975 C16.125,5.675 16.125,6.575 15.425,7.275 L12.325,10.375"></path><path
|
||||
fill="none" stroke="#000" stroke-width="1.1"
|
||||
d="M7.925,11.875 L11.925,7.975"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="uk-margin-small-left">Link this project to...</span>
|
||||
</a>
|
||||
<modal-alert #linkProjectModal
|
||||
[classTitle]="'landing-modal-header uk-padding-small'" [classBody]="'uk-padding-remove landing-modal'">
|
||||
[classTitle]="'landing-modal-header'" [classBody]="'uk-padding-remove landing-modal'">
|
||||
<!-- <div class="uk-modal-title landing-modal-header">-->
|
||||
<!-- <button class="uk-modal-close-default uk-float-right" (click)='linkProjectModal.cancel()' uk-close></button>-->
|
||||
<!-- <h4 class="modal-title" id="myModalLabel">{{linkProjectModal.alertTitle}}</h4>-->
|
||||
|
@ -626,7 +634,7 @@
|
|||
width="12" x="3.5" y="2.5"></rect><polyline
|
||||
fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg></span>
|
||||
</button>
|
||||
<div>Research results</div>
|
||||
<div>Research outcomes</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -695,43 +703,53 @@
|
|||
<span class="uk-margin-small-left">Download report</span>
|
||||
</a>
|
||||
<modal-alert #downloadReportModal
|
||||
[classTitle]="'landing-modal-header uk-padding-small'" [classBody]="'uk-padding-remove landing-modal'">
|
||||
[classTitle]="'landing-modal-header'" [classBody]="'uk-padding-remove landing-modal'">
|
||||
<div class="uk-padding-small uk-margin-small-left uk-margin-small-right">
|
||||
<div class="uk-padding-small uk-padding-remove-vertical">
|
||||
<mat-form-field class="matSelectionFormField uk-width-1-1">
|
||||
<!-- *ngIf="projectInfo.funding &&-->
|
||||
<!-- (fetchPublications.searchUtils.totalResults > 0 ||-->
|
||||
<!-- fetchDatasets.searchUtils.totalResults > 0 ||-->
|
||||
<!-- fetchSoftware.searchUtils.totalResults > 0 ||-->
|
||||
<!-- fetchOrps.searchUtils.totalResults > 0)"-->
|
||||
<mat-form-field
|
||||
class="matSelectionFormField uk-width-1-1">
|
||||
<mat-label>Select content type report to download</mat-label>
|
||||
<mat-select *ngIf="projectInfo.funding &&
|
||||
(fetchPublications.searchUtils.totalResults > 0 ||
|
||||
fetchDatasets.searchUtils.totalResults > 0 ||
|
||||
fetchSoftware.searchUtils.totalResults > 0 ||
|
||||
fetchOrps.searchUtils.totalResults > 0)"
|
||||
#matSelect modal-select [matSelect]="matSelect"
|
||||
<mat-select #matSelect modal-select [matSelect]="matSelect"
|
||||
[(value)]="download_research_results_type"
|
||||
[disableOptionCentering]="true"
|
||||
panelClass="entitiesSelectionPanel"
|
||||
class="matSelection">
|
||||
<!-- <mat-option value="">Select content type</mat-option>-->
|
||||
<mat-option value="results">All research outcomes</mat-option>
|
||||
<mat-option value="results"
|
||||
[disabled]="!projectInfo.funding ||
|
||||
(fetchPublications.searchUtils.totalResults == 0 &&
|
||||
fetchDatasets.searchUtils.totalResults == 0 &&
|
||||
fetchSoftware.searchUtils.totalResults == 0 &&
|
||||
fetchOrps.searchUtils.totalResults == 0)"
|
||||
[attr.uk-tooltip]="(fetchPublications.searchUtils.totalResults == 0 || fetchPublications.searchUtils.status != errorCodes.DONE) ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
title="No report available">
|
||||
All research outcomes
|
||||
</mat-option>
|
||||
<mat-option value="publications"
|
||||
[disabled]="fetchPublications.searchUtils.totalResults == 0 || fetchPublications.searchUtils.status != errorCodes.DONE"
|
||||
[disabled]="!projectInfo.funding || fetchPublications.searchUtils.totalResults == 0 || fetchPublications.searchUtils.status != errorCodes.DONE"
|
||||
[attr.uk-tooltip]="(fetchPublications.searchUtils.totalResults == 0 || fetchPublications.searchUtils.status != errorCodes.DONE) ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
title="No report available">
|
||||
Publications
|
||||
</mat-option>
|
||||
<mat-option value="datasets"
|
||||
[disabled]="fetchDatasets.searchUtils.totalResults == 0 || fetchDatasets.searchUtils.status != errorCodes.DONE"
|
||||
[disabled]="!projectInfo.funding || fetchDatasets.searchUtils.totalResults == 0 || fetchDatasets.searchUtils.status != errorCodes.DONE"
|
||||
[attr.uk-tooltip]="(fetchDatasets.searchUtils.totalResults == 0 || fetchDatasets.searchUtils.status != errorCodes.DONE) ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
title="No report available">
|
||||
Research data
|
||||
</mat-option>
|
||||
<mat-option value="software"
|
||||
[disabled]="fetchSoftware.searchUtils.totalResults == 0 || fetchSoftware.searchUtils.status != errorCodes.DONE"
|
||||
[disabled]="!projectInfo.funding || fetchSoftware.searchUtils.totalResults == 0 || fetchSoftware.searchUtils.status != errorCodes.DONE"
|
||||
[attr.uk-tooltip]="(fetchSoftware.searchUtils.totalResults == 0 || fetchSoftware.searchUtils.status != errorCodes.DONE) ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
title="No report available">
|
||||
Software
|
||||
</mat-option>
|
||||
<mat-option value="other"
|
||||
[disabled]="fetchOrps.searchUtils.totalResults == 0 || fetchOrps.searchUtils.status != errorCodes.DONE"
|
||||
[disabled]="!projectInfo.funding || fetchOrps.searchUtils.totalResults == 0 || fetchOrps.searchUtils.status != errorCodes.DONE"
|
||||
[attr.uk-tooltip]="(fetchOrps.searchUtils.totalResults == 0 || fetchOrps.searchUtils.status != errorCodes.DONE) ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
title="No report available">
|
||||
Other research products
|
||||
|
@ -760,8 +778,7 @@
|
|||
</li>
|
||||
<!-- Metrics -->
|
||||
<li *ngIf="hasMetrics" class="uk-margin-medium-top">
|
||||
<div uk-grid class="uk-child-width-1-3 uk-text-center uk-flex uk-flex-middle">
|
||||
<div></div>
|
||||
<div class="uk-text-center uk-flex uk-flex-middle uk-flex-center">
|
||||
<div>
|
||||
<metrics [pageViews]="pageViews"
|
||||
[id]="projectId" [entityType]="'projects'" [entity]="'project'"
|
||||
|
@ -777,26 +794,23 @@
|
|||
<!-- <div class="uk-margin-small-top uk-text-muted uk-text-small uk-text-right">-->
|
||||
<!-- Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}-->
|
||||
<!-- </div>-->
|
||||
<modal-loading></modal-loading>
|
||||
<modal-alert #AlertModalCsvError></modal-alert>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="projectInfo != null">
|
||||
|
||||
<div class="main-tabs-div">
|
||||
<my-tabs (selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<my-tab [tabTitle]="'Project Summary'" [tabId]="'summary'">
|
||||
<div *ngIf="numberOfTabs > 0; else loadingBlock" class="main-tabs-div">
|
||||
<ng-template #summary_tab>
|
||||
<!-- <my-tab [tabTitle]="'Project Summary'" [tabId]="'summary'" [active]="true">-->
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div *ngIf="projectInfo.description" class="uk-width-expand uk-padding uk-inline">
|
||||
<div *ngIf="hasPrimaryInfo" class="uk-width-expand uk-padding uk-inline">
|
||||
<!-- Description -->
|
||||
<div class="uk-text-muted uk-text-small">Description</div>
|
||||
<div *ngIf="projectInfo.description" class="uk-margin-bottom">
|
||||
<div class="uk-text-justify uk-text-small uk-height-max-medium uk-overflow-auto">
|
||||
<div *ngIf="projectInfo.description" class="uk-margin-medium-bottom">
|
||||
<div class="uk-text-muted">Description</div>
|
||||
<div class="uk-text-justify uk-height-max-medium uk-overflow-auto">
|
||||
<span>{{projectInfo.description.substring(0, showNumDescription)}}</span>
|
||||
<span *ngIf="showNumDescription == thresholdDescription &&
|
||||
projectInfo.description.length > thresholdDescription">...</span>
|
||||
projectInfo.description.length > thresholdDescription">...</span>
|
||||
</div>
|
||||
<div *ngIf="showNumDescription == thresholdDescription &&
|
||||
projectInfo.description.length > thresholdDescription" class="uk-text-right">
|
||||
|
@ -811,135 +825,142 @@
|
|||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div *ngIf="projectInfo.organizations && projectInfo.organizations.length > 0"
|
||||
class="uk-width-1-3 uk-padding right-column uk-inline">
|
||||
<div *ngIf="hasSecondaryInfo"
|
||||
[class]="'uk-padding uk-inline ' + (hasPrimaryInfo?'uk-width-1-3@m right-column': 'uk-width-expand')">
|
||||
<!-- Organizations -->
|
||||
<div class="uk-text-muted uk-text-small">Organizations</div>
|
||||
<div class="uk-height-max-medium uk-overflow-auto">
|
||||
<span *ngFor="let organization of projectInfo.organizations.slice(0, showNumOrganizations) let i=index"
|
||||
[attr.uk-tooltip]="organization.acronym && organization.name ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="organization.name">
|
||||
<a *ngIf="organization.id"
|
||||
[queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active"
|
||||
routerLink="/search/organization">
|
||||
<u>{{(organization.acronym) ? organization.acronym : ''}}</u>
|
||||
<u>{{(!organization.acronym && organization.name) ? organization.name : ''}}</u>
|
||||
</a>
|
||||
<span *ngIf="!organization.id">
|
||||
<span *ngIf="organization.acronym">{{organization.acronym}}</span>
|
||||
<span *ngIf="!organization.acronym && organization.name">{{organization.name}}</span>
|
||||
</span>
|
||||
<span *ngIf="(i < projectInfo.organizations.length-1)">, </span>
|
||||
</span>
|
||||
<span *ngIf="showNumOrganizations == thresholdOrganizations && projectInfo.organizations.length > thresholdOrganizations"> ... </span>
|
||||
</div>
|
||||
<div *ngIf="showNumOrganizations == thresholdOrganizations && projectInfo.organizations.length > thresholdOrganizations"
|
||||
class="uk-width-1-1 uk-text-right uk-margin-small-top">
|
||||
<a (click)="showNumOrganizations = projectInfo.organizations.length;">
|
||||
View all {{projectInfo.organizations.length | number}} organizations
|
||||
</a>
|
||||
</div>
|
||||
<div *ngIf="showNumOrganizations > thresholdOrganizations"
|
||||
class="uk-width-1-1 uk-text-right uk-margin-small-top">
|
||||
<a (click)="showNumOrganizations = thresholdOrganizations;">View less organizations</a>
|
||||
<div class="uk-text-muted">Organizations</div>
|
||||
<div class="uk-margin-medium-bottom">
|
||||
<div class="uk-height-max-medium uk-overflow-auto">
|
||||
<span *ngFor="let organization of projectInfo.organizations.slice(0, showNumOrganizations) let i=index"
|
||||
[attr.uk-tooltip]="organization.acronym && organization.name ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="organization.name">
|
||||
<a *ngIf="organization.id"
|
||||
[queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active"
|
||||
routerLink="/search/organization">
|
||||
<u>{{(organization.acronym) ? organization.acronym : ''}}</u>
|
||||
<u>{{(!organization.acronym && organization.name) ? organization.name : ''}}</u>
|
||||
</a>
|
||||
<span *ngIf="!organization.id">
|
||||
<span *ngIf="organization.acronym">{{organization.acronym}}</span>
|
||||
<span *ngIf="!organization.acronym && organization.name">{{organization.name}}</span>
|
||||
</span>
|
||||
<span *ngIf="(i < projectInfo.organizations.length-1)">, </span>
|
||||
</span>
|
||||
<span *ngIf="showNumOrganizations == thresholdOrganizations && projectInfo.organizations.length > thresholdOrganizations"> ... </span>
|
||||
</div>
|
||||
<div *ngIf="showNumOrganizations == thresholdOrganizations && projectInfo.organizations.length > thresholdOrganizations"
|
||||
class="uk-width-1-1 uk-text-right uk-margin-small-top">
|
||||
<a (click)="showNumOrganizations = projectInfo.organizations.length;">
|
||||
View all {{projectInfo.organizations.length | number}} organizations
|
||||
</a>
|
||||
</div>
|
||||
<div *ngIf="showNumOrganizations > thresholdOrganizations"
|
||||
class="uk-width-1-1 uk-text-right uk-margin-small-top">
|
||||
<a (click)="showNumOrganizations = thresholdOrganizations;">View less organizations</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchPublications.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"
|
||||
[tabId]="'publications'">
|
||||
<!-- </my-tab>-->
|
||||
</ng-template>
|
||||
<ng-template #publications_tab>
|
||||
<!-- <my-tab *ngIf="fetchPublications.searchUtils.totalResults > 0"-->
|
||||
<!-- [tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"-->
|
||||
<!-- [tabId]="'publications'">-->
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<!-- <errorMessages [status]="[fetchPublications.searchUtils.status]" [type]="'publications'"-->
|
||||
<!-- tab_error_class=true></errorMessages>-->
|
||||
<!-- <errorMessages [status]="[fetchPublications.searchUtils.status]" [type]="'publications'"-->
|
||||
<!-- tab_error_class=true></errorMessages>-->
|
||||
|
||||
<!-- <div *ngIf="fetchPublications.searchUtils.status == errorCodes.DONE">-->
|
||||
<!-- <div class="uk-inline uk-flex uk-flex-right">-->
|
||||
<!-- <span class="uk-position-left uk-text-middle uk-flex-middle uk-flex">-->
|
||||
<!-- <span>Top 10</span><span class="space uk-text-muted">PUBLICATION</span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <a [queryParams]="routerHelper.createQueryParams(['project', 'po'], [projectId, 'and'])"-->
|
||||
<!-- routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications">-->
|
||||
<!-- <button *ngIf="fetchPublications.searchUtils.totalResults > 10"-->
|
||||
<!-- class="uk-button uk-button-small portal-button">-->
|
||||
<!-- <span uk-icon="search"></span>-->
|
||||
<!-- View more-->
|
||||
<!-- </button>-->
|
||||
<!-- </a>-->
|
||||
<!-- <div *ngIf="fetchPublications.searchUtils.status == errorCodes.DONE">-->
|
||||
<!-- <div class="uk-inline uk-flex uk-flex-right">-->
|
||||
<!-- <span class="uk-position-left uk-text-middle uk-flex-middle uk-flex">-->
|
||||
<!-- <span>Top 10</span><span class="space uk-text-muted">PUBLICATION</span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <a [queryParams]="routerHelper.createQueryParams(['project', 'po'], [projectId, 'and'])"-->
|
||||
<!-- routerLinkActive="router-link-active" [routerLink]="linkToSearchPublications">-->
|
||||
<!-- <button *ngIf="fetchPublications.searchUtils.totalResults > 10"-->
|
||||
<!-- class="uk-button uk-button-small portal-button">-->
|
||||
<!-- <span uk-icon="search"></span>-->
|
||||
<!-- View more-->
|
||||
<!-- </button>-->
|
||||
<!-- </a>-->
|
||||
|
||||
<!-- </div>-->
|
||||
<!-- <search-result [results]="fetchPublications.results"-->
|
||||
<!-- [status]="fetchPublications.searchUtils.status"-->
|
||||
<!-- type="publication" urlParam="articleId"-->
|
||||
<!-- dividerNotCard="true">-->
|
||||
<!-- </search-result>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <search-result [results]="fetchPublications.results"-->
|
||||
<!-- [status]="fetchPublications.searchUtils.status"-->
|
||||
<!-- type="publication" urlParam="articleId"-->
|
||||
<!-- dividerNotCard="true">-->
|
||||
<!-- </search-result>-->
|
||||
<!-- </div>-->
|
||||
<ng-container *ngTemplateOutlet="search_tab;
|
||||
context: { fetch: fetchPublications, type: 'publication', urlParam: 'articleId'}">
|
||||
context: { fetch: fetchPublications, type: 'publication', urlParam: 'articleId'}">
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<!-- <div class="uk-width-1-3 uk-padding right-column">-->
|
||||
<!-- <div>test publications</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="uk-width-1-3@m uk-padding right-column">-->
|
||||
<!-- <div>test publications</div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
|
||||
<!-- <ng-container *ngTemplateOutlet="tab_content; context: {-->
|
||||
<!-- resultType: 'publication', results: publicationResults,-->
|
||||
<!-- totalResults: publicationTotal, type: 'publication', typeName: 'publication'}">-->
|
||||
<!-- </ng-container>-->
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchDatasets.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"
|
||||
[tabId]="'datasets'">
|
||||
<!-- </my-tab>-->
|
||||
</ng-template>
|
||||
<ng-template #datasets_tab>
|
||||
<!-- <my-tab *ngIf="fetchDatasets.searchUtils.totalResults > 0"-->
|
||||
<!-- [tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"-->
|
||||
<!-- [tabId]="'datasets'">-->
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<ng-container *ngTemplateOutlet="search_tab;
|
||||
context: { fetch: fetchDatasets, type: 'dataset', urlParam: 'datasetId'}">
|
||||
context: { fetch: fetchDatasets, type: 'dataset', urlParam: 'datasetId'}">
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<!-- <div class="uk-width-1-3 uk-padding right-column">-->
|
||||
<!-- <div>test research data</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="uk-width-1-3@m uk-padding right-column">-->
|
||||
<!-- <div>test research data</div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchSoftware.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Software'" [tabNumber]="fetchSoftware.searchUtils.totalResults"
|
||||
[tabId]="'software'">
|
||||
<!-- </my-tab>-->
|
||||
</ng-template>
|
||||
<ng-template #software_tab>
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<ng-container *ngTemplateOutlet="search_tab;
|
||||
context: { fetch: fetchSoftware, type: 'software', urlParam: 'softwareId'}">
|
||||
context: { fetch: fetchSoftware, type: 'software', urlParam: 'softwareId'}">
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<!-- <div class="uk-width-1-3 uk-padding right-column">-->
|
||||
<!-- <div>test software</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="uk-width-1-3@m uk-padding right-column">-->
|
||||
<!-- <div>test software</div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchOrps.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"
|
||||
[tabId]="'other'">
|
||||
</ng-template>
|
||||
<ng-template #other_tab>
|
||||
<!-- <my-tab *ngIf="fetchOrps.searchUtils.totalResults > 0"-->
|
||||
<!-- [tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"-->
|
||||
<!-- [tabId]="'other'">-->
|
||||
<div class="uk-grid uk-margin-remove">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<ng-container *ngTemplateOutlet="search_tab;
|
||||
context: { fetch: fetchOrps, type: 'other', urlParam: 'orpId'}">
|
||||
context: { fetch: fetchOrps, type: 'other', urlParam: 'orpId'}">
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<!-- <div class="uk-width-1-3 uk-padding right-column">-->
|
||||
<!-- <div>test other research products</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="uk-width-1-3@m uk-padding right-column">-->
|
||||
<!-- <div>test other research products</div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||
[tabTitle]="'Statistics'" [statistics]="true" [tabId]="'statistics'">
|
||||
<!-- </my-tab>-->
|
||||
</ng-template>
|
||||
<ng-template #statistics_tab>
|
||||
<!-- <my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0-->
|
||||
<!-- || fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"-->
|
||||
<!-- [tabTitle]="'Statistics'" [statistics]="true" [tabId]="'statistics'">-->
|
||||
<div class="">
|
||||
<div class="uk-width-expand uk-padding">
|
||||
<errorMessages [status]="[fetchPublications.searchUtils.status, fetchDatasets.searchUtils.status,
|
||||
|
@ -950,7 +971,7 @@
|
|||
*ngIf="statsClicked &&
|
||||
(fetchPublications.searchUtils.status == errorCodes.DONE || fetchDatasets.searchUtils.status == errorCodes.DONE
|
||||
|| fetchSoftware.searchUtils.status == errorCodes.DONE || fetchOrps.searchUtils.status == errorCodes.DONE)"
|
||||
class="uk-grid uk-child-width-1-2">
|
||||
class="uk-grid uk-child-width-1-1 uk-child-width-1-2@m">
|
||||
<div class="uk-padding uk-padding-remove-top">
|
||||
<div *ngIf="!properties.useNewStatistisTool" class="uk-text-center uk-text-large">Produced research
|
||||
outcomes per year</div>
|
||||
|
@ -968,20 +989,94 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </my-tab>-->
|
||||
</ng-template>
|
||||
|
||||
<my-tabs [class]="numberOfTabs > 2 ? 'uk-visible@m' : ''" (selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<my-tab *ngIf="hasPrimaryInfo || hasSecondaryInfo"
|
||||
[tabTitle]="'Project Summary'" [tabId]="'summary'"
|
||||
[class]="(firstTab === 'summary')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchPublications.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"
|
||||
[tabId]="'publications'" [class]="(firstTab === 'publications')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="publications_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchDatasets.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"
|
||||
[tabId]="'datasets'" [class]="(firstTab === 'datasets')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="datasets_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchSoftware.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Software'" [tabNumber]="fetchSoftware.searchUtils.totalResults"
|
||||
[tabId]="'software'" [class]="(firstTab === 'software')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="software_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchOrps.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"
|
||||
[tabId]="'other'" [class]="(firstTab === 'other')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="other_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||
[tabTitle]="'Statistics'" [statistics]="true" [tabId]="'statistics'"
|
||||
[class]="(firstTab === 'statistics')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="statistics_tab;"></ng-container>
|
||||
</my-tab>
|
||||
</my-tabs>
|
||||
|
||||
<my-small-tabs *ngIf="numberOfTabs > 2" class="uk-hidden@m" (selectedActiveTab)="onSelectActiveTab($event)">
|
||||
<my-tab *ngIf="hasPrimaryInfo || hasSecondaryInfo"
|
||||
[tabTitle]="'Project Summary'" [tabId]="'summary'"
|
||||
[class]="(firstTab === 'summary')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="summary_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchPublications.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Publications'" [tabNumber]="fetchPublications.searchUtils.totalResults"
|
||||
[tabId]="'publications'" [class]="(firstTab === 'publications')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="publications_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchDatasets.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Research Data'" [tabNumber]="fetchDatasets.searchUtils.totalResults"
|
||||
[tabId]="'datasets'" [class]="(firstTab === 'datasets')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="datasets_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchSoftware.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Software'" [tabNumber]="fetchSoftware.searchUtils.totalResults"
|
||||
[tabId]="'software'" [class]="(firstTab === 'software')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="software_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="fetchOrps.searchUtils.totalResults > 0"
|
||||
[tabTitle]="'Other Research'" [tabNumber]="fetchOrps.searchUtils.totalResults"
|
||||
[tabId]="'other'" [class]="(firstTab === 'other')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="other_tab;"></ng-container>
|
||||
</my-tab>
|
||||
<my-tab *ngIf="(fetchPublications.searchUtils.totalResults > 0 || fetchDatasets.searchUtils.totalResults > 0
|
||||
|| fetchSoftware.searchUtils.totalResults > 0 || fetchOrps.searchUtils.totalResults > 0)"
|
||||
[tabTitle]="'Statistics'" [statistics]="true" [tabId]="'statistics'"
|
||||
[class]="(firstTab === 'statistics')?'uk-active':''">
|
||||
<ng-container *ngTemplateOutlet="statistics_tab;"></ng-container>
|
||||
</my-tab>
|
||||
</my-small-tabs>
|
||||
</div>
|
||||
<ng-template #loadingBlock>
|
||||
<div class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">
|
||||
<span class="loading-gif uk-align-center" ></span>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<div class="uk-margin-small-top uk-flex">
|
||||
<!-- Last Index Info-->
|
||||
<div class="uk-flex uk-flex-bottom uk-width-2-3">
|
||||
<div class="uk-width-2-3@m uk-width-1-2">
|
||||
<img src="assets/common-assets/graph.svg" style="opacity: 0.4">
|
||||
<span class="uk-margin-small-left uk-text-small uk-text-baseline uk-text-muted">Powered by OpenAIRE Open Research Graph</span>
|
||||
<span class="uk-margin-small-left uk-text-small uk-text-baseline uk-text-muted">
|
||||
Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
<span class="uk-margin-small-left uk-text-baseline uk-text-muted">Powered by OpenAIRE Open Research Graph</span>
|
||||
<span class="uk-text-baseline uk-text-muted">
|
||||
. Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
</span>
|
||||
</div>
|
||||
<!--Feedback-->
|
||||
<div class="uk-width-1-3 uk-text-right uk-text-small">
|
||||
<div class="uk-width-expand uk-text-right">
|
||||
<span class="uk-text-muted">Any information missing or wrong?</span>
|
||||
<a (click)="showFeedback = true; scroll()" class="portal-link space">Report an Issue</a>
|
||||
</div>
|
||||
|
@ -1035,3 +1130,6 @@
|
|||
[properties]="properties" [entityType]="'project'" [title]="projectName" [fields]="feedbackFields"
|
||||
[showForm]="showFeedback" (show)="showFeedback = $event"></feedback>
|
||||
</div>
|
||||
|
||||
<modal-loading></modal-loading>
|
||||
<modal-alert #AlertModalCsvError></modal-alert>
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue