[Library|Trunk]

properties: remove reading properties from route data

Aggregator: add aggregator checks in navbar, entities selection and as adminToolsPortalType



git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59899 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-11-18 16:06:27 +00:00
parent 71e98983e1
commit 8d9420e4a1
24 changed files with 143 additions and 149 deletions

View File

@ -7,6 +7,7 @@ import {SearchResearchResultsService} from '../../services/searchResearchResults
import {LinkingGenericComponent} from "../linking/linkingGeneric.component"; import {LinkingGenericComponent} from "../linking/linkingGeneric.component";
import {ClaimResultSearchFormComponent} from "../claim-utils/claimResultSearchForm.component"; import {ClaimResultSearchFormComponent} from "../claim-utils/claimResultSearchForm.component";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
@Component({ @Component({
@ -45,10 +46,7 @@ export class DirectLinkingComponent {
}); });
} }
ngOnInit() { ngOnInit() {
this.subscriptions.push(this.route.data this.properties = properties;
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
}));
this.subscriptions.push(this.route.queryParams.subscribe(params => { this.subscriptions.push(this.route.queryParams.subscribe(params => {
this.id = params['id']; this.id = params['id'];

View File

@ -10,6 +10,7 @@ import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {HelperService} from "../../utils/helper/helper.service"; import {HelperService} from "../../utils/helper/helper.service";
import {PiwikService} from "../../utils/piwik/piwik.service"; import {PiwikService} from "../../utils/piwik/piwik.service";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
declare var UIkit:any; declare var UIkit:any;
@ -57,9 +58,8 @@ export class LinkingGenericComponent {
this.showOptions.basketShowLinksTo = true; this.showOptions.basketShowLinksTo = true;
this.showOptions.show = this.showOptions.linkTo; this.showOptions.show = this.showOptions.linkTo;
} }
this.subscriptions.push(this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { this.properties = properties;
this.properties = data.envSpecific;
this.url = this.properties.domain + this.properties.baseLink+this._router.url; this.url = this.properties.domain + this.properties.baseLink+this._router.url;
var description = "Linking is a functionality provided by OpenAIRE, in order to link research results with a project, a research community or other research results."; var description = "Linking is a functionality provided by OpenAIRE, in order to link research results with a project, a research community or other research results.";
@ -77,7 +77,7 @@ export class LinkingGenericComponent {
this.pageContents = contents; this.pageContents = contents;
}) })
}));
if( typeof localStorage !== 'undefined') { if( typeof localStorage !== 'undefined') {
this.localStoragePrefix +=(this.communityId?this.communityId+"_":""); this.localStoragePrefix +=(this.communityId?this.communityId+"_":"");
if(localStorage.getItem(this.localStoragePrefix + "results")){ if(localStorage.getItem(this.localStoragePrefix + "results")){

View File

@ -4,6 +4,7 @@ import { EnvProperties} from '../../utils/properties/env-properties';
import {ConnectHelper} from '../connectHelper'; import {ConnectHelper} from '../connectHelper';
import {SearchCommunityDataprovidersService} from '../contentProviders/searchDataproviders.service'; import {SearchCommunityDataprovidersService} from '../contentProviders/searchDataproviders.service';
import {properties} from "../../../../environments/environment";
@Component({ @Component({
selector: 'approved-by-community', selector: 'approved-by-community',
@ -24,10 +25,7 @@ export class ApprovedByCommunityComponent {
constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchCommunityDataprovidersService) {} constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchCommunityDataprovidersService) {}
public ngOnInit() { public ngOnInit() {
this.route.data this.properties =properties;
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.route.queryParams.subscribe( this.route.queryParams.subscribe(
communityId => { communityId => {
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain); this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
@ -47,7 +45,7 @@ export class ApprovedByCommunityComponent {
); );
} }
}); });
});
} }

View File

@ -11,6 +11,7 @@ import {EnvProperties} from '../utils/properties/env-properties';
import {ZenodoInformationClass} from "./utils/zenodoInformation.class"; import {ZenodoInformationClass} from "./utils/zenodoInformation.class";
import {RouterHelper} from "../utils/routerHelper.class"; import {RouterHelper} from "../utils/routerHelper.class";
import {Breadcrumb} from "../utils/breadcrumbs/breadcrumbs.component"; import {Breadcrumb} from "../utils/breadcrumbs/breadcrumbs.component";
import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'deposit-search-dataproviders', selector: 'deposit-search-dataproviders',
@ -106,9 +107,8 @@ export class SearchDataprovidersToDepositComponent {
public ngOnInit() { public ngOnInit() {
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { this.properties = properties;
this.properties = data.envSpecific;
this.depositLearnHowPage = this.properties.depositLearnHowPage; this.depositLearnHowPage = this.properties.depositLearnHowPage;
this.baseUrl = this.properties.depositSearchPage; this.baseUrl = this.properties.depositSearchPage;
this.pagingLimit = this.properties.pagingLimit; this.pagingLimit = this.properties.pagingLimit;
@ -116,7 +116,7 @@ export class SearchDataprovidersToDepositComponent {
name: "Deposit", name: "Deposit",
route: this.depositLearnHowPage route: this.depositLearnHowPage
}, {name: "Browse repositories", route: null}); }, {name: "Browse repositories", route: null});
});
this.sub = this.route.queryParams.subscribe(params => { this.sub = this.route.queryParams.subscribe(params => {
this.parameters = Object.assign({}, params); this.parameters = Object.assign({}, params);
this.keyword = params["fv0"]?params["fv0"]:''; this.keyword = params["fv0"]?params["fv0"]:'';

View File

@ -7,6 +7,7 @@ import {ZenodoInformationClass} from "./utils/zenodoInformation.class";
import {ActivatedRoute} from "@angular/router"; import {ActivatedRoute} from "@angular/router";
import {ResultPreview} from "../utils/result-preview/result-preview"; import {ResultPreview} from "../utils/result-preview/result-preview";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'deposit-result', selector: 'deposit-result',
@ -58,9 +59,7 @@ export class SearchResultsInDepositComponent {
this.urlParam = "datasourceId"; this.urlParam = "datasourceId";
} }
this.sub = this.route.data this.properties = properties;
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
if (!this.zenodoInformation) { if (!this.zenodoInformation) {
this.zenodoInformation = new ZenodoInformationClass(); this.zenodoInformation = new ZenodoInformationClass();
@ -71,7 +70,7 @@ export class SearchResultsInDepositComponent {
if (!this.zenodoInformation.name) { if (!this.zenodoInformation.name) {
this.zenodoInformation.name = "Zenodo"; this.zenodoInformation.name = "Zenodo";
} }
});
} }
public quote(params: string):string { public quote(params: string):string {

View File

@ -60,9 +60,6 @@ export class ErrorPageComponent {
this.response.statusCode = 404; this.response.statusCode = 404;
this.response.statusMessage = '404 - Page not found'; this.response.statusMessage = '404 - Page not found';
} }
//this.route.data
//.subscribe((data: { envSpecific: EnvProperties }) => {
//let properties = data.envSpecific;
this.seoService.createLinkForCanonicalURL(properties.domain + properties.baseLink + "/error"); this.seoService.createLinkForCanonicalURL(properties.domain + properties.baseLink + "/error");
this.route.queryParams.subscribe(data => { this.route.queryParams.subscribe(data => {
@ -97,6 +94,5 @@ export class ErrorPageComponent {
} }
} }
}); });
//});
} }
} }

