[develop | DONE | CHANGED]: Funders page: added link to RFO dashboard (irish) when available.
1. funders.component.html: a. [BUG] Updated checks to show Monitor dashboard link only when monitorDashboardStatus has a value. b. Replaced alias usage with monitorDashboard. c. Added link to RFO dashboard if irishDashboard and irishDashboardStatus are available. 2. funders.component.ts: a. Removed from fundersMap "alias" and added irishDashboard, irishDashboardStatus. b. In showOptions, renamed "dashboard" to "monitor" and added "rfo" for RFO dashboard. 3. funders.component.less: Added variable @irish-color and set css for .irish-dashboard-link.
This commit is contained in:
parent
cf998dcd2e
commit
623eb2fad0
|
@ -204,9 +204,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="monitor-dashboard uk-padding-small uk-padding-remove-left uk-margin-medium-left">
|
||||
<a *ngIf="funder.monitorDashboard && funder.monitorDashboardStatus != 'PRIVATE' && funder.monitorDashboardStatus != 'RESTRICTED'"
|
||||
<a *ngIf="funder.monitorDashboard && funder.monitorDashboardStatus && funder.monitorDashboardStatus != 'PRIVATE' && funder.monitorDashboardStatus != 'RESTRICTED'"
|
||||
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text"
|
||||
target="_blank" [href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'monitor.openaire.eu/dashboard/'+funder.alias">
|
||||
target="_blank" [href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'monitor.openaire.eu/dashboard/'+funder.monitorDashboard">
|
||||
<span class="uk-flex uk-flex-middle">
|
||||
<img src="assets/common-assets/common/Symbol.png" alt="OpenAIRE logo"
|
||||
class="uk-margin-xsmall-right" style="width: 17px; height: 17px;" loading="lazy">
|
||||
|
@ -220,6 +220,23 @@
|
|||
<span class="monitor-dashboard-link uk-text-uppercase uk-text-bold uk-text-small">Monitor Dashboard</span>
|
||||
<icon class="uk-margin-xsmall-left" name="closed_access" [flex]="true" [ratio]="1"></icon>
|
||||
</span>
|
||||
|
||||
<a *ngIf="funder.irishDashboard && funder.irishDashboardStatus && funder.irishDashboardStatus != 'PRIVATE' && funder.irishDashboardStatus != 'RESTRICTED' && properties.environment != 'beta'"
|
||||
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text"
|
||||
target="_blank" [href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'oamonitor.ireland.openaire.eu/rfo/'+funder.irishDashboard">
|
||||
<span class="uk-flex uk-flex-middle">
|
||||
<img src="assets/common-assets/common/small_irish.svg" alt="Irish logo"
|
||||
class="uk-margin-xsmall-right" style="width: 17px; height: 17px;" loading="lazy">
|
||||
<span class="irish-dashboard-link uk-text-uppercase">RFO Dashboard</span>
|
||||
</span>
|
||||
</a>
|
||||
<span *ngIf="funder.irishDashboard && funder.irishDashboardStatus && (funder.irishDashboardStatus == 'RESTRICTED' || properties.environment =='beta')"
|
||||
class="uk-flex uk-flex-middle">
|
||||
<img src="assets/common-assets/common/small_irish.svg" alt="Irish logo"
|
||||
class="uk-margin-xsmall-right" style="width: 17px; height: 17px;" loading="lazy">
|
||||
<span class="irish-dashboard-link uk-text-uppercase uk-text-bold uk-text-small">RFO Dashboard</span>
|
||||
<icon class="uk-margin-xsmall-left" name="closed_access" [flex]="true" [ratio]="1"></icon>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@ -238,7 +255,7 @@
|
|||
<div class="uk-flex uk-flex-column uk-flex-center">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<!-- <span class="uk-text-xsmall uk-margin-small-right">flag</span> -->
|
||||
<span class="fi uk-text-xsmall uk-margin-small-right" [ngClass]="'fi-'+funder.country | lowercase"></span>
|
||||
<span *ngIf="funder.country" class="fi uk-text-xsmall uk-margin-small-right" [ngClass]="'fi-'+funder.country | lowercase"></span>
|
||||
<div class="uk-h6 uk-margin-remove uk-text-truncate">
|
||||
<ng-container *ngIf="funder.name">
|
||||
<span>{{funder.name}}</span>
|
||||
|
@ -250,10 +267,10 @@
|
|||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="funder.monitorDashboard" class="uk-margin-top">
|
||||
<a *ngIf="funder.monitorDashboard && funder.monitorDashboardStatus != 'PRIVATE' && funder.monitorDashboardStatus != 'RESTRICTED'"
|
||||
<div *ngIf="funder.monitorDashboard || funder.irishDashboard" class="uk-margin-top">
|
||||
<a *ngIf="funder.monitorDashboard && funder.monitorDashboardStatus && funder.monitorDashboardStatus != 'PRIVATE' && funder.monitorDashboardStatus != 'RESTRICTED'"
|
||||
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text"
|
||||
target="_blank" [href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'monitor.openaire.eu/dashboard/'+funder.alias">
|
||||
target="_blank" [href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'monitor.openaire.eu/dashboard/'+funder.monitorDashboard">
|
||||
<span class="uk-flex uk-flex-middle">
|
||||
<img src="assets/common-assets/common/Symbol.png" alt="OpenAIRE logo"
|
||||
class="uk-margin-xsmall-right" style="width: 17px; height: 17px;" loading="lazy">
|
||||
|
@ -267,6 +284,23 @@
|
|||
<span class="monitor-dashboard-link uk-text-uppercase uk-text-bold uk-text-small">Monitor Dashboard</span>
|
||||
<icon class="uk-margin-xsmall-left" name="closed_access" [flex]="true" [ratio]="1"></icon>
|
||||
</span>
|
||||
|
||||
<a *ngIf="funder.irishDashboard && funder.irishDashboardStatus && funder.irishDashboardStatus != 'PRIVATE' && funder.irishDashboardStatus != 'RESTRICTED' && properties.environment != 'beta'"
|
||||
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text"
|
||||
target="_blank" [href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'monitor.openaire.eu/dashboard/'+funder.irishDashboard">
|
||||
<span class="uk-flex uk-flex-middle">
|
||||
<img src="assets/common-assets/common/small_irish.svg" alt="Irish logo"
|
||||
class="uk-margin-xsmall-right" style="width: 17px; height: 17px;" loading="lazy">
|
||||
<span class="irish-dashboard-link uk-text-uppercase">RFO Dashboard</span>
|
||||
</span>
|
||||
</a>
|
||||
<span *ngIf="funder.irishDashboard && funder.irishDashboardStatus && (funder.irishDashboardStatus == 'RESTRICTED' || properties.environment == 'beta')"
|
||||
class="uk-flex uk-flex-middle">
|
||||
<img src="assets/common-assets/common/small_irish.svg" alt="Irish logo"
|
||||
class="uk-margin-xsmall-right" style="width: 17px; height: 17px;" loading="lazy">
|
||||
<span class="irish-dashboard-link uk-text-uppercase uk-text-bold uk-text-small">RFO Dashboard</span>
|
||||
<icon class="uk-margin-xsmall-left" name="closed_access" [flex]="true" [ratio]="1"></icon>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-flex uk-flex-middle uk-child-width-1-3">
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
@import (reference) "~src/assets/openaire-theme/less/color.less";
|
||||
@import "flag-icons/css/flag-icons.min.css";
|
||||
|
||||
@irish-color: #FF7901;
|
||||
|
||||
.irish-dashboard-link {
|
||||
color: @irish-color;
|
||||
}
|
||||
|
||||
.custom-coins-dot:after {
|
||||
content: "";
|
||||
background-image: url("~src/assets/explore-assets/funders/coins.svg");
|
||||
|
|
|
@ -55,13 +55,16 @@ export class FundersComponent implements OnInit {
|
|||
"id": string,
|
||||
"name": string,
|
||||
"shortName": string,
|
||||
"alias": string,
|
||||
"researchProducts": number,
|
||||
// "alias": string,
|
||||
// "irishAlias": string,
|
||||
"researchProducts": number,
|
||||
"openAccessResearchProducts": number,
|
||||
"openAccessPercentage": number,
|
||||
"projects": number,
|
||||
"monitorDashboard": string,
|
||||
"monitorDashboardStatus": string,
|
||||
"monitorDashboardStatus": string,
|
||||
"irishDashboard": string,
|
||||
"irishDashboardStatus": string,
|
||||
"logoUrl": string,
|
||||
"websiteUrl": string,
|
||||
"country": string,
|
||||
|
@ -111,7 +114,8 @@ export class FundersComponent implements OnInit {
|
|||
}));
|
||||
this.showOptions = [
|
||||
{value: 'all', label: 'All funders'},
|
||||
{value: 'dashboard', label: 'Funders with dashboard'}
|
||||
{value: 'monitor', label: 'Funders with Monitor dashboard'},
|
||||
{value: 'rfo', label: 'Funders with RFO dashboard'}
|
||||
];
|
||||
this.sortOptions = [
|
||||
{value: 'alphAsc', label: 'Alphabetically asc. (A-Z)'},
|
||||
|
@ -162,13 +166,16 @@ export class FundersComponent implements OnInit {
|
|||
"id": id,
|
||||
"name": this.removePartAfterCharacters(queriedFunder.name, "||"),
|
||||
"shortName": queriedFunder.shortName,
|
||||
"alias": '',
|
||||
// "alias": '',
|
||||
// "irishAlias": '',
|
||||
"researchProducts": +queriedFunder.results,
|
||||
"openAccessResearchProducts": +queriedFunder.openResults,
|
||||
"openAccessPercentage": 0,
|
||||
"projects": +queriedFunder.projects,
|
||||
"monitorDashboard": '',
|
||||
"monitorDashboardStatus": '',
|
||||
"irishDashboard": '',
|
||||
"irishDashboardStatus": '',
|
||||
"logoUrl": '',
|
||||
"websiteUrl": '',
|
||||
"country": queriedFunder.country,
|
||||
|
@ -181,12 +188,15 @@ export class FundersComponent implements OnInit {
|
|||
|
||||
if(queriedFunder.stakeholder) {
|
||||
let stakeholder = queriedFunder.stakeholder;
|
||||
funder.alias = stakeholder.alias;
|
||||
if(!funder.shortName) {
|
||||
funder.shortName = stakeholder.alias;
|
||||
}
|
||||
// funder.alias = stakeholder.alias;
|
||||
// funder.irishAlias = stakeholder.irishAlias;
|
||||
// if(!funder.shortName) {
|
||||
// funder.shortName = stakeholder.alias;
|
||||
// }
|
||||
funder.monitorDashboard = stakeholder.alias;
|
||||
funder.monitorDashboardStatus = stakeholder.visibility;
|
||||
funder.irishDashboard = stakeholder.irishAlias;
|
||||
funder.irishDashboardStatus = stakeholder.irishVisibility;
|
||||
if(stakeholder.logoUrl) {
|
||||
funder.logoUrl = (stakeholder.isUpload ? properties.utilsService + "/download/" : "") + (stakeholder.logoUrl);
|
||||
}
|
||||
|
@ -385,10 +395,16 @@ export class FundersComponent implements OnInit {
|
|||
this.keyword = '';
|
||||
}
|
||||
if(this.funders.length) {
|
||||
displayedFunders = displayedFunders.filter(item => (item['name'] && item['name'].toLowerCase().includes(this.keyword.toLowerCase())) || (item['alias'] && item['alias'].toLowerCase().includes(this.keyword.toLowerCase())));
|
||||
displayedFunders = displayedFunders.filter(item => (item['name'] && item['name'].toLowerCase().includes(this.keyword.toLowerCase()))
|
||||
|| (item['monitorDashboard'] && item['monitorDashboard'].toLowerCase().includes(this.keyword.toLowerCase())
|
||||
|| (item['irishDashboard'] && item['irishDashboard'].toLowerCase().includes(this.keyword.toLowerCase()))));
|
||||
}
|
||||
if(this.show == 'dashboard') {
|
||||
displayedFunders = displayedFunders.filter(funder => funder.monitorDashboard && funder.monitorDashboard?.length > 0 && funder.monitorDashboardStatus != 'PRIVATE');
|
||||
if(this.show == 'monitor') {
|
||||
displayedFunders = displayedFunders.filter(funder => funder.monitorDashboard && funder.monitorDashboard?.length > 0 && ((funder.monitorDashboardStatus && funder.monitorDashboardStatus != 'PRIVATE')));
|
||||
}
|
||||
|
||||
if(this.show == 'rfo') {
|
||||
displayedFunders = displayedFunders.filter(funder => funder.monitorDashboard && funder.monitorDashboard?.length > 0 && ((funder.irishDashboardStatus && funder.irishDashboardStatus != 'PRIVATE')));
|
||||
}
|
||||
|
||||
this.displayedFunders = displayedFunders;
|
||||
|
|
Loading…
Reference in New Issue