[Aggregator | new-theme]: [NEW] Added service entity in Menu, properties and added landing and search pages.

1. aggregators.ts: Added in PortalAggregators.disabled object, service entity & route.
2. app.component.ts: Added in menuItems "Serive" and use for menuItems entity names from OpenaireEntities.
3. app-routing.module.ts: Added routes for service landing, search and advanced search pages.
4. environments/: Added values for properties searchLinkToService, searchLinkToServices, searchLinkToAdvancedServices, errorLink
5. [NEW] Files added for services landing, search and advanced search pages: landingPages/service/, advancedSearchServices.component.ts, advancedSearchServices.module.ts, advancedSearchServices-routing.module.ts, searchServices.component.ts, searchServices.module.ts, searchServices-routing.module.ts
This commit is contained in:
Konstantina Galouni 2022-05-13 16:07:09 +03:00
parent 12d4473e54
commit bdda998127
16 changed files with 247 additions and 9 deletions

View File

@ -33,6 +33,10 @@ const routes: Routes = [
path: 'search/dataprovider',
loadChildren: () => import('./landingPages/dataProvider/libDataProvider.module').then(m => m.LibDataProviderModule), data: { showHeader: true}
},
{
path: 'search/service',
loadChildren: () => import('./landingPages/service/libService.module').then(m => m.LibServiceModule), data: { showHeader: true}
},
{
path: 'search/organization',
loadChildren: () => import('./landingPages/organization/libOrganization.module').then(m => m.LibOrganizationModule), data: { showHeader: true}
@ -53,6 +57,10 @@ const routes: Routes = [
path: 'search/find/dataproviders',
loadChildren: () => import('./searchPages/simple/searchDataProviders.module').then(m => m.LibSearchDataProvidersModule)
},
{
path: 'search/find/services',
loadChildren: () => import('./searchPages/simple/searchServices.module').then(m => m.LibSearchServicesModule)
},
{
path: 'search/find/organizations',
loadChildren: () => import('./searchPages/simple/searchOrganizations.module').then(m => m.LibSearchOrganizationsModule)
@ -69,6 +77,10 @@ const routes: Routes = [
path: 'search/advanced/dataproviders',
loadChildren: () => import('./searchPages/advanced/advancedSearchDataProviders.module').then(m => m.LibAdvancedSearchDataProvidersModule)
},
{
path: 'search/advanced/services',
loadChildren: () => import('./searchPages/advanced/advancedSearchServices.module').then(m => m.LibAdvancedSearchServicesModule)
},
{
path: 'search/advanced/projects',
loadChildren: () => import('./searchPages/advanced/advancedSearchProjects.module').then(m => m.LibAdvancedSearchProjectsModule)

View File

@ -13,6 +13,7 @@ import {Subscriber} from "rxjs";
import {DOCUMENT} from "@angular/common";
import {SmoothScroll} from "./openaireLibrary/utils/smooth-scroll";
import {ActivatedRoute, NavigationEnd, Router} from "@angular/router";
import {OpenaireEntities} from "./openaireLibrary/utils/properties/searchFields";
@Component({
selector: 'app-root',
@ -139,10 +140,11 @@ export class AppComponent {
];
let params = {};
// params[this.agg.queryFieldName] = this.agg.valueId;
this.menuItems[1].items.push(new MenuItem("", "Research outcomes", "", "/search/find/research-outcomes", false, [], ["/search/find/research-outcomes"], params));
this.menuItems[1].items.push(new MenuItem("", "Projects", "", "/search/find/projects", false, ["project"], ["/search/find/projects"], params));
this.menuItems[1].items.push(new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], params));
this.menuItems[1].items.push(new MenuItem("", "Organizations", "", "/search/find/organizations", false, ["organization"], ["/search/find/organizations"], params));
this.menuItems[1].items.push(new MenuItem("", OpenaireEntities.RESULTS, "", properties.searchLinkToResults, false, [], ["/search/find/research-outcomes"], params));
this.menuItems[1].items.push(new MenuItem("", OpenaireEntities.PROJECTS, "", properties.searchLinkToProjects, false, ["project"], ["/search/find/projects"], params));
this.menuItems[1].items.push(new MenuItem("", OpenaireEntities.DATASOURCES, "", properties.searchLinkToDataProviders, false, ["datasource"], ["/search/find/dataproviders"], params));
this.menuItems[1].items.push(new MenuItem("", OpenaireEntities.SERVICES, "", properties.searchLinkToServices, false, ["datasource"], ["/search/find/services"], params));
this.menuItems[1].items.push(new MenuItem("", OpenaireEntities.ORGANIZATIONS, "", properties.searchLinkToOrganizations, false, ["organization"], ["/search/find/organizations"], params));
}
setStyles(){

View File

@ -0,0 +1,14 @@
import { NgModule} from '@angular/core';
import { DataProviderModule } from '../../openaireLibrary/landingPages/dataProvider/dataProvider.module';
import { OpenaireServiceComponent } from './service.component';
import {ServiceRoutingModule} from './service-routing.module';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({
imports: [DataProviderModule, ServiceRoutingModule],
declarations:[OpenaireServiceComponent],
providers:[FreeGuard, PreviousRouteRecorder],
exports:[OpenaireServiceComponent]
})
export class LibServiceModule { }

View File

@ -0,0 +1,18 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { OpenaireServiceComponent } from './service.component';
import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireServiceComponent, canActivate: [FreeGuard], data: {
redirect: '/error'
},canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class ServiceRoutingModule { }

View File

@ -0,0 +1,20 @@
import {Component} from '@angular/core';
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-dataprovider',
template: `<dataprovider type="service" [piwikSiteId]="piwikSiteId"></dataprovider>`,
})
export class OpenaireServiceComponent{
piwikSiteId = properties.piwikSiteId;
constructor ( ) {
}
ngOnInit() {
}
}

View File

@ -0,0 +1,17 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireAdvancedSearchServicesComponent} from './advancedSearchServices.component';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireAdvancedSearchServicesComponent, data: {
redirect: '/error'
}, canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class AdvancedSearchServicesRoutingModule { }

View File

@ -0,0 +1,35 @@
import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {AggregatorInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFields";
import {SearchForm} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
@Component({
selector: 'openaire-advanced-search-service',
template: `
<search-dataproviders [customFilter]="customFilter" [simpleView]="false" [openaireLink]="customFilter?'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/advanced/services':null"
[piwikSiteId]="properties.piwikSiteId" [hasPrefix]="false"
type="services" entityType="service" [typeName]="openaireEntities.SERVICES"
[searchForm]="searchForm">
</search-dataproviders>
`
})
export class OpenaireAdvancedSearchServicesComponent {
customFilter: SearchCustomFilter = null;
properties: EnvProperties;
public openaireEntities = OpenaireEntities;
public searchForm: SearchForm = {class: 'search-form', dark: false};
constructor ( ) {}
ngOnInit() {
this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg: AggregatorInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);
}
}

View File

@ -0,0 +1,25 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {AdvancedSearchDataProvidersRoutingModule} from './advancedSearchDataProviders-routing.module';
import {OpenaireAdvancedSearchServicesComponent} from './advancedSearchServices.component';
import {SearchDataProvidersModule} from "../../openaireLibrary/searchPages/searchDataProviders.module";
@NgModule({
imports: [
CommonModule, FormsModule,
AdvancedSearchDataProvidersRoutingModule,
SearchDataProvidersModule
],
declarations: [
OpenaireAdvancedSearchServicesComponent
],
providers:[],
exports: [
OpenaireAdvancedSearchServicesComponent
]
})
export class LibAdvancedSearchServicesModule { }

View File

@ -0,0 +1,18 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {OpenaireSearchServicesComponent} from './searchServices.component';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: OpenaireSearchServicesComponent,data: {
redirect: '/error'
}, canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class SearchServicesRoutingModule { }

View File

@ -0,0 +1,34 @@
import {Component} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {AggregatorInfo, PortalAggregators} from "../../utils/aggregators";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFields";
import {SearchForm} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
@Component({
selector: 'openaire-search-services',
template: `
<search-dataproviders [customFilter]="customFilter" [openaireLink]="customFilter?'https://'+(properties.environment != 'production'?'beta.':'')+'explore.openaire.eu/search/find/services':null"
[piwikSiteId]="properties.piwikSiteId" [hasPrefix]="false"
type="services" entityType="service" [typeName]="openaireEntities.SERVICES"
[searchForm]="searchForm">
</search-dataproviders>
`
})
export class OpenaireSearchServicesComponent {
customFilter: SearchCustomFilter = null;
properties: EnvProperties;
public openaireEntities = OpenaireEntities;
public searchForm: SearchForm = {class: 'search-form', dark: false};
constructor ( ) {}
ngOnInit() {
this.properties = properties;
let id = ConnectHelper.getCommunityFromDomain(properties.domain);
let agg: AggregatorInfo = PortalAggregators.getFilterInfoByMenuId(id);
this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg);
}
}

