Merge remote-tracking branch 'origin/develop'

This commit is contained in:
Konstantinos Triantafyllou 2023-09-05 13:22:44 +03:00
commit 33c6252484
54 changed files with 398 additions and 471 deletions

View File

@ -1,5 +1,3 @@
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
<ng-template #card let-organization="organization" let-fullView="fullView"> <ng-template #card let-organization="organization" let-fullView="fullView">
<div [class]="fullView?'uk-card-body uk-height-1-1 uk-flex uk-flex-column uk-flex-around':''"> <div [class]="fullView?'uk-card-body uk-height-1-1 uk-flex uk-flex-column uk-flex-around':''">
<div class="affiliation-logo"> <div class="affiliation-logo">

View File

@ -1,20 +1,16 @@
import {Component, Input} from '@angular/core'; import {Component, Input} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute} from '@angular/router';
import {Title, Meta} from '@angular/platform-browser'; import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; import {AffiliationService} from "../openaireLibrary/connect/affiliations/affiliation.service";
import {AffiliationService} from "../openaireLibrary/connect/affiliations/affiliation.service"; import {Affiliation} from "../openaireLibrary/utils/entities/CuratorInfo";
import {Affiliation} from "../openaireLibrary/utils/entities/CuratorInfo"; import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
import {PiwikHelper} from "../utils/piwikHelper";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../environments/environment"; import {properties} from "../../environments/environment";
@Component({ @Component({
selector: 'affiliations', selector: 'affiliations',
templateUrl: './affiliations.component.html', templateUrl: './affiliations.component.html',
styleUrls: ['./affiliations.component.less'] styleUrls: ['./affiliations.component.less']
}) })
export class AffiliationsComponent { export class AffiliationsComponent {
@Input() getAffiliationsFromAPI: boolean = false; @Input() getAffiliationsFromAPI: boolean = false;
@ -26,57 +22,29 @@ export class AffiliationsComponent {
@Input() arrows = true; @Input() arrows = true;
public showLoading: boolean = false; public showLoading: boolean = false;
public communityId: string;
public properties: EnvProperties = properties;
private subscriptions = [];
communityId: string; constructor(private route: ActivatedRoute, private affiliationService: AffiliationService) {
properties:EnvProperties; }
subscriptions = [];
public url: string = null;
public pageTitle: string = "Related Organizations";
constructor ( private route: ActivatedRoute, private _router: Router,
private _meta: Meta,
private _title: Title,
private seoService: SEOService,
private _piwikService: PiwikService,
private affiliationService: AffiliationService) {}
public ngOnInit() { public ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.subscriptions.push(this.route.queryParams.subscribe( if (this.getAffiliationsFromAPI) {
communityId => { this.showLoading = true;
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); this.affiliationService.initAffiliations(this.communityId);
if(!this.communityId) { this.subscriptions.push(this.affiliationService.affiliations.subscribe(
this.communityId = communityId['communityId']; affiliations => {
this.affiliations = affiliations.filter((affiliation) => this.longView || !!affiliation['logo_url']);
this.showLoading = false;
},
error => {
console.error("Affiliations Component: Error getting affiliations for community with id: " + this.communityId, error);
this.showLoading = false;
} }
));
this.properties = properties; }
if(this.longView) {
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
// this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.communityId)).subscribe());
}
this.url = this.properties.domain + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url);
this.updateTitle(this.pageTitle);
this.updateDescription("OpenAIRE - Connect, Community Gateway, research community, organizations");
}
if(this.getAffiliationsFromAPI) {
this.showLoading = true;
this.affiliationService.initAffiliations(this.communityId);
this.subscriptions.push(this.affiliationService.affiliations.subscribe(
affiliations => {
this.affiliations = affiliations.filter((affiliation) => this.longView || !!affiliation['logo_url']);
this.showLoading = false;
},
error => {
console.error("Affiliations Component: Error getting affiliations for community with id: " + this.communityId, error);
this.showLoading = false;
}
));
}
}));
} }
ngOnDestroy() { ngOnDestroy() {
@ -87,19 +55,4 @@ export class AffiliationsComponent {
}); });
this.affiliationService.clearSubscriptions(); this.affiliationService.clearSubscriptions();
} }
private updateDescription(description: string) {
this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'");
}
private updateTitle(title: string) {
var _title = ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");
}
private updateUrl(url: string) {
this._meta.updateTag({content: url}, "property='og:url'");
}
} }

View File

@ -1,4 +1,4 @@
import { NgModule } from '@angular/core'; import {NgModule} from '@angular/core';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard' import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard'
@ -7,15 +7,11 @@ import {RouterModule} from '@angular/router';
import {AffiliationsComponent} from './affiliations.component'; import {AffiliationsComponent} from './affiliations.component';
import {AffiliationService} from "../openaireLibrary/connect/affiliations/affiliation.service"; import {AffiliationService} from "../openaireLibrary/connect/affiliations/affiliation.service";
import {CommonModule} from "@angular/common"; import {CommonModule} from "@angular/common";
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
import {PiwikServiceModule} from "../openaireLibrary/utils/piwik/piwikService.module";
import {UrlPrefixModule} from "../openaireLibrary/utils/pipes/url-prefix.module"; import {UrlPrefixModule} from "../openaireLibrary/utils/pipes/url-prefix.module";
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, RouterModule, Schema2jsonldModule, SEOServiceModule, CommonModule, RouterModule, UrlPrefixModule
PiwikServiceModule, UrlPrefixModule
], ],
declarations: [ declarations: [
AffiliationsComponent AffiliationsComponent

View File

@ -6,8 +6,16 @@ import {IsCommunity} from "./openaireLibrary/connect/communityGuard/isCommunity.
const routes: Routes = [ const routes: Routes = [
// ORCID Pages // ORCID Pages
{path: 'orcid', loadChildren: () => import('./orcid/orcid.module').then(m => m.LibOrcidModule)}, {
{path: 'my-orcid-links', loadChildren: () => import('./orcid/my-orcid-links/myOrcidLinks.module').then(m => m.LibMyOrcidLinksModule)}, path: 'orcid',
loadChildren: () => import('./orcid/orcid.module').then(m => m.LibOrcidModule),
data: {hasQuickContact: false}
},
{
path: 'my-orcid-links',
loadChildren: () => import('./orcid/my-orcid-links/myOrcidLinks.module').then(m => m.LibMyOrcidLinksModule),
data: {hasQuickContact: false}
},
/** Other Pages */ /** Other Pages */
{ {
@ -18,46 +26,60 @@ const routes: Routes = [
{path: 'about/learn-how', loadChildren: () => import('./learn-how/learn-how.module').then(m => m.LearnHowModule)}, {path: 'about/learn-how', loadChildren: () => import('./learn-how/learn-how.module').then(m => m.LearnHowModule)},
{path: 'about/faq', loadChildren: () => import('./learn-how/faqs/faqs.module').then(m => m.FaqsModule)}, {path: 'about/faq', loadChildren: () => import('./learn-how/faqs/faqs.module').then(m => m.FaqsModule)},
{path: 'get-started', loadChildren: () => import('./get-started/get-started.module').then(m => m.GetStartedModule)}, {path: 'get-started', loadChildren: () => import('./get-started/get-started.module').then(m => m.GetStartedModule)},
{path: 'contact-us', loadChildren: () => import('./contact/contact.module').then(m => m.ContactModule)}, {
{path: 'invite', loadChildren: () => import('./utils/subscribe/invite/invite.module').then(m => m.InviteModule)}, path: 'contact-us',
loadChildren: () => import('./contact/contact.module').then(m => m.ContactModule),
data: {hasQuickContact: false}
},
{
path: 'invite',
loadChildren: () => import('./utils/subscribe/invite/invite.module').then(m => m.InviteModule),
data: {hasQuickContact: false}
},
{ {
path: 'content', path: 'content',
loadChildren: () => import('./content/contentPage.module').then(m => m.ContentPageModule), loadChildren: () => import('./content/contentPage.module').then(m => m.ContentPageModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'sdgs',
loadChildren: () => import('./sdg/sdg.module').then(m => m.LibSdgModule),
data: {hasQuickContact: false}
}, },
{path: 'sdgs', loadChildren: () => import('./sdg/sdg.module').then(m => m.LibSdgModule)},
{ {
path: 'fields-of-science', path: 'fields-of-science',
loadChildren: () => import('./fos/fos.module').then(m => m.LibFosModule), loadChildren: () => import('./fos/fos.module').then(m => m.LibFosModule),
data: {extraOffset: 100} data: {extraOffset: 100, hasQuickContact: false}
}, },
{ {
path: 'organizations', path: 'organizations',
loadChildren: () => import('./htmlPages/organizations/organizationsPage.module').then(m => m.OrganizationsPageModule), loadChildren: () => import('./htmlPages/organizations/organizationsPage.module').then(m => m.OrganizationsPageModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
{ {
path: 'publications', path: 'publications',
loadChildren: () => import('./htmlPages/publications/publications-page.module').then(m => m.PublicationsPageModule), loadChildren: () => import('./htmlPages/publications/publications-page.module').then(m => m.PublicationsPageModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
{ {
path: 'projects', path: 'projects',
loadChildren: () => import('./htmlPages/projects/projectsPage.module').then(m => m.ProjectsPageModule), loadChildren: () => import('./htmlPages/projects/projectsPage.module').then(m => m.ProjectsPageModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
{ {
path: 'national-bulletins', path: 'national-bulletins',
loadChildren: () => import('./htmlPages/nationalBulletins/nationalBulletinsPage.module').then(m => m.NaionalBulletinPageModule), loadChildren: () => import('./htmlPages/nationalBulletins/nationalBulletinsPage.module').then(m => m.NaionalBulletinPageModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
{ {
path: 'faqs', path: 'faqs',
loadChildren: () => import('./htmlPages/featured/featuredPage.module').then(m => m.FeaturedPageModule), loadChildren: () => import('./htmlPages/featured/featuredPage.module').then(m => m.FeaturedPageModule),
data: {hasQuickContact: false}
}, },
{ {
path: 'roadmap', path: 'roadmap',
loadChildren: () => import('./htmlPages/featured/featuredPage.module').then(m => m.FeaturedPageModule), loadChildren: () => import('./htmlPages/featured/featuredPage.module').then(m => m.FeaturedPageModule),
data: {hasQuickContact: false}
}, },
// { // {
// path: 'featured', // path: 'featured',
@ -65,24 +87,24 @@ const routes: Routes = [
// { // {
// path: '', // path: '',
// loadChildren: () => import('./htmlPages/featured/featuredPage.module').then(m => m.FeaturedPageModule), // loadChildren: () => import('./htmlPages/featured/featuredPage.module').then(m => m.FeaturedPageModule),
// canActivateChild: [IsCommunity], // data: {hasQuickContact: false}, canActivateChild: [IsCommunity],
// }, // },
// { // {
// path: '**', // path: '**',
// loadChildren: () => import('./htmlPages/featured/featuredPage.module').then(m => m.FeaturedPageModule), // loadChildren: () => import('./htmlPages/featured/featuredPage.module').then(m => m.FeaturedPageModule),
// canActivateChild: [IsCommunity], // data: {hasQuickContact: false}, canActivateChild: [IsCommunity],
// }, // },
// ] // ]
// }, // },
{ {
path: 'curators', path: 'curators',
loadChildren: () => import('./curators/curators.module').then(m => m.CuratorsModule), loadChildren: () => import('./curators/curators.module').then(m => m.CuratorsModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
{ {
path: 'subjects', path: 'subjects',
loadChildren: () => import('./subjects/subjects.module').then(m => m.SubjectsModule), loadChildren: () => import('./subjects/subjects.module').then(m => m.SubjectsModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
{ {
path: 'myCommunities', path: 'myCommunities',
@ -90,7 +112,8 @@ const routes: Routes = [
}, },
{ {
path: 'develop', path: 'develop',
loadChildren: () => import('./develop/develop.module').then(m => m.DevelopModule), canActivate: [IsCommunity] loadChildren: () => import('./develop/develop.module').then(m => m.DevelopModule),
data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
/** Testing Page for help contents */ /** Testing Page for help contents */
{path: 'helper-test', loadChildren: () => import('./helper-test/helper-test.module').then(m => m.HelperTestModule)}, {path: 'helper-test', loadChildren: () => import('./helper-test/helper-test.module').then(m => m.HelperTestModule)},
@ -98,42 +121,41 @@ const routes: Routes = [
{ {
path: 'search/result', path: 'search/result',
loadChildren: () => import('./landingPages/result/libResult.module').then(m => m.LibResultModule), loadChildren: () => import('./landingPages/result/libResult.module').then(m => m.LibResultModule),
canActivate: [IsCommunity] data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
}, },
{ {
path: 'search/publication', path: 'search/publication',
loadChildren: () => import('./landingPages/publication/libPublication.module').then(m => m.LibPublicationModule), loadChildren: () => import('./landingPages/publication/libPublication.module').then(m => m.LibPublicationModule),
canActivate: [IsCommunity] data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
}, },
{ {
path: 'search/dataset', path: 'search/dataset',
loadChildren: () => import('./landingPages/dataset/libDataset.module').then(m => m.LibDatasetModule), loadChildren: () => import('./landingPages/dataset/libDataset.module').then(m => m.LibDatasetModule),
canActivate: [IsCommunity] data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
}, },
{ {
path: 'search/software', path: 'search/software',
loadChildren: () => import('./landingPages/software/libSoftware.module').then(m => m.LibSoftwareModule), loadChildren: () => import('./landingPages/software/libSoftware.module').then(m => m.LibSoftwareModule),
canActivate: [IsCommunity] data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
},
{
path: 'search/other', loadChildren: () => import('./landingPages/orp/libOrp.module').then(m => m.LibOrpModule),
data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
}, },
{path: 'search/other', loadChildren: () => import('./landingPages/orp/libOrp.module').then(m => m.LibOrpModule), canActivate: [IsCommunity]},
{ {
path: 'search/project', path: 'search/project',
loadChildren: () => import('./landingPages/project/libProject.module').then(m => m.LibProjectModule), loadChildren: () => import('./landingPages/project/libProject.module').then(m => m.LibProjectModule),
canActivate: [IsCommunity] data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
}, },
{ {
path: 'search/dataprovider', path: 'search/dataprovider',
loadChildren: () => import('././landingPages/dataProvider/libDataProvider.module').then(m => m.LibDataProviderModule), loadChildren: () => import('././landingPages/dataProvider/libDataProvider.module').then(m => m.LibDataProviderModule),
canActivate: [IsCommunity] data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
}, },
{ {
path: 'search/organization', path: 'search/organization',
loadChildren: () => import('./landingPages/organization/libOrganization.module').then(m => m.LibOrganizationModule), loadChildren: () => import('./landingPages/organization/libOrganization.module').then(m => m.LibOrganizationModule),
canActivate: [IsCommunity] data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
},
{
path: 'project-report',
loadChildren: () => import('./landingPages/htmlProjectReport/libHtmlProjectReport.module').then(m => m.LibHtmlProjectReportModule)
}, },
/** Search Pages */ /** Search Pages */
{path: 'search/find', redirectTo: 'search/find/research-outcomes', pathMatch: 'full'}, {path: 'search/find', redirectTo: 'search/find/research-outcomes', pathMatch: 'full'},
@ -145,46 +167,86 @@ const routes: Routes = [
{ {
path: 'search/find/research-outcomes', path: 'search/find/research-outcomes',
loadChildren: () => import('./searchPages/simple/searchResearchResults.module').then(m => m.OpenaireSearchResearchResultsModule), loadChildren: () => import('./searchPages/simple/searchResearchResults.module').then(m => m.OpenaireSearchResearchResultsModule),
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'search/find/publications',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity]
},
{
path: 'search/find/datasets',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity]
},
{
path: 'search/find/software',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity]
},
{
path: 'search/find/other',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity] canActivate: [IsCommunity]
}, },
{path: 'search/find/publications', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{path: 'search/find/datasets', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{path: 'search/find/software', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{path: 'search/find/other', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{ {
path: 'search/find/projects', path: 'search/find/projects',
loadChildren: () => import('./searchPages/simple/searchProjects.module').then(m => m.LibSearchProjectsModule), loadChildren: () => import('./searchPages/simple/searchProjects.module').then(m => m.LibSearchProjectsModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
{ {
path: 'search/find/dataproviders', path: 'search/find/dataproviders',
loadChildren: () => import('./searchPages/simple/searchDataProviders.module').then(m => m.LibSearchDataProvidersModule), loadChildren: () => import('./searchPages/simple/searchDataProviders.module').then(m => m.LibSearchDataProvidersModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
/** Advanced Search Pages */ /** Advanced Search Pages */
{ {
path: 'search/advanced/research-outcomes', path: 'search/advanced/research-outcomes',
loadChildren: () => import('./searchPages/advanced/searchResearchResults.module').then(m => m.OpenaireAdvancedSearchResearchResultsModule), loadChildren: () => import('./searchPages/advanced/searchResearchResults.module').then(m => m.OpenaireAdvancedSearchResearchResultsModule),
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'search/advanced/publications',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity]
},
{
path: 'search/advanced/datasets',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity]
},
{
path: 'search/advanced/software',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity]
},
{
path: 'search/advanced/other',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity] canActivate: [IsCommunity]
}, },
{path: 'search/advanced/publications', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{path: 'search/advanced/datasets', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{path: 'search/advanced/software', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{path: 'search/advanced/other', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{ {
path: 'search/advanced/organizations', path: 'search/advanced/organizations',
loadChildren: () => import('./searchPages/advanced/advancedSearchOrganizations.module').then(m => m.LibAdvancedSearchOrganizationsModule), loadChildren: () => import('./searchPages/advanced/advancedSearchOrganizations.module').then(m => m.LibAdvancedSearchOrganizationsModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
{ {
path: 'search/advanced/dataproviders', path: 'search/advanced/dataproviders',
loadChildren: () => import('./searchPages/advanced/advancedSearchDataProviders.module').then(m => m.LibAdvancedSearchDataProvidersModule), loadChildren: () => import('./searchPages/advanced/advancedSearchDataProviders.module').then(m => m.LibAdvancedSearchDataProvidersModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
{ {
path: 'search/advanced/projects', path: 'search/advanced/projects',
loadChildren: () => import('./searchPages/advanced/advancedSearchProjects.module').then(m => m.LibAdvancedSearchProjectsModule), loadChildren: () => import('./searchPages/advanced/advancedSearchProjects.module').then(m => m.LibAdvancedSearchProjectsModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
/** Deposit Pages */ /** Deposit Pages */
{ path: 'participate/deposit-datasets', { path: 'participate/deposit-datasets',
@ -208,41 +270,56 @@ const routes: Routes = [
{ {
path: 'participate/deposit/learn-how', path: 'participate/deposit/learn-how',
loadChildren: () => import('./deposit/deposit.module').then(m => m.LibDepositModule), loadChildren: () => import('./deposit/deposit.module').then(m => m.LibDepositModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
{ {
path: 'participate/deposit/search', path: 'participate/deposit/search',
loadChildren: () => import('./deposit/searchDataprovidersToDeposit.module').then(m => m.LibSearchDataprovidersToDepositModule), loadChildren: () => import('./deposit/searchDataprovidersToDeposit.module').then(m => m.LibSearchDataprovidersToDepositModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
{ {
path: 'participate/deposit/zenodo', path: 'participate/deposit/zenodo',
loadChildren: () => import('./deposit/zenodo/shareInZenodo.module').then(m => m.ShareInZenodoModule), loadChildren: () => import('./deposit/zenodo/shareInZenodo.module').then(m => m.ShareInZenodoModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
/** Linking Pages */ /** Linking Pages */
{path: 'myclaims', loadChildren: () => import('./claims/myClaims/myClaims.module').then(m => m.LibMyClaimsModule), canActivate: [IsCommunity]}, {
path: 'myclaims', loadChildren: () => import('./claims/myClaims/myClaims.module').then(m => m.LibMyClaimsModule),
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{ {
path: 'participate/claim', path: 'participate/claim',
loadChildren: () => import('./claims/linking/linkingGeneric.module').then(m => m.LibLinkingGenericModule), loadChildren: () => import('./claims/linking/linkingGeneric.module').then(m => m.LibLinkingGenericModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
{ {
path: 'participate/direct-claim', path: 'participate/direct-claim',
loadChildren: () => import('./claims/directLinking/directLinking.module').then(m => m.LibDirectLinkingModule), loadChildren: () => import('./claims/directLinking/directLinking.module').then(m => m.LibDirectLinkingModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
{ {
path: 'preview', path: 'preview',
loadChildren: () => import('./demo/demo.module').then(m => m.DemoModule), loadChildren: () => import('./demo/demo.module').then(m => m.DemoModule),
canActivate: [IsCommunity] data: {hasQuickContact: false}, canActivate: [IsCommunity]
}, },
/** help pages - do not exist in Admin portal/api/db */ /** help pages - do not exist in Admin portal/api/db */
{path: 'reload', loadChildren: () => import('./reload/libReload.module').then(m => m.LibReloadModule)}, {
{path: 'user-info', loadChildren: () => import('./login/libUser.module').then(m => m.LibUserModule)}, path: 'reload',
{path: 'error', component: OpenaireErrorPageComponent}, loadChildren: () => import('./reload/libReload.module').then(m => m.LibReloadModule),
{path: 'theme', loadChildren: () => import('./openaireLibrary/utils/theme/theme.module').then(m => m.ThemeModule)}, data: {hasQuickContact: false}
{path: '**', pathMatch: 'full', component: OpenaireErrorPageComponent} },
{
path: 'user-info',
loadChildren: () => import('./login/libUser.module').then(m => m.LibUserModule),
data: {hasQuickContact: false}
},
{path: 'error', component: OpenaireErrorPageComponent, data: {hasQuickContact: false}},
{
path: 'theme',
loadChildren: () => import('./openaireLibrary/utils/theme/theme.module').then(m => m.ThemeModule),
data: {hasQuickContact: false}
},
{path: '**', pathMatch: 'full', component: OpenaireErrorPageComponent, data: {hasQuickContact: false}}
]; ];
@NgModule({ @NgModule({

View File

@ -1,4 +1,5 @@
import { import {
ChangeDetectorRef,
Component, Component,
ElementRef, ElementRef,
Inject, Inject,
@ -40,6 +41,7 @@ import {NotificationHandler} from "./openaireLibrary/utils/notification-handler"
import {OpenaireEntities} from "./openaireLibrary/utils/properties/searchFields"; import {OpenaireEntities} from "./openaireLibrary/utils/properties/searchFields";
import {DOCUMENT, isPlatformServer} from "@angular/common"; import {DOCUMENT, isPlatformServer} from "@angular/common";
import {AdvancedAsyncSubject} from "./openaireLibrary/utils/AdvancedAsyncSubject"; import {AdvancedAsyncSubject} from "./openaireLibrary/utils/AdvancedAsyncSubject";
import {LayoutService} from "./openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
@ -101,12 +103,16 @@ import {AdvancedAsyncSubject} from "./openaireLibrary/utils/AdvancedAsyncSubject
points="7 4 13 10 7 16"></polyline></svg> points="7 4 13 10 7 16"></polyline></svg>
</span></a> </span></a>
</cookie-law> </cookie-law>
<bottom #bottom *ngIf="properties && isClient && showMenu && !community" [grantAdvance]="false" <bottom #bottom *ngIf="properties && isClient && showMenu && !community" [grantAdvance]="false"
[properties]="properties"></bottom> [properties]="properties"></bottom>
<bottom *ngIf="properties && isClient && showMenu && community" class=" communityPanelBackground " <bottom *ngIf="properties && isClient && showMenu && community" class=" communityPanelBackground "
[showSocialButtons]="true" [showMenuItems]="true" [grantAdvance]="false" [showOpenaire]="true" [showSocialButtons]="true" [showMenuItems]="true" [grantAdvance]="false" [showOpenaire]="true"
[communityId]="community.communityId" [menuItems]=bottomMenuItems [properties]="properties" [centered]="true"></bottom> [communityId]="community.communityId" [menuItems]=bottomMenuItems [properties]="properties"
<quick-contact #quickContact *ngIf="showQuickContact && contactForm" (sendEmitter)="send($event)" [centered]="true"></bottom>
<quick-contact #quickContact
*ngIf="!community && bottomNotIntersecting && displayQuickContact && showQuickContact && contactForm"
(sendEmitter)="send($event)"
[contact]="'Help'" [images]="images" [background]="{class: 'uk-background-primary', dark: false}" [contact]="'Help'" [images]="images" [background]="{class: 'uk-background-primary', dark: false}"
[contactForm]="contactForm" [sending]="sending"></quick-contact> [contactForm]="contactForm" [sending]="sending"></quick-contact>
<modal-alert #modal [overflowBody]="false"></modal-alert> <modal-alert #modal [overflowBody]="false"></modal-alert>
@ -130,9 +136,11 @@ export class AppComponent implements OnInit, OnDestroy {
communityId: string = ""; communityId: string = "";
header: Header; header: Header;
logoPath: string = 'assets/common-assets/logo-services/connect/'; logoPath: string = 'assets/common-assets/logo-services/connect/';
public showGetStarted: boolean = true;
/* Contact */ /* Contact */
public showQuickContact: boolean; public showQuickContact: boolean;
public showGetStarted: boolean = true; public bottomNotIntersecting: boolean;
public displayQuickContact: boolean; // intersecting with specific section in home page
public contactForm: UntypedFormGroup; public contactForm: UntypedFormGroup;
public sending = false; public sending = false;
public images: string[] = []; public images: string[] = [];
@ -157,12 +165,14 @@ export class AppComponent implements OnInit, OnDestroy {
private configurationService: ConfigurationService, private _communityService: CommunityService, private configurationService: ConfigurationService, private _communityService: CommunityService,
private customizationService: CustomizationService, private _meta: Meta, private seoService: SEOService, private customizationService: CustomizationService, private _meta: Meta, private seoService: SEOService,
private quickContactService: QuickContactService, private quickContactService: QuickContactService,
private layoutService: LayoutService,
private fb: UntypedFormBuilder, private fb: UntypedFormBuilder,
private emailService: EmailService, private emailService: EmailService,
@Inject(DOCUMENT) private document, @Inject(DOCUMENT) private document,
private transferState: TransferState, private transferState: TransferState,
@Inject(PLATFORM_ID) private platformId: any, @Inject(PLATFORM_ID) private platformId: any,
private rendererFactory: RendererFactory2 private rendererFactory: RendererFactory2,
private cdr: ChangeDetectorRef
) { ) {
this.subscriptions.push(router.events.forEach((event) => { this.subscriptions.push(router.events.forEach((event) => {
if (event instanceof NavigationEnd) { if (event instanceof NavigationEnd) {
@ -199,8 +209,17 @@ export class AppComponent implements OnInit, OnDestroy {
}, error => { }, error => {
this.init(); this.init();
})); }));
this.subscriptions.push(this.layoutService.hasQuickContact.subscribe(hasQuickContact => {
if (this.showQuickContact !== hasQuickContact) {
this.showQuickContact = hasQuickContact;
this.cdr.detectChanges();
}
}));
this.subscriptions.push(this.quickContactService.isDisplayed.subscribe(display => { this.subscriptions.push(this.quickContactService.isDisplayed.subscribe(display => {
this.showQuickContact = display; if (this.displayQuickContact !== display) {
this.displayQuickContact = display;
this.cdr.detectChanges();
}
})); }));
} }
@ -208,6 +227,8 @@ export class AppComponent implements OnInit, OnDestroy {
this.subscriptions.forEach(subscription => { this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) { if (subscription instanceof Subscriber) {
subscription.unsubscribe(); subscription.unsubscribe();
} else if (typeof IntersectionObserver !== "undefined" && subscription instanceof IntersectionObserver) {
subscription.disconnect();
} }
}); });
this._communitiesService.clearSubscriptions(); this._communitiesService.clearSubscriptions();
@ -225,17 +246,16 @@ export class AppComponent implements OnInit, OnDestroy {
}; };
let intersectionObserver = new IntersectionObserver(entries => { let intersectionObserver = new IntersectionObserver(entries => {
entries.forEach(entry => { entries.forEach(entry => {
if (entry.isIntersecting && this.showQuickContact) { if (this.bottomNotIntersecting !== (!entry.isIntersecting)) {
this.showQuickContact = false; this.bottomNotIntersecting = !entry.isIntersecting;
this.quickContactService.setDisplay(this.showQuickContact); this.cdr.detectChanges();
} else if (!entry.isIntersecting && !this.showQuickContact) {
this.showQuickContact = true;
this.quickContactService.setDisplay(this.showQuickContact);
} }
}); });
}, options); }, options);
intersectionObserver.observe(this.bottom.nativeElement); if (this.bottom) {
this.subscriptions.push(intersectionObserver); intersectionObserver.observe(this.bottom.nativeElement);
this.subscriptions.push(intersectionObserver);
}
} }
get isManager() { get isManager() {
@ -298,7 +318,7 @@ export class AppComponent implements OnInit, OnDestroy {
this.initLayout('connect'); this.initLayout('connect');
} }
} }
this.configurationService.initCommunityInformation(this.properties, (communityId) ? communityId : this.properties.adminToolsPortalType); this.configurationService.initPortal(this.properties, (communityId) ? communityId : this.properties.adminToolsPortalType);
} }
getLayouts() { getLayouts() {
@ -436,8 +456,7 @@ export class AppComponent implements OnInit, OnDestroy {
this.showMenu = true; this.showMenu = true;
} else { } else {
this.communityId = null; this.communityId = null;
this.configurationService.initCommunityInformation(this.properties, "connect"); this.configurationService.initPortal(this.properties, "connect");
// this.initAdminToolCommunity(null);
this.buildConnectMenu(true); this.buildConnectMenu(true);
if (this.community && this.community.status == "manager") { if (this.community && this.community.status == "manager") {
if (!this.user) { if (!this.user) {
@ -505,7 +524,7 @@ export class AppComponent implements OnInit, OnDestroy {
restrictedData ? "" : "/myCommunities", false, [], [], {})); restrictedData ? "" : "/myCommunities", false, [], [], {}));
} }
this.showMenu = true; this.showMenu = true;
if (typeof document !== "undefined" && this.bottom) { if (typeof IntersectionObserver !== "undefined") {
setTimeout(() => { setTimeout(() => {
this.createObservers(); this.createObservers();
}); });

View File

@ -1,22 +1,19 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {ActivatedRoute} from '@angular/router'; import {ActivatedRoute} from '@angular/router';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper'; import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {PiwikHelper} from "../../utils/piwikHelper";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-directLinking', selector: 'openaire-directLinking',
template: ` template: `
<directLinking [communityId]=communityId [piwikSiteId]="piwikSiteId"></directLinking>` <directLinking [communityId]=communityId></directLinking>`
}) })
export class OpenaireDirectLinkingComponent { export class OpenaireDirectLinkingComponent {
communityId: string; communityId: string;
public piwikSiteId = null;
sub; sub;
constructor(private route: ActivatedRoute) {
} constructor(private route: ActivatedRoute) {}
ngOnDestroy() { ngOnDestroy() {
if (this.sub instanceof Subscriber) { if (this.sub instanceof Subscriber) {
@ -24,15 +21,12 @@ export class OpenaireDirectLinkingComponent {
} }
} }
public ngOnInit() { public ngOnInit() {
this.sub = this.sub = this.route.queryParams.subscribe(
this.route.queryParams.subscribe(
communityId => { communityId => {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
if (!this.communityId) { if (!this.communityId) {
this.communityId = communityId['communityId']; this.communityId = communityId['communityId'];
} }
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
}); });
} }
} }

View File

@ -1,23 +1,23 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {ActivatedRoute} from '@angular/router'; import {ActivatedRoute} from '@angular/router';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper'; import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {PiwikHelper} from "../../utils/piwikHelper";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-linking-generic', selector: 'openaire-linking-generic',
template: `<linking-generic [communityId]=communityId [piwikSiteId]="piwikSiteId" pageTitle="Linking"></linking-generic>` template: `<linking-generic [communityId]=communityId pageTitle="Linking"></linking-generic>`
}) })
export class OpenaireLinkingComponent { export class OpenaireLinkingComponent {
communityId:string; communityId:string;
public piwikSiteId = null;
sub; sub;
ngOnDestroy() { ngOnDestroy() {
if (this.sub instanceof Subscriber) { if (this.sub instanceof Subscriber) {
this.sub.unsubscribe(); this.sub.unsubscribe();
} }
} }
constructor (private route: ActivatedRoute) { constructor (private route: ActivatedRoute) {
this.route.queryParams.subscribe( this.route.queryParams.subscribe(
communityId => { communityId => {
@ -25,7 +25,6 @@ export class OpenaireLinkingComponent {
if(!this.communityId) { if(!this.communityId) {
this.communityId = communityId['communityId']; this.communityId = communityId['communityId'];
} }
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
}); });
} }
} }

View File

@ -1,7 +1,6 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {ActivatedRoute} from '@angular/router'; import {ActivatedRoute} from '@angular/router';
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../../utils/piwikHelper";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@ -9,7 +8,7 @@ import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-my-claims', selector: 'openaire-my-claims',
template: ` template: `
<my-claims [claimsInfoURL]=claimsInfoURL [userInfoURL]="userInfoURL" [communityId]=communityId [piwikSiteId]="piwikSiteId"></my-claims> <my-claims [claimsInfoURL]=claimsInfoURL [userInfoURL]="userInfoURL" [communityId]=communityId></my-claims>
` `
}) })
@ -17,15 +16,16 @@ import {properties} from "../../../environments/environment";
claimsInfoURL:string; claimsInfoURL:string;
userInfoURL: string; userInfoURL: string;
communityId:string; communityId:string;
public piwikSiteId = null; sub;
constructor (private route: ActivatedRoute) {} constructor (private route: ActivatedRoute) {}
sub;
ngOnDestroy() { ngOnDestroy() {
if (this.sub instanceof Subscriber) { if (this.sub instanceof Subscriber) {
this.sub.unsubscribe(); this.sub.unsubscribe();
} }
} }
public ngOnInit() { public ngOnInit() {
this.claimsInfoURL = properties.claimsInformationLink; this.claimsInfoURL = properties.claimsInformationLink;
this.userInfoURL = properties.userInfoUrl; this.userInfoURL = properties.userInfoUrl;
@ -35,9 +35,6 @@ import {properties} from "../../../environments/environment";
if(!this.communityId) { if(!this.communityId) {
this.communityId = communityId['communityId']; this.communityId = communityId['communityId'];
} }
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
}); });
} }
} }

View File

@ -227,10 +227,10 @@
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon> <icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon>
Access control Access control
</li> </li>
<li class="uk-flex uk-flex-middle"> <!--<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon> <icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon>
Analytics: rich set of indicators Analytics: rich set of indicators
</li> </li>-->
<li class="uk-flex uk-flex-middle"> <li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon> <icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon>
Look &amp; feel to match your brand Look &amp; feel to match your brand

View File

@ -39,7 +39,6 @@ export class CommunitiesComponent implements OnInit, OnDestroy, AfterViewInit {
public subscriberErrorMessage: string = ""; public subscriberErrorMessage: string = "";
public errorCodes: ErrorCodes; public errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent; private errorMessages: ErrorMessagesComponent;
public showQuickContact: boolean = true;
@ViewChildren('scrolling_element') elements: QueryList<ElementRef>; @ViewChildren('scrolling_element') elements: QueryList<ElementRef>;
@ViewChild('contact') contact: ElementRef; @ViewChild('contact') contact: ElementRef;
public entities = OpenaireEntities; public entities = OpenaireEntities;
@ -70,15 +69,14 @@ export class CommunitiesComponent implements OnInit, OnDestroy, AfterViewInit {
this.errorCodes = new ErrorCodes(); this.errorCodes = new ErrorCodes();
this.errorMessages = new ErrorMessagesComponent(); this.errorMessages = new ErrorMessagesComponent();
this.status = this.errorCodes.LOADING; this.status = this.errorCodes.LOADING;
this.quickContactService.setDisplay(false);
} }
public ngOnInit() { public ngOnInit() {
var url = this.properties.domain + this.properties.baseLink + this._router.url; var url = this.properties.domain + this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(url, false); this.seoService.createLinkForCanonicalURL(url, false);
this._meta.updateTag({content: url}, "property='og:url'"); this._meta.updateTag({content: url}, "property='og:url'");
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Connect").subscribe());
this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Connect", this.properties.piwikSiteId).subscribe());
}
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => { this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
this.user = user; this.user = user;
this.getCommunities(); this.getCommunities();
@ -94,14 +92,16 @@ export class CommunitiesComponent implements OnInit, OnDestroy, AfterViewInit {
this.subscriptions.forEach(subscription => { this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) { if (subscription instanceof Subscriber) {
subscription.unsubscribe(); subscription.unsubscribe();
} else if (subscription instanceof IntersectionObserver || subscription instanceof MutationObserver) { } else if ((typeof MutationObserver != 'undefined' && subscription instanceof MutationObserver) ||
subscription.disconnect(); (typeof IntersectionObserver != 'undefined' && subscription instanceof IntersectionObserver)) {
} subscription.disconnect();
}
}); });
this.quickContactService.setDisplay(true);
} }
ngAfterViewInit() { ngAfterViewInit() {
if(typeof window !== "undefined") { if(typeof IntersectionObserver !== "undefined" && typeof MutationObserver !== "undefined") {
this.createObservers(); this.createObservers();
} }
} }
@ -126,13 +126,7 @@ export class CommunitiesComponent implements OnInit, OnDestroy, AfterViewInit {
}; };
let intersectionObserver = new IntersectionObserver(entries => { let intersectionObserver = new IntersectionObserver(entries => {
entries.forEach(entry => { entries.forEach(entry => {
if (entry.isIntersecting && this.showQuickContact) { this.quickContactService.setDisplay(!entry.isIntersecting);
this.showQuickContact = false;
this.quickContactService.setDisplay(this.showQuickContact);
} else if (!entry.isIntersecting && !this.showQuickContact) {
this.showQuickContact = true;
this.quickContactService.setDisplay(this.showQuickContact);
}
}); });
}, options); }, options);
intersectionObserver.observe(this.contact.nativeElement); intersectionObserver.observe(this.contact.nativeElement);

View File

@ -148,35 +148,48 @@
</div> </div>
</ng-template> </ng-template>
<div *ngIf="communityInfo && community && !isPrivate()" > <div *ngIf="portal && community && !isPrivate()" >
<div *ngIf="communityInfo && community" class="generalSearchForm heroBackground"> <!-- this div will have the <div *ngIf="portal && community" class="generalSearchForm heroBackground"> <!-- this div will have the
customized color or image --> customized color or image -->
<div class="uk-container uk-container-large uk-flex uk-flex-center"> <div class="uk-container uk-container-large uk-flex uk-flex-center">
<div class="uk-width-2-3@m uk-width-1-2@l uk-margin-large-top uk-margin-large-bottom"> <div class="uk-width-2-3@m uk-width-1-2@l uk-margin-large-top uk-margin-large-bottom">
<h1 *ngIf="community.title" class="uk-text-center uk-h2 uk-margin-remove"> <h1 *ngIf="community.title" class="uk-text-center uk-h2 uk-margin-remove">
{{community.shortTitle}} {{community.shortTitle}}
</h1> </h1>
<div *ngIf="community.shortTitle && community.title != community.shortTitle" class="uk-text-center uk-margin-top"> <div *ngIf="community.shortTitle && community.title != community.shortTitle"
class="uk-text-center uk-margin-top">
{{community.title}} {{community.title}}
</div> </div>
<div [class.uk-invisible]="disableSelect" class="uk-margin-medium-top"> <!-- <div [class.uk-invisible]="disableSelect" class="uk-margin-medium-top">-->
<advanced-search-input #advanced (searchEmitter)="goTo(true)"> <!-- <advanced-search-input #advanced (searchEmitter)="goTo(true)">-->
<entities-selection [simpleView]="true" currentEntity="result" [selectedEntity]="selectedEntity" [customFilter]="customFilter" <!-- <entities-selection [simpleView]="true" currentEntity="result" [selectedEntity]="selectedEntity" [customFilter]="customFilter"-->
(selectionChange)="entityChanged($event);advanced.focusNext(input, $event)" (disableSelectEmitter)="disableSelectChange($event)" <!-- (selectionChange)="entityChanged($event);advanced.focusNext(input, $event)" (disableSelectEmitter)="disableSelectChange($event)"-->
[onChangeNavigate]="false"></entities-selection> <!-- [onChangeNavigate]="false"></entities-selection>-->
<div input #input placeholder="Scholary works" [searchable]="true" [hint]="'Search in OpenAIRE'" [(value)]="keyword"></div> <!-- <div input #input placeholder="Scholary works" [searchable]="true" [hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>-->
</advanced-search-input> <!-- </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"> <!-- <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">-->
<div class="uk-padding-small"> <!-- <div class="uk-padding-small">-->
<quick-selections [resultTypes]="resultTypes" [quickFilter]="resultsQuickFilter"></quick-selections> <!-- <quick-selections [resultTypes]="resultTypes" [quickFilter]="resultsQuickFilter"></quick-selections>-->
</div> <!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="uk-margin-medium-top" uk-scrollspy-class>
<div class="uk-flex uk-flex-right uk-text-small">
<a [routerLink]="properties.searchLinkToAdvancedResults" class="uk-margin-small-bottom">
Advanced search
</a>
</div> </div>
<div search-input [(value)]="keyword"
[placeholder]="'Search'+(portal && portal.name ? (' in '+portal.name) : '')"
(searchEmitter)="goTo(true)"
[searchInputClass]="'inner background'"></div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div *ngIf="communityInfo && community" class=" uk-container uk-container-large uk-section uk-section-small"> <div *ngIf="portal && community" class=" uk-container uk-container-large uk-section uk-section-small">
<div *ngIf="communityId" > <div *ngIf="communityId" >
<div> <div>
<div class="main-tabs-div"> <div class="main-tabs-div">
@ -512,7 +525,7 @@
</li> </li>
</ul> </ul>
</li> </li>
<li *ngIf="properties.environment == 'development' && communityInfo.twitterAccount" <li *ngIf="properties.environment == 'development' && portal.twitterAccount"
(click)="onSelectActiveTab('twitter')"> (click)="onSelectActiveTab('twitter')">
<ul class="uk-tab"> <ul class="uk-tab">
<li [class.uk-active]="activeTab == 'twitter'"> <li [class.uk-active]="activeTab == 'twitter'">
@ -689,11 +702,11 @@
type: 'orp', typeName: 'other products'}"> type: 'orp', typeName: 'other products'}">
</ng-container> </ng-container>
</div> </div>
<div *ngIf="activeTab == 'twitter' && properties.environment == 'development' && communityInfo.twitterAccount"> <div *ngIf="activeTab == 'twitter' && properties.environment == 'development' && portal.twitterAccount">
<div> <div>
<div> <div>
<a href="https://twitter.com/{{ communityInfo.twitterAccount }}?ref_src=twsrc%5Etfw" class="twitter-timeline" data-height="900"> <a href="https://twitter.com/{{ portal.twitterAccount }}?ref_src=twsrc%5Etfw" class="twitter-timeline" data-height="900">
Tweets by {{communityInfo.twitterAccount}} Tweets by {{portal.twitterAccount}}
</a> </a>
</div> </div>
</div> </div>
@ -790,12 +803,12 @@
</div> </div>
</ng-container> --> </ng-container> -->
<div *ngIf="communityId && communityInfo && isRouteEnabled('/organizations')" <div *ngIf="communityId && portal && isRouteEnabled('/organizations')"
class="uk-container uk-container-large"> class="uk-container uk-container-large">
<affiliations [longView]="false" [getAffiliationsFromAPI]="true" [communityFirstPage]="true"></affiliations> <affiliations [longView]="false" [getAffiliationsFromAPI]="true" [communityFirstPage]="true"></affiliations>
</div> </div>
<div *ngIf="(communityId == null || communityId == '' ) && !communityInfo" <div *ngIf="(communityId == null || communityId == '' ) && !portal"
class="uk-section tm-middle uk-container uk-margin-large-top "> class="uk-section tm-middle uk-container uk-margin-large-top ">
<div class="uk-container uk-margin-bottom uk-grid"> <div class="uk-container uk-margin-bottom uk-grid">
<div class="uk-width-expand uk-padding-remove"> <div class="uk-width-expand uk-padding-remove">
@ -811,6 +824,6 @@
</div> </div>
</div> </div>
</div> </div>
<error *ngIf="communityInfo && community && isPrivate()" [page]="community.status == 'manager'?'-1':null"> <error *ngIf="portal && community && isPrivate()" [page]="community.status == 'manager'?'-1':null">
</error> </error>
</div> </div>

View File

@ -77,7 +77,7 @@ export class CommunityComponent {
@Input() communityId = null; @Input() communityId = null;
public community = null; public community = null;
public communityInfo = null; public portal = null;
public showLoading: boolean = true; public showLoading: boolean = true;
masterZenodoCommunity = null; masterZenodoCommunity = null;
@ -142,7 +142,6 @@ export class CommunityComponent {
}; };
disableSelect: boolean = true; disableSelect: boolean = true;
openaireEntities= OpenaireEntities; openaireEntities= OpenaireEntities;
piwikSiteId;
constructor( constructor(
private element: ElementRef, private element: ElementRef,
@ -220,14 +219,7 @@ export class CommunityComponent {
this._meta.updateTag({content: community.description}, "property='og:description'"); this._meta.updateTag({content: community.description}, "property='og:description'");
this._meta.updateTag({content: community.title}, "property='og:title'"); this._meta.updateTag({content: community.title}, "property='og:title'");
this._title.setTitle(community.title); this._title.setTitle(community.title);
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { this.subs.push(this._piwikService.trackView(this.properties, community.title).subscribe());
this.subs.push(this.config.communityInformationState.subscribe(portal => {
if(portal && portal.piwik) {
this.piwikSiteId = portal.piwik;
this.subs.push(this._piwikService.trackView(this.properties, community.title, this.piwikSiteId).subscribe());
}
}));
}
if (this.community.zenodoCommunity) { if (this.community.zenodoCommunity) {
this.subs.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties, this.properties.zenodoCommunities + this.community.zenodoCommunity, null).subscribe( this.subs.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties, this.properties.zenodoCommunities + this.community.zenodoCommunity, null).subscribe(
result => { result => {
@ -281,13 +273,13 @@ export class CommunityComponent {
this.contentProvidersCalculated = true; this.contentProvidersCalculated = true;
} }
)); ));
this.subs.push(this.config.communityInformationState.subscribe( this.subs.push(this.config.portalAsObservable.subscribe(
res => { res => {
this.communityInfo = res; this.portal = res;
// loading twitter widget script conditionally // loading twitter widget script conditionally
if (properties.environment == "development") { if (properties.environment == "development") {
if (this.communityInfo && this.communityInfo.twitterAccount) { if (this.portal && this.portal.twitterAccount) {
let script = this._renderer2.createElement('script'); let script = this._renderer2.createElement('script');
script.charset = "utf-8"; script.charset = "utf-8";
script.src = "https://platform.twitter.com/widgets.js"; script.src = "https://platform.twitter.com/widgets.js";
@ -300,7 +292,7 @@ export class CommunityComponent {
this.handleError("Error getting community with id: " + this.communityId, error); this.handleError("Error getting community with id: " + this.communityId, error);
} }
)); ));
this.subs.push(this.config.communityInformationState.subscribe(data => { this.subs.push(this.config.portalAsObservable.subscribe(data => {
if (data) { if (data) {
var showEntity = {}; var showEntity = {};
for (var i = 0; i < data['entities'].length; i++) { for (var i = 0; i < data['entities'].length; i++) {
@ -439,11 +431,11 @@ export class CommunityComponent {
} }
isEntityEnabled(entity: string) { isEntityEnabled(entity: string) {
return this.communityInfo.entities.some(x => x['pid'] == entity && x['isEnabled'] === true); return this.portal.entities.some(x => x['pid'] == entity && x['isEnabled'] === true);
} }
isRouteEnabled(route: string) { isRouteEnabled(route: string) {
return this.communityInfo.pages.some(x => x['route'] == route && x['isEnabled'] === true); return this.portal.pages.some(x => x['route'] == route && x['isEnabled'] === true);
} }
showInvite() { showInvite() {

View File

@ -34,6 +34,7 @@ import {InputModule} from '../openaireLibrary/sharedComponents/input/input.modul
import {QuickSelectionsModule} from '../openaireLibrary/searchPages/searchUtils/quick-selections.module'; import {QuickSelectionsModule} from '../openaireLibrary/searchPages/searchUtils/quick-selections.module';
import {IconsModule} from '../openaireLibrary/utils/icons/icons.module'; import {IconsModule} from '../openaireLibrary/utils/icons/icons.module';
import {NoLoadPaging} from '../openaireLibrary/searchPages/searchUtils/no-load-paging.module'; import {NoLoadPaging} from '../openaireLibrary/searchPages/searchUtils/no-load-paging.module';
import {SearchInputModule} from "../openaireLibrary/sharedComponents/search-input/search-input.module";
@NgModule({ @NgModule({
imports: [ imports: [
@ -43,7 +44,7 @@ import {NoLoadPaging} from '../openaireLibrary/searchPages/searchUtils/no-load-p
SearchResearchResultsServiceModule, SearchResultsModule, CuratorsModule, AffiliationsModule, SearchResearchResultsServiceModule, SearchResultsModule, CuratorsModule, AffiliationsModule,
SEOServiceModule, MatSelectModule, EntitiesSelectionModule, SEOServiceModule, MatSelectModule, EntitiesSelectionModule,
TabsModule, SearchTabModule, ErrorMessagesModule, SafeHtmlPipeModule, ErrorModule, TabsModule, SearchTabModule, ErrorMessagesModule, SafeHtmlPipeModule, ErrorModule,
AdvancedSearchInputModule, InputModule, QuickSelectionsModule, IconsModule, NoLoadPaging AdvancedSearchInputModule, InputModule, QuickSelectionsModule, IconsModule, NoLoadPaging, SearchInputModule
], ],
declarations: [ declarations: [
CommunityComponent CommunityComponent

View File

@ -58,10 +58,7 @@ export class ContactComponent implements OnInit {
this.properties = properties; this.properties = properties;
this.email = {body: '', subject: '', recipients: []}; this.email = {body: '', subject: '', recipients: []};
this.subscriptions.push( this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push( this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
}
this.url = this.properties.domain + this._router.url; this.url = this.properties.domain + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url); this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url); this.updateUrl(this.url);

View File

@ -8,7 +8,6 @@ import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
import {Meta, Title} from "@angular/platform-browser"; import {Meta, Title} from "@angular/platform-browser";
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
import {PiwikHelper} from "../utils/piwikHelper";
import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component"; import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
import {Subscription} from "rxjs"; import {Subscription} from "rxjs";
import {properties} from "../../environments/environment"; import {properties} from "../../environments/environment";
@ -78,9 +77,7 @@ export class CuratorsComponent {
this.subs.push(this.communityService.getCommunityAsObservable().subscribe(community => { this.subs.push(this.communityService.getCommunityAsObservable().subscribe(community => {
if (community) { if (community) {
this.community = community; this.community = community;
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { this.subs.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
this.subs.push(this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.community.communityId)).subscribe());
}
this.url = this.properties.domain + this._router.url; this.url = this.properties.domain + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url); this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url); this.updateUrl(this.url);

View File

@ -6,22 +6,22 @@ import {ZenodoInformationClass} from "../openaireLibrary/deposit/utils/zenodoInf
import {FetchZenodoInformation} from "./utils/fetchZenodoInformation.class"; import {FetchZenodoInformation} from "./utils/fetchZenodoInformation.class";
import {ZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service"; import {ZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service";
import {CommunityService} from "../openaireLibrary/connect/community/community.service"; import {CommunityService} from "../openaireLibrary/connect/community/community.service";
import {SearchZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service"; import {
import {PiwikHelper} from "../utils/piwikHelper"; SearchZenodoCommunitiesService
} from "../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service";
import {Subscriber, Subscription} from "rxjs"; import {Subscriber, Subscription} from "rxjs";
import {properties} from "../../environments/environment"; import {properties} from "../../environments/environment";
@Component({ @Component({
selector: 'openaire-deposit', selector: 'openaire-deposit',
template: ` template: `
<deposit-first-page [piwikSiteId]=piwikSiteId [zenodoInformation]="zenodoInformation" <deposit-first-page [zenodoInformation]="zenodoInformation"
[communityId]="communityId" [assetsPath]="'assets/connect-assets'"></deposit-first-page> [communityId]="communityId" [assetsPath]="'assets/connect-assets'"></deposit-first-page>
` `
}) })
export class OpenaireDepositComponent { export class OpenaireDepositComponent {
properties: EnvProperties = properties; properties: EnvProperties = properties;
piwikSiteId = null;
public pageContents = null; public pageContents = null;
public divContents = null; public divContents = null;
public communityId = null; public communityId = null;
@ -42,7 +42,6 @@ export class OpenaireDepositComponent {
this.subs.push(this._communityService.getCommunityAsObservable().subscribe( this.subs.push(this._communityService.getCommunityAsObservable().subscribe(
community => { community => {
if(community) { if(community) {
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
this.communityId = community.communityId this.communityId = community.communityId
let masterZenodoCommunityId = community.zenodoCommunity; let masterZenodoCommunityId = community.zenodoCommunity;
if (masterZenodoCommunityId) { if (masterZenodoCommunityId) {

View File

@ -1,11 +1,11 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {ActivatedRoute} from '@angular/router'; import {ActivatedRoute} from '@angular/router';
import {PiwikHelper} from '../utils/piwikHelper';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import {ZenodoCommunitiesService} from '../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service'; import {ZenodoCommunitiesService} from '../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service';
import {SearchZenodoCommunitiesService} from '../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service'; import {
SearchZenodoCommunitiesService
} from '../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service';
import {CommunityService} from '../openaireLibrary/connect/community/community.service'; import {CommunityService} from '../openaireLibrary/connect/community/community.service';
import {ZenodoInformationClass} from '../openaireLibrary/deposit/utils/zenodoInformation.class'; import {ZenodoInformationClass} from '../openaireLibrary/deposit/utils/zenodoInformation.class';
@ -16,7 +16,7 @@ import {properties} from "../../environments/environment";
@Component({ @Component({
selector: 'openaire-search-deposit', selector: 'openaire-search-deposit',
template: ` template: `
<deposit-search-dataproviders [piwikSiteId]=piwikSiteId [zenodoInformation]="zenodoInformation" <deposit-search-dataproviders [zenodoInformation]="zenodoInformation"
[communityId]="communityId" [searchForm]="{dark: false, class: 'search-form'}"></deposit-search-dataproviders> [communityId]="communityId" [searchForm]="{dark: false, class: 'search-form'}"></deposit-search-dataproviders>
` `
}) })
@ -25,8 +25,6 @@ export class OpenaireSearchDataprovidersToDepositComponent {
public zenodoInformation: ZenodoInformationClass = new ZenodoInformationClass(); public zenodoInformation: ZenodoInformationClass = new ZenodoInformationClass();
properties: EnvProperties = properties; properties: EnvProperties = properties;
fetchZenodoInformation: FetchZenodoInformation; fetchZenodoInformation: FetchZenodoInformation;
piwikSiteId = null;
communityId: string = null; communityId: string = null;
subs: Subscription[] = []; subs: Subscription[] = [];
@ -42,7 +40,6 @@ export class OpenaireSearchDataprovidersToDepositComponent {
community => { community => {
if(community) { if(community) {
this.communityId = community.communityId; this.communityId = community.communityId;
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
let masterZenodoCommunityId = community.zenodoCommunity; let masterZenodoCommunityId = community.zenodoCommunity;
if (masterZenodoCommunityId) { if (masterZenodoCommunityId) {
this.zenodoInformation.shareInZenodoUrl = this.properties.shareInZenodoPage; this.zenodoInformation.shareInZenodoUrl = this.properties.shareInZenodoPage;

View File

@ -3,7 +3,9 @@ import {ActivatedRoute, Router} from '@angular/router';
import {Meta, Title} from '@angular/platform-browser'; import {Meta, Title} from '@angular/platform-browser';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties'; import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {ZenodoCommunitiesService} from '../../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service'; import {ZenodoCommunitiesService} from '../../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service';
import {SearchZenodoCommunitiesService} from '../../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service'; import {
SearchZenodoCommunitiesService
} from '../../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service';
import {CommunityService} from '../../openaireLibrary/connect/community/community.service'; import {CommunityService} from '../../openaireLibrary/connect/community/community.service';
import {CommunityInfo} from '../../openaireLibrary/connect/community/communityInfo'; import {CommunityInfo} from '../../openaireLibrary/connect/community/communityInfo';
import {SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class'; import {SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
@ -12,7 +14,6 @@ import {HelperService} from "../../openaireLibrary/utils/helper/helper.service";
import {RouterHelper} from "../../openaireLibrary/utils/routerHelper.class"; import {RouterHelper} from "../../openaireLibrary/utils/routerHelper.class";
import {SEOService} from "../../openaireLibrary/sharedComponents/SEO/SEO.service"; import {SEOService} from "../../openaireLibrary/sharedComponents/SEO/SEO.service";
import {PiwikService} from "../../openaireLibrary/utils/piwik/piwik.service"; import {PiwikService} from "../../openaireLibrary/utils/piwik/piwik.service";
import {PiwikHelper} from "../../utils/piwikHelper";
import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.component"; import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
import {Subscriber, Subscription} from "rxjs"; import {Subscriber, Subscription} from "rxjs";
@ -24,9 +25,6 @@ import {Subscriber, Subscription} from "rxjs";
export class ShareInZenodoComponent { export class ShareInZenodoComponent {
public url: string = null; public url: string = null;
public title: string = "Share in Zenodo"; public title: string = "Share in Zenodo";
public piwikSiteId = null;
properties: EnvProperties = properties; properties: EnvProperties = properties;
communityId: string = null; communityId: string = null;
private community: CommunityInfo = null; private community: CommunityInfo = null;
@ -84,10 +82,7 @@ export class ShareInZenodoComponent {
community => { community => {
if (community) { if (community) {
this.communityId = community.communityId; this.communityId = community.communityId;
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId); this.subs.push(this._piwikService.trackView(this.properties, this.title).subscribe());
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subs.push(this._piwikService.trackView(this.properties, this.title, this.piwikSiteId).subscribe());
}
this.community = community; this.community = community;
this.masterZenodoCommunityId = this.community.zenodoCommunity; this.masterZenodoCommunityId = this.community.zenodoCommunity;
if (this.masterZenodoCommunityId) { if (this.masterZenodoCommunityId) {

View File

@ -75,43 +75,44 @@ import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties"
</div> </div>
</div> </div>
</div> </div>
<div class="uk-container uk-container-large"> <div class="uk-container uk-container-large uk-text-center">
<h1>Download records<span class="uk-text-primary">.</span></h1> <h1>Download records<span class="uk-text-primary">.</span></h1>
</div> <div class="uk-width-1-1 uk-flex uk-flex-center">
<div class="uk-section uk-container uk-container-large"> <div class="uk-width-large">
<div class="uk-grid uk-grid-large uk-child-width-1-2@m" uk-grid> To get all metadata records of the community in bulk, use the dump of research communities on Zenodo.
<div class="uk-text-center uk-flex uk-flex-middle"> It contains one tar file per community.
<div class="uk-icon-bg-shadow uk-icon-bg-shadow-large uk-margin-auto"> Each tar file contains gzipped tar files with one JSON per line.
<icon name="download" customClass="uk-text-background" [flex]="true" ratio="2.5" type="outlined" visuallyHidden="For {{openaireEntities.RESULTS}}"></icon> <br>
</div> <a href="https://graph.openaire.eu/docs/downloads/subgraphs#the-dumps-about-research-communities-initiatives-and-infrastructures" target="_blank">
</div> Learn more <span uk-icon="icon:chevron-right; ratio:0.7"></span></a>
<div class="uk-text-center">
<div class="">
To get all metadata records of the community in bulk, use the dump of research communities on Zenodo.
It contains one tar file per community.
Each tar file contains gzipped tar files with one JSON per line.
<a href="https://graph.openaire.eu/docs/downloads/subgraphs#the-dumps-about-research-communities-initiatives-and-infrastructures" target="_blank">
More information</a>
</div>
<div class="uk-margin-top">
<a class="uk-display-inline-block uk-button uk-button-text"
href="https://doi.org/10.5281/zenodo.3974604" target="_blank">
<span class="uk-flex uk-flex-middle">
<span>Community dump</span>
</span>
</a>
<br>
<a class="uk-display-inline-block uk-button uk-button-text"
href="https://doi.org/10.5281/zenodo.3974225" target="_blank">
<span class="uk-flex uk-flex-middle">
<span>Schema</span>
</span>
</a>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="uk-section uk-container uk-container-small">
<div class="uk-grid uk-grid-large uk-flex uk-flex-center" uk-grid>
<div class="uk-flex uk-flex-middle uk-flex-center uk-card uk-card-default uk-padding uk-width-medium">
<a class="uk-display-inline-block uk-button uk-button-text"
href="https://doi.org/10.5281/zenodo.3974604" target="_blank">
<span class="uk-flex uk-flex-middle">
<span>Community dump</span>
</span>
</a>
</div>
<div class="uk-flex uk-flex-middle uk-flex-center uk-card uk-card-default uk-padding uk-width-medium uk-margin-large-left">
<a class="uk-display-inline-block uk-button uk-button-text"
href="https://doi.org/10.5281/zenodo.3974225" target="_blank">
<span class="uk-flex uk-flex-middle">
<span>Schema</span>
</span>
</a>
</div>
</div>
</div>
</div>
` `
}) })
export class DevelopComponent implements OnInit, OnDestroy { export class DevelopComponent implements OnInit, OnDestroy {

View File

@ -1,17 +1,15 @@
import {Component} from "@angular/core"; import {Component} from "@angular/core";
import {properties} from "../../environments/environment"; import {properties} from "../../environments/environment";
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../utils/piwikHelper";
@Component({ @Component({
selector: 'community-fos', selector: 'community-fos',
template: ` template: `
<fos [piwikSiteId]="piwikSiteId"></fos> <fos></fos>
` `
}) })
export class CommunityFosComponent { export class CommunityFosComponent {
piwikSiteId;
communityId; communityId;
constructor() { constructor() {
@ -19,6 +17,5 @@ export class CommunityFosComponent {
ngOnInit() { ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
} }
} }

View File

@ -51,9 +51,7 @@ export class GetStartedComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
}
this.url = this.properties.domain + this.properties.baseLink + this._router.url; this.url = this.properties.domain + this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url); this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url); this.updateUrl(this.url);

View File

@ -31,7 +31,7 @@ export class FeaturedPageComponent {
this.breadcrumbs = data.breadcrumbs; this.breadcrumbs = data.breadcrumbs;
} }
})) }))
this.subs.push(this.config.communityInformationState.subscribe((portal: Portal) => { this.subs.push(this.config.portalAsObservable.subscribe((portal: Portal) => {
if (portal) { if (portal) {
let pages: Page[] = <Page[]>portal.pages; let pages: Page[] = <Page[]>portal.pages;
this.page = pages.find(page => (page.route == this._router.url)); this.page = pages.find(page => (page.route == this._router.url));

View File

@ -8,7 +8,7 @@ import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../environments/environment"; import {properties} from "../../environments/environment";
import {PiwikHelper} from "../utils/piwikHelper"; import {ConfigurationService} from "../openaireLibrary/utils/configuration/configuration.service";
@Component({ @Component({
selector: 'html-page', selector: 'html-page',
@ -28,24 +28,20 @@ export class HtmlPageComponent {
@Input() description: string; @Input() description: string;
private subscriptions = []; private subscriptions = [];
communityId; communityId;
piwikSiteId;
constructor(private route: ActivatedRoute, private _router: Router, constructor(private route: ActivatedRoute, private _router: Router,
private _meta: Meta, private _meta: Meta,
private _title: Title, private _title: Title,
private seoService: SEOService, private seoService: SEOService,
private _piwikService: PiwikService, private _piwikService: PiwikService,
private configurationService: ConfigurationService,
private helper: HelperService) { private helper: HelperService) {
} }
public ngOnInit() { public ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId); this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { this.url = this.properties.domain + this.properties.baseLink + this._router.url;
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
}
//TODO set the proper URL
this.url = this.properties.domain + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url); this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url); this.updateUrl(this.url);
this.updateTitle(this.pageTitle); this.updateTitle(this.pageTitle);

View File

@ -11,7 +11,7 @@ import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.co
</div> </div>
<div class="uk-container uk-container-large uk-section uk-section-small uk-margin-medium-bottom"> <div class="uk-container uk-container-large uk-section uk-section-small uk-margin-medium-bottom">
<h1 class="uk-margin-top uk-margin-large-bottom uk-width-1-2@m">Supporting Organizations</h1> <h1 class="uk-margin-top uk-margin-large-bottom uk-width-1-2@m">Supporting Organizations</h1>
<html-page description="Organizations" pageTitle="Supporting Organizations"></html-page> <html-page description="OpenAIRE - Connect, Community Gateway, research community, organizations" pageTitle="Supporting Organizations"></html-page>
<affiliations [longView]="true" [getAffiliationsFromAPI]="true"></affiliations> <affiliations [longView]="true" [getAffiliationsFromAPI]="true"></affiliations>
</div> </div>
` `

View File

@ -1,15 +1,13 @@
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper'; import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-dataprovider', selector: 'openaire-dataprovider',
template: ` template: `
<dataprovider [piwikSiteId]=piwikSiteId [communityId]="communityId"></dataprovider>`, <dataprovider [communityId]="communityId"></dataprovider>`,
}) })
export class OpenaireDataProviderComponent implements OnInit { export class OpenaireDataProviderComponent implements OnInit {
piwikSiteId;
communityId; communityId;
constructor() { constructor() {
@ -17,6 +15,5 @@ export class OpenaireDataProviderComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
} }
} }

View File

@ -1,16 +1,14 @@
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper'; import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-dataset', selector: 'openaire-dataset',
template: ` template: `
<result-landing type="dataset" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing> <result-landing type="dataset" [communityId]="communityId"></result-landing>
`, `,
}) })
export class OpenaireDatasetComponent implements OnInit { export class OpenaireDatasetComponent implements OnInit {
piwikSiteId;
communityId; communityId;
constructor() { constructor() {
@ -18,6 +16,5 @@ export class OpenaireDatasetComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
} }
} }

View File

@ -1,15 +1,13 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper'; import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-htmlProjectReport', selector: 'openaire-htmlProjectReport',
template: ` template: `
<htmlProjectReport [piwikSiteId]=piwikSiteId [communityId]="communityId"></htmlProjectReport>`, <htmlProjectReport [communityId]="communityId"></htmlProjectReport>`,
}) })
export class OpenaireHtmlProjectReportComponent { export class OpenaireHtmlProjectReportComponent {
piwikSiteId;
communityId; communityId;
constructor() { constructor() {
@ -17,6 +15,5 @@ export class OpenaireHtmlProjectReportComponent {
ngOnInit() { ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
} }
} }

View File

@ -1,15 +1,13 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper'; import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-organization', selector: 'openaire-organization',
template: ` template: `
<organization [piwikSiteId]=piwikSiteId [communityId]="communityId"></organization>`, <organization [communityId]="communityId"></organization>`,
}) })
export class OpenaireOrganizationComponent { export class OpenaireOrganizationComponent {
piwikSiteId;
communityId; communityId;
constructor() { constructor() {
@ -17,6 +15,5 @@ export class OpenaireOrganizationComponent {
ngOnInit() { ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
} }
} }

View File

@ -1,23 +1,20 @@
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper'; import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-orp', selector: 'openaire-orp',
template: ` template: `
<result-landing type="orp" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing> <result-landing type="orp" [communityId]="communityId"></result-landing>
`, `,
}) })
export class OpenaireOrpComponent implements OnInit { export class OpenaireOrpComponent implements OnInit {
piwikSiteId = null;
communityId = null; communityId = null;
constructor() {} constructor() {}
ngOnInit() { ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
} }
} }

View File

@ -1,15 +1,13 @@
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper'; import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-project', selector: 'openaire-project',
template: ` template: `
<project [piwikSiteId]=piwikSiteId [communityId]="communityId"></project>`, <project [communityId]="communityId"></project>`,
}) })
export class OpenaireProjectComponent implements OnInit { export class OpenaireProjectComponent implements OnInit {
piwikSiteId;
communityId; communityId;
constructor() { constructor() {
@ -17,6 +15,5 @@ export class OpenaireProjectComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
} }
} }

View File

@ -1,22 +1,19 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper'; import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-publication', selector: 'openaire-publication',
template: ` template: `
<result-landing type="publication" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing> <result-landing type="publication" [communityId]="communityId"></result-landing>
`, `,
}) })
export class OpenairePublicationComponent { export class OpenairePublicationComponent {
piwikSiteId = null;
communityId = null; communityId = null;
constructor() {} constructor() {}
ngOnInit() { ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
} }
} }

View File

@ -1,21 +1,18 @@
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../../utils/piwikHelper";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-publication', selector: 'openaire-publication',
template: ` template: `
<result-landing type="result" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing>`, <result-landing type="result" [communityId]="communityId"></result-landing>`,
}) })
export class OpenaireResultComponent implements OnInit{ export class OpenaireResultComponent implements OnInit{
piwikSiteId;
communityId; communityId;
constructor() {} constructor() {}
ngOnInit() { ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
} }
} }

View File

@ -1,16 +1,14 @@
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper'; import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-software', selector: 'openaire-software',
template: ` template: `
<result-landing type="software" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing> <result-landing type="software" [communityId]="communityId"></result-landing>
`, `,
}) })
export class OpenaireSoftwareComponent implements OnInit { export class OpenaireSoftwareComponent implements OnInit {
piwikSiteId;
communityId; communityId;
constructor() { constructor() {
@ -18,6 +16,5 @@ export class OpenaireSoftwareComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
} }
} }

View File

@ -220,10 +220,7 @@ export class FaqsComponent {
public ngOnInit() { public ngOnInit() {
this.properties = properties; this.properties = properties;
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
}
this.url = this.properties.baseLink + this._router.url; this.url = this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url); this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url); this.updateUrl(this.url);

View File

@ -184,10 +184,10 @@ import {QuickContactService} from '../openaireLibrary/sharedComponents/quick-con
<h6 class="uk-margin-small-bottom">Content</h6> <h6 class="uk-margin-small-bottom">Content</h6>
<div>Manage projects, content providers, subjects and zenodo communities that are related to the research community.</div> <div>Manage projects, content providers, subjects and zenodo communities that are related to the research community.</div>
</div> </div>
<div class="left-text uk-margin-medium-bottom uk-padding uk-margin-medium-left uk-padding-remove-right"> <!--<div class="left-text uk-margin-medium-bottom uk-padding uk-margin-medium-left uk-padding-remove-right">
<h6 class="uk-margin-small-bottom">Statistics & Charts</h6> <h6 class="uk-margin-small-bottom">Statistics & Charts</h6>
<div>Manage statistical numbers & charts that will be displayed in the community overview and graph analysis views.</div> <div>Manage statistical numbers & charts that will be displayed in the community overview and graph analysis views.</div>
</div> </div>-->
</div> </div>
<div class="mid uk-flex uk-flex-middle"> <div class="mid uk-flex uk-flex-middle">
<div class="uk-position-relative"> <div class="uk-position-relative">
@ -253,9 +253,7 @@ export class LearnHowComponent implements OnInit {
} }
public ngOnInit() { public ngOnInit() {
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
}
this.url = this.properties.baseLink + this._router.url; this.url = this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url); this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url); this.updateUrl(this.url);
@ -281,12 +279,14 @@ export class LearnHowComponent implements OnInit {
this.subscriptions.forEach(subscription => { this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) { if (subscription instanceof Subscriber) {
subscription.unsubscribe(); subscription.unsubscribe();
} else if(typeof IntersectionObserver !== 'undefined' && subscription instanceof IntersectionObserver) {
subscription.disconnect();
} }
}); });
} }
ngAfterViewInit() { ngAfterViewInit() {
if (typeof window !== "undefined") { if (typeof IntersectionObserver !== "undefined") {
this.createObservers(); this.createObservers();
} }
} }

View File

@ -72,9 +72,7 @@ export class MyCommunitiesComponent {
var url = this.properties.domain + this.properties.baseLink + this._router.url; var url = this.properties.domain + this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(url, false); this.seoService.createLinkForCanonicalURL(url, false);
this._meta.updateTag({content: url}, "property='og:url'"); this._meta.updateTag({content: url}, "property='og:url'");
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Connect").subscribe());
this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Connect", this.properties.piwikSiteId).subscribe());
}
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => { this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
this.user = user; this.user = user;
if (this.user) { if (this.user) {

View File

@ -4,19 +4,16 @@ import {Subscriber, Subscription} from "rxjs";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties"; import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
import {CommunityService} from "../../openaireLibrary/connect/community/community.service"; import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
import {PiwikHelper} from "../../utils/piwikHelper";
@Component({ @Component({
selector: 'openaire-my-orcid-links', selector: 'openaire-my-orcid-links',
template: ` template: `
<my-orcid-links [piwikSiteId]=piwikSiteId <my-orcid-links [communityId]="communityId"></my-orcid-links>
[communityId]="communityId"></my-orcid-links>
` `
}) })
export class OpenaireMyOrcidLinksComponent { export class OpenaireMyOrcidLinksComponent {
properties: EnvProperties = properties; properties: EnvProperties = properties;
piwikSiteId = null;
public communityId = null; public communityId = null;
subs: Subscription[] = []; subs: Subscription[] = [];
@ -27,7 +24,6 @@ export class OpenaireMyOrcidLinksComponent {
this.subs.push(this._communityService.getCommunityAsObservable().subscribe( this.subs.push(this._communityService.getCommunityAsObservable().subscribe(
community => { community => {
if(community) { if(community) {
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
this.communityId = community.communityId; this.communityId = community.communityId;
} }
})); }));

View File

@ -1,17 +1,15 @@
import {Component} from "@angular/core"; import {Component} from "@angular/core";
import {properties} from "../../environments/environment"; import {properties} from "../../environments/environment";
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../utils/piwikHelper";
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
@Component({ @Component({
selector: 'community-sdg', selector: 'community-sdg',
template: ` template: `
<sdg [piwikSiteId]="piwikSiteId" [customFilter]="customFilter"></sdg> <sdg [customFilter]="customFilter"></sdg>
` `
}) })
export class CommunitySdgComponent { export class CommunitySdgComponent {
piwikSiteId;
communityId; communityId;
customFilter: SearchCustomFilter = null; customFilter: SearchCustomFilter = null;
@ -20,7 +18,6 @@ export class CommunitySdgComponent {
ngOnInit() { ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, ""); this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
} }
} }

View File

@ -1,20 +1,18 @@
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../../utils/piwikHelper";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-advanced-search-dataprovider', selector: 'openaire-advanced-search-dataprovider',
template: ` template: `
<search-dataproviders [simpleView]="false" [customFilter]=customFilter [piwikSiteId]="piwikSiteId" <search-dataproviders [simpleView]="false" [customFilter]=customFilter
[hasPrefix]="false" [showBreadcrumb]="true" [showSwitchSearchLink]="false" [searchForm]="{dark: false, class: 'search-form'}"> [hasPrefix]="false" [showBreadcrumb]="true" [showSwitchSearchLink]="false" [searchForm]="{dark: false, class: 'search-form'}">
</search-dataproviders> </search-dataproviders>
` `
}) })
export class OpenaireAdvancedSearchDataProvidersComponent implements OnInit { export class OpenaireAdvancedSearchDataProvidersComponent implements OnInit {
communityId: string; communityId: string;
piwikSiteId = null;
customFilter: SearchCustomFilter = null; customFilter: SearchCustomFilter = null;
constructor() { constructor() {
@ -23,7 +21,6 @@ export class OpenaireAdvancedSearchDataProvidersComponent implements OnInit {
ngOnInit() { ngOnInit() {
let communityId = ConnectHelper.getCommunityFromDomain(properties.domain); let communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
if (communityId) { if (communityId) {
this.piwikSiteId = PiwikHelper.getSiteId(communityId);
this.communityId = communityId; this.communityId = communityId;
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, ""); this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
this.customFilter.isHiddenFilter = false; this.customFilter.isHiddenFilter = false;

View File

@ -1,22 +1,18 @@
import {Component, Input, OnInit, ViewChild} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ActivatedRoute} from "@angular/router";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../../utils/piwikHelper";
import {Subscriber} from "rxjs";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-advanced-search-organizations', selector: 'openaire-advanced-search-organizations',
template: ` template: `
<search-organizations [simpleView]="false" [customFilter]=customFilter [piwikSiteId]="piwikSiteId" [hasPrefix]="false" [showBreadcrumb]="true" [showSwitchSearchLink]="false" [searchForm]="{dark: false, class: 'search-form'}"> <search-organizations [simpleView]="false" [customFilter]=customFilter [hasPrefix]="false" [showBreadcrumb]="true" [showSwitchSearchLink]="false" [searchForm]="{dark: false, class: 'search-form'}">
</search-organizations> </search-organizations>
` `
}) })
export class OpenaireAdvancedSearchOrganizationsComponent implements OnInit { export class OpenaireAdvancedSearchOrganizationsComponent implements OnInit {
communityId:string; communityId:string;
piwikSiteId;
customFilter: SearchCustomFilter; customFilter: SearchCustomFilter;
constructor () { constructor () {
@ -24,7 +20,6 @@ export class OpenaireAdvancedSearchOrganizationsComponent implements OnInit {
ngOnInit() { ngOnInit() {
let communityId = ConnectHelper.getCommunityFromDomain(properties.domain); let communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(communityId);
if(communityId){ if(communityId){
this.communityId = communityId; this.communityId = communityId;
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, ""); this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");

View File

@ -1,13 +1,12 @@
import {Component, OnInit} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper"; import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../../utils/piwikHelper";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-advanced-search-projects', selector: 'openaire-advanced-search-projects',
template: ` template: `
<search-projects [simpleView]="false" [customFilter]=customFilter [piwikSiteId]="piwikSiteId" [hasPrefix]="false" <search-projects [simpleView]="false" [customFilter]=customFilter [hasPrefix]="false"
[showBreadcrumb]="true" [showSwitchSearchLink]="false" [searchForm]="{dark: false, class: 'search-form'}"> [showBreadcrumb]="true" [showSwitchSearchLink]="false" [searchForm]="{dark: false, class: 'search-form'}">
</search-projects> </search-projects>
@ -16,7 +15,6 @@ import {properties} from "../../../environments/environment";
export class OpenaireAdvancedSearchProjectsComponent implements OnInit { export class OpenaireAdvancedSearchProjectsComponent implements OnInit {
communityId: string; communityId: string;
piwikSiteId;
customFilter: SearchCustomFilter = null; customFilter: SearchCustomFilter = null;
constructor() { constructor() {
@ -26,7 +24,6 @@ export class OpenaireAdvancedSearchProjectsComponent implements OnInit {
let communityId = ConnectHelper.getCommunityFromDomain(properties.domain); let communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
if (communityId) { if (communityId) {
this.communityId = communityId; this.communityId = communityId;
this.piwikSiteId = PiwikHelper.getSiteId(communityId);
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, ""); this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
this.customFilter.isHiddenFilter = false; this.customFilter.isHiddenFilter = false;
} }

View File

@ -1,8 +1,6 @@
import {Component, OnDestroy, OnInit} from '@angular/core'; import {Component, OnDestroy, OnInit} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ActivatedRoute} from "@angular/router"; import {ActivatedRoute} from "@angular/router";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../../utils/piwikHelper";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties"; import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@ -12,7 +10,7 @@ import {CommunityService} from "../../openaireLibrary/connect/community/communit
selector: 'openaire-search-results', selector: 'openaire-search-results',
template: ` template: `
<search-research-results resultType="result" [simpleView]="false" [customFilter]=customFilter <search-research-results resultType="result" [simpleView]="false" [customFilter]=customFilter
[piwikSiteId]="piwikSiteId" [hasPrefix]="false" [showBreadcrumb]="true" [hasPrefix]="false" [showBreadcrumb]="true"
[openaireLink]="'https://' + (properties.environment == 'production'?'':'beta.') + 'explore.openaire.eu/search/advanced/research-outcomes'" [openaireLink]="'https://' + (properties.environment == 'production'?'':'beta.') + 'explore.openaire.eu/search/advanced/research-outcomes'"
[searchForm]="{dark: false, class: 'search-form'}" [searchForm]="{dark: false, class: 'search-form'}"
></search-research-results> ></search-research-results>
@ -20,7 +18,6 @@ import {CommunityService} from "../../openaireLibrary/connect/community/communit
}) })
export class OpenaireSearchResearchResultsComponent implements OnInit, OnDestroy { export class OpenaireSearchResearchResultsComponent implements OnInit, OnDestroy {
connectCommunityId: string; connectCommunityId: string;
piwikSiteId = null;
customFilter: SearchCustomFilter = null; customFilter: SearchCustomFilter = null;
properties: EnvProperties = properties; properties: EnvProperties = properties;
sub; sub;
@ -42,7 +39,6 @@ export class OpenaireSearchResearchResultsComponent implements OnInit, OnDestro
this.sub = this._communityService.getCommunityAsObservable().subscribe(community => { this.sub = this._communityService.getCommunityAsObservable().subscribe(community => {
if (community != null) { if (community != null) {
this.connectCommunityId = community.communityId; this.connectCommunityId = community.communityId;
this.piwikSiteId = PiwikHelper.getSiteId(this.connectCommunityId);
this.customFilter = new SearchCustomFilter("Community", "communityId", this.connectCommunityId, community.shortTitle); this.customFilter = new SearchCustomFilter("Community", "communityId", this.connectCommunityId, community.shortTitle);
} }
}); });

View File

@ -23,7 +23,7 @@ import {Subscriber} from "rxjs";
selector: 'search-communities', selector: 'search-communities',
template: ` template: `
<new-search-page pageTitle="Communities" <new-search-page pageTitle="Communities"
[hasPrefix]=true prefix="OpenAIRE Connect | " [piwikSiteId]="piwikSiteId" [hasPrefix]=true prefix="OpenAIRE Connect | "
[formPlaceholderText]="'Search OpenAIRE Communities'" [formPlaceholderText]="'Search OpenAIRE Communities'"
[type]="(results.length > 1)?'communities':'community'" entityType="community" [type]="(results.length > 1)?'communities':'community'" entityType="community"
[results]="results" [searchUtils]="searchUtils" [results]="results" [searchUtils]="searchUtils"
@ -39,7 +39,6 @@ import {Subscriber} from "rxjs";
` `
}) })
export class SearchCommunitiesComponent { export class SearchCommunitiesComponent {
public piwikSiteId = null;
private errorCodes: ErrorCodes; private errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent; private errorMessages: ErrorMessagesComponent;
public results: CommunityInfo[] = []; public results: CommunityInfo[] = [];
@ -82,7 +81,6 @@ export class SearchCommunitiesComponent {
public ngOnInit() { public ngOnInit() {
this.properties = properties; this.properties = properties;
this.piwikSiteId = this.properties.piwikSiteId;
this.baseUrl = this.properties.searchLinkToCommunities; this.baseUrl = this.properties.searchLinkToCommunities;
this.subscriptions.push(this.route.queryParams.subscribe(params => { this.subscriptions.push(this.route.queryParams.subscribe(params => {
this.searchPage.resultsPerPage = 10; this.searchPage.resultsPerPage = 10;

View File

@ -1,5 +1,4 @@
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper'; import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@ -9,13 +8,12 @@ import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properti
selector: 'openaire-search-find', selector: 'openaire-search-find',
template: ` template: `
<search-all logoURL="/assets/common-assets/logo-small-explore.png" name="OpenAIRE Connect" <search-all logoURL="/assets/common-assets/logo-small-explore.png" name="OpenAIRE Connect"
[customFilter]=customFilter [piwikSiteId]="piwikSiteId"></search-all> [customFilter]=customFilter></search-all>
`, `,
}) })
export class OpenaireSearchComponent { export class OpenaireSearchComponent {
communityId: string; communityId: string;
customFilter: SearchCustomFilter = null; customFilter: SearchCustomFilter = null;
piwikSiteId = null;
properties: EnvProperties = properties; properties: EnvProperties = properties;
constructor() { constructor() {
@ -25,7 +23,6 @@ export class OpenaireSearchComponent {
let communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain); let communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
if (communityId) { if (communityId) {
this.communityId = communityId; this.communityId = communityId;
this.piwikSiteId = PiwikHelper.getSiteId(communityId);
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, ""); this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
} }
} }

View File

@ -1,13 +1,14 @@
import {Component, ViewChild} from '@angular/core'; import {Component, ViewChild} from '@angular/core';
import { ActivatedRoute} from '@angular/router'; import {ActivatedRoute} from '@angular/router';
import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes'; import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes';
import {ErrorMessagesComponent} from '../../openaireLibrary/utils/errorMessages.component'; import {ErrorMessagesComponent} from '../../openaireLibrary/utils/errorMessages.component';
import {SearchFields} from '../../openaireLibrary/utils/properties/searchFields'; import {SearchFields} from '../../openaireLibrary/utils/properties/searchFields';
import {SearchCustomFilter, SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class'; import {SearchCustomFilter, SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties'; import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {SearchCommunityDataprovidersService} from '../../openaireLibrary/connect/contentProviders/searchDataproviders.service'; import {
import {PiwikHelper} from '../../utils/piwikHelper'; SearchCommunityDataprovidersService
} from '../../openaireLibrary/connect/contentProviders/searchDataproviders.service';
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
import {CommunitiesService} from "../../openaireLibrary/connect/communities/communities.service"; import {CommunitiesService} from "../../openaireLibrary/connect/communities/communities.service";
import {CommunityService} from "../../openaireLibrary/connect/community/community.service"; import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
@ -28,7 +29,6 @@ import {SearchResult} from "../../openaireLibrary/utils/entities/searchResult";
[searchUtils]="searchUtils" [searchUtils]="searchUtils"
[sortedByChanged]="searchUtils.sortBy" [sortedByChanged]="searchUtils.sortBy"
[fieldIds]="fieldIds" [fieldIdsMap]="fieldIdsMap" [selectedFields]="selectedFields" [fieldIds]="fieldIds" [fieldIdsMap]="fieldIdsMap" [selectedFields]="selectedFields"
[simpleSearchLink]="properties.searchLinkToDataProviders" [simpleSearchLink]="properties.searchLinkToDataProviders"
[disableForms]="disableForms" [disableForms]="disableForms"
[disableRefineForms]="disableRefineForms" [disableRefineForms]="disableRefineForms"
@ -36,8 +36,8 @@ import {SearchResult} from "../../openaireLibrary/utils/entities/searchResult";
[oldTotalResults]="oldTotalResults" [oldTotalResults]="oldTotalResults"
[openaireLink]="'https://' + (properties.environment == 'production'?'':'beta.') + 'explore.openaire.eu/search/find/dataproviders'" [openaireLink]="'https://' + (properties.environment == 'production'?'':'beta.') + 'explore.openaire.eu/search/find/dataproviders'"
[includeOnlyResultsAndFilter]="false" [includeOnlyResultsAndFilter]="false"
[piwikSiteId]=piwikSiteId [hasPrefix]="false" [hasPrefix]="false"
searchFormClass="datasourcesTableSearchForm" [entitiesSelection]="true" [showSwitchSearchLink]="false" searchFormClass="datasourcesTableSearchForm" [entitiesSelection]="false" [showSwitchSearchLink]="false"
[filters]="filters" [filters]="filters"
[simpleView]="true" formPlaceholderText="Search by name..." [simpleView]="true" formPlaceholderText="Search by name..."
[showResultCount]="false" [showIndexInfo]="false" [showDownload]="false" [showResultCount]="false" [showIndexInfo]="false" [showDownload]="false"
@ -64,7 +64,6 @@ export class OpenaireSearchDataprovidersComponent {
private communityId: string = ''; private communityId: string = '';
subscriptions = []; subscriptions = [];
piwikSiteId = null;
customFilter: SearchCustomFilter = null; customFilter: SearchCustomFilter = null;
initialLoad = true; initialLoad = true;
public allResults =[]; public allResults =[];
@ -89,7 +88,6 @@ export class OpenaireSearchDataprovidersComponent {
if(community != null) { if(community != null) {
this.communityId = community.communityId; this.communityId = community.communityId;
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, community.shortTitle); this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, community.shortTitle);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
this.subscriptions.push(this.route.queryParams.subscribe(params => { this.subscriptions.push(this.route.queryParams.subscribe(params => {
let page = (params['page'] === undefined) ? 1 : +params['page']; let page = (params['page'] === undefined) ? 1 : +params['page'];
this.searchUtils.page = (page <= 0) ? 1 : page; this.searchUtils.page = (page <= 0) ? 1 : page;

View File

@ -1,8 +1,4 @@
import {Component, OnInit} from '@angular/core'; import {Component} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'openaire-search-organizations', selector: 'openaire-search-organizations',
@ -10,16 +6,5 @@ import {properties} from "../../../environments/environment";
<search-organizations [searchForm]="{dark: false, class: 'search-form'}"></search-organizations> <search-organizations [searchForm]="{dark: false, class: 'search-form'}"></search-organizations>
` `
}) })
export class OpenaireSearchOrganizationsComponent implements OnInit { export class OpenaireSearchOrganizationsComponent{
piwikSiteId = null;
constructor() {
}
ngOnInit() {
let communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
if (communityId) {
this.piwikSiteId = PiwikHelper.getSiteId(communityId);
}
}
} }

View File

@ -9,7 +9,6 @@ import {SearchFields} from '../../openaireLibrary/utils/properties/searchFields'
import {SearchCustomFilter, SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class'; import {SearchCustomFilter, SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties'; import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {SearchCommunityProjectsService} from '../../openaireLibrary/connect/projects/searchProjects.service'; import {SearchCommunityProjectsService} from '../../openaireLibrary/connect/projects/searchProjects.service';
import {PiwikHelper} from '../../utils/piwikHelper';
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
import {CommunityService} from "../../openaireLibrary/connect/community/community.service"; import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
@ -20,29 +19,29 @@ import {SearchResult} from "../../openaireLibrary/utils/entities/searchResult";
selector: 'openaire-search-projects', selector: 'openaire-search-projects',
template: ` template: `
<new-search-page <new-search-page
pageTitle="Search Projects" pageTitle="Search Projects"
entityType="project" entityType="project"
type="project" type="project"
[results]="results" [results]="results"
[searchUtils]="searchUtils" [searchUtils]="searchUtils"
[sortedByChanged]="searchUtils.sortBy" [sortedByChanged]="searchUtils.sortBy"
[fieldIds]="fieldIds" [fieldIdsMap]="fieldIdsMap" [selectedFields]="selectedFields" [fieldIds]="fieldIds" [fieldIdsMap]="fieldIdsMap" [selectedFields]="selectedFields"
[simpleSearchLink]="properties.searchLinkToProjects" [simpleSearchLink]="properties.searchLinkToProjects"
[disableForms]="disableForms" [disableForms]="disableForms"
[disableRefineForms]="disableRefineForms" [disableRefineForms]="disableRefineForms"
[loadPaging]="loadPaging" [loadPaging]="loadPaging"
[oldTotalResults]="oldTotalResults" [oldTotalResults]="oldTotalResults"
[openaireLink]="'https://' + (properties.environment == 'production'?'':'beta.') + 'explore.openaire.eu/search/find/projects'" [openaireLink]="'https://' + (properties.environment == 'production'?'':'beta.') + 'explore.openaire.eu/search/find/projects'"
[includeOnlyResultsAndFilter]="false" [includeOnlyResultsAndFilter]="false"
[piwikSiteId]=piwikSiteId [hasPrefix]="false" [hasPrefix]="false"
searchFormClass="datasourcesTableSearchForm" [entitiesSelection]="true" [showSwitchSearchLink]="false" searchFormClass="datasourcesTableSearchForm" [entitiesSelection]="false" [showSwitchSearchLink]="false"
[filters]="filters" [filters]="filters"
[simpleView]="true" formPlaceholderText="Search by name..." [simpleView]="true" formPlaceholderText="Search by name..."
[showResultCount]="false" [showIndexInfo]="false" [showDownload]="false" [showResultCount]="false" [showIndexInfo]="false" [showDownload]="false"
[sort]="false" [showBreadcrumb]="true" [sort]="false" [showBreadcrumb]="true"
[customFilter]=customFilter [searchForm]="{dark: false, class: 'search-form'}"> [customFilter]=customFilter [searchForm]="{dark: false, class: 'search-form'}">
</new-search-page> </new-search-page>
` `
}) })
@ -63,8 +62,6 @@ export class OpenaireSearchProjectsComponent {
public enableSearchView: boolean = true; public enableSearchView: boolean = true;
private communityId: string = ''; private communityId: string = '';
piwikSiteId = null;
customFilter: SearchCustomFilter = null; customFilter: SearchCustomFilter = null;
initialLoad = true; initialLoad = true;
public allResults =[]; public allResults =[];
@ -88,7 +85,6 @@ export class OpenaireSearchProjectsComponent {
if(community != null){ if(community != null){
this.communityId = community.communityId; this.communityId = community.communityId;
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, community.shortTitle); this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, community.shortTitle);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
this.subscriptions.push(this.route.queryParams.subscribe(params => { this.subscriptions.push(this.route.queryParams.subscribe(params => {
let page = (params['page'] === undefined) ? 1 : +params['page']; let page = (params['page'] === undefined) ? 1 : +params['page'];
this.searchUtils.page = (page <= 0) ? 1 : page; this.searchUtils.page = (page <= 0) ? 1 : page;

View File

@ -2,10 +2,7 @@ import {Component, OnDestroy, OnInit} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties"; import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
import {ActivatedRoute} from "@angular/router"; import {ActivatedRoute} from "@angular/router";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../../utils/piwikHelper";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {CommunitiesService} from "../../openaireLibrary/connect/communities/communities.service";
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
import {CommunityService} from "../../openaireLibrary/connect/community/community.service"; import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
@ -13,15 +10,13 @@ import {CommunityService} from "../../openaireLibrary/connect/community/communit
selector: 'openaire-search-results', selector: 'openaire-search-results',
template: ` template: `
<search-research-results resultType="result" [openaireLink]="'https://' + (properties.environment == 'production'?'':'beta.') + 'explore.openaire.eu/search/find/research-outcomes'" <search-research-results resultType="result" [openaireLink]="'https://' + (properties.environment == 'production'?'':'beta.') + 'explore.openaire.eu/search/find/research-outcomes'"
[customFilter]=customFilter [piwikSiteId]="piwikSiteId" [hasPrefix]="false" [customFilter]=customFilter [hasPrefix]="false"
[includeOnlyResultsAndFilter]="false" [showBreadcrumb]="true" [showSwitchSearchLink]="true" [searchForm]="{dark: false, class: 'search-form'}"></search-research-results> [includeOnlyResultsAndFilter]="false" [showBreadcrumb]="true" [showSwitchSearchLink]="true" [searchForm]="{dark: false, class: 'search-form'}"></search-research-results>
` `
}) })
export class OpenaireSearchResearchResultsComponent implements OnInit, OnDestroy { export class OpenaireSearchResearchResultsComponent implements OnInit, OnDestroy {
connectCommunityId: string; connectCommunityId: string;
piwikSiteId = null;
customFilter: SearchCustomFilter = null; customFilter: SearchCustomFilter = null;
properties:EnvProperties = properties; properties:EnvProperties = properties;
sub; sub;
@ -43,7 +38,6 @@ export class OpenaireSearchResearchResultsComponent implements OnInit, OnDestroy
this.sub = this._communityService.getCommunityAsObservable().subscribe(community =>{ this.sub = this._communityService.getCommunityAsObservable().subscribe(community =>{
if(community != null){ if(community != null){
this.connectCommunityId = community.communityId; this.connectCommunityId = community.communityId;
this.piwikSiteId = PiwikHelper.getSiteId(this.connectCommunityId);
this.customFilter = new SearchCustomFilter("Community", "communityId", this.connectCommunityId, community.shortTitle); this.customFilter = new SearchCustomFilter("Community", "communityId", this.connectCommunityId, community.shortTitle);
} }
}); });

View File

@ -13,7 +13,6 @@ import {
StatisticsDisplay, StatisticsDisplay,
StatisticsSummary StatisticsSummary
} from "../openaireLibrary/connect/statistics/statisticsEntities"; } from "../openaireLibrary/connect/statistics/statisticsEntities";
import {PiwikHelper} from '../utils/piwikHelper';
import {CommunityCharts} from "../openaireLibrary/connect/statistics/communityCharts"; import {CommunityCharts} from "../openaireLibrary/connect/statistics/communityCharts";
import {CommunityService} from "../openaireLibrary/connect/community/community.service"; import {CommunityService} from "../openaireLibrary/connect/community/community.service";
import {Subscriber, Subscription} from "rxjs"; import {Subscriber, Subscription} from "rxjs";
@ -90,8 +89,8 @@ export class StatisticsComponent {
community => { community => {
if(community) { if(community) {
this.communityId = community.communityId; this.communityId = community.communityId;
if (this.currentMode == "showInMonitor" && this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { if (this.currentMode == "showInMonitor") {
this.subs.push(this._piwikService.trackView(this.properties, "Monitor " + this.communityId, PiwikHelper.siteIDs[this.communityId]).subscribe()); this.subs.push(this._piwikService.trackView(this.properties, "Monitor " + this.communityId).subscribe());
} }
this.communityName = community.shortTitle; this.communityName = community.shortTitle;
this.createChartUrlMap(); this.createChartUrlMap();
@ -157,7 +156,7 @@ export class StatisticsComponent {
getCommunityInfo() { getCommunityInfo() {
// console.log(`calling ${this.properties.adminToolsAPIURL}/communityFull/${this.communityId}`); // console.log(`calling ${this.properties.adminToolsAPIURL}/communityFull/${this.communityId}`);
this.subs.push(this._configService.communityInformationState.subscribe( this.subs.push(this._configService.portalAsObservable.subscribe(
res => { res => {
this.communityInfo = res; this.communityInfo = res;
/*for(let i=0; i<this.communityInfo.entities.length; i++){ /*for(let i=0; i<this.communityInfo.entities.length; i++){

View File

@ -6,7 +6,6 @@ import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
import {Meta, Title} from "@angular/platform-browser"; import {Meta, Title} from "@angular/platform-browser";
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
import {PiwikHelper} from "../utils/piwikHelper";
import {StringUtils} from "../openaireLibrary/utils/string-utils.class"; import {StringUtils} from "../openaireLibrary/utils/string-utils.class";
import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component"; import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
import {properties} from "../../environments/environment"; import {properties} from "../../environments/environment";
@ -362,9 +361,7 @@ export class SubjectsComponent {
this.subs.push(this.communityService.getCommunityAsObservable().subscribe(community => { this.subs.push(this.communityService.getCommunityAsObservable().subscribe(community => {
if (community) { if (community) {
this.communityId = community.communityId; this.communityId = community.communityId;
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { this.subs.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
this.subs.push(this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.communityId)).subscribe());
}
this.getPageContents(); this.getPageContents();
this.displayedSubjects = community.subjects; this.displayedSubjects = community.subjects;
this.displayedSdg = community.sdg; this.displayedSdg = community.sdg;

View File

@ -1,3 +1,6 @@
/**
* @deprecated
* */
export class PiwikHelper{ export class PiwikHelper{
public static siteIDs = { public static siteIDs = {
"dh-ch":81, "dh-ch":81,
@ -43,6 +46,7 @@ export class PiwikHelper{
"dth": 719, "dth": 719,
"lifewatch-eric": 744 "lifewatch-eric": 744
}; };
public static getSiteId(communityId:string){ public static getSiteId(communityId:string){
return this.siteIDs[communityId]; return this.siteIDs[communityId];
} }

View File

@ -102,6 +102,7 @@ export let properties: EnvProperties = {
errorLink: '/error', errorLink: '/error',
lastIndexInformationLink: "https://beta.openaire.eu/aggregation-and-content-provision-workflows", lastIndexInformationLink: "https://beta.openaire.eu/aggregation-and-content-provision-workflows",
showLastIndexInformationLink: true, showLastIndexInformationLink: true,
bipFrameAPIURL: "https://bip.imsi.athenarc.gr/api/impact-chart?id=",
widgetLink: "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=", widgetLink: "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",
claimsInformationLink: "https://beta.openaire.eu/linking", claimsInformationLink: "https://beta.openaire.eu/linking",
depositLearnHowPage: "/participate/deposit/learn-how", depositLearnHowPage: "/participate/deposit/learn-how",

View File

@ -102,6 +102,7 @@ export let properties: EnvProperties = {
errorLink: '/error', errorLink: '/error',
lastIndexInformationLink: "https://www.openaire.eu/aggregation-and-content-provision-workflows", lastIndexInformationLink: "https://www.openaire.eu/aggregation-and-content-provision-workflows",
showLastIndexInformationLink: true, showLastIndexInformationLink: true,
bipFrameAPIURL: "https://bip.imsi.athenarc.gr/api/impact-chart?id=",
widgetLink: "https://www.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=", widgetLink: "https://www.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",
claimsInformationLink: "https://www.openaire.eu/linking", claimsInformationLink: "https://www.openaire.eu/linking",
depositLearnHowPage: "/participate/deposit/learn-how", depositLearnHowPage: "/participate/deposit/learn-how",

View File

@ -107,6 +107,7 @@ export let properties: EnvProperties = {
errorLink: '/error', errorLink: '/error',
lastIndexInformationLink: 'https://beta.openaire.eu/aggregation-and-content-provision-workflows', lastIndexInformationLink: 'https://beta.openaire.eu/aggregation-and-content-provision-workflows',
showLastIndexInformationLink: true, showLastIndexInformationLink: true,
bipFrameAPIURL: "https://bip.imsi.athenarc.gr/api/impact-chart?id=",
widgetLink: 'https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=', widgetLink: 'https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=',
claimsInformationLink: 'https://beta.openaire.eu/linking', claimsInformationLink: 'https://beta.openaire.eu/linking',
depositLearnHowPage: '/participate/deposit/learn-how', depositLearnHowPage: '/participate/deposit/learn-how',