View File

@ -5,6 +5,7 @@ import {ErrorCodes} from '../../utils/properties/errorCodes';
import {EnvProperties} from '../../utils/properties/env-properties'; import {EnvProperties} from '../../utils/properties/env-properties';
import {StringUtils} from "../../utils/string-utils.class"; import {StringUtils} from "../../utils/string-utils.class";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
@Component({ @Component({
selector: 'statisticsTab', selector: 'statisticsTab',
@ -72,9 +73,8 @@ export class StatisticsTabComponent {
constructor (private route: ActivatedRoute) {} constructor (private route: ActivatedRoute) {}
ngOnInit() { ngOnInit() {
this.sub = this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { this.properties = properties;
this.properties = data.envSpecific;
if (this.properties.useNewStatistisTool) { if (this.properties.useNewStatistisTool) {
this.docsTimelineUrl = this.properties.statisticsFrameNewAPIURL + this.docsTimelineUrl = this.properties.statisticsFrameNewAPIURL +
@ -94,7 +94,7 @@ export class StatisticsTabComponent {
this.dataProjectsUrl = this.properties.statisticsFrameAPIURL + 'chart.php?com=query&persistent=false&data={"query":"dtsrcProjData","dtsrcName":"' + this.datasourceId + '", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Data"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%'; this.dataProjectsUrl = this.properties.statisticsFrameAPIURL + 'chart.php?com=query&persistent=false&data={"query":"dtsrcProjData","dtsrcName":"' + this.datasourceId + '", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Research Data"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%';
this.pubsProjectsUrl = this.properties.statisticsFrameAPIURL + 'chart.php?com=query&persistent=false&data={"query":"dtsrcProjPubs","dtsrcName":"' + this.datasourceId + '", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Publications"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%'; this.pubsProjectsUrl = this.properties.statisticsFrameAPIURL + 'chart.php?com=query&persistent=false&data={"query":"dtsrcProjPubs","dtsrcName":"' + this.datasourceId + '", "table": "result", "fields": [{"fld": "number", "agg": "count", "type": "bar", "yaxis":1, "c":false}], "xaxis":{"name": "result_classifications-type", "agg": "avg"}, "group": "", "color": "", "type": "chart", "size":30, "sort": "xaxis", "xStyle":{"r": "-", "s": "-", "l": "-", "ft": "-", "wt": "-"}, "yaxisheaders": [""], "fieldsheaders": ["Publications"], "in": [], "filters": [{"name": "result_datasources-datasource-name", "values": [""], "to": "-1"}], "having": [], "incfilters": [], "inchaving": [], "title": "", "subtitle": "", "xaxistitle": ""}&w=90%&h=90%';
} }
});
} }
ngOnDestroy() { ngOnDestroy() {

View File

@ -10,6 +10,7 @@ import {PiwikService} from '../../utils/piwik/piwik.service';
import {SEOService} from '../../sharedComponents/SEO/SEO.service'; import {SEOService} from '../../sharedComponents/SEO/SEO.service';
import {HelperService} from "../../utils/helper/helper.service"; import {HelperService} from "../../utils/helper/helper.service";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
declare var UIkit: any; declare var UIkit: any;
@ -84,15 +85,14 @@ export class HtmlProjectReportComponent {
} }
ngOnInit() { ngOnInit() {
this.subscriptions.push(this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { this.properties = properties;
this.properties = data.envSpecific;
//this.getDivContents(); //this.getDivContents();
this.getPageContents(); this.getPageContents();
this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url); this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url);
this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this._router.url); this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink + this._router.url);
}));
this.subscriptions.push(this.route.queryParams.subscribe(params => { this.subscriptions.push(this.route.queryParams.subscribe(params => {
this.projectId = params['projectId']; this.projectId = params['projectId'];

View File

@ -11,6 +11,7 @@ import {OrganizationsDeletedByInferenceService} from './deletedByInference.se
import {ResultPreview} from "../../../utils/result-preview/result-preview"; import {ResultPreview} from "../../../utils/result-preview/result-preview";
import {AlertModal} from "../../../utils/modal/alert"; import {AlertModal} from "../../../utils/modal/alert";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../../../environments/environment";
@Component({ @Component({
selector: 'organizationsDeletedByInference', selector: 'organizationsDeletedByInference',
@ -57,11 +58,9 @@ export class OrganizationsDeletedByInferenceComponent {
} }
ngOnInit() { ngOnInit() {
this.subscriptions.push(this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
})); this.properties = properties;
this.subscriptions.push(this.route.queryParams.subscribe(data => { this.subscriptions.push(this.route.queryParams.subscribe(data => {
this.errorCodes = new ErrorCodes(); this.errorCodes = new ErrorCodes();
this.status = this.errorCodes.LOADING; this.status = this.errorCodes.LOADING;

View File

@ -23,6 +23,7 @@ import {FetchResearchResults} from "../../utils/fetchEntitiesClasses/fetchResear
import {FetchDataproviders} from "../../utils/fetchEntitiesClasses/fetchDataproviders.class"; import {FetchDataproviders} from "../../utils/fetchEntitiesClasses/fetchDataproviders.class";
import {IndexInfoService} from "../../utils/indexInfo.service"; import {IndexInfoService} from "../../utils/indexInfo.service";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
@Component({ @Component({
selector: 'organization', selector: 'organization',
@ -125,9 +126,8 @@ export class OrganizationComponent {
} }
ngOnInit() { ngOnInit() {
this.subscriptions.push(this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { this.properties = properties;
this.properties = data.envSpecific;
if (typeof document !== 'undefined') { if (typeof document !== 'undefined') {
this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => { this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => {
if (lastIndexUpdate) { if (lastIndexUpdate) {
@ -138,7 +138,7 @@ export class OrganizationComponent {
//this.getDivContents(); //this.getDivContents();
this.getPageContents(); this.getPageContents();
this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url); this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url);
}));
this.subscriptions.push(this.route.queryParams.subscribe(params => { this.subscriptions.push(this.route.queryParams.subscribe(params => {
this.organizationInfo = null; this.organizationInfo = null;
this.updateTitle("Organization"); this.updateTitle("Organization");

View File

@ -26,6 +26,7 @@ import {ResultPreview} from "../../utils/result-preview/result-preview";
import {SearchResult} from "../../utils/entities/searchResult"; import {SearchResult} from "../../utils/entities/searchResult";
import {IndexInfoService} from "../../utils/indexInfo.service"; import {IndexInfoService} from "../../utils/indexInfo.service";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
@Component({ @Component({
selector: 'project', selector: 'project',
@ -138,9 +139,8 @@ export class ProjectComponent {
private indexInfoService: IndexInfoService) {} private indexInfoService: IndexInfoService) {}
ngOnInit() { ngOnInit() {
this.subscriptions.push(this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { this.properties = properties;
this.properties = data.envSpecific;
if (typeof document !== 'undefined') { if (typeof document !== 'undefined') {
this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => { this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => {
if (lastIndexUpdate) { if (lastIndexUpdate) {
@ -152,7 +152,7 @@ export class ProjectComponent {
this.getPageContents(); this.getPageContents();
this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url); this.updateUrl(this.properties.domain + this.properties.baseLink + this._router.url);
}));
this.subscriptions.push(this.route.queryParams.subscribe(params => { this.subscriptions.push(this.route.queryParams.subscribe(params => {
this.metricsClicked = false; this.metricsClicked = false;
this.statsClicked = false; this.statsClicked = false;

View File

@ -11,6 +11,7 @@ import {DeletedByInferenceService} from './deletedByInference.service';
import {ResultPreview} from "../../../utils/result-preview/result-preview"; import {ResultPreview} from "../../../utils/result-preview/result-preview";
import {AlertModal} from "../../../utils/modal/alert"; import {AlertModal} from "../../../utils/modal/alert";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../../../environments/environment";
@Component({ @Component({
selector: 'deletedByInference', selector: 'deletedByInference',
@ -54,16 +55,14 @@ export class DeletedByInferenceComponent {
constructor(private element: ElementRef, constructor(private element: ElementRef,
private _deletedByInferenceService: DeletedByInferenceService, private _deletedByInferenceService: DeletedByInferenceService,
private route: ActivatedRoute, private route: ActivatedRoute) {
private _router: Router) {
} }
ngOnInit() { ngOnInit() {
this.subscriptions.push(this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
})); this.properties = properties;
this.subscriptions.push(this.route.queryParams.subscribe(data => { this.subscriptions.push(this.route.queryParams.subscribe(data => {
this.errorCodes = new ErrorCodes(); this.errorCodes = new ErrorCodes();
this.status = this.errorCodes.LOADING; this.status = this.errorCodes.LOADING;

View File

@ -41,12 +41,10 @@ export class UserComponent {
} }
ngOnInit() { ngOnInit() {
this.subscriptions.push(this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { this.properties = properties;
this.properties = data.envSpecific;
this.loginUrl = this.properties.loginUrl; this.loginUrl = this.properties.loginUrl;
}));
if (typeof document !== 'undefined') { if (typeof document !== 'undefined') {
this.server = false; this.server = false;
this.subscriptions.push(this.userManagementsService.getUserInfo().subscribe(user => { this.subscriptions.push(this.userManagementsService.getUserInfo().subscribe(user => {

View File

@ -74,19 +74,19 @@
<search-research-results *ngIf="activeEntity == 'result'" resultType="result" [includeOnlyResultsAndFilter]="true" <search-research-results *ngIf="activeEntity == 'result'" resultType="result" [includeOnlyResultsAndFilter]="true"
(searchPageUpdates)="activeEntityUpdate($event)" [showSwitchSearchLink]="false" (searchPageUpdates)="activeEntityUpdate($event)" [showSwitchSearchLink]="false"
simpleSearchLink="/search/find"></search-research-results> simpleSearchLink="/search/find" [customFilter]="customFilter"></search-research-results>
<search-projects *ngIf="activeEntity == 'projects'" [includeOnlyResultsAndFilter]="true" [showSwitchSearchLink]="false" <search-projects *ngIf="activeEntity == 'projects'" [includeOnlyResultsAndFilter]="true" [showSwitchSearchLink]="false"
(searchPageUpdates)="activeEntityUpdate($event)" (searchPageUpdates)="activeEntityUpdate($event)"
simpleSearchLink="/search/find"> simpleSearchLink="/search/find" [customFilter]="customFilter">
</search-projects> </search-projects>
<search-organizations *ngIf="activeEntity == 'organizations'" [includeOnlyResultsAndFilter]="true" [showSwitchSearchLink]="false" <search-organizations *ngIf="activeEntity == 'organizations'" [includeOnlyResultsAndFilter]="true" [showSwitchSearchLink]="false"
(searchPageUpdates)="activeEntityUpdate($event)" (searchPageUpdates)="activeEntityUpdate($event)"
simpleSearchLink="/search/find"> simpleSearchLink="/search/find" [customFilter]="customFilter">
</search-organizations> </search-organizations>
<search-dataproviders *ngIf="activeEntity == 'datasources'" [includeOnlyResultsAndFilter]="true" [showSwitchSearchLink]="false" <search-dataproviders *ngIf="activeEntity == 'datasources'" [includeOnlyResultsAndFilter]="true" [showSwitchSearchLink]="false"
(searchPageUpdates)="activeEntityUpdate($event)" (searchPageUpdates)="activeEntityUpdate($event)"
simpleSearchLink="/search/find"> simpleSearchLink="/search/find" [customFilter]="customFilter">
</search-dataproviders> </search-dataproviders>

View File

@ -32,6 +32,7 @@ import {SearchProjectsComponent} from "../searchProjects.component";
import {SearchOrganizationsComponent} from "../searchOrganizations.component"; import {SearchOrganizationsComponent} from "../searchOrganizations.component";
import {SearchDataProvidersComponent} from "../searchDataProviders.component"; import {SearchDataProvidersComponent} from "../searchDataProviders.component";
import {NewSearchPageComponent} from "../searchUtils/newSearchPage.component"; import {NewSearchPageComponent} from "../searchUtils/newSearchPage.component";
import {properties} from "../../../../environments/environment";
@Component({ @Component({
changeDetection: ChangeDetectionStrategy.Default, changeDetection: ChangeDetectionStrategy.Default,
@ -141,12 +142,11 @@ export class SearchAllComponent {
} }
public ngOnInit() { public ngOnInit() {
this.subs.push(this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
var description = "Search for research outcomes (publications, datasets, software, other research products), projects, organizations, content providers in the OpenAIRE Research Graph. "; var description = "Search for research outcomes (publications, datasets, software, other research products), projects, organizations, content providers in the OpenAIRE Research Graph. ";
var title = "OpenAIRE |Search for research outcomes, projects, content providers & organizations"; var title = "OpenAIRE |Search for research outcomes, projects, content providers & organizations";
this.properties = data.envSpecific; this.properties = properties;
var url = this.properties.domain + this.properties.baseLink + this._router.url; var url = this.properties.domain + this.properties.baseLink + this._router.url;
this._title.setTitle(title); this._title.setTitle(title);
this._meta.updateTag({content: description}, "name='description'"); this._meta.updateTag({content: description}, "name='description'");
@ -197,7 +197,7 @@ export class SearchAllComponent {
} }
} }
this.loadAll(); this.loadAll();
}));
} }
loadAll() { loadAll() {

View File

@ -7,6 +7,7 @@ import {Dates} from '../../utils/string-utils.class';
import {EnvProperties} from '../../utils/properties/env-properties'; import {EnvProperties} from '../../utils/properties/env-properties';
import {SearchCustomFilter} from "./searchUtils.class"; import {SearchCustomFilter} from "./searchUtils.class";
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
@Component({ @Component({
selector: 'advanced-search-form', selector: 'advanced-search-form',
@ -52,11 +53,9 @@ export class AdvancedSearchFormComponent {
} }
ngOnInit() { ngOnInit() {
this.selectedEntity = this.entityType; this.selectedEntity = this.entityType;
this.sub = this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
}); this.properties = properties;
for(var i = 0; i < this.fieldIds.length; i++){ for(var i = 0; i < this.fieldIds.length; i++){
this.fieldList[this.fieldIds[i]]=[]; this.fieldList[this.fieldIds[i]]=[];
} }

View File

@ -103,7 +103,7 @@ export class EntitiesSelectionComponent {
ngOnInit() { ngOnInit() {
this.show = 0; this.show = 0;
if (this.properties) { if (this.properties) {
if((this.customFilter && this.customFilter.queryFieldName == "communityId") || this.properties.adminToolsCommunity !== "monitor") { if((this.customFilter && this.customFilter.queryFieldName == "communityId") || (this.properties.adminToolsCommunity !== "monitor" && this.properties.adminToolsPortalType !=='aggregator')) {
//this.config.getCommunityInformation(this.properties, (this.customFilter && this.customFilter.queryFieldName == "communityId") ? this.customFilter.valueId : this.properties.adminToolsCommunity).subscribe(data => { //this.config.getCommunityInformation(this.properties, (this.customFilter && this.customFilter.queryFieldName == "communityId") ? this.customFilter.valueId : this.properties.adminToolsCommunity).subscribe(data => {
this.subs.push(this.config.communityInformationState.subscribe(data => { this.subs.push(this.config.communityInformationState.subscribe(data => {
if(data) { if(data) {
@ -176,6 +176,17 @@ export class EntitiesSelectionComponent {
this.show = 3;*/ this.show = 3;*/
this.show = 1; this.show = 1;
this.disableSelect = true; this.disableSelect = true;
}else if(this.properties.adminToolsPortalType =='aggregator'){
this.showResearchOutcomes = true;
this.showPublications = true;
this.showDatasets = true;
this.showSoftware = true;
this.showOther = true;
this.showProjects = true;
this.showOrganizations = true;
this.showDataProviders = true;
this.showAll = true;
this.show = 5;
} else { } else {
this.showResearchOutcomes = true; this.showResearchOutcomes = true;
this.showPublications = true; this.showPublications = true;

View File

@ -293,7 +293,7 @@
class="uk-alert uk-animation-slide-top-small"> class="uk-alert uk-animation-slide-top-small">
Do you want to see results only for {{customFilter.valueName}}? <a Do you want to see results only for {{customFilter.valueName}}? <a
(click)="addCustomFilter();">Click (click)="addCustomFilter();">Click
here {{customFilterEnabled}}</a>. here</a>.
</div> </div>
<div *ngIf="openaireLink && (searchUtils.totalResults > 0 || !loadPaging )"><a <div *ngIf="openaireLink && (searchUtils.totalResults > 0 || !loadPaging )"><a
class="uk-margin-top uk-button uk-button-text" class="uk-margin-top uk-button uk-button-text"

View File

@ -9,6 +9,7 @@ import {ErrorCodes} from '../../utils/properties/errorCodes';
import 'rxjs'; import 'rxjs';
import {Subscriber} from "rxjs"; import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
@Component({ @Component({
selector: 'search-download', selector: 'search-download',
@ -53,13 +54,12 @@ export class SearchDownloadComponent {
} }
ngOnInit() { ngOnInit() {
this.subscriptions.push(this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { this.properties = properties;
this.properties = data.envSpecific; this.csvLimit = this.properties.csvLimit;
this.csvLimit = data.envSpecific.csvLimit; this.downloadURLAPI = this.properties.csvAPIURL;
this.downloadURLAPI = data.envSpecific.csvAPIURL; this.isPiwikEnabled = this.properties.enablePiwikTrack;
this.isPiwikEnabled = data.envSpecific.enablePiwikTrack;
}));
} }
ngOnDestroy() { ngOnDestroy() {

View File

@ -19,6 +19,7 @@ import {PiwikService} from '../../utils/piwik/piwik.service'
import { SEOService } from '../../sharedComponents/SEO/SEO.service'; import { SEOService } from '../../sharedComponents/SEO/SEO.service';
import {HelperService} from "../../utils/helper/helper.service"; import {HelperService} from "../../utils/helper/helper.service";
import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component"; import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
import {properties} from "../../../../environments/environment";
@Component({ @Component({
selector: 'search-page-table', selector: 'search-page-table',
@ -92,19 +93,18 @@ export class SearchPageTableViewComponent implements OnInit, AfterViewInit {
private helper: HelperService) { } private helper: HelperService) { }
ngOnInit() { ngOnInit() {
this.subscriptions.push(this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { this.properties = properties;
this.properties = data.envSpecific;
this.getPageContents(); this.getPageContents();
this.isPiwikEnabled = data.envSpecific.enablePiwikTrack; this.isPiwikEnabled =this.properties.enablePiwikTrack;
if(typeof window !== 'undefined') { if(typeof window !== 'undefined') {
this.updateUrl(this.properties.domain+this.properties.baseLink+location.pathname); this.updateUrl(this.properties.domain+this.properties.baseLink+location.pathname);
this.url =this.properties.domain+this.properties.baseLink+location.pathname; this.url =this.properties.domain+this.properties.baseLink+location.pathname;
} }
if(typeof document !== 'undefined' && this.isPiwikEnabled){ if(typeof document !== 'undefined' && this.isPiwikEnabled){
this.subscriptions.push(this._piwikService.trackView(data.envSpecific, this.pageTitle, this.piwikSiteId).subscribe()); this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe());
} }
}));
this.dtOptions = { this.dtOptions = {
"paging": true, "paging": true,
"searching": false, "searching": false,

View File

@ -50,7 +50,8 @@
<div> <div>
<div class="uk-panel" id="module-0"> <div class="uk-panel" id="module-0">
<ul class="uk-nav uk-nav-default"> <ul class="uk-nav uk-nav-default">
<li *ngIf="(['explore','connect','monitor','provide','develop']).indexOf(portal)!=-1" class="uk-nav-header uk-parent"> <li *ngIf="(['explore','connect','monitor','provide','develop','aggregator']).indexOf(portal)!=-1"
class="uk-nav-header uk-parent">
Dashboards Dashboards
<ul class="uk-nav-sub"> <ul class="uk-nav-sub">
<li *ngIf="portal!='explore'"><a <li *ngIf="portal!='explore'"><a
@ -119,7 +120,7 @@
</div> </div>
</div> </div>
</div> </div>
<div *ngIf="(['explore','connect','monitor','provide','develop']).indexOf(portal)!=-1" <div *ngIf="(['explore','connect','monitor','provide','develop', 'aggregator']).indexOf(portal)!=-1"
class="tm-toolbar custom-{{portal}}-toolbar uk-visible@m"> class="tm-toolbar custom-{{portal}}-toolbar uk-visible@m">
<div class="uk-container uk-flex uk-flex-middle uk-container-expand"> <div class="uk-container uk-flex uk-flex-middle uk-container-expand">
<div class="uk-margin-auto-left"> <div class="uk-margin-auto-left">

View File

@ -4,6 +4,7 @@ import {DomSanitizer} from '@angular/platform-browser';
//Usage Example <paging [currentPage]="page" [totalResults]="resultsNum" [term]="keyword"> </paging> //Usage Example <paging [currentPage]="page" [totalResults]="resultsNum" [term]="keyword"> </paging>
import {RouterHelper} from './routerHelper.class'; import {RouterHelper} from './routerHelper.class';
import {EnvProperties} from './properties/env-properties'; import {EnvProperties} from './properties/env-properties';
import {properties} from "../../../environments/environment";
@Component({ @Component({
selector: 'paging', selector: 'paging',
template: ` template: `
@ -51,17 +52,13 @@ export class PagingFormatter {
public routerHelper:RouterHelper = new RouterHelper(); public routerHelper:RouterHelper = new RouterHelper();
constructor (private route: ActivatedRoute, private _router: Router, private sanitizer:DomSanitizer) { constructor () {
} }
ngOnInit() { ngOnInit() {
this.route.data this.properties = properties;
.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
this.limit = this.properties.pagingLimit; this.limit = this.properties.pagingLimit;
} }
);
}
getTotalPages(){ getTotalPages(){
let total: number = 0; let total: number = 0;
//let limit: number = 20;//OpenaireProperties.getPagingLimit(); //let limit: number = 20;//OpenaireProperties.getPagingLimit();

View File

@ -1,6 +1,7 @@
import {Component, Input, Output, EventEmitter} from '@angular/core'; import {Component, Input, Output, EventEmitter} from '@angular/core';
import {ActivatedRoute} from '@angular/router'; import {ActivatedRoute} from '@angular/router';
import{EnvProperties} from './properties/env-properties'; import{EnvProperties} from './properties/env-properties';
import {properties} from "../../../environments/environment";
//Usage Example <paging [currentPage]="page" [totalResults]="resultsNum" [term]="keyword"> </paging> //Usage Example <paging [currentPage]="page" [totalResults]="resultsNum" [term]="keyword"> </paging>
@ -56,12 +57,10 @@ export class pagingFormatterNoLoad {
ngOnInit() { ngOnInit() {
//console.info("In paging -- CurrentPage:"+this.currentPage+" "+"total Pages = "+this.getTotalPages() +" Results num:"+this.totalResults); //console.info("In paging -- CurrentPage:"+this.currentPage+" "+"total Pages = "+this.getTotalPages() +" Results num:"+this.totalResults);
this.route.data
.subscribe((data: { envSpecific: EnvProperties }) => { this.properties = properties;
this.properties = data.envSpecific;
this.limit = this.properties.pagingLimit; this.limit = this.properties.pagingLimit;
}
);
} }
getTotalPages(){ getTotalPages(){
let total: number = 0; let total: number = 0;

View File

@ -1,6 +1,6 @@
export type Environment = "development" | "test" | "beta" | "production"; export type Environment = "development" | "test" | "beta" | "production";
export type Dashboard = "explore" | "connect" | "monitor"; export type Dashboard = "explore" | "connect" | "monitor";
export type PortalType = "explore" | "connect" | "community" | "monitor"; export type PortalType = "explore" | "connect" | "community" | "monitor" | "aggregator";
export interface EnvProperties { export interface EnvProperties {
environment?: Environment; environment?: Environment;