View File

@ -0,0 +1,23 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {SearchServicesRoutingModule} from './searchServices-routing.module';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {SearchDataProvidersModule} from "../../openaireLibrary/searchPages/searchDataProviders.module";
import {OpenaireSearchServicesComponent} from "./searchServices.component";
@NgModule({
imports: [
CommonModule, FormsModule,
SearchDataProvidersModule, SearchServicesRoutingModule
],
declarations: [
OpenaireSearchServicesComponent
],
providers:[PreviousRouteRecorder],
exports: [
OpenaireSearchServicesComponent
]
})
export class LibSearchServicesModule { }

View File

@ -185,9 +185,9 @@ border-bottom:1px solid #ced4da;
];
static disabled = {
"canada": {pages: [], entities: ["software"]},
"italy": {pages: [], entities: []},
"greece": {pages: [], entities: []},
"canada": {pages: ["/search/find/services"], entities: ["software", "service"]},
"italy": {pages: ["/search/find/services"], entities: ["service"]},
"greece": {pages: ["/search/find/services"], entities: ["service"]},
"eosc": {pages: ["/participate/deposit/search", "/participate/deposit/learn-how","/participate/claim", "/participate/direct-claim", "/myclaims","/claims", "/develop"]
, entities: []}
};

View File

@ -77,6 +77,7 @@ export let properties: EnvProperties = {
searchLinkToPublication: "/search/publication?articleId=",
searchLinkToProject: "/search/project?projectId=",
searchLinkToDataProvider: "/search/dataprovider?datasourceId=",
searchLinkToService: "/search/service?serviceId=",
searchLinkToDataset: "/search/dataset?datasetId=",
searchLinkToSoftwareLanding: "/search/software?softwareId=",
searchLinkToOrp: "/search/other?orpId=",
@ -84,6 +85,7 @@ export let properties: EnvProperties = {
searchLinkToPublications: "/search/find/publications",
searchLinkToDataProviders: "/search/find/dataproviders",
searchLinkToServices: "/search/find/services",
searchLinkToProjects: "/search/find/projects",
searchLinkToDatasets: "/search/find/datasets",
searchLinkToSoftware: "/search/find/software",
@ -102,9 +104,12 @@ export let properties: EnvProperties = {
searchLinkToAdvancedSoftware: "/search/advanced/software",
searchLinkToAdvancedOrps: "/search/advanced/other",
searchLinkToAdvancedDataProviders: "/search/advanced/dataproviders",
searchLinkToAdvancedServices: "/search/advanced/services",
searchLinkToAdvancedOrganizations: "/search/advanced/organizations",
searchLinkToAdvancedResults: "/search/advanced/research-outcomes",
errorLink: "/error",
lastIndexInformationLink: "https://beta.openaire.eu/aggregation-and-content-provision-workflows",
showLastIndexInformationLink: true,
widgetLink: "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",

View File

@ -79,6 +79,7 @@ export let properties: EnvProperties = {
searchLinkToPublication: "/search/publication?articleId=",
searchLinkToProject: "/search/project?projectId=",
searchLinkToDataProvider: "/search/dataprovider?datasourceId=",
searchLinkToService: "/search/service?serviceId=",
searchLinkToDataset: "/search/dataset?datasetId=",
searchLinkToSoftwareLanding: "/search/software?softwareId=",
searchLinkToOrp: "/search/other?orpId=",
@ -86,6 +87,7 @@ export let properties: EnvProperties = {
searchLinkToPublications: "/search/find/publications",
searchLinkToDataProviders: "/search/find/dataproviders",
searchLinkToServices: "/search/find/services",
searchLinkToProjects: "/search/find/projects",
searchLinkToDatasets: "/search/find/datasets",
searchLinkToSoftware: "/search/find/software",
@ -104,9 +106,12 @@ export let properties: EnvProperties = {
searchLinkToAdvancedSoftware: "/search/advanced/software",
searchLinkToAdvancedOrps: "/search/advanced/other",
searchLinkToAdvancedDataProviders: "/search/advanced/dataproviders",
searchLinkToAdvancedServices: "/search/advanced/services",
searchLinkToAdvancedOrganizations: "/search/advanced/organizations",
searchLinkToAdvancedResults: "/search/advanced/research-outcomes",
errorLink: "/error",
lastIndexInformationLink: "https://www.openaire.eu/aggregation-and-content-provision-workflows",
showLastIndexInformationLink: true,
widgetLink: "https://www.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",

View File

@ -79,6 +79,7 @@ export let properties: EnvProperties = {
searchLinkToPublication: "/search/publication?articleId=",
searchLinkToProject: "/search/project?projectId=",
searchLinkToDataProvider: "/search/dataprovider?datasourceId=",
searchLinkToService: "/search/service?serviceId=",
searchLinkToDataset: "/search/dataset?datasetId=",
searchLinkToSoftwareLanding: "/search/software?softwareId=",
searchLinkToOrp: "/search/other?orpId=",
@ -86,6 +87,7 @@ export let properties: EnvProperties = {
searchLinkToPublications: "/search/find/publications",
searchLinkToDataProviders: "/search/find/dataproviders",
searchLinkToServices: "/search/find/services",
searchLinkToProjects: "/search/find/projects",
searchLinkToDatasets: "/search/find/datasets",
searchLinkToSoftware: "/search/find/software",
@ -104,9 +106,12 @@ export let properties: EnvProperties = {
searchLinkToAdvancedSoftware: "/search/advanced/software",
searchLinkToAdvancedOrps: "/search/advanced/other",
searchLinkToAdvancedDataProviders: "/search/advanced/dataproviders",
searchLinkToAdvancedServices: "/search/advanced/services",
searchLinkToAdvancedOrganizations: "/search/advanced/organizations",
searchLinkToAdvancedResults: "/search/advanced/research-outcomes",
errorLink: "/error",
lastIndexInformationLink: "https://www.openaire.eu/aggregation-and-content-provision-workflows",
showLastIndexInformationLink: true,
widgetLink: "https://www.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",

View File

@ -21,7 +21,7 @@ export let properties: EnvProperties = {
useNewStatistisTool: true,
claimsAPIURL: "http://dl170.madgik.di.uoa.gr:8180/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/",
searchAPIURLLAst: "http://beta.services.openaire.eu/search/v2/api/",
searchResourcesAPIURL: "https://beta.services.openaire.eu/search/v2/api/resources",
searchResourcesAPIURL: "http://beta.services.openaire.eu/search/v2/api/resources",
openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=",
csvAPIURL: "https://beta.services.openaire.eu/search/v2/api/reports",
searchCrossrefAPIURL: "https://api.crossref.org/works",
@ -81,6 +81,7 @@ export let properties: EnvProperties = {
searchLinkToPublication: "/search/publication?articleId=",
searchLinkToProject: "/search/project?projectId=",
searchLinkToDataProvider: "/search/dataprovider?datasourceId=",
searchLinkToService: "/search/service?serviceId=",
searchLinkToDataset: "/search/dataset?datasetId=",
searchLinkToSoftwareLanding: "/search/software?softwareId=",
searchLinkToOrp: "/search/other?orpId=",
@ -88,6 +89,7 @@ export let properties: EnvProperties = {
searchLinkToPublications: "/search/find/publications",
searchLinkToDataProviders: "/search/find/dataproviders",
searchLinkToServices: "/search/find/services",
searchLinkToProjects: "/search/find/projects",
searchLinkToDatasets: "/search/find/datasets",
searchLinkToSoftware: "/search/find/software",
@ -106,9 +108,12 @@ export let properties: EnvProperties = {
searchLinkToAdvancedSoftware: "/search/advanced/software",
searchLinkToAdvancedOrps: "/search/advanced/other",
searchLinkToAdvancedDataProviders: "/search/advanced/dataproviders",
searchLinkToAdvancedServices: "/search/advanced/services",
searchLinkToAdvancedOrganizations: "/search/advanced/organizations",
searchLinkToAdvancedResults: "/search/advanced/research-outcomes",
errorLink: "/error",
lastIndexInformationLink: "https://www.openaire.eu/aggregation-and-content-provision-workflows",
showLastIndexInformationLink: true,
widgetLink: "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",