Merge remote-tracking branch 'origin/develop'

This commit is contained in:
Konstantina Galouni 2024-07-23 11:23:20 +03:00
commit fe09fbfdcb
9 changed files with 74 additions and 48 deletions

View File

@ -12,7 +12,7 @@ export class ConnectHelper {
if(properties.environment == "development" && if(properties.environment == "development" &&
(properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community" (properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community"
|| properties.adminToolsPortalType == "aggregator" || properties.adminToolsPortalType == "eosc")) { || properties.adminToolsPortalType == "aggregator" || properties.adminToolsPortalType == "eosc")) {
domain = "covid-19.openaire.eu"; //for testing // domain = "covid-19.openaire.eu"; //for testing
} }
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
if (domain.indexOf('eosc-portal.eu') != -1) { if (domain.indexOf('eosc-portal.eu') != -1) {

View File

@ -1000,10 +1000,10 @@
<a href="#">Overview</a> <a href="#">Overview</a>
</li> </li>
<li *ngIf="resultLandingInfo.measure && resultLandingInfo.measure.bip.length"> <li *ngIf="resultLandingInfo.measure && resultLandingInfo.measure.bip.length">
<a href="#">Impact</a> <a href="#" (click)="clickedImpactIndicators()">Impact</a>
</li> </li>
<li *ngIf="hasAltMetrics"> <li *ngIf="hasAltMetrics">
<a href="#">Social</a> <a href="#" (click)="clickedAltMetrics()">Social</a>
</li> </li>
<li *ngIf="resultLandingInfo.measure && resultLandingInfo.measure.counts.length"> <li *ngIf="resultLandingInfo.measure && resultLandingInfo.measure.counts.length">
<a href="#" (click)="clickedUsageMetrics()">Usage</a> <a href="#" (click)="clickedUsageMetrics()">Usage</a>
@ -1092,44 +1092,46 @@
</li> </li>
<!-- impact --> <!-- impact -->
<li *ngIf="resultLandingInfo.measure && resultLandingInfo.measure.bip.length"> <li *ngIf="resultLandingInfo.measure && resultLandingInfo.measure.bip.length">
<div class="uk-flex uk-flex-center uk-flex-middle uk-flex-wrap"> <ng-container *ngIf="impactClicked">
<div class="uk-card uk-card-default uk-padding-small"> <div class="uk-flex uk-flex-center uk-flex-middle uk-flex-wrap">
<table class="uk-table uk-table-small uk-margin-remove"> <div class="uk-card uk-card-default uk-padding-small">
<tbody> <table class="uk-table uk-table-small uk-margin-remove">
<ng-container *ngFor="let measure of resultLandingInfo.measure.bip; let i = index"> <tbody>
<tr> <ng-container *ngFor="let measure of resultLandingInfo.measure.bip; let i = index">
<td [class.uk-padding-remove-top]="i == 0" [class.uk-padding-remove-bottom]="i == resultLandingInfo.measure.bip.length - 1"> <tr>
<icon [name]="measure.icon" [flex]="true" [customClass]="'bip-icon'"></icon> <td [class.uk-padding-remove-top]="i == 0" [class.uk-padding-remove-bottom]="i == resultLandingInfo.measure.bip.length - 1">
</td> <icon [name]="measure.icon" [flex]="true" [customClass]="'bip-icon'"></icon>
<td [class.uk-padding-remove-top]="i == 0" [class.uk-padding-remove-bottom]="i == resultLandingInfo.measure.bip.length - 1"> </td>
<a class="uk-link uk-link-text uk-text-capitalize">{{measure.name}}</a> <td [class.uk-padding-remove-top]="i == 0" [class.uk-padding-remove-bottom]="i == resultLandingInfo.measure.bip.length - 1">
<ng-container *ngTemplateOutlet="dropInfo; context: {option: measure.name, isCompact: true}"></ng-container> <a class="uk-link uk-link-text uk-text-capitalize">{{measure.name}}</a>
</td> <ng-container *ngTemplateOutlet="dropInfo; context: {option: measure.name, isCompact: true}"></ng-container>
<td class="uk-text-uppercase uk-text-bolder" [class.uk-padding-remove-top]="i == 0" [class.uk-padding-remove-bottom]="i == resultLandingInfo.measure.bip.length - 1"> </td>
{{isNumber(measure.value) ? formatNumber(measure.value) : measure.value}} <td class="uk-text-uppercase uk-text-bolder" [class.uk-padding-remove-top]="i == 0" [class.uk-padding-remove-bottom]="i == resultLandingInfo.measure.bip.length - 1">
</td> {{isNumber(measure.value) ? formatNumber(measure.value) : measure.value}}
</tr> </td>
</ng-container> </tr>
</tbody> </ng-container>
</table> </tbody>
</table>
</div>
<div *ngIf="bipFrameUrl" class="uk-margin-large-left">
<i-frame [height]="300" [url]="bipFrameUrl" [addClass]="false"
customContainerClass="uk-background-default" customIframeClass="uk-blend-multiply uk-height-1-1"></i-frame>
</div>
</div> </div>
<div *ngIf="bipFrameUrl" class="uk-margin-large-left"> <div class="uk-text-center" [ngClass]="bipFrameUrl ? 'uk-margin-top' : 'uk-margin-large-top'">
<i-frame [height]="300" [url]="bipFrameUrl" [addClass]="false" <span class="uk-text-meta">Powered by</span>
customContainerClass="uk-background-default" customIframeClass="uk-blend-multiply uk-height-1-1"></i-frame> <a href='https://bip.imsi.athenarc.gr/' target='_blank' class='uk-link-reset'>
<img class="uk-margin-small-left uk-margin-small-right" src="assets/common-assets/bip-minimal.svg" loading="lazy" alt="BIP!"
style="width: 61px; height: 43px;">
<span class="uk-text-bolder">BIP!</span>
</a>
</div> </div>
</div> </ng-container>
<div class="uk-text-center" [ngClass]="bipFrameUrl ? 'uk-margin-top' : 'uk-margin-large-top'">
<span class="uk-text-meta">Powered by</span>
<a href='https://bip.imsi.athenarc.gr/' target='_blank' class='uk-link-reset'>
<img class="uk-margin-small-left uk-margin-small-right" src="assets/common-assets/bip-minimal.svg" loading="lazy" alt="BIP!"
style="width: 61px; height: 43px;">
<span class="uk-text-bolder">BIP!</span>
</a>
</div>
</li> </li>
<!-- social --> <!-- social -->
<li *ngIf="hasAltMetrics"> <li *ngIf="hasAltMetrics">
<altmetrics id="{{resultLandingInfo.identifiers?.get('doi')[0]}}" type="doi" size="medium-donut"></altmetrics> <altmetrics *ngIf="altMetricsClicked" id="{{resultLandingInfo.identifiers?.get('doi')[0]}}" type="doi" size="medium-donut"></altmetrics>
</li> </li>
<!-- usage --> <!-- usage -->
<li *ngIf="resultLandingInfo.measure && resultLandingInfo.measure.counts.length"> <li *ngIf="resultLandingInfo.measure && resultLandingInfo.measure.counts.length">

View File

@ -79,6 +79,8 @@ export class ResultLandingComponent {
public descriptionClicked: boolean; public descriptionClicked: boolean;
// Metrics tab variables // Metrics tab variables
public impactClicked: boolean;
public altMetricsClicked: boolean;
public metricsClicked: boolean; public metricsClicked: boolean;
public hasAltMetrics: boolean = false; public hasAltMetrics: boolean = false;
public viewsFrameUrl: string; public viewsFrameUrl: string;
@ -1126,6 +1128,18 @@ export class ResultLandingComponent {
this.descriptionModal.open(); this.descriptionModal.open();
} }
public clickedImpactIndicators() {
setTimeout( () => {
this.impactClicked = true;
});
}
public clickedAltMetrics() {
setTimeout( () => {
this.altMetricsClicked = true;
});
}
public clickedUsageMetrics() { public clickedUsageMetrics() {
setTimeout( () => { setTimeout( () => {
this.metricsClicked = true; this.metricsClicked = true;

View File

@ -1,4 +1,5 @@
import {IndicatorType, Stakeholder} from "../../../monitor/entities/stakeholder"; import {IndicatorType, Stakeholder} from "../../../monitor/entities/stakeholder";
// @ts-ignore
import axios from "axios"; import axios from "axios";
import {IndicatorUtils} from "../indicator-utils"; import {IndicatorUtils} from "../indicator-utils";
import {Composer} from "../../../utils/email/composer"; import {Composer} from "../../../utils/email/composer";

View File

@ -53,18 +53,16 @@ export interface StakeholderCategory {
export class StakeholderConfiguration { export class StakeholderConfiguration {
public static ENTITIES: Entities = new Entities(); public static ENTITIES: Entities = new Entities();
public static STAKEHOLDER_CATEGORIES: StakeholderCategory[] = (properties.environment !== 'production')?[ public static STAKEHOLDER_CATEGORIES: StakeholderCategory[] = [
{name: 'All', plural: 'All', value: 'all'}, {name: 'All', plural: 'All', value: 'all'},
{name: 'Template', plural: 'Templates', value: 'templates'}, {name: 'Template', plural: 'Templates', value: 'templates'},
{name: 'Standalone', plural: 'Standalone', value: 'standalone'}, {name: 'Standalone', plural: 'Standalone', value: 'standalone'},
{name: 'Umbrella', plural: 'Umbrella', value: 'umbrella'}, {name: 'Umbrella', plural: 'Umbrella', value: 'umbrella'},
{name: 'Integrated ', plural: 'Integrated', value: 'dependent', {
name: 'Integrated ', plural: 'Integrated', value: 'dependent',
tooltip: 'A profile that doesn\'t have his own ' + StakeholderConfiguration.ENTITIES.stakeholder + tooltip: 'A profile that doesn\'t have his own ' + StakeholderConfiguration.ENTITIES.stakeholder +
', but can be integrated into another ' + StakeholderConfiguration.ENTITIES.stakeholder + '.'} ', but can be integrated into another ' + StakeholderConfiguration.ENTITIES.stakeholder + '.'
]:[ }
{name: 'All', plural: 'All', value: 'all'},
{name: 'Template', plural: 'Templates', value: 'templates'},
{name: 'Profiles', plural: 'Profiles', value: 'standalone'},
]; ];
public static TYPES: Option[] = [ public static TYPES: Option[] = [
@ -734,7 +732,7 @@ export class IndicatorUtils {
if (indicatorPath.type == null) { if (indicatorPath.type == null) {
indicatorPath.type = this.defaultChartType; indicatorPath.type = this.defaultChartType;
} }
if(tab) { if (tab) {
indicatorPath.parameters.tab = tab; indicatorPath.parameters.tab = tab;
} }
return indicatorPath; return indicatorPath;
@ -783,7 +781,7 @@ export class IndicatorUtils {
for (let gfilter of filter["groupFilters"]) { for (let gfilter of filter["groupFilters"]) {
let replacedValue = this.replaceIndexValues(gfilter["values"][0], stakeholder); let replacedValue = this.replaceIndexValues(gfilter["values"][0], stakeholder);
if (replacedValue) { // don't proceed in replacement if no replaced value matches if (replacedValue) { // don't proceed in replacement if no replaced value matches
gfilter["values"][0] = replacedValue; gfilter["values"][0] = replacedValue;
} }
} }
} }

View File

@ -20,7 +20,7 @@ export class BrowseStakeholderBaseComponent<T> extends StakeholderBaseComponent
gridView: boolean = true; gridView: boolean = true;
sortOptions: Option[] = [ sortOptions: Option[] = [
{value: 'alphAsc', label: 'Alphabetically Asc. (A-Z)'}, {value: 'alphAsc', label: 'Alphabetically Asc. (A-Z)'},
{value: 'alphDsc', label: 'Alphabetically Dsc. (Z-A)'}, {value: 'alphDsc', label: 'Alphabetically Desc. (Z-A)'},
]; ];
pageOptions: number[] = [10, 20, 30, 40]; pageOptions: number[] = [10, 20, 30, 40];
sortBy: string = null; sortBy: string = null;

View File

@ -58,7 +58,7 @@ import {EnvProperties} from "../properties/env-properties";
[type]="getTypeName().toLowerCase()"></citeThis> [type]="getTypeName().toLowerCase()"></citeThis>
</modal-alert> </modal-alert>
<modal-alert *ngIf="share" #addThisModal classBody="uk-flex uk-flex-center uk-flex-middle"> <modal-alert *ngIf="share" #addThisModal classBody="uk-flex uk-flex-center uk-flex-middle">
<addThis [url]="url"></addThis> <addThis *ngIf="addThisClicked" [url]="url"></addThis>
</modal-alert> </modal-alert>
<modal-alert *ngIf="result" #embedResultsModal large="true"> <modal-alert *ngIf="result" #embedResultsModal 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">
@ -98,6 +98,7 @@ export class EntityActionsComponent implements OnInit {
@Input() showTooltip: boolean = true; @Input() showTooltip: boolean = true;
@Input() compactView: boolean = false; // if true, do not show label for actions @Input() compactView: boolean = false; // if true, do not show label for actions
public citeThisClicked: boolean; public citeThisClicked: boolean;
public addThisClicked: boolean;
public routerHelper: RouterHelper = new RouterHelper(); public routerHelper: RouterHelper = new RouterHelper();
@ViewChild('citeModal') citeModal; @ViewChild('citeModal') citeModal;
@ViewChild('embedResultsModal') embedResultsModal; @ViewChild('embedResultsModal') embedResultsModal;
@ -140,6 +141,7 @@ export class EntityActionsComponent implements OnInit {
} }
public openAddThisModal() { public openAddThisModal() {
this.addThisClicked = true;
this.addThisModal.cancelButton = false; this.addThisModal.cancelButton = false;
this.addThisModal.okButton = false; this.addThisModal.okButton = false;
this.addThisModal.alertTitle = "Share this " + this.getTypeName() + " in your social networks"; this.addThisModal.alertTitle = "Share this " + this.getTypeName() + " in your social networks";

View File

@ -8,6 +8,7 @@ export interface EnvProperties {
adminToolsPortalType?: PortalType; adminToolsPortalType?: PortalType;
dashboard?: Dashboard; dashboard?: Dashboard;
isDashboard?: boolean; isDashboard?: boolean;
plan?:string;
domain?: string; domain?: string;
enablePiwikTrack?: boolean; enablePiwikTrack?: boolean;
useCache?: boolean; useCache?: boolean;

View File

@ -349,7 +349,15 @@ export class SearchFieldsBase {
operator: "hl", operator: "hl",
equalityOperator: " = ", equalityOperator: " = ",
filterType: "triplet" filterType: "triplet"
} },
["relorganization"]: {
name: OpenaireEntities.ORGANIZATION,
type: "refine",
param: "organization",
operator: "or",
equalityOperator: " exact ",
filterType: "checkbox"
},
}; };
public RESULT_STATIC_FIELD_VALUES: { [key: string]: {"name": string, "id": string, "count": string}[] } = { public RESULT_STATIC_FIELD_VALUES: { [key: string]: {"name": string, "id": string, "count": string}[] } = {