Merging from dynamic piwik
This commit is contained in:
commit
a03d41be9c
|
@ -1,5 +1,3 @@
|
|||
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
|
||||
|
||||
<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="affiliation-logo">
|
||||
|
|
|
@ -1,20 +1,16 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Title, Meta} from '@angular/platform-browser';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {AffiliationService} from "../openaireLibrary/connect/affiliations/affiliation.service";
|
||||
import {Affiliation} from "../openaireLibrary/utils/entities/CuratorInfo";
|
||||
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 {Component, Input} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {AffiliationService} from "../openaireLibrary/connect/affiliations/affiliation.service";
|
||||
import {Affiliation} from "../openaireLibrary/utils/entities/CuratorInfo";
|
||||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
import {Subscriber} from "rxjs";
|
||||
import {properties} from "../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'affiliations',
|
||||
templateUrl: './affiliations.component.html',
|
||||
styleUrls: ['./affiliations.component.less']
|
||||
styleUrls: ['./affiliations.component.less']
|
||||
})
|
||||
export class AffiliationsComponent {
|
||||
@Input() getAffiliationsFromAPI: boolean = false;
|
||||
|
@ -24,61 +20,33 @@ export class AffiliationsComponent {
|
|||
@Input() affiliations: Affiliation[] = [];
|
||||
@Input() sliderOptions = '';
|
||||
@Input() arrows = true;
|
||||
|
||||
|
||||
public showLoading: boolean = false;
|
||||
|
||||
communityId: string;
|
||||
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() {
|
||||
|
||||
this.subscriptions.push(this.route.queryParams.subscribe(
|
||||
communityId => {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
if(!this.communityId) {
|
||||
this.communityId = communityId['communityId'];
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
));
|
||||
}
|
||||
}));
|
||||
|
||||
public communityId: string;
|
||||
public properties: EnvProperties = properties;
|
||||
private subscriptions = [];
|
||||
|
||||
constructor(private route: ActivatedRoute, private affiliationService: AffiliationService) {
|
||||
}
|
||||
|
||||
|
||||
public ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
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() {
|
||||
this.subscriptions.forEach(subscription => {
|
||||
if (subscription instanceof Subscriber) {
|
||||
|
@ -87,19 +55,4 @@ export class AffiliationsComponent {
|
|||
});
|
||||
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'");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import {NgModule} from '@angular/core';
|
||||
|
||||
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
|
||||
import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard'
|
||||
|
@ -7,15 +7,11 @@ import {RouterModule} from '@angular/router';
|
|||
import {AffiliationsComponent} from './affiliations.component';
|
||||
import {AffiliationService} from "../openaireLibrary/connect/affiliations/affiliation.service";
|
||||
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";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, RouterModule, Schema2jsonldModule, SEOServiceModule,
|
||||
PiwikServiceModule, UrlPrefixModule
|
||||
CommonModule, RouterModule, UrlPrefixModule
|
||||
],
|
||||
declarations: [
|
||||
AffiliationsComponent
|
||||
|
|
|
@ -318,7 +318,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
this.initLayout('connect');
|
||||
}
|
||||
}
|
||||
this.configurationService.initCommunityInformation(this.properties, (communityId) ? communityId : this.properties.adminToolsPortalType);
|
||||
this.configurationService.initPortal(this.properties, (communityId) ? communityId : this.properties.adminToolsPortalType);
|
||||
}
|
||||
|
||||
getLayouts() {
|
||||
|
@ -456,8 +456,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
this.showMenu = true;
|
||||
} else {
|
||||
this.communityId = null;
|
||||
this.configurationService.initCommunityInformation(this.properties, "connect");
|
||||
// this.initAdminToolCommunity(null);
|
||||
this.configurationService.initPortal(this.properties, "connect");
|
||||
this.buildConnectMenu(true);
|
||||
if (this.community && this.community.status == "manager") {
|
||||
if (!this.user) {
|
||||
|
|
|
@ -1,22 +1,19 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
import {PiwikHelper} from "../../utils/piwikHelper";
|
||||
import {Subscriber} from "rxjs";
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-directLinking',
|
||||
template: `
|
||||
<directLinking [communityId]=communityId [piwikSiteId]="piwikSiteId"></directLinking>`
|
||||
<directLinking [communityId]=communityId></directLinking>`
|
||||
})
|
||||
export class OpenaireDirectLinkingComponent {
|
||||
communityId: string;
|
||||
public piwikSiteId = null;
|
||||
sub;
|
||||
constructor(private route: ActivatedRoute) {
|
||||
|
||||
}
|
||||
constructor(private route: ActivatedRoute) {}
|
||||
|
||||
ngOnDestroy() {
|
||||
if (this.sub instanceof Subscriber) {
|
||||
|
@ -24,15 +21,12 @@ export class OpenaireDirectLinkingComponent {
|
|||
}
|
||||
}
|
||||
public ngOnInit() {
|
||||
this.sub =
|
||||
this.route.queryParams.subscribe(
|
||||
this.sub = this.route.queryParams.subscribe(
|
||||
communityId => {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
if (!this.communityId) {
|
||||
this.communityId = communityId['communityId'];
|
||||
}
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
import {PiwikHelper} from "../../utils/piwikHelper";
|
||||
import {Subscriber} from "rxjs";
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
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 {
|
||||
communityId:string;
|
||||
public piwikSiteId = null;
|
||||
sub;
|
||||
|
||||
ngOnDestroy() {
|
||||
if (this.sub instanceof Subscriber) {
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
constructor (private route: ActivatedRoute) {
|
||||
this.route.queryParams.subscribe(
|
||||
communityId => {
|
||||
|
@ -25,7 +25,6 @@ export class OpenaireLinkingComponent {
|
|||
if(!this.communityId) {
|
||||
this.communityId = communityId['communityId'];
|
||||
}
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
|
||||
import {PiwikHelper} from "../../utils/piwikHelper";
|
||||
import {Subscriber} from "rxjs";
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
|
@ -9,7 +8,7 @@ import {properties} from "../../../environments/environment";
|
|||
@Component({
|
||||
selector: 'openaire-my-claims',
|
||||
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;
|
||||
userInfoURL: string;
|
||||
communityId:string;
|
||||
public piwikSiteId = null;
|
||||
sub;
|
||||
|
||||
constructor (private route: ActivatedRoute) {}
|
||||
sub;
|
||||
|
||||
ngOnDestroy() {
|
||||
if (this.sub instanceof Subscriber) {
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
public ngOnInit() {
|
||||
this.claimsInfoURL = properties.claimsInformationLink;
|
||||
this.userInfoURL = properties.userInfoUrl;
|
||||
|
@ -35,9 +35,6 @@ import {properties} from "../../../environments/environment";
|
|||
if(!this.communityId) {
|
||||
this.communityId = communityId['communityId'];
|
||||
}
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -76,9 +76,7 @@ export class CommunitiesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
var url = this.properties.domain + this.properties.baseLink + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(url, false);
|
||||
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", this.properties.piwikSiteId).subscribe());
|
||||
}
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Connect").subscribe());
|
||||
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
|
||||
this.user = user;
|
||||
this.getCommunities();
|
||||
|
|
|
@ -148,8 +148,8 @@
|
|||
</div>
|
||||
</ng-template>
|
||||
|
||||
<div *ngIf="communityInfo && community && !isPrivate()" >
|
||||
<div *ngIf="communityInfo && community" class="generalSearchForm heroBackground"> <!-- this div will have the
|
||||
<div *ngIf="portal && community && !isPrivate()" >
|
||||
<div *ngIf="portal && community" class="generalSearchForm heroBackground"> <!-- this div will have the
|
||||
customized color or image -->
|
||||
<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">
|
||||
|
@ -176,7 +176,7 @@
|
|||
</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>
|
||||
<div class="main-tabs-div">
|
||||
|
@ -512,7 +512,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li *ngIf="properties.environment == 'development' && communityInfo.twitterAccount"
|
||||
<li *ngIf="properties.environment == 'development' && portal.twitterAccount"
|
||||
(click)="onSelectActiveTab('twitter')">
|
||||
<ul class="uk-tab">
|
||||
<li [class.uk-active]="activeTab == 'twitter'">
|
||||
|
@ -689,11 +689,11 @@
|
|||
type: 'orp', typeName: 'other products'}">
|
||||
</ng-container>
|
||||
</div>
|
||||
<div *ngIf="activeTab == 'twitter' && properties.environment == 'development' && communityInfo.twitterAccount">
|
||||
<div *ngIf="activeTab == 'twitter' && properties.environment == 'development' && portal.twitterAccount">
|
||||
<div>
|
||||
<div>
|
||||
<a href="https://twitter.com/{{ communityInfo.twitterAccount }}?ref_src=twsrc%5Etfw" class="twitter-timeline" data-height="900">
|
||||
Tweets by {{communityInfo.twitterAccount}}
|
||||
<a href="https://twitter.com/{{ portal.twitterAccount }}?ref_src=twsrc%5Etfw" class="twitter-timeline" data-height="900">
|
||||
Tweets by {{portal.twitterAccount}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -790,12 +790,12 @@
|
|||
</div>
|
||||
</ng-container> -->
|
||||
|
||||
<div *ngIf="communityId && communityInfo && isRouteEnabled('/organizations')"
|
||||
<div *ngIf="communityId && portal && isRouteEnabled('/organizations')"
|
||||
class="uk-container uk-container-large">
|
||||
<affiliations [longView]="false" [getAffiliationsFromAPI]="true" [communityFirstPage]="true"></affiliations>
|
||||
</div>
|
||||
|
||||
<div *ngIf="(communityId == null || communityId == '' ) && !communityInfo"
|
||||
<div *ngIf="(communityId == null || communityId == '' ) && !portal"
|
||||
class="uk-section tm-middle uk-container uk-margin-large-top ">
|
||||
<div class="uk-container uk-margin-bottom uk-grid">
|
||||
<div class="uk-width-expand uk-padding-remove">
|
||||
|
@ -811,6 +811,6 @@
|
|||
</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>
|
||||
</div>
|
||||
|
|
|
@ -77,7 +77,7 @@ export class CommunityComponent {
|
|||
@Input() communityId = null;
|
||||
public community = null;
|
||||
|
||||
public communityInfo = null;
|
||||
public portal = null;
|
||||
|
||||
public showLoading: boolean = true;
|
||||
masterZenodoCommunity = null;
|
||||
|
@ -142,7 +142,6 @@ export class CommunityComponent {
|
|||
};
|
||||
disableSelect: boolean = true;
|
||||
openaireEntities= OpenaireEntities;
|
||||
piwikSiteId;
|
||||
|
||||
constructor(
|
||||
private element: ElementRef,
|
||||
|
@ -220,14 +219,7 @@ export class CommunityComponent {
|
|||
this._meta.updateTag({content: community.description}, "property='og:description'");
|
||||
this._meta.updateTag({content: community.title}, "property='og:title'");
|
||||
this._title.setTitle(community.title);
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
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());
|
||||
}
|
||||
}));
|
||||
}
|
||||
this.subs.push(this._piwikService.trackView(this.properties, community.title).subscribe());
|
||||
if (this.community.zenodoCommunity) {
|
||||
this.subs.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties, this.properties.zenodoCommunities + this.community.zenodoCommunity, null).subscribe(
|
||||
result => {
|
||||
|
@ -281,13 +273,13 @@ export class CommunityComponent {
|
|||
this.contentProvidersCalculated = true;
|
||||
}
|
||||
));
|
||||
this.subs.push(this.config.communityInformationState.subscribe(
|
||||
this.subs.push(this.config.portalAsObservable.subscribe(
|
||||
res => {
|
||||
this.communityInfo = res;
|
||||
this.portal = res;
|
||||
|
||||
// loading twitter widget script conditionally
|
||||
if (properties.environment == "development") {
|
||||
if (this.communityInfo && this.communityInfo.twitterAccount) {
|
||||
if (this.portal && this.portal.twitterAccount) {
|
||||
let script = this._renderer2.createElement('script');
|
||||
script.charset = "utf-8";
|
||||
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.subs.push(this.config.communityInformationState.subscribe(data => {
|
||||
this.subs.push(this.config.portalAsObservable.subscribe(data => {
|
||||
if (data) {
|
||||
var showEntity = {};
|
||||
for (var i = 0; i < data['entities'].length; i++) {
|
||||
|
@ -439,11 +431,11 @@ export class CommunityComponent {
|
|||
}
|
||||
|
||||
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) {
|
||||
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() {
|
||||
|
|
|
@ -58,10 +58,7 @@ export class ContactComponent implements OnInit {
|
|||
|
||||
this.properties = properties;
|
||||
this.email = {body: '', subject: '', recipients: []};
|
||||
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subscriptions.push( this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
|
||||
}
|
||||
this.subscriptions.push( this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
|
||||
this.url = this.properties.domain + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(this.url);
|
||||
this.updateUrl(this.url);
|
||||
|
|
|
@ -8,7 +8,6 @@ import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
|||
import {Meta, Title} from "@angular/platform-browser";
|
||||
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
|
||||
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||
import {PiwikHelper} from "../utils/piwikHelper";
|
||||
import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
|
||||
import {Subscription} from "rxjs";
|
||||
import {properties} from "../../environments/environment";
|
||||
|
@ -78,9 +77,7 @@ export class CuratorsComponent {
|
|||
this.subs.push(this.communityService.getCommunityAsObservable().subscribe(community => {
|
||||
if (community) {
|
||||
this.community = community;
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subs.push(this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.community.communityId)).subscribe());
|
||||
}
|
||||
this.subs.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
|
||||
this.url = this.properties.domain + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(this.url);
|
||||
this.updateUrl(this.url);
|
||||
|
|
|
@ -6,22 +6,22 @@ import {ZenodoInformationClass} from "../openaireLibrary/deposit/utils/zenodoInf
|
|||
import {FetchZenodoInformation} from "./utils/fetchZenodoInformation.class";
|
||||
import {ZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service";
|
||||
import {CommunityService} from "../openaireLibrary/connect/community/community.service";
|
||||
import {SearchZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service";
|
||||
import {PiwikHelper} from "../utils/piwikHelper";
|
||||
import {
|
||||
SearchZenodoCommunitiesService
|
||||
} from "../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service";
|
||||
import {Subscriber, Subscription} from "rxjs";
|
||||
import {properties} from "../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-deposit',
|
||||
template: `
|
||||
<deposit-first-page [piwikSiteId]=piwikSiteId [zenodoInformation]="zenodoInformation"
|
||||
<deposit-first-page [zenodoInformation]="zenodoInformation"
|
||||
[communityId]="communityId" [assetsPath]="'assets/connect-assets'"></deposit-first-page>
|
||||
`
|
||||
})
|
||||
|
||||
export class OpenaireDepositComponent {
|
||||
properties: EnvProperties = properties;
|
||||
piwikSiteId = null;
|
||||
public pageContents = null;
|
||||
public divContents = null;
|
||||
public communityId = null;
|
||||
|
@ -42,7 +42,6 @@ export class OpenaireDepositComponent {
|
|||
this.subs.push(this._communityService.getCommunityAsObservable().subscribe(
|
||||
community => {
|
||||
if(community) {
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
this.communityId = community.communityId
|
||||
let masterZenodoCommunityId = community.zenodoCommunity;
|
||||
if (masterZenodoCommunityId) {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
|
||||
import {PiwikHelper} from '../utils/piwikHelper';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
|
||||
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 {ZenodoInformationClass} from '../openaireLibrary/deposit/utils/zenodoInformation.class';
|
||||
|
@ -16,7 +16,7 @@ import {properties} from "../../environments/environment";
|
|||
@Component({
|
||||
selector: 'openaire-search-deposit',
|
||||
template: `
|
||||
<deposit-search-dataproviders [piwikSiteId]=piwikSiteId [zenodoInformation]="zenodoInformation"
|
||||
<deposit-search-dataproviders [zenodoInformation]="zenodoInformation"
|
||||
[communityId]="communityId" [searchForm]="{dark: false, class: 'search-form'}"></deposit-search-dataproviders>
|
||||
`
|
||||
})
|
||||
|
@ -25,8 +25,6 @@ export class OpenaireSearchDataprovidersToDepositComponent {
|
|||
public zenodoInformation: ZenodoInformationClass = new ZenodoInformationClass();
|
||||
properties: EnvProperties = properties;
|
||||
fetchZenodoInformation: FetchZenodoInformation;
|
||||
|
||||
piwikSiteId = null;
|
||||
communityId: string = null;
|
||||
|
||||
subs: Subscription[] = [];
|
||||
|
@ -42,7 +40,6 @@ export class OpenaireSearchDataprovidersToDepositComponent {
|
|||
community => {
|
||||
if(community) {
|
||||
this.communityId = community.communityId;
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
let masterZenodoCommunityId = community.zenodoCommunity;
|
||||
if (masterZenodoCommunityId) {
|
||||
this.zenodoInformation.shareInZenodoUrl = this.properties.shareInZenodoPage;
|
||||
|
|
|
@ -3,7 +3,9 @@ import {ActivatedRoute, Router} from '@angular/router';
|
|||
import {Meta, Title} from '@angular/platform-browser';
|
||||
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
|
||||
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 {CommunityInfo} from '../../openaireLibrary/connect/community/communityInfo';
|
||||
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 {SEOService} from "../../openaireLibrary/sharedComponents/SEO/SEO.service";
|
||||
import {PiwikService} from "../../openaireLibrary/utils/piwik/piwik.service";
|
||||
import {PiwikHelper} from "../../utils/piwikHelper";
|
||||
import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
|
||||
import {properties} from "../../../environments/environment";
|
||||
import {Subscriber, Subscription} from "rxjs";
|
||||
|
@ -24,9 +25,6 @@ import {Subscriber, Subscription} from "rxjs";
|
|||
export class ShareInZenodoComponent {
|
||||
public url: string = null;
|
||||
public title: string = "Share in Zenodo";
|
||||
|
||||
public piwikSiteId = null;
|
||||
|
||||
properties: EnvProperties = properties;
|
||||
communityId: string = null;
|
||||
private community: CommunityInfo = null;
|
||||
|
@ -84,10 +82,7 @@ export class ShareInZenodoComponent {
|
|||
community => {
|
||||
if (community) {
|
||||
this.communityId = community.communityId;
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subs.push(this._piwikService.trackView(this.properties, this.title, this.piwikSiteId).subscribe());
|
||||
}
|
||||
this.subs.push(this._piwikService.trackView(this.properties, this.title).subscribe());
|
||||
this.community = community;
|
||||
this.masterZenodoCommunityId = this.community.zenodoCommunity;
|
||||
if (this.masterZenodoCommunityId) {
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
import {Component} from "@angular/core";
|
||||
import {properties} from "../../environments/environment";
|
||||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
import {PiwikHelper} from "../utils/piwikHelper";
|
||||
|
||||
@Component({
|
||||
selector: 'community-fos',
|
||||
template: `
|
||||
<fos [piwikSiteId]="piwikSiteId"></fos>
|
||||
<fos></fos>
|
||||
`
|
||||
})
|
||||
|
||||
export class CommunityFosComponent {
|
||||
piwikSiteId;
|
||||
communityId;
|
||||
|
||||
constructor() {
|
||||
|
@ -19,6 +17,5 @@ export class CommunityFosComponent {
|
|||
|
||||
ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,9 +51,7 @@ export class GetStartedComponent implements OnInit {
|
|||
}
|
||||
|
||||
ngOnInit() {
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
|
||||
}
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
|
||||
this.url = this.properties.domain + this.properties.baseLink + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(this.url);
|
||||
this.updateUrl(this.url);
|
||||
|
|
|
@ -31,7 +31,7 @@ export class FeaturedPageComponent {
|
|||
this.breadcrumbs = data.breadcrumbs;
|
||||
}
|
||||
}))
|
||||
this.subs.push(this.config.communityInformationState.subscribe((portal: Portal) => {
|
||||
this.subs.push(this.config.portalAsObservable.subscribe((portal: Portal) => {
|
||||
if (portal) {
|
||||
let pages: Page[] = <Page[]>portal.pages;
|
||||
this.page = pages.find(page => (page.route == this._router.url));
|
||||
|
|
|
@ -8,7 +8,7 @@ import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
|||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
import {Subscriber} from "rxjs";
|
||||
import {properties} from "../../environments/environment";
|
||||
import {PiwikHelper} from "../utils/piwikHelper";
|
||||
import {ConfigurationService} from "../openaireLibrary/utils/configuration/configuration.service";
|
||||
|
||||
@Component({
|
||||
selector: 'html-page',
|
||||
|
@ -28,24 +28,20 @@ export class HtmlPageComponent {
|
|||
@Input() description: string;
|
||||
private subscriptions = [];
|
||||
communityId;
|
||||
piwikSiteId;
|
||||
|
||||
constructor(private route: ActivatedRoute, private _router: Router,
|
||||
private _meta: Meta,
|
||||
private _title: Title,
|
||||
private seoService: SEOService,
|
||||
private _piwikService: PiwikService,
|
||||
private configurationService: ConfigurationService,
|
||||
private helper: HelperService) {
|
||||
}
|
||||
|
||||
public ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
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.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
this.url = this.properties.domain + this.properties.baseLink + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(this.url);
|
||||
this.updateUrl(this.url);
|
||||
this.updateTitle(this.pageTitle);
|
||||
|
|
|
@ -11,7 +11,7 @@ import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.co
|
|||
</div>
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
`
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-dataprovider',
|
||||
template: `
|
||||
<dataprovider [piwikSiteId]=piwikSiteId [communityId]="communityId"></dataprovider>`,
|
||||
<dataprovider [communityId]="communityId"></dataprovider>`,
|
||||
})
|
||||
export class OpenaireDataProviderComponent implements OnInit {
|
||||
piwikSiteId;
|
||||
communityId;
|
||||
|
||||
constructor() {
|
||||
|
@ -17,6 +15,5 @@ export class OpenaireDataProviderComponent implements OnInit {
|
|||
|
||||
ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-dataset',
|
||||
template: `
|
||||
<result-landing type="dataset" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing>
|
||||
<result-landing type="dataset" [communityId]="communityId"></result-landing>
|
||||
`,
|
||||
})
|
||||
export class OpenaireDatasetComponent implements OnInit {
|
||||
piwikSiteId;
|
||||
communityId;
|
||||
|
||||
constructor() {
|
||||
|
@ -18,6 +16,5 @@ export class OpenaireDatasetComponent implements OnInit {
|
|||
|
||||
ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-htmlProjectReport',
|
||||
template: `
|
||||
<htmlProjectReport [piwikSiteId]=piwikSiteId [communityId]="communityId"></htmlProjectReport>`,
|
||||
<htmlProjectReport [communityId]="communityId"></htmlProjectReport>`,
|
||||
})
|
||||
export class OpenaireHtmlProjectReportComponent {
|
||||
piwikSiteId;
|
||||
communityId;
|
||||
|
||||
constructor() {
|
||||
|
@ -17,6 +15,5 @@ export class OpenaireHtmlProjectReportComponent {
|
|||
|
||||
ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-organization',
|
||||
template: `
|
||||
<organization [piwikSiteId]=piwikSiteId [communityId]="communityId"></organization>`,
|
||||
<organization [communityId]="communityId"></organization>`,
|
||||
})
|
||||
export class OpenaireOrganizationComponent {
|
||||
piwikSiteId;
|
||||
communityId;
|
||||
|
||||
constructor() {
|
||||
|
@ -17,6 +15,5 @@ export class OpenaireOrganizationComponent {
|
|||
|
||||
ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,23 +1,20 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-orp',
|
||||
template: `
|
||||
<result-landing type="orp" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing>
|
||||
<result-landing type="orp" [communityId]="communityId"></result-landing>
|
||||
`,
|
||||
})
|
||||
|
||||
export class OpenaireOrpComponent implements OnInit {
|
||||
piwikSiteId = null;
|
||||
communityId = null;
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-project',
|
||||
template: `
|
||||
<project [piwikSiteId]=piwikSiteId [communityId]="communityId"></project>`,
|
||||
<project [communityId]="communityId"></project>`,
|
||||
})
|
||||
export class OpenaireProjectComponent implements OnInit {
|
||||
piwikSiteId;
|
||||
communityId;
|
||||
|
||||
constructor() {
|
||||
|
@ -17,6 +15,5 @@ export class OpenaireProjectComponent implements OnInit {
|
|||
|
||||
ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +1,19 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-publication',
|
||||
template: `
|
||||
<result-landing type="publication" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing>
|
||||
<result-landing type="publication" [communityId]="communityId"></result-landing>
|
||||
`,
|
||||
})
|
||||
export class OpenairePublicationComponent {
|
||||
piwikSiteId = null;
|
||||
communityId = null;
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +1,18 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
|
||||
import {PiwikHelper} from "../../utils/piwikHelper";
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-publication',
|
||||
template: `
|
||||
<result-landing type="result" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing>`,
|
||||
<result-landing type="result" [communityId]="communityId"></result-landing>`,
|
||||
})
|
||||
export class OpenaireResultComponent implements OnInit{
|
||||
piwikSiteId;
|
||||
communityId;
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-software',
|
||||
template: `
|
||||
<result-landing type="software" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing>
|
||||
<result-landing type="software" [communityId]="communityId"></result-landing>
|
||||
`,
|
||||
})
|
||||
export class OpenaireSoftwareComponent implements OnInit {
|
||||
piwikSiteId;
|
||||
communityId;
|
||||
|
||||
constructor() {
|
||||
|
@ -18,6 +16,5 @@ export class OpenaireSoftwareComponent implements OnInit {
|
|||
|
||||
ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -220,10 +220,7 @@ export class FaqsComponent {
|
|||
public ngOnInit() {
|
||||
|
||||
this.properties = properties;
|
||||
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
|
||||
}
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
|
||||
this.url = this.properties.baseLink + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(this.url);
|
||||
this.updateUrl(this.url);
|
||||
|
|
|
@ -253,9 +253,7 @@ export class LearnHowComponent implements OnInit {
|
|||
}
|
||||
|
||||
public ngOnInit() {
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
|
||||
}
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
|
||||
this.url = this.properties.baseLink + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(this.url);
|
||||
this.updateUrl(this.url);
|
||||
|
|
|
@ -72,9 +72,7 @@ export class MyCommunitiesComponent {
|
|||
var url = this.properties.domain + this.properties.baseLink + this._router.url;
|
||||
this.seoService.createLinkForCanonicalURL(url, false);
|
||||
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", this.properties.piwikSiteId).subscribe());
|
||||
}
|
||||
this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Connect").subscribe());
|
||||
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
|
||||
this.user = user;
|
||||
if (this.user) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 3aee0bcca2c39d35ee7a94fd57896059842d5f65
|
||||
Subproject commit 2f989107123ae674aba4907b113e4498a8f87786
|
|
@ -4,19 +4,16 @@ import {Subscriber, Subscription} from "rxjs";
|
|||
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
|
||||
import {properties} from "../../../environments/environment";
|
||||
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
|
||||
import {PiwikHelper} from "../../utils/piwikHelper";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-my-orcid-links',
|
||||
template: `
|
||||
<my-orcid-links [piwikSiteId]=piwikSiteId
|
||||
[communityId]="communityId"></my-orcid-links>
|
||||
<my-orcid-links [communityId]="communityId"></my-orcid-links>
|
||||
`
|
||||
})
|
||||
|
||||
export class OpenaireMyOrcidLinksComponent {
|
||||
properties: EnvProperties = properties;
|
||||
piwikSiteId = null;
|
||||
public communityId = null;
|
||||
|
||||
subs: Subscription[] = [];
|
||||
|
@ -27,7 +24,6 @@ export class OpenaireMyOrcidLinksComponent {
|
|||
this.subs.push(this._communityService.getCommunityAsObservable().subscribe(
|
||||
community => {
|
||||
if(community) {
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
this.communityId = community.communityId;
|
||||
}
|
||||
}));
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
import {Component} from "@angular/core";
|
||||
import {properties} from "../../environments/environment";
|
||||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
import {PiwikHelper} from "../utils/piwikHelper";
|
||||
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
|
||||
@Component({
|
||||
selector: 'community-sdg',
|
||||
template: `
|
||||
<sdg [piwikSiteId]="piwikSiteId" [customFilter]="customFilter"></sdg>
|
||||
<sdg [customFilter]="customFilter"></sdg>
|
||||
`
|
||||
})
|
||||
export class CommunitySdgComponent {
|
||||
piwikSiteId;
|
||||
communityId;
|
||||
customFilter: SearchCustomFilter = null;
|
||||
|
||||
|
@ -20,7 +18,6 @@ export class CommunitySdgComponent {
|
|||
|
||||
ngOnInit() {
|
||||
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
|
||||
import {PiwikHelper} from "../../utils/piwikHelper";
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-advanced-search-dataprovider',
|
||||
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'}">
|
||||
</search-dataproviders>
|
||||
`
|
||||
})
|
||||
export class OpenaireAdvancedSearchDataProvidersComponent implements OnInit {
|
||||
communityId: string;
|
||||
piwikSiteId = null;
|
||||
customFilter: SearchCustomFilter = null;
|
||||
|
||||
constructor() {
|
||||
|
@ -23,7 +21,6 @@ export class OpenaireAdvancedSearchDataProvidersComponent implements OnInit {
|
|||
ngOnInit() {
|
||||
let communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
if (communityId) {
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(communityId);
|
||||
this.communityId = communityId;
|
||||
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
|
||||
this.customFilter.isHiddenFilter = false;
|
||||
|
|
|
@ -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 {ActivatedRoute} from "@angular/router";
|
||||
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
|
||||
import {PiwikHelper} from "../../utils/piwikHelper";
|
||||
import {Subscriber} from "rxjs";
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-advanced-search-organizations',
|
||||
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>
|
||||
`
|
||||
})
|
||||
export class OpenaireAdvancedSearchOrganizationsComponent implements OnInit {
|
||||
communityId:string;
|
||||
piwikSiteId;
|
||||
customFilter: SearchCustomFilter;
|
||||
|
||||
constructor () {
|
||||
|
@ -24,7 +20,6 @@ export class OpenaireAdvancedSearchOrganizationsComponent implements OnInit {
|
|||
|
||||
ngOnInit() {
|
||||
let communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(communityId);
|
||||
if(communityId){
|
||||
this.communityId = communityId;
|
||||
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
|
||||
import {PiwikHelper} from "../../utils/piwikHelper";
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-advanced-search-projects',
|
||||
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'}">
|
||||
</search-projects>
|
||||
|
||||
|
@ -16,7 +15,6 @@ import {properties} from "../../../environments/environment";
|
|||
|
||||
export class OpenaireAdvancedSearchProjectsComponent implements OnInit {
|
||||
communityId: string;
|
||||
piwikSiteId;
|
||||
customFilter: SearchCustomFilter = null;
|
||||
|
||||
constructor() {
|
||||
|
@ -26,7 +24,6 @@ export class OpenaireAdvancedSearchProjectsComponent implements OnInit {
|
|||
let communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
if (communityId) {
|
||||
this.communityId = communityId;
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(communityId);
|
||||
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
|
||||
this.customFilter.isHiddenFilter = false;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import {Component, OnDestroy, OnInit} from '@angular/core';
|
||||
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {ActivatedRoute} from "@angular/router";
|
||||
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
|
||||
import {PiwikHelper} from "../../utils/piwikHelper";
|
||||
import {Subscriber} from "rxjs";
|
||||
import {properties} from "../../../environments/environment";
|
||||
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
|
||||
|
@ -12,7 +10,7 @@ import {CommunityService} from "../../openaireLibrary/connect/community/communit
|
|||
selector: 'openaire-search-results',
|
||||
template: `
|
||||
<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'"
|
||||
[searchForm]="{dark: false, class: 'search-form'}"
|
||||
></search-research-results>
|
||||
|
@ -20,7 +18,6 @@ import {CommunityService} from "../../openaireLibrary/connect/community/communit
|
|||
})
|
||||
export class OpenaireSearchResearchResultsComponent implements OnInit, OnDestroy {
|
||||
connectCommunityId: string;
|
||||
piwikSiteId = null;
|
||||
customFilter: SearchCustomFilter = null;
|
||||
properties: EnvProperties = properties;
|
||||
sub;
|
||||
|
@ -42,7 +39,6 @@ export class OpenaireSearchResearchResultsComponent implements OnInit, OnDestro
|
|||
this.sub = this._communityService.getCommunityAsObservable().subscribe(community => {
|
||||
if (community != null) {
|
||||
this.connectCommunityId = community.communityId;
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.connectCommunityId);
|
||||
this.customFilter = new SearchCustomFilter("Community", "communityId", this.connectCommunityId, community.shortTitle);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -23,7 +23,7 @@ import {Subscriber} from "rxjs";
|
|||
selector: 'search-communities',
|
||||
template: `
|
||||
<new-search-page pageTitle="Communities"
|
||||
[hasPrefix]=true prefix="OpenAIRE Connect | " [piwikSiteId]="piwikSiteId"
|
||||
[hasPrefix]=true prefix="OpenAIRE Connect | "
|
||||
[formPlaceholderText]="'Search OpenAIRE Communities'"
|
||||
[type]="(results.length > 1)?'communities':'community'" entityType="community"
|
||||
[results]="results" [searchUtils]="searchUtils"
|
||||
|
@ -39,7 +39,6 @@ import {Subscriber} from "rxjs";
|
|||
`
|
||||
})
|
||||
export class SearchCommunitiesComponent {
|
||||
public piwikSiteId = null;
|
||||
private errorCodes: ErrorCodes;
|
||||
private errorMessages: ErrorMessagesComponent;
|
||||
public results: CommunityInfo[] = [];
|
||||
|
@ -82,7 +81,6 @@ export class SearchCommunitiesComponent {
|
|||
|
||||
public ngOnInit() {
|
||||
this.properties = properties;
|
||||
this.piwikSiteId = this.properties.piwikSiteId;
|
||||
this.baseUrl = this.properties.searchLinkToCommunities;
|
||||
this.subscriptions.push(this.route.queryParams.subscribe(params => {
|
||||
this.searchPage.resultsPerPage = 10;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {properties} from "../../../environments/environment";
|
||||
|
@ -9,13 +8,12 @@ import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properti
|
|||
selector: 'openaire-search-find',
|
||||
template: `
|
||||
<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 {
|
||||
communityId: string;
|
||||
customFilter: SearchCustomFilter = null;
|
||||
piwikSiteId = null;
|
||||
properties: EnvProperties = properties;
|
||||
|
||||
constructor() {
|
||||
|
@ -25,7 +23,6 @@ export class OpenaireSearchComponent {
|
|||
let communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
|
||||
if (communityId) {
|
||||
this.communityId = communityId;
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(communityId);
|
||||
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
import {Component, ViewChild} from '@angular/core';
|
||||
import { ActivatedRoute} from '@angular/router';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
|
||||
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 {SearchCustomFilter, SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
|
||||
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
|
||||
import {SearchCommunityDataprovidersService} from '../../openaireLibrary/connect/contentProviders/searchDataproviders.service';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {
|
||||
SearchCommunityDataprovidersService
|
||||
} from '../../openaireLibrary/connect/contentProviders/searchDataproviders.service';
|
||||
import {properties} from "../../../environments/environment";
|
||||
import {CommunitiesService} from "../../openaireLibrary/connect/communities/communities.service";
|
||||
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
|
||||
|
@ -28,7 +29,6 @@ import {SearchResult} from "../../openaireLibrary/utils/entities/searchResult";
|
|||
[searchUtils]="searchUtils"
|
||||
[sortedByChanged]="searchUtils.sortBy"
|
||||
[fieldIds]="fieldIds" [fieldIdsMap]="fieldIdsMap" [selectedFields]="selectedFields"
|
||||
|
||||
[simpleSearchLink]="properties.searchLinkToDataProviders"
|
||||
[disableForms]="disableForms"
|
||||
[disableRefineForms]="disableRefineForms"
|
||||
|
@ -36,7 +36,7 @@ import {SearchResult} from "../../openaireLibrary/utils/entities/searchResult";
|
|||
[oldTotalResults]="oldTotalResults"
|
||||
[openaireLink]="'https://' + (properties.environment == 'production'?'':'beta.') + 'explore.openaire.eu/search/find/dataproviders'"
|
||||
[includeOnlyResultsAndFilter]="false"
|
||||
[piwikSiteId]=piwikSiteId [hasPrefix]="false"
|
||||
[hasPrefix]="false"
|
||||
searchFormClass="datasourcesTableSearchForm" [entitiesSelection]="true" [showSwitchSearchLink]="false"
|
||||
[filters]="filters"
|
||||
[simpleView]="true" formPlaceholderText="Search by name..."
|
||||
|
@ -64,7 +64,6 @@ export class OpenaireSearchDataprovidersComponent {
|
|||
|
||||
private communityId: string = '';
|
||||
subscriptions = [];
|
||||
piwikSiteId = null;
|
||||
customFilter: SearchCustomFilter = null;
|
||||
initialLoad = true;
|
||||
public allResults =[];
|
||||
|
@ -89,7 +88,6 @@ export class OpenaireSearchDataprovidersComponent {
|
|||
if(community != null) {
|
||||
this.communityId = community.communityId;
|
||||
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, community.shortTitle);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
this.subscriptions.push(this.route.queryParams.subscribe(params => {
|
||||
let page = (params['page'] === undefined) ? 1 : +params['page'];
|
||||
this.searchUtils.page = (page <= 0) ? 1 : page;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
|
||||
import {properties} from "../../../environments/environment";
|
||||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'openaire-search-organizations',
|
||||
|
@ -10,16 +6,5 @@ import {properties} from "../../../environments/environment";
|
|||
<search-organizations [searchForm]="{dark: false, class: 'search-form'}"></search-organizations>
|
||||
`
|
||||
})
|
||||
export class OpenaireSearchOrganizationsComponent implements OnInit {
|
||||
piwikSiteId = null;
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
let communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||
if (communityId) {
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(communityId);
|
||||
}
|
||||
}
|
||||
export class OpenaireSearchOrganizationsComponent{
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ import {SearchFields} from '../../openaireLibrary/utils/properties/searchFields'
|
|||
import {SearchCustomFilter, SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
|
||||
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
|
||||
import {SearchCommunityProjectsService} from '../../openaireLibrary/connect/projects/searchProjects.service';
|
||||
import {PiwikHelper} from '../../utils/piwikHelper';
|
||||
import {properties} from "../../../environments/environment";
|
||||
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
|
||||
import {Subscriber} from "rxjs";
|
||||
|
@ -35,7 +34,7 @@ import {SearchResult} from "../../openaireLibrary/utils/entities/searchResult";
|
|||
[oldTotalResults]="oldTotalResults"
|
||||
[openaireLink]="'https://' + (properties.environment == 'production'?'':'beta.') + 'explore.openaire.eu/search/find/projects'"
|
||||
[includeOnlyResultsAndFilter]="false"
|
||||
[piwikSiteId]=piwikSiteId [hasPrefix]="false"
|
||||
[hasPrefix]="false"
|
||||
searchFormClass="datasourcesTableSearchForm" [entitiesSelection]="true" [showSwitchSearchLink]="false"
|
||||
[filters]="filters"
|
||||
[simpleView]="true" formPlaceholderText="Search by name..."
|
||||
|
@ -63,8 +62,6 @@ export class OpenaireSearchProjectsComponent {
|
|||
public enableSearchView: boolean = true;
|
||||
|
||||
private communityId: string = '';
|
||||
|
||||
piwikSiteId = null;
|
||||
customFilter: SearchCustomFilter = null;
|
||||
initialLoad = true;
|
||||
public allResults =[];
|
||||
|
@ -88,7 +85,6 @@ export class OpenaireSearchProjectsComponent {
|
|||
if(community != null){
|
||||
this.communityId = community.communityId;
|
||||
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, community.shortTitle);
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
|
||||
this.subscriptions.push(this.route.queryParams.subscribe(params => {
|
||||
let page = (params['page'] === undefined) ? 1 : +params['page'];
|
||||
this.searchUtils.page = (page <= 0) ? 1 : page;
|
||||
|
|
|
@ -2,10 +2,7 @@ import {Component, OnDestroy, OnInit} from '@angular/core';
|
|||
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
|
||||
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
|
||||
import {ActivatedRoute} from "@angular/router";
|
||||
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
|
||||
import {PiwikHelper} from "../../utils/piwikHelper";
|
||||
import {Subscriber} from "rxjs";
|
||||
import {CommunitiesService} from "../../openaireLibrary/connect/communities/communities.service";
|
||||
import {properties} from "../../../environments/environment";
|
||||
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
|
||||
|
||||
|
@ -13,15 +10,13 @@ import {CommunityService} from "../../openaireLibrary/connect/community/communit
|
|||
selector: 'openaire-search-results',
|
||||
template: `
|
||||
<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>
|
||||
`
|
||||
|
||||
})
|
||||
export class OpenaireSearchResearchResultsComponent implements OnInit, OnDestroy {
|
||||
|
||||
connectCommunityId: string;
|
||||
piwikSiteId = null;
|
||||
customFilter: SearchCustomFilter = null;
|
||||
properties:EnvProperties = properties;
|
||||
sub;
|
||||
|
@ -43,7 +38,6 @@ export class OpenaireSearchResearchResultsComponent implements OnInit, OnDestroy
|
|||
this.sub = this._communityService.getCommunityAsObservable().subscribe(community =>{
|
||||
if(community != null){
|
||||
this.connectCommunityId = community.communityId;
|
||||
this.piwikSiteId = PiwikHelper.getSiteId(this.connectCommunityId);
|
||||
this.customFilter = new SearchCustomFilter("Community", "communityId", this.connectCommunityId, community.shortTitle);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -13,7 +13,6 @@ import {
|
|||
StatisticsDisplay,
|
||||
StatisticsSummary
|
||||
} from "../openaireLibrary/connect/statistics/statisticsEntities";
|
||||
import {PiwikHelper} from '../utils/piwikHelper';
|
||||
import {CommunityCharts} from "../openaireLibrary/connect/statistics/communityCharts";
|
||||
import {CommunityService} from "../openaireLibrary/connect/community/community.service";
|
||||
import {Subscriber, Subscription} from "rxjs";
|
||||
|
@ -90,8 +89,8 @@ export class StatisticsComponent {
|
|||
community => {
|
||||
if(community) {
|
||||
this.communityId = community.communityId;
|
||||
if (this.currentMode == "showInMonitor" && this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subs.push(this._piwikService.trackView(this.properties, "Monitor " + this.communityId, PiwikHelper.siteIDs[this.communityId]).subscribe());
|
||||
if (this.currentMode == "showInMonitor") {
|
||||
this.subs.push(this._piwikService.trackView(this.properties, "Monitor " + this.communityId).subscribe());
|
||||
}
|
||||
this.communityName = community.shortTitle;
|
||||
this.createChartUrlMap();
|
||||
|
@ -157,7 +156,7 @@ export class StatisticsComponent {
|
|||
|
||||
getCommunityInfo() {
|
||||
// console.log(`calling ${this.properties.adminToolsAPIURL}/communityFull/${this.communityId}`);
|
||||
this.subs.push(this._configService.communityInformationState.subscribe(
|
||||
this.subs.push(this._configService.portalAsObservable.subscribe(
|
||||
res => {
|
||||
this.communityInfo = res;
|
||||
/*for(let i=0; i<this.communityInfo.entities.length; i++){
|
||||
|
|
|
@ -6,7 +6,6 @@ import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
|
|||
import {Meta, Title} from "@angular/platform-browser";
|
||||
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
|
||||
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
|
||||
import {PiwikHelper} from "../utils/piwikHelper";
|
||||
import {StringUtils} from "../openaireLibrary/utils/string-utils.class";
|
||||
import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
|
||||
import {properties} from "../../environments/environment";
|
||||
|
@ -362,9 +361,7 @@ export class SubjectsComponent {
|
|||
this.subs.push(this.communityService.getCommunityAsObservable().subscribe(community => {
|
||||
if (community) {
|
||||
this.communityId = community.communityId;
|
||||
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
|
||||
this.subs.push(this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.communityId)).subscribe());
|
||||
}
|
||||
this.subs.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
|
||||
this.getPageContents();
|
||||
this.displayedSubjects = community.subjects;
|
||||
this.displayedSdg = community.sdg;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
/**
|
||||
* @deprecated
|
||||
* */
|
||||
export class PiwikHelper{
|
||||
public static siteIDs = {
|
||||
"dh-ch":81,
|
||||
|
@ -43,6 +46,7 @@ export class PiwikHelper{
|
|||
"dth": 719,
|
||||
"lifewatch-eric": 744
|
||||
};
|
||||
|
||||
public static getSiteId(communityId:string){
|
||||
return this.siteIDs[communityId];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue