Merge remote-tracking branch 'origin/develop' into recommendations-functionality
This commit is contained in:
commit
25b3c6121b
|
@ -11,15 +11,17 @@ import {properties} from "../../../../../environments/environment";
|
|||
<h6 class="uk-margin-remove multi-line-ellipsis lines-2">
|
||||
<p class="uk-margin-remove">
|
||||
<a *ngIf="externalPortalUrl" [href]="externalPortalUrl + projectUrl + '?projectId='+project['openaireId']" class="uk-link uk-link-heading" [class.uk-disabled]="project.name == 'unidentified'">
|
||||
{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}
|
||||
<span *ngIf="project['code'] != 'unidentified'">{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}</span>
|
||||
<span *ngIf="project['code'] == 'unidentified'">{{project['funderName']}}</span>
|
||||
</a>
|
||||
<a *ngIf="!externalPortalUrl" [routerLink]="projectUrl" [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])" class="uk-link uk-link-heading" [class.uk-disabled]="project.name == 'unidentified'">
|
||||
{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}
|
||||
<span *ngIf="project['code'] != 'unidentified'">{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}</span>
|
||||
<span *ngIf="project['code'] == 'unidentified'">{{project['funderName']}} </span>
|
||||
</a>
|
||||
</p>
|
||||
</h6>
|
||||
</ng-container>
|
||||
<span *ngIf="project['funderName']" class="uk-margin-small-top">
|
||||
<span *ngIf="project['funderName'] && project['code'] != 'unidentified'" class="uk-margin-small-top">
|
||||
<span class="uk-text-meta">Funder: </span>{{project['funderName']}}
|
||||
</span>
|
||||
`
|
||||
|
|
|
@ -91,6 +91,7 @@ export class CustomizationOptions {
|
|||
identity: {
|
||||
mainColor: string;
|
||||
secondaryColor: string;
|
||||
customCss: string;
|
||||
};
|
||||
identityIsCustom: boolean;
|
||||
backgroundsIsCustom: boolean;
|
||||
|
@ -114,11 +115,12 @@ export class CustomizationOptions {
|
|||
darkBackground: ButtonsCustomization;
|
||||
lightBackground: ButtonsCustomization;
|
||||
};
|
||||
|
||||
|
||||
constructor(mainColor: string = null, secondaryColor: string = null) {
|
||||
this.identity = {
|
||||
mainColor: mainColor ? mainColor : CustomizationOptions.getIdentity().mainColor,
|
||||
secondaryColor: secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor,
|
||||
customCss: ""
|
||||
};
|
||||
this.identityIsCustom = false;
|
||||
this.backgroundsIsCustom = false;
|
||||
|
@ -185,6 +187,9 @@ export class CustomizationOptions {
|
|||
if (current.identity && current.identity.mainColor && current.identity.secondaryColor) {
|
||||
updated = new CustomizationOptions(current.identity.mainColor, current.identity.secondaryColor);
|
||||
}
|
||||
if(!current.identity.customCss){
|
||||
current.identity.customCss = defaultCO.identity.customCss;
|
||||
}
|
||||
if (!current.backgrounds) {
|
||||
current.backgrounds = Object.assign({}, updated.backgrounds);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ export class ConnectHelper {
|
|||
if(properties.environment == "development" &&
|
||||
(properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community"
|
||||
|| 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
|
||||
if (domain.indexOf('eosc-portal.eu') != -1) {
|
||||
|
|
|
@ -12,7 +12,7 @@ export class CuratorService {
|
|||
}
|
||||
|
||||
public getCurators(properties: EnvProperties, communityId: string): Observable<Curator[]> {
|
||||
let url: string = properties.adminToolsAPIURL + '/' + communityId + '/curator';
|
||||
let url: string = properties.adminToolsAPIURL + communityId + '/curator';
|
||||
return this.http.get<Curator[]>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
</div>
|
||||
<form *ngIf="!showLoading" [formGroup]="myForm">
|
||||
<div class="uk-grid uk-child-width-1-2">
|
||||
<div *ngIf="placementsOptions.length > 1 && myForm.get('placement').value" input [formInput]="myForm.get('placement')"
|
||||
<div *ngIf="placementsOptions.length > 1" input [formInput]="myForm.get('placement')"
|
||||
placeholder="Select placement" [options]="placementsOptions" type="select"></div>
|
||||
<div *ngIf="orderOptions.length > 1 " input [formInput]="myForm.get('order')" placeholder="Select order" [options]="orderOptions" type="select"></div>
|
||||
</div>
|
||||
|
|
|
@ -149,6 +149,9 @@ export class PageContentFormComponent implements OnInit {
|
|||
if (page.left) {
|
||||
this.placementsOptions.push({label: "left", value: "left"});
|
||||
}
|
||||
if (page.right) {
|
||||
this.placementsOptions.push({label: "right", value: "right"});
|
||||
}
|
||||
this.orderOptions = [];
|
||||
for (let i = 1; i < countContents + 1; i++) {
|
||||
this.orderOptions.push({label: "" + i, value: i});
|
||||
|
|
|
@ -89,7 +89,7 @@ import {PluginBaseFormComponent} from "../../utils/base-plugin.form.component";
|
|||
</plugin-field-edit>
|
||||
Subjects
|
||||
</div>
|
||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall uk-margin-medium-left "> Manage community info <a routerLink="../../info/profile" target="_blank">here</a>.</div>
|
||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall uk-margin-medium-left "> Manage community info <a routerLink="../../../info/profile" target="_blank">here</a>.</div>
|
||||
<div class="uk-margin-top uk-text-meta uk-text-xsmall">
|
||||
Pages & menus
|
||||
</div>
|
||||
|
@ -148,10 +148,10 @@ import {PluginBaseFormComponent} from "../../utils/base-plugin.form.component";
|
|||
</div>
|
||||
|
||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall"> If some information is enabled here,
|
||||
but still not visible, please check related <a routerLink="../entities" target="_blank">entity</a> or <a routerLink="../pages" target="_blank">page</a>.
|
||||
but still not visible, please check related <a routerLink="../../entities" target="_blank">entity</a> or <a routerLink="../../pages" target="_blank">page</a>.
|
||||
</div>
|
||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall">
|
||||
Change the custom section background options <a routerLink="../../customize-layout" target="_blank"> here.</a>
|
||||
Change the custom section background options <a routerLink="../../../customize-layout" target="_blank"> here.</a>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
|
|
|
@ -30,7 +30,7 @@ import {PluginSearchBar} from "./plugin-search-bar.component";
|
|||
|
||||
</div>
|
||||
|
||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall uk-margin-medium-left "> Manage community info <a routerLink="../../info/profile" target="_blank">here</a>.</div>
|
||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall uk-margin-medium-left "> Manage community info <a routerLink="../../../info/profile" target="_blank">here</a>.</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
|
|
|
@ -33,7 +33,7 @@ import {PluginBaseFormComponent, PluginEditEvent} from "../../utils/base-plugin.
|
|||
|
||||
</ng-container>
|
||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall">
|
||||
Change the custom section background options <a routerLink="../../customize-layout" target="_blank"> here.</a>
|
||||
Change the custom section background options <a routerLink="../../../customize-layout" target="_blank"> here.</a>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="selectedIndex > -1">
|
||||
|
|
|
@ -11,7 +11,7 @@ import {PluginSuggestedRepositories} from "./plugin-suggested-repositories.compo
|
|||
<plugin-field-edit [value]="pluginObject.description"
|
||||
type="textarea" field="description" (changed)="valueChanged($event)" [switchToHTMLEditor]="true"></plugin-field-edit>
|
||||
<div class="uk-alert uk-alert-warning uk-text-small"> Manage the content providers list in
|
||||
<a routerLink="../../../info/content-providers" target="_blank">Community info</a> by adding them in deposit.</div>
|
||||
<a routerLink="../../../config/content-providers" target="_blank">community content config</a> by adding them in deposit.</div>
|
||||
</div>
|
||||
`,
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ export class PortalsComponent implements OnInit {
|
|||
|
||||
public confirmedDeletePortals(data: any) {
|
||||
this.showLoading = true;
|
||||
this.subscriptions.push(this._helpContentService.deleteCommunities(this.selectedPortals, this.properties.adminToolsAPIURL).subscribe(
|
||||
this.subscriptions.push(this._helpContentService.deleteCommunities(this.selectedPortals, this.properties.adminToolsAPIURL, this.getPortalType()).subscribe(
|
||||
_ => {
|
||||
this.deletePortalsFromArray(this.selectedPortals);
|
||||
NotificationHandler.rise('Portals have been <b>successfully deleted</b>');
|
||||
|
@ -141,7 +141,11 @@ export class PortalsComponent implements OnInit {
|
|||
error => this.handleUpdateError('System error deleting the selected communities', error)
|
||||
));
|
||||
}
|
||||
|
||||
getPortalType():string {
|
||||
let portalId = this.selectedPortals[0];
|
||||
let index = this.portals.findIndex(value => value._id === portalId);
|
||||
return this.portals[index].type;
|
||||
}
|
||||
public editPortal(i: number) {
|
||||
const portal: Portal = this.checkboxes[i].portal;
|
||||
this.index = this.portals.findIndex(value => value._id === portal._id);
|
||||
|
|
|
@ -157,51 +157,54 @@
|
|||
{{child.id}}
|
||||
</a>
|
||||
</h3>
|
||||
<!-- hide L3 & L4 FoS-->
|
||||
<ng-container *ngIf="properties.environment == 'development'">
|
||||
<!-- class="parent uk-transition-toggle" tabindex="0"-->
|
||||
<div *ngFor="let subChild of child.children; let i=index" style="margin-bottom: 7px;"
|
||||
class="uk-flex uk-flex-middle uk-flex-between uk-transition-toggle" tabindex="0">
|
||||
<!-- <span class="uk-flex uk-flex-between">-->
|
||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subChild)"
|
||||
class="uk-link-text uk-width-expand">
|
||||
{{searchFieldsHelper.getFosParameter() == 'foslabel' ? subChild.label : subChild.id}}
|
||||
</a>
|
||||
<span *ngIf="properties.environment == 'development' && subChild.children?.length > 0" (click)="moreClicked(item, child, subChild)"
|
||||
class="uk-transition-fade uk-width-auto uk-flex uk-flex-middle uk-margin-left label4 uk-text-small uk-text-meta">
|
||||
<!-- <a class="view-more-less-link uk-link-text uk-text-lowercase">-->
|
||||
<!-- +{{subChild.children.length}} more-->
|
||||
<!--<!– <icon [flex]="true" ratio="1" name="chevron_right"></icon>–>-->
|
||||
<!-- </a>-->
|
||||
<div *ngFor="let subChild of child.children; let i=index" style="margin-bottom: 7px;"
|
||||
class="uk-flex uk-flex-middle uk-flex-between uk-transition-toggle" tabindex="0">
|
||||
<!-- <span class="uk-flex uk-flex-between">-->
|
||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subChild)"
|
||||
class="uk-link-text uk-width-expand">
|
||||
{{searchFieldsHelper.getFosParameter() == 'foslabel' ? subChild.label : subChild.id}}
|
||||
</a>
|
||||
<span *ngIf="properties.environment == 'development' && subChild.children?.length > 0" (click)="moreClicked(item, child, subChild)"
|
||||
class="uk-transition-fade uk-width-auto uk-flex uk-flex-middle uk-margin-left label4 uk-text-small uk-text-meta">
|
||||
<!-- <a class="view-more-less-link uk-link-text uk-text-lowercase">-->
|
||||
<!-- +{{subChild.children.length}} more-->
|
||||
<!--<!– <icon [flex]="true" ratio="1" name="chevron_right"></icon>–>-->
|
||||
<!-- </a>-->
|
||||
|
||||
<icon [flex]="true" ratio="0.7" name="subdirectory_arrow_right"></icon>
|
||||
<a class="uk-link-text uk-text-lowercase">
|
||||
more
|
||||
</a>
|
||||
</span>
|
||||
<icon [flex]="true" ratio="0.7" name="subdirectory_arrow_right"></icon>
|
||||
<a class="uk-link-text uk-text-lowercase">
|
||||
more
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<!-- <div *ngIf="subChild.children?.length > 0" (click)="selectedParentLevels=[item, child, subChild]"-->
|
||||
<!-- class="uk-flex uk-flex-middle uk-margin-left label4 uk-text-small uk-text-meta">-->
|
||||
<!-- <a class="uk-link-text">{{subChild.children.length}} Subcategories</a>-->
|
||||
<!-- <icon [flex]="true" ratio="1" name="chevron_right"></icon>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div *ngIf="subChild.children?.length > 0" (click)="selectedParentLevels=[item, child, subChild]"-->
|
||||
<!-- class="uk-flex uk-flex-middle uk-margin-left label4 uk-text-small uk-text-meta">-->
|
||||
<!-- <a class="uk-link-text">{{subChild.children.length}} Subcategories</a>-->
|
||||
<!-- <icon [flex]="true" ratio="1" name="chevron_right"></icon>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <span *ngIf="subChild?.children?.length > 0" (click)="fosAccordions.set(subChild.id, !fosAccordions.get(subChild.id))" class="uk-accordion-title uk-padding-remove"></span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <div *ngIf="fosAccordions.get(subChild.id)" class="uk-margin-left">-->
|
||||
<!-- <div *ngFor="let level4 of subChild.children" style="margin-bottom: 7px;">-->
|
||||
<!-- <a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(level4)"-->
|
||||
<!-- class="label4 uk-text-small uk-text-meta">-->
|
||||
<!-- {{searchFieldsHelper.getFosParameter() == 'foslabel' ? level4.label : level4.id}}-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <span *ngIf="subChild?.children?.length > 0" (click)="fosAccordions.set(subChild.id, !fosAccordions.get(subChild.id))" class="uk-accordion-title uk-padding-remove"></span>-->
|
||||
<!-- </span>-->
|
||||
<!-- <div *ngIf="fosAccordions.get(subChild.id)" class="uk-margin-left">-->
|
||||
<!-- <div *ngFor="let level4 of subChild.children" style="margin-bottom: 7px;">-->
|
||||
<!-- <a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(level4)"-->
|
||||
<!-- class="label4 uk-text-small uk-text-meta">-->
|
||||
<!-- {{searchFieldsHelper.getFosParameter() == 'foslabel' ? level4.label : level4.id}}-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- uk-transition-slide-top-->
|
||||
<!-- <div *ngIf="subChild.children?.length > 0" class="uk-transition-slide-top">-->
|
||||
<!-- <div class="child">-->
|
||||
<!-- <a class="uk-link uk-margin-left">{{subChild.children.length}} Subcategories ></a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<!-- uk-transition-slide-top-->
|
||||
<!-- <div *ngIf="subChild.children?.length > 0" class="uk-transition-slide-top">-->
|
||||
<!-- <div class="child">-->
|
||||
<!-- <a class="uk-link uk-margin-left">{{subChild.children.length}} Subcategories ></a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -223,19 +226,22 @@
|
|||
class="uk-link-text" [innerHTML]="highlightKeyword(subItem.id)">
|
||||
</a>
|
||||
</h3>
|
||||
<div *ngFor="let subSubItem of subItem.children" style="margin-bottom: 7px;">
|
||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subSubItem)"
|
||||
class="uk-link-text" [innerHTML]="highlightKeyword(searchFieldsHelper.getFosParameter() == 'foslabel' ? subSubItem.label : subSubItem.id)">
|
||||
</a>
|
||||
<!-- hide L3 & L4 FoS-->
|
||||
<ng-container *ngIf="properties.environment == 'development'">
|
||||
<div *ngFor="let subSubItem of subItem.children" style="margin-bottom: 7px;">
|
||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(subSubItem)"
|
||||
class="uk-link-text" [innerHTML]="highlightKeyword(searchFieldsHelper.getFosParameter() == 'foslabel' ? subSubItem.label : subSubItem.id)">
|
||||
</a>
|
||||
|
||||
<ng-container *ngIf="properties.environment == 'development'">
|
||||
<div *ngFor="let level4 of subSubItem?.children" class="uk-margin-left">
|
||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(level4)"
|
||||
class="uk-text-small uk-text-meta uk-margin-xsmall-bottom" [innerHTML]="highlightKeyword(searchFieldsHelper.getFosParameter() == 'foslabel' ? level4.label : level4.id)">
|
||||
</a>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
<ng-container *ngIf="properties.environment == 'development'">
|
||||
<div *ngFor="let level4 of subSubItem?.children" class="uk-margin-left">
|
||||
<a [routerLink]="properties.searchLinkToResults" [queryParams]="buildFosQueryParam(level4)"
|
||||
class="uk-text-small uk-text-meta uk-margin-xsmall-bottom" [innerHTML]="highlightKeyword(searchFieldsHelper.getFosParameter() == 'foslabel' ? level4.label : level4.id)">
|
||||
</a>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -184,7 +184,8 @@ export class FosComponent implements OnInit, OnDestroy {
|
|||
if(fos.children) {
|
||||
fos.children.forEach(l2 => {
|
||||
this.fosOptions.push(l2.id);
|
||||
if(l2.children) {
|
||||
// hide L3 & L4 FoS
|
||||
if(l2.children && properties.environment == "development") {
|
||||
l2.children.forEach(l3 => {
|
||||
this.fosOptions.push(l3.id);
|
||||
if(l3.children) {
|
||||
|
@ -212,20 +213,25 @@ export class FosComponent implements OnInit, OnDestroy {
|
|||
if(item.children?.length && !matchLevel1) {
|
||||
item.children = item.children.filter(subItem => {
|
||||
matchLevel2 = !!subItem.id.includes(value?.toLowerCase());
|
||||
// 3rd level search
|
||||
if(subItem.children?.length && !matchLevel2) {
|
||||
subItem.children = subItem.children.filter(subSubItem => {
|
||||
matchLevel3 = subSubItem.id.includes(value?.toLowerCase());
|
||||
// 4th level search
|
||||
if(subSubItem.children?.length && !matchLevel3) {
|
||||
subSubItem.children = subSubItem.children.filter(level4Item => {
|
||||
return level4Item.id.toLowerCase().includes(value?.toLowerCase())
|
||||
});
|
||||
}
|
||||
return subSubItem.children?.length > 0 || matchLevel3;
|
||||
});
|
||||
}
|
||||
return subItem.children?.length > 0;
|
||||
// hide L3 & L4 FoS
|
||||
if(properties.environment == "development") {
|
||||
// 3rd level search
|
||||
if(subItem.children?.length && !matchLevel2) {
|
||||
subItem.children = subItem.children.filter(subSubItem => {
|
||||
matchLevel3 = subSubItem.id.includes(value?.toLowerCase());
|
||||
// 4th level search
|
||||
if (subSubItem.children?.length && !matchLevel3) {
|
||||
subSubItem.children = subSubItem.children.filter(level4Item => {
|
||||
return level4Item.id.toLowerCase().includes(value?.toLowerCase())
|
||||
});
|
||||
}
|
||||
return subSubItem.children?.length > 0 || matchLevel3;
|
||||
});
|
||||
}
|
||||
return subItem.children?.length > 0;
|
||||
} else {
|
||||
return matchLevel2;
|
||||
}
|
||||
});
|
||||
}
|
||||
return item.children?.length > 0;
|
||||
|
|
|
@ -22,12 +22,13 @@ import {SearchFields} from "../../utils/properties/searchFields";
|
|||
(click)="viewAllClick();" class="view-more-less-link uk-link uk-link-text uk-text-truncate">
|
||||
View all
|
||||
</a>
|
||||
<!-- <a *ngIf="viewAll && lessBtn" (click)="viewAll = !viewAll; lessBtn=false;">View less</a> -->
|
||||
<!-- hide L3 & L4 FoS-->
|
||||
<!-- <a *ngIf="viewAll && lessBtn" (click)="viewAll = !viewAll; lessBtn=false;">View less</a> -->
|
||||
<a *ngIf="properties.adminToolsPortalType != 'eosc' && subjects && subjects.length > threshold && !viewAll"
|
||||
(click)="viewAllClick();" class="view-more-less-link uk-link uk-link-text uk-text-truncate">
|
||||
View all & suggest
|
||||
View all<ng-container *ngIf="properties.environment == 'development'"> & suggest</ng-container>
|
||||
</a>
|
||||
<a *ngIf="properties.adminToolsPortalType != 'eosc' && (subjects && subjects.length <= threshold || viewAll)" class="uk-link uk-link-text uk-text-truncate"
|
||||
<a *ngIf="properties.environment == 'development' && properties.adminToolsPortalType != 'eosc' && (subjects && subjects.length <= threshold || viewAll)" class="uk-link uk-link-text uk-text-truncate"
|
||||
(click)="suggestClick();">Suggest</a>
|
||||
</div>
|
||||
<div class="uk-margin-small-top">
|
||||
|
|
|
@ -1049,10 +1049,10 @@
|
|||
<a href="#">Overview</a>
|
||||
</li>
|
||||
<li *ngIf="resultLandingInfo.measure && resultLandingInfo.measure.bip.length">
|
||||
<a href="#">Impact</a>
|
||||
<a href="#" (click)="clickedImpactIndicators()">Impact</a>
|
||||
</li>
|
||||
<li *ngIf="hasAltMetrics">
|
||||
<a href="#">Social</a>
|
||||
<a href="#" (click)="clickedAltMetrics()">Social</a>
|
||||
</li>
|
||||
<li *ngIf="resultLandingInfo.measure && resultLandingInfo.measure.counts.length">
|
||||
<a href="#" (click)="clickedUsageMetrics()">Usage</a>
|
||||
|
@ -1141,44 +1141,46 @@
|
|||
</li>
|
||||
<!-- impact -->
|
||||
<li *ngIf="resultLandingInfo.measure && resultLandingInfo.measure.bip.length">
|
||||
<div class="uk-flex uk-flex-center uk-flex-middle uk-flex-wrap">
|
||||
<div class="uk-card uk-card-default uk-padding-small">
|
||||
<table class="uk-table uk-table-small uk-margin-remove">
|
||||
<tbody>
|
||||
<ng-container *ngFor="let measure of resultLandingInfo.measure.bip; let i = index">
|
||||
<tr>
|
||||
<td [class.uk-padding-remove-top]="i == 0" [class.uk-padding-remove-bottom]="i == resultLandingInfo.measure.bip.length - 1">
|
||||
<icon [name]="measure.icon" [flex]="true" [customClass]="'bip-icon'"></icon>
|
||||
</td>
|
||||
<td [class.uk-padding-remove-top]="i == 0" [class.uk-padding-remove-bottom]="i == resultLandingInfo.measure.bip.length - 1">
|
||||
<a class="uk-link uk-link-text uk-text-capitalize">{{measure.name}}</a>
|
||||
<ng-container *ngTemplateOutlet="dropInfo; context: {option: measure.name, isCompact: true}"></ng-container>
|
||||
</td>
|
||||
<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">
|
||||
{{isNumber(measure.value) ? formatNumber(measure.value) : measure.value}}
|
||||
</td>
|
||||
</tr>
|
||||
</ng-container>
|
||||
</tbody>
|
||||
</table>
|
||||
<ng-container *ngIf="impactClicked">
|
||||
<div class="uk-flex uk-flex-center uk-flex-middle uk-flex-wrap">
|
||||
<div class="uk-card uk-card-default uk-padding-small">
|
||||
<table class="uk-table uk-table-small uk-margin-remove">
|
||||
<tbody>
|
||||
<ng-container *ngFor="let measure of resultLandingInfo.measure.bip; let i = index">
|
||||
<tr>
|
||||
<td [class.uk-padding-remove-top]="i == 0" [class.uk-padding-remove-bottom]="i == resultLandingInfo.measure.bip.length - 1">
|
||||
<icon [name]="measure.icon" [flex]="true" [customClass]="'bip-icon'"></icon>
|
||||
</td>
|
||||
<td [class.uk-padding-remove-top]="i == 0" [class.uk-padding-remove-bottom]="i == resultLandingInfo.measure.bip.length - 1">
|
||||
<a class="uk-link uk-link-text uk-text-capitalize">{{measure.name}}</a>
|
||||
<ng-container *ngTemplateOutlet="dropInfo; context: {option: measure.name, isCompact: true}"></ng-container>
|
||||
</td>
|
||||
<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">
|
||||
{{isNumber(measure.value) ? formatNumber(measure.value) : measure.value}}
|
||||
</td>
|
||||
</tr>
|
||||
</ng-container>
|
||||
</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 *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 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>
|
||||
</div>
|
||||
<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>
|
||||
</ng-container>
|
||||
</li>
|
||||
<!-- social -->
|
||||
<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>
|
||||
<!-- usage -->
|
||||
<li *ngIf="resultLandingInfo.measure && resultLandingInfo.measure.counts.length">
|
||||
|
|
|
@ -80,6 +80,8 @@ export class ResultLandingComponent {
|
|||
public descriptionClicked: boolean;
|
||||
|
||||
// Metrics tab variables
|
||||
public impactClicked: boolean;
|
||||
public altMetricsClicked: boolean;
|
||||
public metricsClicked: boolean;
|
||||
public hasAltMetrics: boolean = false;
|
||||
public viewsFrameUrl: string;
|
||||
|
@ -1151,6 +1153,18 @@ export class ResultLandingComponent {
|
|||
this.descriptionModal.open();
|
||||
}
|
||||
|
||||
public clickedImpactIndicators() {
|
||||
setTimeout( () => {
|
||||
this.impactClicked = true;
|
||||
});
|
||||
}
|
||||
|
||||
public clickedAltMetrics() {
|
||||
setTimeout( () => {
|
||||
this.altMetricsClicked = true;
|
||||
});
|
||||
}
|
||||
|
||||
public clickedUsageMetrics() {
|
||||
setTimeout( () => {
|
||||
this.metricsClicked = true;
|
||||
|
|
|
@ -344,9 +344,22 @@ export class ResultLandingService {
|
|||
if (subjectResults[3]) {
|
||||
let searchFieldsHelper: SearchFields = new SearchFields();
|
||||
subjectResults[3].forEach(element => {
|
||||
this.resultLandingInfo.fos.push(
|
||||
{id: element, label: searchFieldsHelper.getFosParameter() == "foslabel" ? element.replace(/^\d+/, '').trim() : element}
|
||||
);
|
||||
// hide L3 & L4 FoS
|
||||
let add = true;
|
||||
if(element) {
|
||||
let id = element.split(" ")[0];
|
||||
if(id.length > 4 && properties.environment != "development") {
|
||||
add = false;
|
||||
}
|
||||
}
|
||||
if(add) {
|
||||
this.resultLandingInfo.fos.push(
|
||||
{
|
||||
id: element,
|
||||
label: searchFieldsHelper.getFosParameter() == "foslabel" ? element.replace(/^\d+/, '').trim() : element
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (this.resultLandingInfo.fos) {
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
<div class="section">
|
||||
<div *ngIf="isEditable" class="tools">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<a *ngIf="isCurator" [class.uk-disabled]="editing" class="" (click)="createSection(i, 'number')"
|
||||
<a *ngIf="isCurator" [class.uk-disabled]="editing" class=""
|
||||
(click)="createSection(i, 'number')"
|
||||
uk-tooltip="Create a new section">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
</a>
|
||||
|
@ -20,66 +21,67 @@
|
|||
<div *ngIf="isEditable" input [formInput]="numberSections.at(i).get('title')"
|
||||
(focusEmitter)="saveSection($event, numberSections.at(i), i, 'number')"
|
||||
class="uk-width-1-3@m uk-width-1-1" placeholder="Title" inputClass="border-bottom"></div>
|
||||
<h5 *ngIf="!isEditable" class="uk-margin-remove">{{numberSections.at(i).get('title').value}}</h5>
|
||||
<h5 *ngIf="!isEditable"
|
||||
class="uk-margin-remove">{{ numberSections.at(i).get('title').value }}</h5>
|
||||
</div>
|
||||
<div [id]="'number-' + number._id" class="uk-grid uk-grid-small uk-grid-match"
|
||||
[attr.uk-sortable]="isEditable ? 'group: number': null" uk-grid>
|
||||
<ng-template ngFor [ngForOf]="number.indicators" let-indicator let-j="index">
|
||||
<div *ngIf="indicator" [id]="indicator._id"
|
||||
[ngClass]="getNumberClassBySize(indicator.width)">
|
||||
<div class="uk-card uk-card-default uk-padding-small number-card uk-position-relative">
|
||||
<div *ngIf="!dragging"
|
||||
class="uk-position-top-right uk-margin-small-right uk-margin-small-top">
|
||||
<icon *ngIf="!isEditable && showVisibility" [flex]="true"
|
||||
[attr.uk-sortable]="isEditable ? 'group: number': null" uk-grid>
|
||||
<div *ngFor="let indicator of number.indicators; let j=index" [id]="indicator._id"
|
||||
[ngClass]="getNumberClassBySize(indicator.width)">
|
||||
<div class="uk-card uk-card-default uk-padding-small number-card uk-position-relative">
|
||||
<div *ngIf="!dragging"
|
||||
class="uk-position-top-right uk-margin-small-right uk-margin-small-top">
|
||||
<icon *ngIf="!isEditable && showVisibility" [flex]="true"
|
||||
[name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)"
|
||||
ratio="0.6"></icon>
|
||||
<a *ngIf="isEditable && (isCurator || showVisibility)" class="uk-link-reset uk-flex uk-flex-middle" [class.uk-disabled]="editing">
|
||||
<icon *ngIf="showVisibility" [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)" ratio="0.6"></icon>
|
||||
<icon [flex]="true" name="more_vert"></icon>
|
||||
</a>
|
||||
<div #element *ngIf="isEditable && (isCurator || showVisibility)" class="uk-dropdown"
|
||||
uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0">
|
||||
<ul class="uk-nav uk-dropdown-nav">
|
||||
<ng-container *ngIf="isCurator">
|
||||
<li>
|
||||
<a (click)="editNumberIndicatorOpen(number, indicator._id); hide(element)">Edit</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="showVisibility">
|
||||
<li *ngIf="isCurator" class="uk-nav-divider"></li>
|
||||
<ng-template ngFor [ngForOf]="stakeholderUtils.visibilities" let-v>
|
||||
<li>
|
||||
<a (click)="changeIndicatorStatus(number._id, indicator, v.value);hide(element)">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" [name]="v.icon"
|
||||
ratio="0.6"></icon>
|
||||
<span class="uk-margin-small-left uk-width-expand">{{ v.label }}</span>
|
||||
<icon *ngIf="indicator.visibility === v.value"
|
||||
[flex]="true" name="done"
|
||||
class="uk-text-secondary" ratio="0.8"></icon>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!indicator.defaultId && !editing && isCurator">
|
||||
<li class="uk-nav-divider">
|
||||
<li>
|
||||
<a (click)="deleteIndicatorOpen(number, indicator._id, 'number', 'delete');hide(element)">Delete</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-text-small uk-text-truncate uk-margin-xsmall-bottom uk-margin-right">{{ indicator.name }}</div>
|
||||
<div class="number uk-text-small uk-text-bold">
|
||||
<span *ngIf="numberResults.get(i + '-' + j + '-' + 0)"
|
||||
[innerHTML]="(indicator.indicatorPaths[0].format == 'NUMBER'?(numberResults.get(i + '-' + j + '-' + 0) | numberRound: 2:1:stakeholder.locale):(numberResults.get(i + '-' + j + '-' + 0) | numberPercentage: stakeholder.locale))"></span>
|
||||
<span *ngIf="!numberResults.get(i + '-' + j + '-' + 0)">--</span>
|
||||
<a *ngIf="isEditable && (isCurator || showVisibility)"
|
||||
class="uk-link-reset uk-flex uk-flex-middle" [class.uk-disabled]="editing">
|
||||
<icon *ngIf="showVisibility" [flex]="true"
|
||||
[name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)"
|
||||
ratio="0.6"></icon>
|
||||
<icon [flex]="true" name="more_vert"></icon>
|
||||
</a>
|
||||
<div #element *ngIf="isEditable && (isCurator || showVisibility)"
|
||||
class="uk-dropdown"
|
||||
uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0">
|
||||
<ul class="uk-nav uk-dropdown-nav">
|
||||
<ng-container *ngIf="isCurator">
|
||||
<li>
|
||||
<a (click)="editNumberIndicatorOpen(number, indicator._id); hide(element)">Edit</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="showVisibility">
|
||||
<li *ngIf="isCurator" class="uk-nav-divider"></li>
|
||||
<li *ngFor="let v of stakeholderUtils.visibilities">
|
||||
<a (click)="changeIndicatorStatus(number._id, indicator, v.value);hide(element)">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" [name]="v.icon"
|
||||
ratio="0.6"></icon>
|
||||
<span class="uk-margin-small-left uk-width-expand">{{ v.label }}</span>
|
||||
<icon *ngIf="indicator.visibility === v.value"
|
||||
[flex]="true" name="done"
|
||||
class="uk-text-secondary" ratio="0.8"></icon>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!indicator.defaultId && !editing && isCurator">
|
||||
<li class="uk-nav-divider">
|
||||
<li>
|
||||
<a (click)="deleteIndicatorOpen(number, indicator._id, 'number', 'delete');hide(element)">Delete</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-text-small uk-text-truncate uk-margin-xsmall-bottom uk-margin-right">{{ indicator.name }}</div>
|
||||
<div class="number uk-text-small uk-text-bold">
|
||||
<span *ngIf="numberResults.get(i + '-' + j + '-' + 0)"
|
||||
[innerHTML]="(indicator.indicatorPaths[0].format == 'NUMBER'?(numberResults.get(i + '-' + j + '-' + 0) | numberRound: 2:1:stakeholder.locale):(numberResults.get(i + '-' + j + '-' + 0) | numberPercentage: stakeholder.locale))"></span>
|
||||
<span *ngIf="!numberResults.get(i + '-' + j + '-' + 0)">--</span>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="isCurator && isEditable" class="uk-margin-top">
|
||||
<div class="uk-grid uk-grid-small" uk-grid>
|
||||
|
@ -99,7 +101,14 @@
|
|||
</div>
|
||||
</div>
|
||||
<div *ngIf="isEditable && isCurator">
|
||||
<ng-container *ngTemplateOutlet="new_section; context:{type: 'number'}"></ng-container>
|
||||
<div class="section">
|
||||
<div class="uk-flex uk-flex-center" (click)="createSection(-1, 'number')">
|
||||
<button class="uk-button uk-button-primary uk-flex uk-flex-middle">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">New section</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -125,24 +134,30 @@
|
|||
<div *ngIf="isEditable" input [formInput]="chartSections.at(i).get('title')"
|
||||
(focusEmitter)="saveSection($event, chartSections.at(i), i)"
|
||||
class="uk-width-1-3@m uk-width-1-1" placeholder="Title" inputClass="border-bottom"></div>
|
||||
<h5 *ngIf="!isEditable" class="uk-margin-remove">{{chartSections.at(i).get('title').value}}</h5>
|
||||
<h5 *ngIf="!isEditable"
|
||||
class="uk-margin-remove">{{ chartSections.at(i).get('title').value }}</h5>
|
||||
</div>
|
||||
<div [id]="'chart-' + chart._id" class="uk-grid uk-grid-small uk-grid-match"
|
||||
[attr.uk-sortable]="isEditable ? 'group: chart': null" uk-grid>
|
||||
<ng-template ngFor [ngForOf]="chart.indicators" let-indicator let-j="index">
|
||||
<div *ngIf="indicator" [id]="indicator._id"
|
||||
[ngClass]="getChartClassBySize(indicator.width)">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-position-relative">
|
||||
[attr.uk-sortable]="isEditable ? 'group: chart': null" uk-grid>
|
||||
<div *ngFor="let indicator of chart.indicators; let j=index" [id]="indicator._id"
|
||||
[ngClass]="getChartClassBySize(indicator.width)">
|
||||
<div class="uk-card uk-card-default uk-position-relative">
|
||||
<div class="uk-card-body uk-margin-small-bottom">
|
||||
<!-- Dropdown -->
|
||||
<div *ngIf="!dragging"
|
||||
class="uk-position-top-right uk-margin-small-right uk-margin-small-top">
|
||||
<icon *ngIf="!isEditable && showVisibility" [flex]="true"
|
||||
[name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)"
|
||||
ratio="0.6"></icon>
|
||||
<a *ngIf="isEditable && (isCurator || showVisibility)" class="uk-link-reset uk-flex uk-flex-middle" [class.uk-disabled]="editing">
|
||||
<icon *ngIf="showVisibility" [flex]="true" [name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)" ratio="0.6"></icon>
|
||||
[name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)"
|
||||
ratio="0.6"></icon>
|
||||
<a *ngIf="isEditable && (isCurator || showVisibility)"
|
||||
class="uk-link-reset uk-flex uk-flex-middle" [class.uk-disabled]="editing">
|
||||
<icon *ngIf="showVisibility" [flex]="true"
|
||||
[name]="stakeholderUtils.visibilityIcon.get(indicator.visibility)"
|
||||
ratio="0.6"></icon>
|
||||
<icon [flex]="true" name="more_vert"></icon>
|
||||
</a>
|
||||
<div #element *ngIf="isEditable && (isCurator || showVisibility)" class="uk-dropdown"
|
||||
<div #element *ngIf="isEditable && (isCurator || showVisibility)"
|
||||
class="uk-dropdown"
|
||||
uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0">
|
||||
<ul class="uk-nav uk-dropdown-nav">
|
||||
<ng-container *ngIf="isCurator">
|
||||
|
@ -152,20 +167,18 @@
|
|||
</ng-container>
|
||||
<ng-container *ngIf="showVisibility">
|
||||
<li *ngIf="isCurator" class="uk-nav-divider"></li>
|
||||
<ng-template ngFor [ngForOf]="stakeholderUtils.visibilities" let-v>
|
||||
<li>
|
||||
<a (click)="changeIndicatorStatus(chart._id, indicator, v.value);">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" [name]="v.icon"
|
||||
ratio="0.6"></icon>
|
||||
<span class="uk-margin-small-left uk-width-expand">{{ v.label }}</span>
|
||||
<icon *ngIf="indicator.visibility === v.value"
|
||||
[flex]="true" name="done"
|
||||
class="uk-text-secondary" ratio="0.8"></icon>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ng-template>
|
||||
<li *ngFor="let v of stakeholderUtils.visibilities">
|
||||
<a (click)="changeIndicatorStatus(chart._id, indicator, v.value);">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" [name]="v.icon"
|
||||
ratio="0.6"></icon>
|
||||
<span class="uk-margin-small-left uk-width-expand">{{ v.label }}</span>
|
||||
<icon *ngIf="indicator.visibility === v.value"
|
||||
[flex]="true" name="done"
|
||||
class="uk-text-secondary" ratio="0.8"></icon>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!indicator.defaultId && !editing && isCurator">
|
||||
<li class="uk-nav-divider">
|
||||
|
@ -176,41 +189,44 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Main content-->
|
||||
<div>
|
||||
<div *ngIf="indicator.name"
|
||||
class="uk-text-center uk-text-bold uk-margin-small-bottom">
|
||||
{{ indicator.name }}
|
||||
</div>
|
||||
<h6 class="uk-margin-bottom chartTitle uk-flex uk-flex-bottom">
|
||||
{{ indicator.name + " " }}
|
||||
</h6>
|
||||
<iframe *ngIf="!properties.disableFrameLoad && getActiveIndicatorPath(indicator) && getActiveIndicatorPath(indicator).source !=='image' &&
|
||||
safeUrls.get(indicatorUtils.getFullUrl(stakeholder, getActiveIndicatorPath(indicator)))"
|
||||
safeUrls.get(indicatorUtils.getFullUrl(stakeholder, getActiveIndicatorPath(indicator)))"
|
||||
allowfullscreen="true" mozallowfullscreen="true"
|
||||
webkitallowfullscreen="true"
|
||||
[src]="safeUrls.get(indicatorUtils.getFullUrl(stakeholder, getActiveIndicatorPath(indicator)))"
|
||||
class="uk-width-1-1"
|
||||
[ngClass]="'uk-height-' + (indicator.height?indicator.height.toLowerCase():'medium')"
|
||||
[class.uk-blend-multiply]="!isFullscreen"></iframe>
|
||||
<div *ngIf="properties.disableFrameLoad && indicator.indicatorPaths &&
|
||||
indicator.indicatorPaths.length > 0 && getActiveIndicatorPath(indicator).source !=='image'">
|
||||
<div *ngIf="properties.disableFrameLoad && getActiveIndicatorPath(indicator)?.source !=='image'">
|
||||
<img class="uk-width-1-1 uk-blend-multiply"
|
||||
[ngClass]="'uk-height-' + (indicator.height?indicator.height.toLowerCase():'medium')"
|
||||
src="assets/chart-placeholder.png">
|
||||
</div>
|
||||
<div *ngIf="indicator.indicatorPaths && getActiveIndicatorPath(indicator) && getActiveIndicatorPath(indicator).source === 'image'">
|
||||
<div *ngIf="getActiveIndicatorPath(indicator)?.source === 'image'">
|
||||
<img class="uk-width-1-1 uk-blend-multiply"
|
||||
[ngClass]="'uk-height-' + (indicator.height?indicator.height.toLowerCase():'medium')"
|
||||
[src]="getActiveIndicatorPath(indicator).url">
|
||||
</div>
|
||||
<slider-tabs *ngIf="indicator.indicatorPaths.length > 1" [type]="'dynamic'" [flexPosition]="'right'" (activeEmitter)="indicator.activePath = $event"
|
||||
tabsClass="uk-subnav uk-subnav-pill uk-subnav-small" containerClass="uk-margin-top uk-margin-bottom" [border]="false">
|
||||
<slider-tab *ngFor="let indicatorPath of indicator.indicatorPaths; let i=index"
|
||||
[tabTitle]="indicatorPath.parameters.tab ? indicatorPath.parameters.tab : indicatorPath.parameters.title"
|
||||
[tabId]="i" [active]="(!indicator.activePath && i == 0) || indicator.activePath == i">
|
||||
</slider-tab>
|
||||
</slider-tabs>
|
||||
</div>
|
||||
<!-- Tabs -->
|
||||
<slider-tabs [type]="'dynamic'" [flexPosition]="'right'"
|
||||
(activeEmitter)="indicator.activePath = $event"
|
||||
tabsClass="uk-subnav uk-subnav-pill uk-subnav-small"
|
||||
containerClass="uk-margin-top uk-margin-bottom" [border]="false">
|
||||
<slider-tab *ngFor="let indicatorPath of indicator.indicatorPaths; let i=index"
|
||||
[tabTitle]="indicatorPath.parameters.tab ? indicatorPath.parameters.tab : indicatorPath.parameters.title"
|
||||
[invisible]="indicator.indicatorPaths.length < 2"
|
||||
[tabId]="i" [active]="getActivePathIndex(indicator) == i">
|
||||
</slider-tab>
|
||||
</slider-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="isCurator && isEditable" class="uk-margin-top">
|
||||
<div class="uk-grid uk-grid-small uk-grid-match" uk-grid>
|
||||
|
@ -235,7 +251,14 @@
|
|||
</div>
|
||||
</div>
|
||||
<div *ngIf="isEditable && isCurator">
|
||||
<ng-container *ngTemplateOutlet="new_section; context:{type: 'chart'}"></ng-container>
|
||||
<div class="section">
|
||||
<div class="uk-flex uk-flex-center" (click)="createSection(-1)">
|
||||
<button class="uk-button uk-button-primary uk-flex uk-flex-middle">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">New section</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -269,68 +292,8 @@
|
|||
</div>
|
||||
<hr class="uk-width-1-1">
|
||||
<div *ngIf="numberIndicatorPaths" formArrayName="indicatorPaths">
|
||||
<div *ngIf="stakeholderUtils.hasMultiNumberIndicatorPaths" class="uk-margin-medium-bottom">
|
||||
<ul #numbersTransition class="uk-subnav uk-subnav-pill uk-subnav-small" transition-group>
|
||||
<li *ngFor="let indicatorPath of numberIndicatorPaths.controls; let i=index"
|
||||
class="uk-visible-toggle uk-flex uk-margin-small-top" transition-group-item
|
||||
[class.uk-active]="(!indicator.activePath && i == 0) || indicator.activePath === i">
|
||||
<a (click)="activeNumberIndicatorPath(i)">
|
||||
<span *ngIf="indicatorPath.get('result').valid && indicatorPath.get('result').value !== 0"
|
||||
[innerHTML]="(indicatorPath.get('format').value == 'NUMBER'?(indicatorPath.get('result').value | numberRound: 2:1:stakeholder.locale):(indicatorPath.get('result').value | numberPercentage: stakeholder.locale))">
|
||||
</span>
|
||||
<span *ngIf="!indicatorPath.get('result').valid || indicatorPath.get('result').value === 0">
|
||||
--
|
||||
</span>
|
||||
</a>
|
||||
<span *ngIf="!indicator.defaultId && numberIndicatorPaths.length > 1"
|
||||
class="uk-flex uk-flex-column uk-flex-center uk-margin-small-left"
|
||||
[class.uk-invisible-hover]="indicator.activePath !== i"
|
||||
(click)="$event.stopPropagation();$event.preventDefault()">
|
||||
<a *ngIf="isCurator" class="uk-link-reset uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" name="more_vert"></icon>
|
||||
</a>
|
||||
<div #element uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0;">
|
||||
<ul class="uk-nav uk-dropdown-nav">
|
||||
<li *ngIf="i > 0">
|
||||
<a (click)="hide(element);moveIndicatorPath(numberIndicatorFb, 'number', i)">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" name="west" ratio="0.6"></icon>
|
||||
<span class="uk-margin-small-left uk-width-expand">Move Left</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngIf="i < numberIndicatorPaths.length - 1">
|
||||
<a (click)="hide(element);moveIndicatorPath(numberIndicatorFb, 'number', i, i + 1)">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" name="east" ratio="0.6"></icon>
|
||||
<span class="uk-margin-small-left uk-width-expand">Move Right</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a (click)="removeNumberIndicatorPath(i); hide(element)">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" name="delete" ratio="0.6"></icon>
|
||||
<span class="uk-margin-small-left uk-width-expand">Delete</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
</li>
|
||||
<li class="uk-margin-small-top">
|
||||
<a (click)="activeNumberIndicatorPath(numberIndicatorPaths.length); $event.preventDefault()"
|
||||
class="uk-flex uk-flex-middle">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-text-uppercase">Add</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div *ngFor="let indicatorPath of numberIndicatorPaths.controls; let i=index" [formGroupName]="i">
|
||||
<div *ngIf="(!indicator.activePath && i == 0) || indicator.activePath === i" class="uk-grid"
|
||||
uk-grid>
|
||||
<div *ngIf="getActivePathIndex() === i" class="uk-grid" uk-grid>
|
||||
<div class="uk-width-1-1">
|
||||
<div class="uk-grid" uk-grid>
|
||||
<div class="uk-width-1-1 uk-flex uk-flex-middle">
|
||||
|
@ -388,8 +351,8 @@
|
|||
</a>
|
||||
<span [class.uk-invisible]="getJsonPath(i).disabled || j === (getJsonPath(i).controls.length - 1)"
|
||||
class="uk-text-center uk-margin-small-left">
|
||||
<icon name="east"></icon>
|
||||
</span>
|
||||
<icon name="east"></icon>
|
||||
</span>
|
||||
</div>
|
||||
<div *ngIf="indicator.defaultId === null">
|
||||
<button class="uk-icon-button uk-button-primary" (click)="addJsonPath(i)">
|
||||
|
@ -471,17 +434,17 @@
|
|||
[options]="indicatorUtils.indicatorSizes" type="select">
|
||||
</div>
|
||||
<div *ngIf="chartIndicatorPaths" formArrayName="indicatorPaths" class="uk-width-1-1">
|
||||
<div *ngIf="stakeholderUtils.hasMultiChartIndicatorPaths" class="uk-margin-medium-bottom">
|
||||
<div class="uk-margin-medium-bottom">
|
||||
<ul #chartsTransition class="uk-subnav uk-subnav-pill uk-subnav-small" transition-group>
|
||||
<li *ngFor="let indicatorPath of chartIndicatorPaths.controls; let i=index"
|
||||
class="uk-visible-toggle uk-flex uk-margin-small-top" transition-group-item
|
||||
[class.uk-active]="(!indicator.activePath && i == 0) || indicator.activePath === i">
|
||||
<a (click)="activeChartIndicatorPath(i)">
|
||||
[class.uk-active]="getActivePathIndex() === i">
|
||||
<a (click)="setActiveChartIndicatorPath(i)">
|
||||
<span>{{ getParameter(i, 'tab')?.get('value')?.value ? getParameter(i, 'tab').get('value').value : 'No title yet' }}</span>
|
||||
</a>
|
||||
<span *ngIf="!indicator.defaultId && chartIndicatorPaths.length > 1"
|
||||
class="uk-flex uk-flex-column uk-flex-center uk-margin-small-left"
|
||||
[class.uk-invisible-hover]="indicator.activePath !== i"
|
||||
[class.uk-invisible-hover]="getActivePathIndex()!== i"
|
||||
(click)="$event.stopPropagation();$event.preventDefault()">
|
||||
<a *ngIf="isCurator" class="uk-link-reset uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" name="more_vert"></icon>
|
||||
|
@ -517,7 +480,7 @@
|
|||
</span>
|
||||
</li>
|
||||
<li *ngIf="!indicator.defaultId" class="uk-margin-small-top">
|
||||
<a (click)="activeChartIndicatorPath(chartIndicatorPaths.length); $event.preventDefault()"
|
||||
<a (click)="setActiveChartIndicatorPath(chartIndicatorPaths.length); $event.preventDefault()"
|
||||
class="uk-flex uk-flex-middle">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-text-uppercase">Add</span>
|
||||
|
@ -525,10 +488,8 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div *ngFor="let indicatorPath of chartIndicatorPaths.controls; let i=index;"
|
||||
[formGroupName]="i">
|
||||
<div *ngIf="(!indicator.activePath && i == 0) || indicator.activePath === i" class="uk-grid"
|
||||
uk-grid>
|
||||
<div *ngFor="let indicatorPath of chartIndicatorPaths.controls; let i=index;" [formGroupName]="i">
|
||||
<div *ngIf="getActivePathIndex() === i" class="uk-grid" uk-grid>
|
||||
<div class="uk-width-1-1 uk-flex uk-flex-middle">
|
||||
<div input class="uk-width-expand"
|
||||
[title]="indicatorPath.get('url').disabled?'Default chart URLs cannot change':''"
|
||||
|
@ -542,7 +503,7 @@
|
|||
</div>
|
||||
<div class="uk-width-1-1" formArrayName="parameters">
|
||||
<div class="uk-grid" uk-grid>
|
||||
<div *ngIf="stakeholderUtils.hasMultiChartIndicatorPaths && getParameter(i, 'tab')" input class="uk-width-1-1"
|
||||
<div *ngIf="getParameter(i, 'tab')" input class="uk-width-1-1"
|
||||
[formInput]="getParameter(i, 'tab').get('value')"
|
||||
placeholder="Tab Title"></div>
|
||||
<div *ngIf="getParameter(i, 'title')" input class="uk-width-1-1"
|
||||
|
@ -566,7 +527,8 @@
|
|||
[formInput]="getParameter(i, 'yAxisTitle').get('value')"
|
||||
placeholder="Y-Axis Title"></div>
|
||||
<ng-container *ngIf="isLegendEnabled(indicator, i)">
|
||||
<div *ngFor="let dataTitle of dataTitles(i); let j=index" input class="uk-width-1-3@s"
|
||||
<div *ngFor="let dataTitle of dataTitles(i); let j=index" input
|
||||
class="uk-width-1-3@s"
|
||||
[formInput]="getParameter(i, dataTitle).get('value')"
|
||||
[placeholder]="'Data Title ' + (j + 1)"></div>
|
||||
</ng-container>
|
||||
|
@ -641,13 +603,3 @@
|
|||
Are you sure you want to proceed?
|
||||
</div>
|
||||
</modal-alert>
|
||||
<ng-template #new_section let-type="type">
|
||||
<div class="section">
|
||||
<div class="uk-flex uk-flex-center" (click)="createSection(-1, type)">
|
||||
<button class="uk-button uk-button-primary uk-flex uk-flex-middle">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">New section</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
|
|
@ -10,8 +10,8 @@ import {
|
|||
ViewChild
|
||||
} from "@angular/core";
|
||||
import {
|
||||
Format,
|
||||
Indicator,
|
||||
Format, ImportIndicators,
|
||||
Indicator, IndicatorImport,
|
||||
IndicatorPath,
|
||||
IndicatorSize,
|
||||
IndicatorType,
|
||||
|
@ -79,7 +79,6 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
* Editable indicator
|
||||
*/
|
||||
public section: Section;
|
||||
public indicator: Indicator;
|
||||
public index: number = -1;
|
||||
public editing: boolean = false;
|
||||
public dragging: boolean = false;
|
||||
|
@ -102,7 +101,6 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
@ViewChild('editChartNotify', {static: true}) editChartNotify: NotifyFormComponent;
|
||||
@ViewChild('deleteNotify', {static: true}) deleteNotify: NotifyFormComponent;
|
||||
/* Transition Groups */
|
||||
@ViewChild('numbersTransition') numbersTransition: TransitionGroupComponent;
|
||||
@ViewChild('chartsTransition') chartsTransition: TransitionGroupComponent;
|
||||
|
||||
public isFullscreen: boolean = false;
|
||||
|
@ -581,26 +579,14 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
}
|
||||
}
|
||||
|
||||
public removeNumberIndicatorPath(index: number) {
|
||||
this.numberIndicatorPaths.removeAt(index);
|
||||
this.indicator.indicatorPaths.splice(index, 1);
|
||||
this.numbersTransition.init();
|
||||
if (this.indicator.activePath === index) {
|
||||
this.activeNumberIndicatorPath(Math.max(0, index - 1));
|
||||
} else if (this.indicator.activePath > index) {
|
||||
this.activeNumberIndicatorPath(this.indicator.activePath - 1);
|
||||
}
|
||||
this.numberIndicatorFb.markAsDirty();
|
||||
}
|
||||
|
||||
public removeChartIndicatorPath(index: number) {
|
||||
this.chartIndicatorPaths.removeAt(index);
|
||||
this.indicator.indicatorPaths.splice(index, 1);
|
||||
this.chartsTransition.init();
|
||||
if (this.indicator.activePath === index) {
|
||||
this.activeChartIndicatorPath(Math.max(0, index - 1));
|
||||
this.setActiveChartIndicatorPath(Math.max(0, index - 1));
|
||||
} else if (this.indicator.activePath > index) {
|
||||
this.activeChartIndicatorPath(this.indicator.activePath - 1);
|
||||
this.setActiveChartIndicatorPath(this.indicator.activePath - 1);
|
||||
}
|
||||
this.chartIndicatorFb.markAsDirty();
|
||||
}
|
||||
|
@ -609,9 +595,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
type: 'number' | 'chart', index: number,
|
||||
newIndex: number = index - 1) {
|
||||
let indicatorPaths = type == 'number'?this.numberIndicatorPaths:this.chartIndicatorPaths;
|
||||
if(type == 'number') {
|
||||
this.numbersTransition.init();
|
||||
} else {
|
||||
if(type == 'chart') {
|
||||
this.chartsTransition.init();
|
||||
}
|
||||
let a = indicatorPaths.at(index);
|
||||
|
@ -627,16 +611,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
form.markAsDirty();
|
||||
}
|
||||
|
||||
public activeNumberIndicatorPath(index: number) {
|
||||
let paths = this.numberIndicatorPaths;
|
||||
if (index == paths.length) {
|
||||
this.addNumberIndicatorPath();
|
||||
this.numbersTransition.init();
|
||||
}
|
||||
this.indicator.activePath = index;
|
||||
}
|
||||
|
||||
public activeChartIndicatorPath(index: number) {
|
||||
public setActiveChartIndicatorPath(index: number) {
|
||||
let paths = this.chartIndicatorPaths;
|
||||
if (index == paths.length) {
|
||||
this.addChartIndicatorPath();
|
||||
|
@ -1008,8 +983,10 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
this.getSecureUrlByStakeHolder(this.indicator.indicatorPaths[index]).toString();
|
||||
} else if (type === 'number') {
|
||||
let indicatorPath = this.numberIndicatorPaths.at(index).value;
|
||||
indicatorPath.parameters.forEach(parameter => {
|
||||
if (parameter.value !== this.indicator.indicatorPaths[index].parameters[parameter.key]) {
|
||||
indicatorPath.parameters.forEach((parameter: { value: any; key: string | number; }) => {
|
||||
if (!parameter.value && !this.indicator.indicatorPaths[index].parameters[parameter.key]) {
|
||||
return;
|
||||
} else if (parameter.value !== this.indicator.indicatorPaths[index].parameters[parameter.key]) {
|
||||
hasDifference = true;
|
||||
return;
|
||||
}
|
||||
|
@ -1027,6 +1004,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
}
|
||||
|
||||
refreshIndicator(type: IndicatorType = 'chart') {
|
||||
let activePath = this.indicator.activePath;
|
||||
if (type === 'chart') {
|
||||
this.indicator = this.indicatorUtils.generateIndicatorByForm(this.chartIndicatorFb.value, this.indicator.indicatorPaths, 'chart');
|
||||
this.indicator.indicatorPaths.forEach(indicatorPath => {
|
||||
|
@ -1038,6 +1016,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
this.validateJsonPath(index);
|
||||
});
|
||||
}
|
||||
this.indicator.activePath = activePath;
|
||||
}
|
||||
|
||||
deleteIndicatorOpen(section: Section, indicatorId: string, type: string, childrenAction: string = null) {
|
||||
|
@ -1276,10 +1255,10 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
}));
|
||||
}
|
||||
|
||||
importIndicatorsAndSave(stakeholder: Stakeholder, charts: any[]) {
|
||||
importIndicatorsAndSave(importIndicators: ImportIndicators) {
|
||||
let sectionsToSave: Section[] = [];
|
||||
let countIndicators = 0;
|
||||
if (stakeholder.type !== this.stakeholder.type) {
|
||||
if (importIndicators.stakeholder.type !== this.stakeholder.type) {
|
||||
UIkit.notification("The type of this profile is not the same with the file's one!", {
|
||||
status: 'warning',
|
||||
timeout: 6000,
|
||||
|
@ -1290,26 +1269,26 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
}
|
||||
// name description additionalDescription, height, width, visibility
|
||||
let duplicates = 0;
|
||||
for (let chart of charts) {
|
||||
chart.visibility = this.showVisibility ? chart.visibility : this.stakeholderUtils.defaultValue(this.stakeholderUtils.visibilities);
|
||||
if (!sectionsToSave[chart['sectionIndex']]) {
|
||||
let sectionToSave = new Section(chart['sectionType'] ? chart['sectionType'] : chart['type'], chart['sectionTitle']);
|
||||
for (let indicator of importIndicators.indicators) {
|
||||
indicator.visibility = this.showVisibility ? indicator.visibility : this.stakeholderUtils.defaultValue(this.stakeholderUtils.visibilities);
|
||||
if (!sectionsToSave[indicator['sectionIndex']]) {
|
||||
let sectionToSave = new Section(indicator['sectionType'] ? indicator['sectionType'] : indicator['type'], indicator['sectionTitle']);
|
||||
sectionToSave.indicators = [];
|
||||
sectionsToSave[chart['sectionIndex']] = sectionToSave;
|
||||
sectionsToSave[indicator['sectionIndex']] = sectionToSave;
|
||||
}
|
||||
let exists = false;
|
||||
let indicatorPaths: IndicatorPath[] = [];
|
||||
// validate indicators' schema from file
|
||||
let invalid_file_message;
|
||||
if (!chart.type) {
|
||||
if (!indicator.type) {
|
||||
invalid_file_message = "No indicator type is specified. Type should be chart or number.";
|
||||
} else if (chart.type != "chart" && chart.type != "number") {
|
||||
} else if (indicator.type != "chart" && indicator.type != "number") {
|
||||
invalid_file_message = "Invalid indicator type. Type should be chart or number.";
|
||||
} else if (chart.indicatorPaths.length === 0) {
|
||||
} else if (indicator.indicatorPaths.length === 0) {
|
||||
invalid_file_message = "No indicator paths are specified."
|
||||
} else if (chart.type == "number" && chart.indicatorPaths.filter(path => !path.jsonPath).length > 0) {
|
||||
} else if (indicator.type == "number" && indicator.indicatorPaths.filter(path => !path.jsonPath).length > 0) {
|
||||
invalid_file_message = "No jsonPath is specified for number indicator."
|
||||
} else if (chart.indicatorPaths.filter(path => !path.url).length > 0) {
|
||||
} else if (indicator.indicatorPaths.filter(path => !path.url).length > 0) {
|
||||
invalid_file_message = "No indicator url is specified.";
|
||||
}
|
||||
|
||||
|
@ -1323,8 +1302,8 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
break;
|
||||
}
|
||||
|
||||
if (chart.type == "chart") {
|
||||
indicatorPaths = chart.indicatorPaths.map(path => this.indicatorUtils.generateIndicatorByChartUrl(this.indicatorUtils.getChartSource(path.url), path.url, chart.type, stakeholder, path.tab));
|
||||
if (indicator.type == "chart") {
|
||||
indicatorPaths = indicator.indicatorPaths.map(path => this.indicatorUtils.generateIndicatorByChartUrl(this.indicatorUtils.getChartSource(path.url), path.url, null, importIndicators.stakeholder, path.tab));
|
||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index].charts.forEach((section: Section) => {
|
||||
section.indicators.forEach(indicator => {
|
||||
indicator.indicatorPaths.forEach(path => {
|
||||
|
@ -1337,10 +1316,10 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
});
|
||||
});
|
||||
});
|
||||
} else if (chart.type == "number") {
|
||||
indicatorPaths = chart.indicatorPaths.map(path =>
|
||||
} else if (indicator.type == "number") {
|
||||
indicatorPaths = indicator.indicatorPaths.map(path =>
|
||||
this.indicatorUtils.generateIndicatorByNumberUrl(this.indicatorUtils.getNumberSource(path.url), path.url,
|
||||
stakeholder, path.jsonPath, this.indicatorUtils.numberSources.get(this.indicatorUtils.getNumberSource(path.url))));
|
||||
importIndicators.stakeholder, path.jsonPath, this.indicatorUtils.numberSources.get(this.indicatorUtils.getNumberSource(path.url))));
|
||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index].numbers.forEach((section: Section) => {
|
||||
section.indicators.forEach(indicator => {
|
||||
indicator.indicatorPaths.forEach(path => {
|
||||
|
@ -1355,8 +1334,8 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
});
|
||||
}
|
||||
if (indicatorPaths.length > 0) {
|
||||
let i: Indicator = new Indicator(chart.name, chart.description, chart.additionalDescription, chart.type, chart.width, chart.height, this.showVisibility ? "RESTRICTED" : this.stakeholderUtils.defaultValue(this.stakeholderUtils.visibilities), indicatorPaths);
|
||||
sectionsToSave[chart['sectionIndex']].indicators.push(i);
|
||||
let i: Indicator = new Indicator(indicator.name, indicator.description, indicator.additionalDescription, indicator.type, indicator.width, indicator.height, this.showVisibility ? "RESTRICTED" : this.stakeholderUtils.defaultValue(this.stakeholderUtils.visibilities), indicatorPaths);
|
||||
sectionsToSave[indicator['sectionIndex']].indicators.push(i);
|
||||
countIndicators++;
|
||||
}
|
||||
}
|
||||
|
@ -1498,7 +1477,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
|||
});
|
||||
this.finish();
|
||||
} else {
|
||||
this.importIndicatorsAndSave(json.stakeholder, json.indicators);
|
||||
this.importIndicatorsAndSave(json);
|
||||
}
|
||||
}, (error) => {
|
||||
console.error("Error importing files", error);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import {IndicatorType, Stakeholder} from "../../../monitor/entities/stakeholder";
|
||||
// @ts-ignore
|
||||
import axios from "axios";
|
||||
import {IndicatorUtils} from "../indicator-utils";
|
||||
import {Composer} from "../../../utils/email/composer";
|
||||
|
|
|
@ -53,18 +53,16 @@ export interface StakeholderCategory {
|
|||
export class StakeholderConfiguration {
|
||||
|
||||
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: 'Template', plural: 'Templates', value: 'templates'},
|
||||
{name: 'Standalone', plural: 'Standalone', value: 'standalone'},
|
||||
{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 +
|
||||
', 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'},
|
||||
', but can be integrated into another ' + StakeholderConfiguration.ENTITIES.stakeholder + '.'
|
||||
}
|
||||
];
|
||||
|
||||
public static TYPES: Option[] = [
|
||||
|
@ -86,8 +84,6 @@ export class StakeholderConfiguration {
|
|||
{icon: 'incognito', value: "PRIVATE", label: 'Private'},
|
||||
];
|
||||
public static CACHE_INDICATORS: boolean = true;
|
||||
public static NUMBER_MULTI_INDICATOR_PATHS = false;
|
||||
public static CHART_MULTI_INDICATOR_PATHS = true;
|
||||
public static openAccess: Map<string, OAIndicator> = new Map();
|
||||
|
||||
}
|
||||
|
@ -121,14 +117,6 @@ export class StakeholderUtils {
|
|||
return StakeholderConfiguration.CACHE_INDICATORS;
|
||||
}
|
||||
|
||||
get hasMultiNumberIndicatorPaths() {
|
||||
return StakeholderConfiguration.NUMBER_MULTI_INDICATOR_PATHS;
|
||||
}
|
||||
|
||||
get hasMultiChartIndicatorPaths() {
|
||||
return StakeholderConfiguration.CHART_MULTI_INDICATOR_PATHS;
|
||||
}
|
||||
|
||||
get openAccess(): Map<string, OAIndicator> {
|
||||
return StakeholderConfiguration.openAccess;
|
||||
}
|
||||
|
@ -734,7 +722,7 @@ export class IndicatorUtils {
|
|||
if (indicatorPath.type == null) {
|
||||
indicatorPath.type = this.defaultChartType;
|
||||
}
|
||||
if(tab) {
|
||||
if (tab) {
|
||||
indicatorPath.parameters.tab = tab;
|
||||
}
|
||||
return indicatorPath;
|
||||
|
@ -746,6 +734,7 @@ export class IndicatorUtils {
|
|||
} else if ((obj[this.getDescriptionObjectName(obj)]).hasOwnProperty("queries")) {
|
||||
return "queries";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private getDescriptionObjectName(obj) {
|
||||
|
@ -758,6 +747,7 @@ export class IndicatorUtils {
|
|||
} else if (obj.hasOwnProperty("series")) {
|
||||
return "series";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private extractType(obj, indicatorPath: IndicatorPath): IndicatorPathType {
|
||||
|
@ -783,7 +773,7 @@ export class IndicatorUtils {
|
|||
for (let gfilter of filter["groupFilters"]) {
|
||||
let replacedValue = this.replaceIndexValues(gfilter["values"][0], stakeholder);
|
||||
if (replacedValue) { // don't proceed in replacement if no replaced value matches
|
||||
gfilter["values"][0] = replacedValue;
|
||||
gfilter["values"][0] = replacedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import {Directive} from "@angular/core";
|
|||
import {BaseComponent} from "../../sharedComponents/base/base.component";
|
||||
import {IndicatorUtils, StakeholderUtils} from "./indicator-utils";
|
||||
import {ConnectHelper} from "../../connect/connectHelper";
|
||||
import {IndicatorSize} from "../../monitor/entities/stakeholder";
|
||||
import {Indicator, IndicatorSize} from "../../monitor/entities/stakeholder";
|
||||
import {statsToolParser} from "./cache-indicators/cache-indicators";
|
||||
|
||||
@Directive()
|
||||
|
@ -53,6 +53,7 @@ export abstract class StakeholderBaseComponent extends BaseComponent {
|
|||
export abstract class IndicatorStakeholderBaseComponent extends StakeholderBaseComponent {
|
||||
|
||||
indicatorUtils: IndicatorUtils = new IndicatorUtils();
|
||||
indicator: Indicator;
|
||||
|
||||
public getNumberClassBySize(size: IndicatorSize): string {
|
||||
if (size === 'small') {
|
||||
|
@ -73,4 +74,15 @@ export abstract class IndicatorStakeholderBaseComponent extends StakeholderBaseC
|
|||
return 'uk-width-1-1';
|
||||
}
|
||||
}
|
||||
|
||||
public getActivePathIndex(indicator: Indicator = this.indicator): number {
|
||||
return indicator?.activePath ? indicator.activePath : 0;
|
||||
}
|
||||
|
||||
public getActiveIndicatorPath(indicator: Indicator = this.indicator) {
|
||||
if(indicator?.indicatorPaths.length > this.getActivePathIndex(indicator)) {
|
||||
return indicator.indicatorPaths[this.getActivePathIndex(indicator)];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ export class BrowseStakeholderBaseComponent<T> extends StakeholderBaseComponent
|
|||
gridView: boolean = true;
|
||||
sortOptions: Option[] = [
|
||||
{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];
|
||||
sortBy: string = null;
|
||||
|
|
|
@ -16,6 +16,31 @@ export type Format = 'NUMBER' | 'PERCENTAGE';
|
|||
export type Visibility = 'PUBLIC' | 'PRIVATE' | 'RESTRICTED';
|
||||
export type Overlay = 'embed' | 'description' | false;
|
||||
|
||||
export interface IndicatorImport {
|
||||
indicatorPaths?: IndicatorPathImport[];
|
||||
type: IndicatorType,
|
||||
name: string,
|
||||
description: string,
|
||||
additionalDescription: string,
|
||||
visibility: Visibility,
|
||||
width: IndicatorSize,
|
||||
height: IndicatorSize,
|
||||
sectionTitle: string,
|
||||
sectionType: IndicatorType,
|
||||
sectionIndex: number
|
||||
}
|
||||
|
||||
export interface IndicatorPathImport {
|
||||
jsonPath?: string[],
|
||||
tab: string,
|
||||
url: string
|
||||
}
|
||||
|
||||
export interface ImportIndicators {
|
||||
stakeholder: Stakeholder,
|
||||
indicators: IndicatorImport[]
|
||||
}
|
||||
|
||||
export class ManageStakeholders {
|
||||
templates: (Stakeholder & StakeholderInfo)[];
|
||||
standalone: (Stakeholder & StakeholderInfo)[];
|
||||
|
|
|
@ -68,7 +68,7 @@ export class ResourcesService {
|
|||
}
|
||||
|
||||
public isPagesEnabled() {
|
||||
let url = properties.adminToolsAPIURL + "/monitor/monitor/pages";
|
||||
let url = properties.adminToolsAPIURL + "monitor/monitor/pages";
|
||||
return this.http.get<Page[]>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
||||
.pipe(map(pages => {
|
||||
let result = this.routes.map(() => false);
|
||||
|
|
|
@ -57,7 +57,7 @@ export class StakeholderService {
|
|||
getStakeholder(alias: string, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
||||
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== alias || shouldUpdate) {
|
||||
this.promise = new Promise<void>((resolve, reject) => {
|
||||
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + '/stakeholder/' + encodeURIComponent(alias), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + 'stakeholder/' + encodeURIComponent(alias), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
||||
})).subscribe(stakeholder => {
|
||||
this.stakeholderSubject.next(stakeholder);
|
||||
|
@ -74,7 +74,7 @@ export class StakeholderService {
|
|||
getChildStakeholder(parent: string, type: string, child: string, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
||||
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== child || shouldUpdate) {
|
||||
this.promise = new Promise<void>((resolve, reject) => {
|
||||
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + '/stakeholder/' + encodeURIComponent(parent) + '/' + type + '/' + encodeURIComponent(child), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + 'stakeholder/' + encodeURIComponent(parent) + '/' + type + '/' + encodeURIComponent(child), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
||||
})).subscribe(stakeholder => {
|
||||
this.stakeholderSubject.next(stakeholder);
|
||||
|
@ -91,7 +91,7 @@ export class StakeholderService {
|
|||
getResearcherStakeholder(orcid, name, results, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
||||
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== orcid || shouldUpdate) {
|
||||
this.promise = new Promise<void>((resolve, reject) => {
|
||||
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + '/stakeholder/' + encodeURIComponent("researcher"), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + 'stakeholder/' + encodeURIComponent("researcher"), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
||||
})).subscribe(stakeholder => {
|
||||
stakeholder.index_id = orcid;
|
||||
|
@ -123,19 +123,19 @@ export class StakeholderService {
|
|||
}
|
||||
|
||||
getAlias(url: string): Observable<string[]> {
|
||||
return this.http.get<Stakeholder[]>(url + '/stakeholder/alias', CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
||||
return this.http.get<Stakeholder[]>(url + 'stakeholder/alias', CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
||||
return HelperFunctions.copy(stakeholders);
|
||||
}));
|
||||
}
|
||||
|
||||
getStakeholders(url: string, type: string = null, defaultId: string = null): Observable<(Stakeholder & StakeholderInfo)[]> {
|
||||
return this.http.get<Stakeholder[]>(url + '/stakeholder' + ((type) ? ('?type=' + type) : (defaultId?'?defaultId=' + defaultId:'')) + ((type && defaultId) ? ('&defaultId=' + defaultId) : ''), CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
||||
return this.http.get<Stakeholder[]>(url + 'stakeholder' + ((type) ? ('?type=' + type) : (defaultId?'?defaultId=' + defaultId:'')) + ((type && defaultId) ? ('&defaultId=' + defaultId) : ''), CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholders));
|
||||
}));
|
||||
}
|
||||
|
||||
getMyStakeholders(url: string, type: string = null): Observable<ManageStakeholders> {
|
||||
return this.http.get<ManageStakeholders>(url + '/my-stakeholder' + ((type) ? ('?type=' + type) : ''), CustomOptions.registryOptions()).pipe(map(manageStakeholder => {
|
||||
return this.http.get<ManageStakeholders>(url + 'my-stakeholder' + ((type) ? ('?type=' + type) : ''), CustomOptions.registryOptions()).pipe(map(manageStakeholder => {
|
||||
return HelperFunctions.copy({
|
||||
templates: Stakeholder.checkIsUpload(manageStakeholder.templates),
|
||||
standalone: Stakeholder.checkIsUpload(manageStakeholder.standalone),
|
||||
|
@ -155,20 +155,20 @@ export class StakeholderService {
|
|||
umbrella: umbrella,
|
||||
standalone: standalone
|
||||
}
|
||||
return this.http.post<Stakeholder>(url + '/build-stakeholder', buildStakeholder, CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||
return this.http.post<Stakeholder>(url + 'build-stakeholder', buildStakeholder, CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
||||
}));
|
||||
}
|
||||
|
||||
changeVisibility(url: string, path: string[], visibility: Visibility, propagate: boolean = false): Observable<any> {
|
||||
return this.http.post<Visibility>(url + '/' + path.join('/') + '/change-visibility' + '?visibility=' + visibility + (propagate ? '&propagate=true' : ''), null, CustomOptions.registryOptions());
|
||||
return this.http.post<Visibility>(url + path.join('/') + '/change-visibility' + '?visibility=' + visibility + (propagate ? '&propagate=true' : ''), null, CustomOptions.registryOptions());
|
||||
}
|
||||
|
||||
saveElement(url: string, element: any, path: string[] = [], isFull: boolean = false): Observable<any> {
|
||||
if (element.alias && element.alias.startsWith('/')) {
|
||||
element.alias = element.alias.slice(1);
|
||||
}
|
||||
return this.http.post<any>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
|
||||
return this.http.post<any>(url + path.join('/') +
|
||||
'/save' + (isFull ? '/full' : ''), element, CustomOptions.registryOptions()).pipe(map(element => {
|
||||
if (path.length === 0) {
|
||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(element));
|
||||
|
@ -179,7 +179,7 @@ export class StakeholderService {
|
|||
}
|
||||
|
||||
saveBulkElements(url: string, indicators, path: string[] = []): Observable<any> {
|
||||
return this.http.post<any>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
|
||||
return this.http.post<any>(url + path.join('/') +
|
||||
'/save-bulk', indicators, CustomOptions.registryOptions()).pipe(map(element => {
|
||||
if (path.length === 0) {
|
||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(element));
|
||||
|
@ -190,7 +190,7 @@ export class StakeholderService {
|
|||
}
|
||||
|
||||
saveSection(url: string, element: any, path: string[] = [], index: number = -1): Observable<Section> {
|
||||
return this.http.post<Section>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
|
||||
return this.http.post<Section>(url + path.join('/') +
|
||||
'/save/' + index, element, CustomOptions.registryOptions()).pipe(map(element => {
|
||||
return HelperFunctions.copy(element);
|
||||
}));
|
||||
|
@ -201,27 +201,27 @@ export class StakeholderService {
|
|||
if (childrenAction) {
|
||||
params = "?children=" + childrenAction;
|
||||
}
|
||||
return this.http.delete<any>(url + '/' + path.join('/') + '/delete' + params, CustomOptions.registryOptions());
|
||||
return this.http.delete<any>(url + path.join('/') + '/delete' + params, CustomOptions.registryOptions());
|
||||
}
|
||||
|
||||
reorderElements(url: string, path: string[], ids: string[]): Observable<any> {
|
||||
return this.http.post<any>(url + '/' + path.join('/') + '/reorder', ids, CustomOptions.registryOptions());
|
||||
return this.http.post<any>(url + path.join('/') + '/reorder', ids, CustomOptions.registryOptions());
|
||||
}
|
||||
|
||||
reorderIndicators(url: string, path: string[], indicators: string[]): Observable<Indicator[]> {
|
||||
return this.http.post<Indicator[]>(url + '/' + path.join('/') + '/reorder', indicators, CustomOptions.registryOptions()).pipe(map(indicators => {
|
||||
return this.http.post<Indicator[]>(url + path.join('/') + '/reorder', indicators, CustomOptions.registryOptions()).pipe(map(indicators => {
|
||||
return HelperFunctions.copy(indicators);
|
||||
}));
|
||||
}
|
||||
|
||||
moveIndicator(url: string, path: string[], moveIndicator: MoveIndicator): Observable<SubCategory> {
|
||||
return this.http.post<SubCategory>(url + '/' + path.join('/') + '/moveIndicator', moveIndicator, CustomOptions.registryOptions()).pipe(map(subCategory => {
|
||||
return this.http.post<SubCategory>(url + path.join('/') + '/moveIndicator', moveIndicator, CustomOptions.registryOptions()).pipe(map(subCategory => {
|
||||
return HelperFunctions.copy(subCategory);
|
||||
}));
|
||||
}
|
||||
|
||||
updateUmbrella(url: string, id: string, update: UpdateUmbrella): Observable<Umbrella> {
|
||||
return this.http.post<Umbrella>(url + '/' + id + '/umbrella', update, CustomOptions.registryOptions()).pipe(map(umbrella => {
|
||||
return this.http.post<Umbrella>(url + id + '/umbrella', update, CustomOptions.registryOptions()).pipe(map(umbrella => {
|
||||
return HelperFunctions.copy(umbrella);
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -367,6 +367,14 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Compact results -->
|
||||
<a *ngIf="hasCompactView && (searchUtils.status !== errorCodes.LOADING || !loadPaging)"
|
||||
class="uk-link-reset custom-view-button active uk-margin-left">
|
||||
<icon *ngIf="!compactView" uk-tooltip="Compact results" (click)="toggleView(true)"
|
||||
name="unfold_less" [flex]="true" visuallyHidden="Compact results"></icon>
|
||||
<icon *ngIf="compactView" uk-tooltip="Expand results" (click)="toggleView(false)"
|
||||
name="unfold_more" [flex]="true" visuallyHidden="Expand results"></icon>
|
||||
</a>
|
||||
<!-- Download results -->
|
||||
<div *ngIf="showDownload && (searchUtils.status !== errorCodes.LOADING || !loadPaging)"
|
||||
class="uk-margin-left uk-flex uk-flex-middle" [class.uk-flex-center]="mobile" [class.uk-margin-medium-top]="mobile">
|
||||
|
@ -381,14 +389,6 @@
|
|||
</a>
|
||||
</ng-container>
|
||||
</div>
|
||||
<!-- Compact results -->
|
||||
<a *ngIf="hasCompactView && (searchUtils.status !== errorCodes.LOADING || !loadPaging)"
|
||||
class="uk-link-reset custom-view-button active uk-margin-left">
|
||||
<icon *ngIf="!compactView" uk-tooltip="Compact results" (click)="toggleView(true)"
|
||||
name="unfold_less" [flex]="true" visuallyHidden="Compact results"></icon>
|
||||
<icon *ngIf="compactView" uk-tooltip="Expand results" (click)="toggleView(false)"
|
||||
name="unfold_more" [flex]="true" visuallyHidden="Expand results"></icon>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -26,19 +26,19 @@ export class CustomizationService {
|
|||
|
||||
saveLayout(properties: EnvProperties, pid: string, layout: Layout, portalType = null): Observable<Layout> {
|
||||
CustomizationService.removeNulls(layout);
|
||||
return this.http.post<Layout>(properties.adminToolsAPIURL + '/' + (portalType?portalType: properties.adminToolsPortalType) + '/'
|
||||
return this.http.post<Layout>(properties.adminToolsAPIURL + (portalType?portalType: properties.adminToolsPortalType) + '/'
|
||||
+ pid + '/layout', layout, CustomOptions.getAuthOptionsWithBody());
|
||||
}
|
||||
deleteLayout(properties: EnvProperties, pid: string, portalType = null): Observable<Layout> {
|
||||
return this.http.delete<Layout>(properties.adminToolsAPIURL + '/' + (portalType?portalType: properties.adminToolsPortalType) + '/'
|
||||
return this.http.delete<Layout>(properties.adminToolsAPIURL + (portalType?portalType: properties.adminToolsPortalType) + '/'
|
||||
+ pid + '/layout', CustomOptions.getAuthOptionsWithBody());
|
||||
}
|
||||
getLayout(properties: EnvProperties, pid: string): Observable<Layout> {
|
||||
return this.http.get<Layout>(properties.adminToolsAPIURL+"/" + properties.adminToolsPortalType + '/'
|
||||
return this.http.get<Layout>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'
|
||||
+ pid + '/layout');
|
||||
}
|
||||
getLayouts(properties: EnvProperties): Observable<Layout[]> {
|
||||
return this.http.get<Layout[]>(properties.adminToolsAPIURL+'/community/layouts');
|
||||
return this.http.get<Layout[]>(properties.adminToolsAPIURL + 'community/layouts');
|
||||
}
|
||||
mockLayout(): any {
|
||||
return this.http.get('./assets/customizationOptions.json') ;
|
||||
|
|
|
@ -406,11 +406,10 @@ export class HelpContentService {
|
|||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
deleteCommunities(ids : string[], helpContentUrl:string) {
|
||||
deleteCommunities(ids : string[], helpContentUrl:string, portalType:string) {
|
||||
// let headers = new Headers({'Content-Type': 'application/json'});
|
||||
// let options = new RequestOptions({headers: headers});
|
||||
|
||||
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||
return this.http.post(helpContentUrl + '/' + portalType + '/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ export class PluginsService {
|
|||
}
|
||||
|
||||
countPluginTemplatePerPageForAllPortals(api: string) {
|
||||
return this.http.get(api + '/pluginTemplate/page/count');
|
||||
return this.http.get(api + 'pluginTemplate/page/count');
|
||||
}
|
||||
|
||||
getPluginsByPage(api: string, pid: string, pageId: string) {
|
||||
|
@ -66,11 +66,11 @@ export class PluginsService {
|
|||
return this.http.post(api + 'community/' + community + '/plugin/status/' + id, status, CustomOptions.getAuthOptionsWithBody());
|
||||
}
|
||||
getPluginById(api: string, id: string) {
|
||||
return this.http.get<Plugin>(api + '/plugin/' + id);
|
||||
return this.http.get<Plugin>(api + 'plugin/' + id);
|
||||
}
|
||||
|
||||
getPluginTemplateById(api: string, id: string) {
|
||||
return this.http.get<PluginTemplate>(api + '/pluginTemplates/' + id);
|
||||
return this.http.get<PluginTemplate>(api + 'pluginTemplates/' + id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,6 +15,8 @@ export class SliderTabComponent {
|
|||
@Input()
|
||||
public disabled: boolean = false;
|
||||
@Input()
|
||||
public invisible: boolean = false;
|
||||
@Input()
|
||||
public align: 'left' | 'right' = 'left';
|
||||
@Input()
|
||||
public routerLink: any[] | string | null | undefined = null;
|
||||
|
|
|
@ -21,71 +21,71 @@ declare var UIkit;
|
|||
@Component({
|
||||
selector: 'slider-tabs',
|
||||
template: `
|
||||
<div #sliderElement class="uk-position-relative" [class.uk-slider]="position === 'horizontal'"
|
||||
[ngClass]="customClass">
|
||||
<div [class.uk-slider-container-tabs]="position === 'horizontal'" [class.uk-border-bottom]="border && position === 'horizontal'" [ngClass]="containerClass">
|
||||
<ul #tabsElement [class.uk-flex-nowrap]="position === 'horizontal'"
|
||||
[class.uk-slider-items]="position === 'horizontal'"
|
||||
[class.uk-tab-left]="position === 'left'" [class.uk-tab-right]="position === 'right'"
|
||||
[attr.uk-switcher]="type === 'static'?('connect:' + connect):null"
|
||||
[ngClass]="'uk-flex-' + flexPosition + ' ' + tabsClass">
|
||||
<ng-container *ngIf="type === 'static'">
|
||||
<li *ngFor="let tab of leftTabs" [ngStyle]="" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||
<a>
|
||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngFor="let tab of rightTabs; let i=index;" [style.max-width]="(position === 'horizontal')?'50%':null" [ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''"
|
||||
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||
<a [ngClass]="tab.customClass">
|
||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||
</a>
|
||||
</li>
|
||||
<div #sliderElement class="uk-position-relative" [class.uk-slider]="position === 'horizontal'"
|
||||
[ngClass]="customClass">
|
||||
<div [class.uk-slider-container-tabs]="position === 'horizontal'" [class.uk-border-bottom]="border && position === 'horizontal'" [ngClass]="containerClass">
|
||||
<ul #tabsElement [class.uk-flex-nowrap]="position === 'horizontal'"
|
||||
[class.uk-slider-items]="position === 'horizontal'"
|
||||
[class.uk-tab-left]="position === 'left'" [class.uk-tab-right]="position === 'right'"
|
||||
[attr.uk-switcher]="type === 'static'?('connect:' + connect):null"
|
||||
[ngClass]="'uk-flex-' + flexPosition + ' ' + tabsClass">
|
||||
<ng-container *ngIf="type === 'static'">
|
||||
<li *ngFor="let tab of leftTabs" [class.uk-invisible]="tab.invisible" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||
<a [class.uk-disabled]="tab.invisible || tab.disabled">
|
||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngFor="let tab of rightTabs; let i=index;" [class.uk-invisible]="tab.invisible" [style.max-width]="(position === 'horizontal')?'50%':null" [ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''"
|
||||
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||
<a [class.uk-disabled]="tab.invisible || tab.disabled" [ngClass]="tab.customClass">
|
||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||
</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="type === 'dynamic'">
|
||||
<li *ngFor="let tab of leftTabs; let i=index;" [class.uk-invisible]="tab.invisible" [class.uk-active]="tab.active" [style.max-width]="(position === 'horizontal')?'50%':null">
|
||||
<a [class.uk-disabled]="tab.invisible || tab.disabled" [routerLink]="tab.routerLink" [queryParams]="tab.queryParams" [ngClass]="tab.customClass" [relativeTo]="tab.relativeTo"
|
||||
(click)="showActive(i)"
|
||||
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngFor="let tab of rightTabs; let i=index;" [class.uk-invisible]="tab.invisible" [style.max-width]="(position === 'horizontal')?'50%':null" [class.uk-active]="tab.active"
|
||||
[ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''">
|
||||
<a [class.uk-disabled]="tab.invisible || tab.disabled" [routerLink]="tab.routerLink" [queryParams]="tab.queryParams" [ngClass]="tab.customClass" [relativeTo]="tab.relativeTo"
|
||||
(click)="showActive(i)"
|
||||
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||
</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="type === 'scrollable'">
|
||||
<li *ngFor="let tab of leftTabs" [class.uk-invisible]="tab.invisible" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block" [class.uk-active]="tab.active">
|
||||
<a [class.uk-disabled]="tab.invisible || tab.disabled" routerLink="./" [fragment]="tab.id" queryParamsHandling="merge" [ngClass]="tab.customClass">
|
||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngFor="let tab of rightTabs; let i=index;" [class.uk-invisible]="tab.invisible" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block"
|
||||
[ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''"
|
||||
[class.uk-active]="tab.active">
|
||||
<a [class.uk-disabled]="tab.invisible || tab.disabled" routerLink="./" [fragment]="tab.id" queryParamsHandling="merge" [ngClass]="tab.customClass">
|
||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||
</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
<ng-container *ngIf="!isServer">
|
||||
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="previous"></slider-arrow>
|
||||
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="next"></slider-arrow>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="type === 'dynamic'">
|
||||
<li *ngFor="let tab of leftTabs; let i=index;" [class.uk-active]="tab.active" [style.max-width]="(position === 'horizontal')?'50%':null">
|
||||
<a [routerLink]="tab.routerLink" [queryParams]="tab.queryParams" [ngClass]="tab.customClass" [relativeTo]="tab.relativeTo"
|
||||
(click)="showActive(i)"
|
||||
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngFor="let tab of rightTabs; let i=index;" [style.max-width]="(position === 'horizontal')?'50%':null" [class.uk-active]="tab.active"
|
||||
[ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''">
|
||||
<a [routerLink]="tab.routerLink" [queryParams]="tab.queryParams" [ngClass]="tab.customClass" [relativeTo]="tab.relativeTo"
|
||||
(click)="showActive(i)"
|
||||
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||
</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="type === 'scrollable'">
|
||||
<li *ngFor="let tab of leftTabs" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block" [class.uk-active]="tab.active">
|
||||
<a routerLink="./" [fragment]="tab.id" queryParamsHandling="merge" [ngClass]="tab.customClass">
|
||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||
</a>
|
||||
</li>
|
||||
<li *ngFor="let tab of rightTabs; let i=index;" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block"
|
||||
[ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''"
|
||||
[class.uk-active]="tab.active">
|
||||
<a routerLink="./" [fragment]="tab.id" queryParamsHandling="merge" [ngClass]="tab.customClass">
|
||||
<span *ngIf="tab.title">{{tab.title}}</span>
|
||||
<ng-container *ngTemplateOutlet="tab.tabTemplate"></ng-container>
|
||||
</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
<ng-container *ngIf="!isServer">
|
||||
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="previous"></slider-arrow>
|
||||
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="next"></slider-arrow>
|
||||
</ng-container>
|
||||
</div>
|
||||
`,
|
||||
})
|
||||
export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
||||
|
@ -149,18 +149,18 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
|||
private observer: IntersectionObserver;
|
||||
private timeout: Timeout;
|
||||
isServer: boolean;
|
||||
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private cdr: ChangeDetectorRef,
|
||||
@Inject(PLATFORM_ID) private platform: any) {
|
||||
this.isServer = isPlatformServer(this.platform);
|
||||
}
|
||||
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.initTabs();
|
||||
this.tabs.changes.subscribe(() => {
|
||||
this.initTabs();
|
||||
this.initTabs();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private scrollToStart() {
|
||||
this.subscriptions.push(UIkit.util.on(this.connect, 'shown', (event): void => {
|
||||
let index = event.detail[0].index();
|
||||
|
@ -204,7 +204,7 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
|||
}
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
private scrollable(slider = null) {
|
||||
this.activeFragment(this.route.snapshot.fragment, slider);
|
||||
this.subscriptions.push(this.route.fragment.subscribe(fragment => {
|
||||
|
@ -212,7 +212,7 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
|||
}));
|
||||
this.setObserver();
|
||||
}
|
||||
|
||||
|
||||
private setObserver() {
|
||||
if (this.observer) {
|
||||
this.observer.disconnect();
|
||||
|
@ -249,7 +249,7 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
|||
this.slider.show(this.activeIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private activeFragment(fragment, slider) {
|
||||
let index = 0;
|
||||
if (fragment) {
|
||||
|
@ -268,15 +268,15 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
|||
});
|
||||
this.cdr.detectChanges();
|
||||
}
|
||||
|
||||
|
||||
get leftTabs(): SliderTabComponent[] {
|
||||
return this.tabs.toArray().filter(tab => tab.align === 'left');
|
||||
}
|
||||
|
||||
|
||||
get rightTabs(): SliderTabComponent[] {
|
||||
return this.tabs.toArray().filter(tab => tab.align === 'right');
|
||||
}
|
||||
|
||||
|
||||
ngOnDestroy() {
|
||||
this.subscriptions.forEach(subscription => {
|
||||
if (subscription instanceof Subscription) {
|
||||
|
|
|
@ -35,7 +35,7 @@ export class ConfigurationService {
|
|||
|
||||
public initPortal(properties: EnvProperties, pid: string) {
|
||||
if (pid == null || this.portal?.getValue()?.static) return;
|
||||
let url = properties.adminToolsAPIURL + "/" + properties.adminToolsPortalType + "/" + pid + "/full";
|
||||
let url = properties.adminToolsAPIURL + properties.adminToolsPortalType + "/" + pid + "/full";
|
||||
this.promise = new Promise<void>(resolve => {
|
||||
this.sub = this.http.get<Portal>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) :*/ url).subscribe(
|
||||
(portal: Portal) => {
|
||||
|
|
|
@ -16,22 +16,22 @@ export class EmailService {
|
|||
}
|
||||
|
||||
notifyManagers(pid: string, role: "manager" | "subscriber", email: Email) {
|
||||
return this.http.post(properties.adminToolsAPIURL + '/notifyManagers/' + pid + '/' + role, email, CustomOptions.getAuthOptions())
|
||||
return this.http.post(properties.adminToolsAPIURL + 'notifyManagers/' + pid + '/' + role, email, CustomOptions.getAuthOptions())
|
||||
}
|
||||
|
||||
notifyNewManager(email: Email) {
|
||||
return this.http.post(properties.adminToolsAPIURL + '/notifyNewManager', email, CustomOptions.getAuthOptions())
|
||||
return this.http.post(properties.adminToolsAPIURL + 'notifyNewManager', email, CustomOptions.getAuthOptions())
|
||||
}
|
||||
|
||||
sendEmail(properties: EnvProperties, email: Email) {
|
||||
return this.http.post(properties.adminToolsAPIURL + "/sendMail/", email, CustomOptions.registryOptions());
|
||||
return this.http.post(properties.adminToolsAPIURL + "sendMail/", email, CustomOptions.registryOptions());
|
||||
}
|
||||
|
||||
contact(properties: EnvProperties, email: Email, recaptcha: string = null):Observable<boolean> {
|
||||
const data: EmailRecaptcha = new EmailRecaptcha();
|
||||
data.email = email;
|
||||
data.recaptcha = recaptcha;
|
||||
return this.http.post<boolean>(properties.adminToolsAPIURL + '/contact', data);
|
||||
return this.http.post<boolean>(properties.adminToolsAPIURL + 'contact', data);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ import {EnvProperties} from "../properties/env-properties";
|
|||
[type]="getTypeName().toLowerCase()"></citeThis>
|
||||
</modal-alert>
|
||||
<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 *ngIf="result" #embedResultsModal large="true">
|
||||
<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() compactView: boolean = false; // if true, do not show label for actions
|
||||
public citeThisClicked: boolean;
|
||||
public addThisClicked: boolean;
|
||||
public routerHelper: RouterHelper = new RouterHelper();
|
||||
@ViewChild('citeModal') citeModal;
|
||||
@ViewChild('embedResultsModal') embedResultsModal;
|
||||
|
@ -140,6 +141,7 @@ export class EntityActionsComponent implements OnInit {
|
|||
}
|
||||
|
||||
public openAddThisModal() {
|
||||
this.addThisClicked = true;
|
||||
this.addThisModal.cancelButton = false;
|
||||
this.addThisModal.okButton = false;
|
||||
this.addThisModal.alertTitle = "Share this " + this.getTypeName() + " in your social networks";
|
||||
|
|
|
@ -19,9 +19,9 @@ export class HelperService {
|
|||
|
||||
let url = properties.adminToolsAPIURL;
|
||||
if (div) {
|
||||
url += '/divhelpcontent?active=true&community=' + communityId + '&page=' + router + '&div=' + div;
|
||||
url += 'divhelpcontent?active=true&community=' + communityId + '&page=' + router + '&div=' + div;
|
||||
} else {
|
||||
url += '/pagehelpcontent?active=true&community=' + communityId + '&page=' + router + '&position=' + position;
|
||||
url += 'pagehelpcontent?active=true&community=' + communityId + '&page=' + router + '&position=' + position;
|
||||
if (before) {
|
||||
url += '&before=' + before;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ export class HelperService {
|
|||
if (typeof properties.useHelpTexts == "undefined" || properties.useHelpTexts) {
|
||||
let page_route: string = router.split('?')[0].substring(0);
|
||||
let url = properties.adminToolsAPIURL;
|
||||
url += '/' + portalType + '/' + portal + '/pagehelpcontent/grouped?active=true&page=' +
|
||||
url += portalType + '/' + portal + '/pagehelpcontent/grouped?active=true&page=' +
|
||||
((page_route.indexOf("/" + portal + "/") != -1) ? ("/" + page_route.split("/" + portal + "/")[1]) : page_route);
|
||||
return this.http.get(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)+ (properties.forceCacheReload?'&forceReload=true':'')) :*/ url);
|
||||
} else {
|
||||
|
@ -60,7 +60,7 @@ export class HelperService {
|
|||
if (typeof properties.useHelpTexts == "undefined" || properties.useHelpTexts) {
|
||||
let page_route: string = router.split('?')[0].substring(0);
|
||||
let url = properties.adminToolsAPIURL;
|
||||
url += '/' + properties.adminToolsPortalType + '/' + communityId + '/divhelpcontent/grouped?active=true&page=' +
|
||||
url += properties.adminToolsPortalType + '/' + communityId + '/divhelpcontent/grouped?active=true&page=' +
|
||||
((page_route.indexOf("/" + communityId + "/") != -1) ? ("/" + page_route.split("/" + communityId + "/")[1]) : page_route);
|
||||
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload ? '&forceReload=true' : '')) : url);
|
||||
} else {
|
||||
|
|
|
@ -8,6 +8,7 @@ export interface EnvProperties {
|
|||
adminToolsPortalType?: PortalType;
|
||||
dashboard?: Dashboard;
|
||||
isDashboard?: boolean;
|
||||
plan?:string;
|
||||
domain?: string;
|
||||
enablePiwikTrack?: boolean;
|
||||
useCache?: boolean;
|
||||
|
|
|
@ -116,7 +116,7 @@ export let commonDev: EnvProperties = {
|
|||
cookieDomain: ".di.uoa.gr",
|
||||
feedbackmail: "kostis30fylloy@gmail.com",
|
||||
cacheUrl: "http://dl170.madgik.di.uoa.gr:3000/get?url=",
|
||||
monitorServiceAPIURL: "http://mpagasas.di.uoa.gr:19380/uoa-monitor-service",
|
||||
monitorServiceAPIURL: "http://mpagasas.di.uoa.gr:19380/uoa-monitor-service/",
|
||||
adminToolsAPIURL: "http://duffy.di.uoa.gr:19280/uoa-admin-tools/",
|
||||
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/api/",
|
||||
contextsAPI: "https://dev-openaire.d4science.org/openaire/context",
|
||||
|
@ -152,7 +152,7 @@ export let commonTest: EnvProperties = {
|
|||
loginServiceURL: " https://services.openaire.eu/login-service/",
|
||||
cacheUrl: "https://explore.openaire.eu/cache/get?url=",
|
||||
datasourcesAPI: "https://services.openaire.eu/openaire/ds/api/",
|
||||
monitorServiceAPIURL: "https://services.openaire.eu/uoa-monitor-service",
|
||||
monitorServiceAPIURL: "https://services.openaire.eu/uoa-monitor-service/",
|
||||
adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/",
|
||||
contextsAPI: "https://services.openaire.eu/openaire/context",
|
||||
communityAPI: "https://services.openaire.eu/openaire/community/",
|
||||
|
@ -181,7 +181,7 @@ export let commonBeta: EnvProperties = {
|
|||
loginServiceURL: "https://beta.services.openaire.eu/login-service/",
|
||||
cacheUrl: "https://demo.openaire.eu/cache/get?url=",
|
||||
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/api/",
|
||||
monitorServiceAPIURL: "https://beta.services.openaire.eu/uoa-monitor-service",
|
||||
monitorServiceAPIURL: "https://beta.services.openaire.eu/uoa-monitor-service/",
|
||||
adminToolsAPIURL: "https://beta.services.openaire.eu/uoa-admin-tools/",
|
||||
contextsAPI: "https://beta.services.openaire.eu/openaire/context",
|
||||
communityAPI: "https://beta.services.openaire.eu/openaire/community/",
|
||||
|
@ -220,7 +220,7 @@ export let commonProd: EnvProperties = {
|
|||
loginServiceURL: "https://services.openaire.eu/login-service/",
|
||||
cacheUrl: "https://explore.openaire.eu/cache/get?url=",
|
||||
datasourcesAPI: "https://services.openaire.eu/openaire/ds/api/",
|
||||
monitorServiceAPIURL: "https://services.openaire.eu/uoa-monitor-service",
|
||||
monitorServiceAPIURL: "https://services.openaire.eu/uoa-monitor-service/",
|
||||
adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/",
|
||||
contextsAPI: "https://services.openaire.eu/openaire/context",
|
||||
communityAPI: "https://services.openaire.eu/openaire/community/",
|
||||
|
|
|
@ -349,7 +349,15 @@ export class SearchFieldsBase {
|
|||
operator: "hl",
|
||||
equalityOperator: " = ",
|
||||
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}[] } = {
|
||||
|
|
|
@ -150,7 +150,8 @@ export class ISVocabulariesService {
|
|||
value.id = fos.id;//data[i].code;
|
||||
value.label = fos.label;
|
||||
array.push(value);
|
||||
if(fos.children && fos.children.length > 0) {
|
||||
// hide L3 & L4 FoS
|
||||
if(fos.children && fos.children.length > 0 && (fos.level == 1)) {
|
||||
for (let i=fos.children.length-1; i>=0; i--) {
|
||||
children.push(fos.children[i]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue