[plugins-functionality | WIP] add sliders, update gateway info with search bar, sdgs, fos, community title & description, update suggested repositories and forms

This commit is contained in:
argirok 2024-03-01 10:32:38 +02:00
parent 9ad2da0fd3
commit 17e3cda685
14 changed files with 461 additions and 180 deletions

View File

@ -6,6 +6,8 @@ import {Affiliation} from "../../utils/entities/CuratorInfo";
import {ConnectHelper} from "../connectHelper"; import {ConnectHelper} from "../connectHelper";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment"; import {properties} from "../../../../environments/environment";
import {ConfigurationService} from "../../utils/configuration/configuration.service";
import {CommunityService} from "../community/community.service";
@Component({ @Component({
selector: 'affiliations', selector: 'affiliations',
@ -29,8 +31,18 @@ export class AffiliationsComponent {
constructor(private route: ActivatedRoute, private affiliationService: AffiliationService) { constructor(private route: ActivatedRoute, private affiliationService: AffiliationService) {
} }
public ngOnInit() { public ngOnInit(/*private config: ConfigurationService */) {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
/* this.subscriptions.push(this.config.portalAsObservable.subscribe(
res => {
// this.portal = res;
this.communityId = res.pid
},
error => {
console.log(error);
}
));*/
if (this.getAffiliationsFromAPI) { if (this.getAffiliationsFromAPI) {
this.showLoading = true; this.showLoading = true;
this.affiliationService.initAffiliations(this.communityId); this.affiliationService.initAffiliations(this.communityId);

View File

@ -1,150 +1,227 @@
<div class="plugin-gateway-information uk-border-rounded uk-padding uk-margin-medium-bottom"> <div *ngIf="!community " class="uk-text-muted uk-text-center">
<img class="plugin-background" src="assets/common-assets/connect_image_faded.png"> No community info available available
<div class="plugin-content"> </div>
<div class="uk-text-lead uk-text-large uk-text-bold uk-margin-bottom"> <div class="uk-grid uk-child-width-1-2@m uk-child-width-1-1@s">
{{ pluginObject.title}} <div *ngIf="portal && community" class=""> <!-- this div will have the
customized color or image -->
<div class="uk-container uk-container-large uk-flex uk-flex-center">
<div class="uk-margin-large-top uk-margin-large-bottom">
<h1 *ngIf="pluginObject.showShortTitle" class="uk-text-center uk-h2 uk-margin-remove">
{{community.shortTitle}}
</h1>
<div *ngIf="pluginObject.showTitle"
class="uk-text-center uk-margin-top">
{{community.title}}
</div>
<div *ngIf="pluginObject.description" [innerHTML]="community.description"></div>
<div *ngIf="pluginObject.searchbar && isRouteEnabled(searchLinkToResults)" [class.uk-invisible]="disableSelect" class="uk-margin-medium-top">
<advanced-search-input #advanced (searchEmitter)="goTo(true)">
<entities-selection class="uk-width-1-3" [simpleView]="true" currentEntity="result"
[selectedEntity]="selectedEntity"
(selectionChange)="entityChanged($event);advanced.focusNext(input, $event)"
(disableSelectEmitter)="disableSelectChange($event)"
[onChangeNavigate]="false"></entities-selection>
<div input #input class="uk-width-expand" placeholder="Scholary works" [searchable]="true"
[hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>
</advanced-search-input>
<div *ngIf="selectedEntity === 'result' && input.focused"
(click)="$event.stopPropagation();advanced.focusNext(input, $event)"
class="uk-dropdown uk-display-block uk-margin-small-top uk-width-auto" uk-dropdown="mode: click">
<div class="uk-padding-small">
<quick-selections [resultTypes]="resultTypes" [quickFilter]="resultsQuickFilter"></quick-selections>
</div>
</div>
</div>
<div *ngIf="(pluginObject.fos && isRouteEnabled('/fields-of-science')) || (pluginObject.sdgs && isRouteEnabled('/sdgs'))" class="uk-padding-small uk-margin-small-top">
<div class="uk-text-meta">
Try browsing by:
</div>
<div class="link-actions uk-flex uk-flex-column uk-flex-top uk-margin-small-top">
<a *ngIf="pluginObject.sdgs && isRouteEnabled('/sdgs')" class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text uk-margin-small-bottom"
routerLinkActive="router-link-active" routerLink="/sdgs">
<span class="uk-flex uk-flex-middle">
<img src="assets/common-assets/sdg/sdg-dot-img.svg" alt="SDGs logo" loading="lazy" width="17px" height="17px">
<span class="uk-margin-small-left">Sustainable Development Goals (SDG<span
class="uk-text-lowercase">s</span>)</span>
</span>
</a>
<a *ngIf="pluginObject.fos&& isRouteEnabled('/fields-of-science') " class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text"
routerLinkActive="router-link-active" routerLink="/fields-of-science">
<span class="uk-flex uk-flex-middle">
<img src="assets/common-assets/fos/fos-icon.svg" alt="FOS logo" loading="lazy" width="17px" height="8px">
<span class="uk-margin-small-left">Fields of Science (FoS)</span>
</span>
</a>
</div>
</div>
</div>
</div> </div>
<div *ngIf="!community " class="uk-text-muted uk-text-center"> </div>
No community info available available <div>
</div> <div class="plugin-gateway-information uk-border-rounded uk-padding uk-margin-medium-bottom">
<ng-container *ngIf="community"> <img class="plugin-background" src="assets/common-assets/connect_image_faded.png">
<div *ngIf="isRouteEnabled('/curators') && isVisible('curators')" class="uk-text-small uk-margin-xsmall-bottom"> <div class="plugin-content">
<curators [longView]="false"></curators> <div class="uk-text-lead uk-text-large uk-text-bold uk-margin-bottom">
</div> {{ pluginObject.title}}
<div *ngIf="community.date && isVisible('date')" class="uk-text-small"> </div>
<span>Created: </span> {{community.date | date:'dd-MMM-yyyy'}}
</div> <ng-container *ngIf="community">
<div class="uk-grid uk-grid-large uk-grid-stack uk-margin-top" uk-grid uk-height-match=".info-number"> <div *ngIf="isRouteEnabled('/curators') && isVisible('curators')"
<div> class="uk-text-small uk-margin-xsmall-bottom">
<div *ngIf="projectTotal && projectTotal > 0 && isEntityEnabled('project') <curators [longView]="false"></curators>
</div>
<div *ngIf="community.date && isVisible('date')" class="uk-text-small">
<span>Created: </span> {{community.date | date:'dd-MMM-yyyy'}}
</div>
<div class="uk-grid uk-grid-large uk-grid-stack uk-margin-top" uk-grid uk-height-match=".info-number">
<div>
<div *ngIf="projectTotal && projectTotal > 0 && isEntityEnabled('project')
&& isRouteEnabled(searchLinkToProjects) && isVisible('projects')" && isRouteEnabled(searchLinkToProjects) && isVisible('projects')"
class="uk-flex uk-flex-column uk-margin-bottom info-number"> class="uk-flex uk-flex-column uk-margin-bottom info-number">
<a class="uk-h5 uk-margin-remove" [queryParams]=params <a class="uk-h5 uk-margin-remove" [queryParams]=params
routerLinkActive="router-link-active" routerLinkActive="router-link-active"
[routerLink]="searchLinkToProjects"> [routerLink]="searchLinkToProjects">
{{projectTotal|number}} {{projectTotal|number}}
</a> </a>
<span class="uk-flex uk-flex-middle uk-text-small"> <span class="uk-flex uk-flex-middle uk-text-small">
Projects Projects
<a *ngIf="projectsCalculated && (projectTotal && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects))" <a *ngIf="projectsCalculated && (projectTotal && projectTotal > 0 && isEntityEnabled('project') && isRouteEnabled(searchLinkToProjects))"
[title]="buildProjectsTooltip()" [title]="buildProjectsTooltip()"
[attr.uk-tooltip]="'pos: bottom-right; delay: 10;'" [attr.uk-tooltip]="'pos: bottom-right; delay: 10;'"
class="uk-link-reset uk-margin-xsmall-left"> class="uk-link-reset uk-margin-xsmall-left">
<icon [name]="'help_outline'" [type]="'outlined'" [ratio]="0.8" [flex]="true" [customClass]="'uk-text-muted'"></icon> <icon [name]="'help_outline'" [type]="'outlined'" [ratio]="0.8" [flex]="true"
[customClass]="'uk-text-muted'"></icon>
</a> </a>
</span> </span>
</div> </div>
<div *ngIf="contentProviderTotal && contentProviderTotal > 0 && isEntityEnabled('datasource') && <div *ngIf="contentProviderTotal && contentProviderTotal > 0 && isEntityEnabled('datasource') &&
isRouteEnabled(searchLinkToDataProviders) && isVisible('datasources')" isRouteEnabled(searchLinkToDataProviders) && isVisible('datasources')"
class="uk-flex uk-flex-column info-number"> class="uk-flex uk-flex-column info-number">
<a class="uk-h5 uk-margin-remove" [queryParams]=params <a class="uk-h5 uk-margin-remove" [queryParams]=params
routerLinkActive="router-link-active" routerLinkActive="router-link-active"
[routerLink]="searchLinkToDataProviders"> [routerLink]="searchLinkToDataProviders">
{{contentProviderTotal|number}} {{contentProviderTotal|number}}
</a> </a>
<span class="uk-flex uk-flex-middle uk-text-small"> <span class="uk-flex uk-flex-middle uk-text-small">
Content Providers Content Providers
<a *ngIf="contentProvidersCalculated && (contentProviderTotal && contentProviderTotal > 0 && isEntityEnabled('datasource') && isRouteEnabled(searchLinkToDataProviders))" <a *ngIf="contentProvidersCalculated && (contentProviderTotal && contentProviderTotal > 0 && isEntityEnabled('datasource') && isRouteEnabled(searchLinkToDataProviders))"
[title]="buildContentProvidersTooltip()" [title]="buildContentProvidersTooltip()"
[attr.uk-tooltip]="'pos: bottom-right; delay: 10;'" [attr.uk-tooltip]="'pos: bottom-right; delay: 10;'"
class="uk-link-reset uk-margin-xsmall-left"> class="uk-link-reset uk-margin-xsmall-left">
<icon [name]="'help_outline'" [type]="'outlined'" [ratio]="0.8" [flex]="true" [customClass]="'uk-text-muted'"></icon> <icon [name]="'help_outline'" [type]="'outlined'" [ratio]="0.8" [flex]="true"
[customClass]="'uk-text-muted'"></icon>
</a> </a>
</span> </span>
</div> </div>
</div> </div>
<div> <div>
<div *ngIf="(zenodoCommunityIdS.length + ((masterZenodoCommunity) ? 1 : 0) > 0) && isRouteEnabled(shareInZenodoPage) <div *ngIf="(zenodoCommunityIdS.length + ((masterZenodoCommunity) ? 1 : 0) > 0) && isRouteEnabled(shareInZenodoPage)
&& isVisible('communities')" && isVisible('communities')"
class="uk-flex uk-flex-column uk-margin-bottom info-number"> class="uk-flex uk-flex-column uk-margin-bottom info-number">
<a class="uk-h5 uk-margin-remove" [queryParams]=params <a class="uk-h5 uk-margin-remove" [queryParams]=params
routerLinkActive="router-link-active" [routerLink]="shareInZenodoPage"> routerLinkActive="router-link-active" [routerLink]="shareInZenodoPage">
{{zenodoCommunityIdS.length + ((masterZenodoCommunity) ? 1 : 0)}} {{zenodoCommunityIdS.length + ((masterZenodoCommunity) ? 1 : 0)}}
</a> </a>
<span class="uk-flex uk-flex-middle uk-text-small"> <span class="uk-flex uk-flex-middle uk-text-small">
Linked Zenodo Communities Linked Zenodo Communities
<a [title]="buildZenodoCommunitiesTooltip()" <a [title]="buildZenodoCommunitiesTooltip()"
[attr.uk-tooltip]="'pos: bottom-right; delay: 10;'" [attr.uk-tooltip]="'pos: bottom-right; delay: 10;'"
class="uk-link-reset uk-margin-xsmall-left"> class="uk-link-reset uk-margin-xsmall-left">
<icon [name]="'help_outline'" [type]="'outlined'" [ratio]="0.8" [flex]="true" [customClass]="'uk-text-muted'"></icon> <icon [name]="'help_outline'" [type]="'outlined'" [ratio]="0.8" [flex]="true"
[customClass]="'uk-text-muted'"></icon>
</a> </a>
</span> </span>
</div> </div>
<div *ngIf="isRouteEnabled('/subjects') && displayedAllSubjects && displayedAllSubjects.length > 0 && isVisible('subjects')" <div
class="uk-flex uk-flex-column uk-margin-bottom info-number"> *ngIf="isRouteEnabled('/subjects') && displayedAllSubjects && displayedAllSubjects.length > 0 && isVisible('subjects')"
<a class="uk-h5 uk-margin-remove" class="uk-flex uk-flex-column uk-margin-bottom info-number">
routerLinkActive="router-link-active" [routerLink]="'/subjects'"> <a class="uk-h5 uk-margin-remove"
{{displayedAllSubjects.length}} routerLinkActive="router-link-active" [routerLink]="'/subjects'">
</a> {{displayedAllSubjects.length}}
<span class="uk-text-small"> </a>
<span class="uk-text-small">
Subjects Subjects
</span> </span>
</div> </div>
</div>
</div>
</ng-container>
</div> </div>
</div>
</ng-container>
</div>
</div> </div>
<div *ngIf="community" class="plugin2 uk-flex uk-flex-middle uk-flex-wrap" style="grid-gap: 30px;"> <div *ngIf="community" class="plugin2 uk-flex uk-flex-middle uk-flex-wrap" style="grid-gap: 30px;">
<div class="uk-flex uk-flex-middle" *ngIf="resultCounts && resultCounts.publications > 0 && isEntityEnabled('publication') <div class="uk-flex uk-flex-middle" *ngIf="resultCounts && resultCounts.publications > 0 && isEntityEnabled('publication')
&& isRouteEnabled(searchLinkToResults) && && isRouteEnabled(searchLinkToResults) &&
isVisible('publications')"> isVisible('publications')">
<icon [name]="'description'" [type]="'outlined'" [ratio]="2" [flex]="true" [customClass]="'uk-margin-small-right uk-text-secondary'"></icon> <icon [name]="'description'" [type]="'outlined'" [ratio]="2" [flex]="true"
<a [queryParams]="getParamsForSearchLink('publications')" [routerLink]="properties.searchLinkToAdvancedResults" class="uk-link-reset uk-flex uk-flex-column"> [customClass]="'uk-margin-small-right uk-text-secondary'"></icon>
<a [queryParams]="getParamsForSearchLink('publications')" [routerLink]="properties.searchLinkToAdvancedResults"
class="uk-link-reset uk-flex uk-flex-column">
<span class="uk-text-xsmall"> <span class="uk-text-xsmall">
{{openaireEntities.PUBLICATIONS}} {{openaireEntities.PUBLICATIONS}}
</span> </span>
<span *ngIf="resultCounts" class="uk-h6 uk-margin-remove" [innerHTML]="resultCounts.publications | numberRound: 1:1"> <span *ngIf="resultCounts" class="uk-h6 uk-margin-remove"
[innerHTML]="resultCounts.publications | numberRound: 1:1">
</span> </span>
</a> </a>
</div> </div>
<div class="uk-flex uk-flex-middle" *ngIf="resultCounts && resultCounts.datasets > 0 && isEntityEnabled('dataset') <div class="uk-flex uk-flex-middle" *ngIf="resultCounts && resultCounts.datasets > 0 && isEntityEnabled('dataset')
&& isRouteEnabled(searchLinkToResults) && && isRouteEnabled(searchLinkToResults) &&
isVisible('datasets')"> isVisible('datasets')">
<icon [name]="'database'" [type]="'outlined'" [ratio]="2" [flex]="true" [customClass]="'uk-margin-small-right uk-text-secondary'"></icon> <icon [name]="'database'" [type]="'outlined'" [ratio]="2" [flex]="true"
<a [queryParams]="getParamsForSearchLink('datasets')" [routerLink]="properties.searchLinkToAdvancedResults" class="uk-link-reset uk-flex uk-flex-column"> [customClass]="'uk-margin-small-right uk-text-secondary'"></icon>
<a [queryParams]="getParamsForSearchLink('datasets')" [routerLink]="properties.searchLinkToAdvancedResults"
class="uk-link-reset uk-flex uk-flex-column">
<span class="uk-text-xsmall"> <span class="uk-text-xsmall">
{{openaireEntities.DATASETS}} {{openaireEntities.DATASETS}}
</span> </span>
<span *ngIf="resultCounts" class="uk-h6 uk-margin-remove" [innerHTML]="resultCounts.datasets | numberRound: 1:1"> <span *ngIf="resultCounts" class="uk-h6 uk-margin-remove"
[innerHTML]="resultCounts.datasets | numberRound: 1:1">
</span> </span>
</a> </a>
</div> </div>
<!--<div class="uk-flex uk-flex-middle" *ngIf="resultCounts && resultCounts.datasets > 0 && isEntityEnabled('dataset') <!--<div class="uk-flex uk-flex-middle" *ngIf="resultCounts && resultCounts.datasets > 0 && isEntityEnabled('dataset')
&& isRouteEnabled(searchLinkToResults) && && isRouteEnabled(searchLinkToResults) &&
isVisible('datasets')"> isVisible('datasets')">
<icon [name]="'database'" [type]="'outlined'" [ratio]="2" [flex]="true" [customClass]="'uk-margin-small-right uk-text-secondary'"></icon> <icon [name]="'database'" [type]="'outlined'" [ratio]="2" [flex]="true" [customClass]="'uk-margin-small-right uk-text-secondary'"></icon>
<a [queryParams]="getParamsForSearchLink('datasets')" [routerLink]="properties.searchLinkToAdvancedResults" class="uk-link-reset uk-flex uk-flex-column"> <a [queryParams]="getParamsForSearchLink('datasets')" [routerLink]="properties.searchLinkToAdvancedResults" class="uk-link-reset uk-flex uk-flex-column">
<span class="uk-text-xsmall"> <span class="uk-text-xsmall">
{{openaireEntities.DATASETS}} {{openaireEntities.DATASETS}}
</span> </span>
<span *ngIf="resultCounts" class="uk-h6 uk-margin-remove" [innerHTML]="resultCounts.datasets | numberRound: 1:1"> <span *ngIf="resultCounts" class="uk-h6 uk-margin-remove" [innerHTML]="resultCounts.datasets | numberRound: 1:1">
</span> </span>
</a> </a>
</div>--> </div>-->
<div class="uk-flex uk-flex-middle" *ngIf="resultCounts && resultCounts.software > 0 && isEntityEnabled('software') <div class="uk-flex uk-flex-middle" *ngIf="resultCounts && resultCounts.software > 0 && isEntityEnabled('software')
&& isRouteEnabled(searchLinkToResults) && && isRouteEnabled(searchLinkToResults) &&
isVisible('software')"> isVisible('software')">
<icon [name]="'integration_instructions'" [type]="'outlined'" [ratio]="2" [flex]="true" [customClass]="'uk-margin-small-right uk-text-secondary'"></icon> <icon [name]="'integration_instructions'" [type]="'outlined'" [ratio]="2" [flex]="true"
<a [queryParams]="getParamsForSearchLink('software')" [routerLink]="properties.searchLinkToAdvancedResults" class="uk-link-reset uk-flex uk-flex-column"> [customClass]="'uk-margin-small-right uk-text-secondary'"></icon>
<a [queryParams]="getParamsForSearchLink('software')" [routerLink]="properties.searchLinkToAdvancedResults"
class="uk-link-reset uk-flex uk-flex-column">
<span class="uk-text-xsmall"> <span class="uk-text-xsmall">
{{openaireEntities.SOFTWARE}} {{openaireEntities.SOFTWARE}}
</span> </span>
<span *ngIf="resultCounts" class="uk-h6 uk-margin-remove" [innerHTML]="resultCounts.software | numberRound: 1:1"> <span *ngIf="resultCounts" class="uk-h6 uk-margin-remove"
[innerHTML]="resultCounts.software | numberRound: 1:1">
</span> </span>
</a> </a>
</div> </div>
<div class="uk-flex uk-flex-middle" *ngIf="resultCounts && resultCounts.other > 0 && isEntityEnabled('orp') <div class="uk-flex uk-flex-middle" *ngIf="resultCounts && resultCounts.other > 0 && isEntityEnabled('orp')
&& isRouteEnabled(searchLinkToResults) && && isRouteEnabled(searchLinkToResults) &&
isVisible('other')"> isVisible('other')">
<icon [name]="'integration_instructions'" [type]="'outlined'" [ratio]="2" [flex]="true" [customClass]="'uk-margin-small-right uk-text-secondary'"></icon> <icon [name]="'integration_instructions'" [type]="'outlined'" [ratio]="2" [flex]="true"
<a [queryParams]="getParamsForSearchLink('other')" [routerLink]="properties.searchLinkToAdvancedResults" class="uk-link-reset uk-flex uk-flex-column"> [customClass]="'uk-margin-small-right uk-text-secondary'"></icon>
<a [queryParams]="getParamsForSearchLink('other')" [routerLink]="properties.searchLinkToAdvancedResults"
class="uk-link-reset uk-flex uk-flex-column">
<span class="uk-text-xsmall"> <span class="uk-text-xsmall">
{{openaireEntities.OTHER}} {{openaireEntities.OTHER}}
</span> </span>
<span *ngIf="resultCounts" class="uk-h6 uk-margin-remove" [innerHTML]="resultCounts.other | numberRound: 1:1"> <span *ngIf="resultCounts" class="uk-h6 uk-margin-remove" [innerHTML]="resultCounts.other | numberRound: 1:1">
</span> </span>
</a> </a>
</div>
</div>
</div> </div>
</div> </div>

View File

@ -1,17 +1,24 @@
import {Component} from '@angular/core'; import {ChangeDetectorRef, Component} from '@angular/core';
import {PluginBaseComponent, PluginBaseInfo} from "../../utils/base-plugin.component"; import {PluginBaseComponent, PluginBaseInfo} from "../../utils/base-plugin.component";
import {ConfigurationService} from '../../../../../openaireLibrary/utils/configuration/configuration.service'; import {ConfigurationService} from '../../../../../openaireLibrary/utils/configuration/configuration.service';
import {CommunityService} from '../../../../../openaireLibrary/connect/community/community.service'; import {CommunityService} from '../../../../../openaireLibrary/connect/community/community.service';
import {SearchCommunityProjectsService} from '../../../../../openaireLibrary/connect/projects/searchProjects.service'; import {SearchCommunityProjectsService} from '../../../../../openaireLibrary/connect/projects/searchProjects.service';
import {SearchCommunityDataprovidersService} from '../../../../../openaireLibrary/connect/contentProviders/searchDataproviders.service'; import {SearchCommunityDataprovidersService} from '../../../../../openaireLibrary/connect/contentProviders/searchDataproviders.service';
import {ZenodoCommunitiesService} from '../../../../../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service'; import {ZenodoCommunitiesService} from '../../../../../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service';
import {ConnectHelper} from '../../../../../openaireLibrary/connect/connectHelper';
import {User} from '../../../../../openaireLibrary/login/utils/helper.class'; import {User} from '../../../../../openaireLibrary/login/utils/helper.class';
import {RouterHelper} from "../../../../utils/routerHelper.class"; import {RouterHelper} from "../../../../utils/routerHelper.class";
import {OpenaireEntities} from "../../../../utils/properties/searchFields"; import {OpenaireEntities} from "../../../../utils/properties/searchFields";
import {HttpClient} from "@angular/common/http"; import {HttpClient} from "@angular/common/http";
import {Filter} from "../../../../searchPages/searchUtils/searchHelperClasses.class";
import {Router} from "@angular/router";
export class PluginGatewayInformation extends PluginBaseInfo{ export class PluginGatewayInformation extends PluginBaseInfo{
showTitle:boolean = true;
showShortTitle:boolean = false;
description:boolean = false;
sdgs:boolean = false;
fos:boolean = false;
searchbar:boolean = false;
title:string ="Gateway Information"; title:string ="Gateway Information";
curators:boolean = true; curators:boolean = true;
date:boolean = true; date:boolean = true;
@ -56,14 +63,39 @@ export class PluginGatewayInformationComponent extends PluginBaseComponent<Plugi
searchLinkToResults: string = null; searchLinkToResults: string = null;
public routerHelper: RouterHelper = new RouterHelper(); public routerHelper: RouterHelper = new RouterHelper();
openaireEntities= OpenaireEntities; openaireEntities= OpenaireEntities;
selectedEntity = 'result';
selectedEntitySimpleUrl;
selectedEntityAdvancedUrl;
resultTypes: Filter = {
values: [],
filterId: "type",
countSelectedValues: 0,
filterType: 'checkbox',
originalFilterId: "",
valueIsExact: true,
title: "Type",
filterOperator: "or"
};
keyword: string = "";
// customFilter;
placeholderText = "Search by title, author, abstract, DOI, orcid... ";
resultsQuickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = {
filter: null,
selected: true,
filterId: "resultbestaccessright",
value: "Open Access"
};
disableSelect: boolean = true;
constructor(private http:HttpClient, constructor(private http:HttpClient,
private config: ConfigurationService, private config: ConfigurationService,
private communityService: CommunityService, private communityService: CommunityService,
private searchCommunityProjectsService: SearchCommunityProjectsService, private searchCommunityProjectsService: SearchCommunityProjectsService,
private searchCommunityDataprovidersService: SearchCommunityDataprovidersService, private searchCommunityDataprovidersService: SearchCommunityDataprovidersService,
private zenodoCommunitiesService: ZenodoCommunitiesService) { private zenodoCommunitiesService: ZenodoCommunitiesService, private _router: Router,
private cdr: ChangeDetectorRef) {
super(); super();
// console.log(this.default, this.pluginObject, this.pluginDefaultObject)
this.searchLinkToResults = this.properties.searchLinkToResults; this.searchLinkToResults = this.properties.searchLinkToResults;
this.searchLinkToProjects = this.properties.searchLinkToProjects; this.searchLinkToProjects = this.properties.searchLinkToProjects;
this.searchLinkToDataProviders = this.properties.searchLinkToDataProviders; this.searchLinkToDataProviders = this.properties.searchLinkToDataProviders;
@ -192,4 +224,45 @@ export class PluginGatewayInformationComponent extends PluginBaseComponent<Plugi
return {}; return {};
} }
} }
entityChanged($event) {
this.selectedEntity = $event.entity;
this.selectedEntitySimpleUrl = $event.simpleUrl;
this.selectedEntityAdvancedUrl = $event.advancedUrl;
if (this.selectedEntity == 'result') {
this.placeholderText = "Search by title, author, abstract, DOI, orcid... ";
} else if (this.selectedEntity == 'project') {
this.placeholderText = "Search by project title, grant id, funder...";
} else if (this.selectedEntity == 'dataprovider') {
this.placeholderText = "Search by name...";
} else {
this.placeholderText = "Search community content";
}
}
goTo(simple: boolean) {
let url = (simple) ? this.selectedEntitySimpleUrl : this.selectedEntityAdvancedUrl;
let parameterNames = [];
let parameterValues = [];
if (this.selectedEntity == "result" && this.resultsQuickFilter && this.resultsQuickFilter.selected) {
parameterNames.push(this.resultsQuickFilter.filterId);
parameterValues.push('"'+ encodeURIComponent(this.resultsQuickFilter.value)+'"');
}
if (this.keyword.length > 0) {
parameterNames.push("fv0");
parameterValues.push(this.keyword);
parameterNames.push("f0");
parameterValues.push("q");
}
this._router.navigate([url], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)});
}
disableSelectChange(event: boolean) {
this.disableSelect = event;
this.cdr.detectChanges();
}
} }

View File

@ -16,6 +16,30 @@ import {PluginBaseFormComponent} from "../../utils/base-plugin.form.component";
Community info Community info
</div> </div>
<div class="uk-grid uk-child-width-1-1 uk-text-small uk-hr "> <div class="uk-grid uk-child-width-1-1 uk-text-small uk-hr ">
<div class="uk-margin-xsmall-bottom uk-margin-xsmall-top">
<plugin-field-edit [value]=" pluginObject.showTitle"
type="checkbox" field="showTitle" (editClicked)="pluginEditEvent = $event"
(changed)="valueChanged($event)">
</plugin-field-edit> Title
</div>
<div class="uk-margin-xsmall-bottom uk-margin-xsmall-top">
<plugin-field-edit [value]=" pluginObject.showShortTitle"
type="checkbox" field="showShortTitle" (editClicked)="pluginEditEvent = $event"
(changed)="valueChanged($event)">
</plugin-field-edit> Short title
</div>
<div class="uk-margin-xsmall-bottom uk-margin-xsmall-top">
<plugin-field-edit [value]=" pluginObject.description"
type="checkbox" field="description" (editClicked)="pluginEditEvent = $event"
(changed)="valueChanged($event)">
</plugin-field-edit> Description
</div>
<div class="uk-margin-xsmall-bottom uk-margin-xsmall-top"> <div class="uk-margin-xsmall-bottom uk-margin-xsmall-top">
<plugin-field-edit [value]=" pluginObject.curators" <plugin-field-edit [value]=" pluginObject.curators"
type="checkbox" field="curators" (editClicked)="pluginEditEvent = $event" type="checkbox" field="curators" (editClicked)="pluginEditEvent = $event"
@ -68,7 +92,27 @@ import {PluginBaseFormComponent} from "../../utils/base-plugin.form.component";
Pages & menus Pages & menus
</div> </div>
<div class="uk-margin-xsmall-bottom uk-hr uk-margin-xsmall-top"> <div class="uk-margin-xsmall-bottom uk-hr uk-margin-xsmall-top">
<plugin-field-edit [value]=" pluginObject.searchbar"
type="checkbox" field="searchbar" (editClicked)="pluginEditEvent = $event"
(changed)="valueChanged($event)">
</plugin-field-edit>
Search bar
</div>
<div class="uk-margin-xsmall-bottom">
<plugin-field-edit [value]=" pluginObject.fos"
type="checkbox" field="fos" (editClicked)="pluginEditEvent = $event"
(changed)="valueChanged($event)">
</plugin-field-edit>
Browse by FOS
</div>
<div class="uk-margin-xsmall-bottom">
<plugin-field-edit [value]=" pluginObject.sdgs"
type="checkbox" field="sdgs" (editClicked)="pluginEditEvent = $event"
(changed)="valueChanged($event)">
</plugin-field-edit>
Browse by SDGs
</div>
<div class="uk-margin-xsmall-bottom">
<plugin-field-edit [value]=" pluginObject.publications" <plugin-field-edit [value]=" pluginObject.publications"
type="checkbox" field="publications" (editClicked)="pluginEditEvent = $event" type="checkbox" field="publications" (editClicked)="pluginEditEvent = $event"
(changed)="valueChanged($event)"> (changed)="valueChanged($event)">
@ -109,8 +153,6 @@ import {PluginBaseFormComponent} from "../../utils/base-plugin.form.component";
}) })
export class PluginGatewayInformationFormComponent extends PluginBaseFormComponent<PluginGatewayInformation> { export class PluginGatewayInformationFormComponent extends PluginBaseFormComponent<PluginGatewayInformation> {
default = new PluginGatewayInformation();
selectedIndex = null;
openaireEntities= OpenaireEntities; openaireEntities= OpenaireEntities;
constructor() { constructor() {
super() super()

View File

@ -13,11 +13,15 @@ import {CuratorsModule} from '../../../../connect/components/curators/curators.m
import {SearchCommunityProjectsService} from '../../../../../openaireLibrary/connect/projects/searchProjects.service'; import {SearchCommunityProjectsService} from '../../../../../openaireLibrary/connect/projects/searchProjects.service';
import {SearchCommunityDataprovidersService} from '../../../../../openaireLibrary/connect/contentProviders/searchDataproviders.service'; import {SearchCommunityDataprovidersService} from '../../../../../openaireLibrary/connect/contentProviders/searchDataproviders.service';
import {ZenodoCommunitiesService} from '../../../../../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service'; import {ZenodoCommunitiesService} from '../../../../../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service';
import {AdvancedSearchInputModule} from "../../../../sharedComponents/advanced-search-input/advanced-search-input.module";
import {EntitiesSelectionModule} from "../../../../searchPages/searchUtils/entitiesSelection.module";
import {QuickSelectionsModule} from "../../../../searchPages/searchUtils/quick-selections.module";
import {InputModule} from "../../../../sharedComponents/input/input.module";
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, RouterModule, FormsModule, IconsModule, NumberRoundModule, SearchResearchResultsServiceModule, PluginFieldEditModule, CommonModule, RouterModule, FormsModule, IconsModule, NumberRoundModule, SearchResearchResultsServiceModule, PluginFieldEditModule,
CuratorsModule CuratorsModule, AdvancedSearchInputModule, EntitiesSelectionModule, QuickSelectionsModule, InputModule
], ],
providers: [ providers: [
PluginsService, SearchCommunityProjectsService, SearchCommunityDataprovidersService, ZenodoCommunitiesService PluginsService, SearchCommunityProjectsService, SearchCommunityDataprovidersService, ZenodoCommunitiesService

View File

@ -1,10 +1,10 @@
import {Component} from '@angular/core'; import {Component, SimpleChanges} from '@angular/core';
import {PluginBaseComponent, PluginBaseInfo} from "../../utils/base-plugin.component"; import {PluginBaseComponent, PluginBaseInfo} from "../../utils/base-plugin.component";
import {HttpClient} from "@angular/common/http"; import {HttpClient} from "@angular/common/http";
export class PluginOpenAIREProducts extends PluginBaseInfo{ export class PluginOpenAIREProducts extends PluginBaseInfo{
title:string ="OpenAIRE services for your community"; title:string ="OpenAIRE services for your community";
serviceIdsArray = ["zenodo","graph","explore"]; serviceIdsArray = ["argos","zenodo","amnesia"];
compare(oldObject): any { compare(oldObject): any {
return super.compare(oldObject); return super.compare(oldObject);
} }
@ -14,10 +14,12 @@ export class PluginOpenAIREProducts extends PluginBaseInfo{
template: ` template: `
<div *ngIf="pluginObject"> <div *ngIf="pluginObject">
<h3>{{pluginObject.title}} </h3> <h3>{{pluginObject.title}} </h3>
<div class="uk-child-width-1-3 uk-grid">
<ng-container *ngFor="let service of services"> <div *ngIf="services" uk-slider class="uk-slider">
<div *ngIf="pluginObject && pluginObject.serviceIdsArray.indexOf(service.id)!=-1" class="uk-padding-xsmall"> <ul *ngIf="slides" class="uk-slider-items" uk-height-match="target: .uk-card; row: false">
<li *ngFor="let slide of [].constructor(slides); let i=index" class="uk-width-1-1 uk-padding">
<div class="uk-grid uk-child-width-1-3@m uk-child-width-1-1" uk-grid uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-fade; repeat: true">
<div *ngFor="let service of servicesToShow.slice((i)*slideItems,(i+1)*slideItems)" uk-scrollspy-class>
<div class="uk-card uk-card-default "> <div class="uk-card uk-card-default ">
<div class="uk-card-media-top"> <div class="uk-card-media-top">
<img [src]="service.logo" width="100%" height="" alt="" class="uk-height-max-small"> <img [src]="service.logo" width="100%" height="" alt="" class="uk-height-max-small">
@ -30,8 +32,12 @@ export class PluginOpenAIREProducts extends PluginBaseInfo{
</div> </div>
</div> </div>
</div> </div>
</ng-container>
</div> </div>
</li>
</ul>
<ul class="uk-slider-nav uk-dotnav uk-flex-center uk-margin-medium-top"></ul>
</div>
</div> </div>
`, `,
@ -39,18 +45,42 @@ export class PluginOpenAIREProducts extends PluginBaseInfo{
}) })
export class PluginOpenaireProductsComponent extends PluginBaseComponent<PluginOpenAIREProducts>{ export class PluginOpenaireProductsComponent extends PluginBaseComponent<PluginOpenAIREProducts>{
services = []; services = null;
excludedServiceIds = ["openaire_login","research_community_dashboard"] excludedServiceIds = ["openaire_login","research_community_dashboard"]
default = new PluginOpenAIREProducts(); servicesToShow = [];
constructor(http:HttpClient) { slides = 1;
slideItems = 3;
constructor(private http:HttpClient) {
super() super()
this.subscriptions.push(http.get("https://explore.openaire.eu/cache/get?url="+ encodeURIComponent("https://catalogue.openaire.eu/api/catalogue-resources?from=0&quantity=100&order=asc&orderField=name")).subscribe(res =>{ }
this.services = res["results"].map( x=> { ngOnInit(): void {
x.id = x.id.split("openaire.")[1] super.ngOnInit();
return x; if(!this.services) {
}); this.subscriptions.push(this.http.get("https://explore.openaire.eu/cache/get?url="+ encodeURIComponent("https://catalogue.openaire.eu/api/catalogue-resources?from=0&quantity=100&order=asc&orderField=name")).subscribe(res =>{
this.services = this.services.filter(x=> this.excludedServiceIds.indexOf(x.id) ==-1); this.services = res["results"].map( x=> {
})) x.id = x.id.split("openaire.")[1]
return x;
});
this.services = this.services.filter(x=> this.excludedServiceIds.indexOf(x.id) ==-1);
this.calculatePages();
}))
}else{
this.calculatePages();
}
}
ngOnChanges(changes: SimpleChanges) {
if(this.services) {
this.calculatePages();
}
}
calculatePages(){
this.servicesToShow = this.services.filter(x => this.pluginObject.serviceIdsArray.indexOf(x.id) != -1);
if (this.servicesToShow.length > this.slideItems) {
this.slides = parseInt('' + (this.servicesToShow.length / this.slideItems));
if(this.slides< (this.servicesToShow.length / this.slideItems)){
this.slides++;
}
}
} }
} }

View File

@ -1,31 +1,27 @@
<div>plugin-suggested-repositories</div>
<div class="plugin-suggested-repositories uk-container uk-container-large uk-section"> <div class="plugin-suggested-repositories uk-container uk-container-large uk-section">
<div class="uk-flex uk-flex-middle uk-flex-between uk-margin-large-bottom"> <div class="uk-flex uk-flex-middle uk-flex-between uk-margin-large-bottom">
<h3 class="uk-margin-remove"> <h3 class="uk-margin-remove">
<icon [name]="'database'" [type]="'outlined'" [ratio]="3" class="uk-margin-small-right"></icon> <icon [name]="'database'" [type]="'outlined'" [ratio]="3" class="uk-margin-small-right"></icon>
Suggested repositories & journals {{pluginObject.title}}
</h3> </h3>
<a href="" class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text uk-text-default"> <a [href]="" class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text uk-text-default">
View all View all
</a> </a>
</div> </div>
<div uk-slider class="uk-slider"> <div uk-slider class="uk-slider">
<ul class="uk-slider-items" uk-height-match="target: .uk-card; row: false"> <ul *ngIf="slides" class="uk-slider-items" uk-height-match="target: .uk-card; row: false">
<li *ngFor="let slide of [].constructor(3); let i=index" class="uk-width-1-1 uk-padding"> <li *ngFor="let slide of [].constructor(slides); let i=index" class="uk-width-1-1 uk-padding">
<div class="uk-grid uk-child-width-1-2@m uk-child-width-1-1" uk-grid uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-fade; repeat: true"> <div class="uk-grid uk-child-width-1-2@m uk-child-width-1-1" uk-grid uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-fade; repeat: true">
<ng-container *ngIf="i === 0"> <div *ngFor="let item of contentProviders.slice((i)*2,(i+1)*2)" uk-scrollspy-class>
<div *ngFor="let item of [].constructor(2)" uk-scrollspy-class>
<div class="uk-card uk-card-default uk-card-body uk-card-hover"> <div class="uk-card uk-card-default uk-card-body uk-card-hover">
Card content from result-preview {{item.name}}
<hr> <hr>
<div> <div class="uk-text-small">
Lorem ipsum lorem ipsum {{item.message}}
</div>
<div>
Lorem ipsum
</div> </div>
<div class="uk-flex uk-flex-right uk-margin-small-top"> <div class="uk-flex uk-flex-right uk-margin-small-top">
<a href="" class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text"> <a [href]="properties.connectPortalUrl + properties.searchLinkToDataProvider + item.openaireId " class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text" target="_blank">
<span class="uk-flex uk-flex-middle"> <span class="uk-flex uk-flex-middle">
<icon [name]="'file_upload'" [type]="'outlined'" class="uk-margin-small-right"></icon> <icon [name]="'file_upload'" [type]="'outlined'" class="uk-margin-small-right"></icon>
<span>Go to repository</span> <span>Go to repository</span>
@ -34,32 +30,10 @@
</div> </div>
</div> </div>
</div> </div>
</ng-container>
<ng-container *ngIf="i !== 0">
<div *ngFor="let item of [].constructor(2)">
<div class="uk-card uk-card-default uk-card-body uk-card-hover">
Card content from result-preview
<hr>
<div>
Lorem ipsum lorem ipsum
</div>
<div>
Lorem ipsum
</div>
<div class="uk-flex uk-flex-right uk-margin-small-top">
<a href="" class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
<span class="uk-flex uk-flex-middle">
<icon [name]="'file_upload'" [type]="'outlined'" class="uk-margin-small-right"></icon>
<span>Go to repository</span>
</span>
</a>
</div>
</div>
</div>
</ng-container>
</div> </div>
</li> </li>
</ul> </ul>
<ul class="uk-slider-nav uk-dotnav uk-flex-center uk-margin-medium-top"></ul> <ul class="uk-slider-nav uk-dotnav uk-flex-center uk-margin-medium-top"></ul>
</div> </div>
</div> </div>

View File

@ -1,15 +1,56 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {PluginBaseComponent, PluginBaseInfo} from "../../utils/base-plugin.component"; import {PluginBaseComponent, PluginBaseInfo} from "../../utils/base-plugin.component";
import {SearchCommunityDataprovidersService} from "../../../../connect/contentProviders/searchDataproviders.service";
import {ConfigurationService} from "../../../../utils/configuration/configuration.service";
import {CommunityService} from "../../../../connect/community/community.service";
export class PluginSuggestedRepositories extends PluginBaseInfo{ export class PluginSuggestedRepositories extends PluginBaseInfo{
title:string ="Lorem ipsum"; title:string ="Suggested repositories & journals";
description: string = "Lorem ipsum";
} }
@Component({ @Component({
selector: 'plugin-suggested-repositories', selector: 'plugin-suggested-repositories',
templateUrl: 'plugin-suggested-repositories.component.html' templateUrl: 'plugin-suggested-repositories.component.html'
}) })
export class PluginSuggestedRepositoriesComponent extends PluginBaseComponent<PluginSuggestedRepositories>{ export class PluginSuggestedRepositoriesComponent extends PluginBaseComponent<PluginSuggestedRepositories>{
constructor() { portal;
community;
contentProviders;
slides = 0;
constructor(private searchCommunityDataprovidersService: SearchCommunityDataprovidersService,
private config: ConfigurationService,
private communityService: CommunityService) {
super() super()
this.subscriptions.push(this.config.portalAsObservable.subscribe(
res => {
this.portal = res;
},
error => {
console.log(error);
}
));
this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe(
community => {
this.community = community;
if (community) {
this.subscriptions.push(this.searchCommunityDataprovidersService.searchDataproviders(this.properties, this.community.communityId, true).subscribe(
res => {
this.slides =1;
this.contentProviders = res;
if(this.contentProviders.length > 2){
this.slides = parseInt('' + (this.contentProviders.length/2));
}
if(this.slides< (this.contentProviders.length / 2)){
this.slides++;
}
},
error => {
console.log(error);
}
));
}
}
));
} }
} }

View File

@ -0,0 +1,25 @@
import {Component} from '@angular/core';
import {PluginBaseFormComponent} from "../../utils/base-plugin.form.component";
import {PluginSuggestedRepositories} from "./plugin-suggested-repositories.component";
@Component({
selector: 'plugin-suggested-repositories-form',
template: `
<div *ngIf="pluginObject" class="uk-padding-xsmall">
<plugin-field-edit [value]="pluginObject.title"
type="text" field="title" (changed)="valueChanged($event)"></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>
</div>
`,
})
export class PluginSuggestedRepositoriesFormComponent extends PluginBaseFormComponent<PluginSuggestedRepositories> {
constructor() {
super()
}
}

View File

@ -13,8 +13,10 @@ export class PluginBaseInfo {
if(!oldObject) { if(!oldObject) {
oldObject = Object.assign(this) oldObject = Object.assign(this)
}else{ }else{
if (!oldObject['title'] ) { for (let attrKey of Object.keys(this)) {
oldObject['title'] = this.title; if (!oldObject[attrKey] && oldObject[attrKey] != false) {
oldObject[attrKey] = Object.assign(this[attrKey])
}
} }
} }
return oldObject; return oldObject;

View File

@ -1,14 +1,13 @@
import {Option} from "../../../sharedComponents/input/input.component"; import {Option} from "../../../sharedComponents/input/input.component";
import {PluginOpenAIREProducts} from "../components/openaireProducts/plugin-openaire-products.component"; import {PluginOpenAIREProducts} from "../components/openaireProducts/plugin-openaire-products.component";
import {PluginDiscoverBySubcommunity} from "../components/discover-by-subcommunity/plugin-discover-by-subcommunity.component"; import {PluginDiscoverBySubcommunity} from "../components/discover-by-subcommunity/plugin-discover-by-subcommunity.component";
import {PluginBaseInfo, PluginInfoCards, PluginURL} from "./base-plugin.component"; import {PluginBaseInfo} from "./base-plugin.component";
import {PluginGatewayInformation} from "../components/gateway-information/plugin-gateway-information.component"; import {PluginGatewayInformation} from "../components/gateway-information/plugin-gateway-information.component";
import {PluginLearnAndConnect} from "../components/learn-and-connect/plugin-learn-and-connect.component"; import {PluginLearnAndConnect} from "../components/learn-and-connect/plugin-learn-and-connect.component";
import {PluginFeaturedDatasets} from "../components/featured-datasets/plugin-featured-datasets.component"; import {PluginFeaturedDatasets} from "../components/featured-datasets/plugin-featured-datasets.component";
import {PluginHowToUse} from "../components/how-to-use/plugin-how-to-use.component"; import {PluginHowToUse} from "../components/how-to-use/plugin-how-to-use.component";
import {PluginSearchDepositLink} from "../components/search-deposit-link/plugin-search-deposit-link.component"; import {PluginSearchDepositLink} from "../components/search-deposit-link/plugin-search-deposit-link.component";
import {PluginOrganizations} from "../components/organizations/plugin-organizations.component"; import {PluginOrganizations} from "../components/organizations/plugin-organizations.component";
import {FormArray, FormGroup, Validators} from "@angular/forms";
export class PluginUtils{ export class PluginUtils{
public attrTypeOptions: Option[] = [ public attrTypeOptions: Option[] = [
@ -19,7 +18,7 @@ export class PluginUtils{
]; ];
public availablePluginCodes: Option[] = [ public availablePluginCodes: Option[] = [
{label:"OpenAIRE products", value:"penaire-products"}, {label:"OpenAIRE products", value:"openaire-products"},
{label:"Discover by subcommunity", value:"discover-by-subcommunity"}, {label:"Discover by subcommunity", value:"discover-by-subcommunity"},
{label:"Gateway information", value:"gateway-information"}, {label:"Gateway information", value:"gateway-information"},
{label:"Search/ deposit/ link", value:"search-deposit-link"}, {label:"Search/ deposit/ link", value:"search-deposit-link"},

View File

@ -26,7 +26,7 @@ import {PluginEditEvent} from "../utils/base-plugin.form.component";
<plugin-how-to-use-form [plugin]="plugin" [pluginTemplate]="pluginTemplate" [pluginObject]="pluginObject" (valuesChanged)="changed.emit($event)" [editTemplate]="editTemplate" [editSubmenuOpen]="editSubmenuOpen"></plugin-how-to-use-form> <plugin-how-to-use-form [plugin]="plugin" [pluginTemplate]="pluginTemplate" [pluginObject]="pluginObject" (valuesChanged)="changed.emit($event)" [editTemplate]="editTemplate" [editSubmenuOpen]="editSubmenuOpen"></plugin-how-to-use-form>
</ng-container> </ng-container>
<ng-container *ngIf="pluginTemplate.code == 'suggested-repositories'"> <ng-container *ngIf="pluginTemplate.code == 'suggested-repositories'">
<plugin-suggested-repositories [plugin]="plugin" [pluginTemplate]="pluginTemplate" [pluginObject]="pluginObject" (valuesChanged)="changed.emit($event)" [editTemplate]="editTemplate"></plugin-suggested-repositories> <plugin-suggested-repositories-form [plugin]="plugin" [pluginTemplate]="pluginTemplate" [pluginObject]="pluginObject" (valuesChanged)="changed.emit($event)" [editTemplate]="editTemplate"></plugin-suggested-repositories-form>
</ng-container> </ng-container>
<ng-container *ngIf="pluginTemplate.code == 'featured-datasets'"> <ng-container *ngIf="pluginTemplate.code == 'featured-datasets'">
<plugin-featured-datasets-form [plugin]="plugin" [pluginTemplate]="pluginTemplate" [pluginObject]="pluginObject" (valuesChanged)="changed.emit($event)" [editTemplate]="editTemplate"></plugin-featured-datasets-form> <plugin-featured-datasets-form [plugin]="plugin" [pluginTemplate]="pluginTemplate" [pluginObject]="pluginObject" (valuesChanged)="changed.emit($event)" [editTemplate]="editTemplate"></plugin-featured-datasets-form>

View File

@ -13,13 +13,14 @@ import {PluginSearchDepositLinkFormComponent} from "../components/search-deposit
import {PluginOrganizationsFormComponent} from "../components/organizations/plugin-organizations.form.component"; import {PluginOrganizationsFormComponent} from "../components/organizations/plugin-organizations.form.component";
import {IconsModule} from "../../../utils/icons/icons.module"; import {IconsModule} from "../../../utils/icons/icons.module";
import {PluginHowToUseFormComponent} from "../components/how-to-use/plugin-how-to-use.form.component"; import {PluginHowToUseFormComponent} from "../components/how-to-use/plugin-how-to-use.form.component";
import {PluginSuggestedRepositoriesFormComponent} from "../components/suggested-repositories/plugin-suggested-repositories.form.component";
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, RouterModule, FormsModule, PluginFieldEditModule, IconsModule CommonModule, RouterModule, FormsModule, PluginFieldEditModule, IconsModule
], ],
declarations: [PluginEditWrapperComponent, PluginOpenaireProductsFormComponent, PluginLearnAndConnectFormComponent, declarations: [PluginEditWrapperComponent, PluginOpenaireProductsFormComponent, PluginLearnAndConnectFormComponent,
PluginDiscoverBySubcommunityFormComponent, PluginDiscoverBySubcommunityFormComponent, PluginDiscoverBySubcommunityFormComponent, PluginDiscoverBySubcommunityFormComponent, PluginDiscoverBySubcommunityFormComponent, PluginDiscoverBySubcommunityFormComponent, PluginFeaturedDatasetsFormComponent, PluginGatewayInformationFormComponent, PluginSearchDepositLinkFormComponent, PluginOrganizationsFormComponent, PluginHowToUseFormComponent], PluginDiscoverBySubcommunityFormComponent, PluginDiscoverBySubcommunityFormComponent, PluginDiscoverBySubcommunityFormComponent, PluginDiscoverBySubcommunityFormComponent, PluginDiscoverBySubcommunityFormComponent, PluginDiscoverBySubcommunityFormComponent, PluginFeaturedDatasetsFormComponent, PluginGatewayInformationFormComponent, PluginSearchDepositLinkFormComponent, PluginOrganizationsFormComponent, PluginHowToUseFormComponent, PluginSuggestedRepositoriesFormComponent],
exports: [PluginEditWrapperComponent] exports: [PluginEditWrapperComponent]
}) })

View File

@ -1,3 +1,4 @@
import {Component, Input, Output, EventEmitter} from '@angular/core'; import {Component, Input, Output, EventEmitter} from '@angular/core';
import{EnvProperties} from './properties/env-properties'; import{EnvProperties} from './properties/env-properties';
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";