Compare commits
3 Commits
9db0940697
...
d0adf442db
Author | SHA1 | Date |
---|---|---|
argirok | d0adf442db | |
argirok | a559329643 | |
argirok | 03da07b022 |
|
@ -12,7 +12,7 @@ export class ConnectHelper {
|
|||
if(properties.environment == "development" &&
|
||||
(properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community"
|
||||
|| properties.adminToolsPortalType == "aggregator" || properties.adminToolsPortalType == "eosc")) {
|
||||
domain = "enermaps.openaire.eu"; //for testing
|
||||
domain = "covid-19.openaire.eu"; //for testing
|
||||
}
|
||||
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
|
||||
if (domain.indexOf('eosc-portal.eu') != -1) {
|
||||
|
|
|
@ -105,7 +105,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
|
|||
Find the appropriate repository.
|
||||
</h2>
|
||||
<div class="uk-grid uk-flex uk-flex-middle" uk-height-match="target: .uk-card-body, .uk-tile-primary;" uk-grid>
|
||||
<div>
|
||||
<div page-enabled [pageRoute]="'/participate/deposit/search'">
|
||||
<div class="uk-card uk-card-default uk-text-center" style="width: 360px;">
|
||||
<div class="uk-card-body uk-text-small">
|
||||
<img src="assets/common-assets/common/Logo_Horizontal.png" alt="OpenAIRE logo" class="uk-width-small uk-margin-bottom">
|
||||
|
@ -120,7 +120,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div page-enabled [pageRoute]="'/participate/deposit/zenodo'">
|
||||
<div class="uk-card uk-card-default uk-text-center" style="width: 360px;">
|
||||
<div class="uk-card-body uk-text-small">
|
||||
<img src="assets/common-assets/common/logo-zenodo.png" alt="Zenodo logo" class="uk-width-small uk-margin-bottom">
|
||||
|
@ -141,7 +141,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="zenodoInformation.hasSuggestedRepositories">
|
||||
<div page-enabled [pageRoute]="'/participate/deposit/suggested'" *ngIf="zenodoInformation.hasSuggestedRepositories">
|
||||
<div class="uk-card uk-card-default uk-text-center" style="width: 360px;">
|
||||
<div class="uk-card-body uk-text-small">
|
||||
<img src="assets/connect-assets/deposit/suggested-repositories.svg" alt="Suggested Repositories" class="uk-width-small uk-margin-bottom" style="height:55px">
|
||||
|
|
|
@ -12,6 +12,7 @@ import {DepositFirstPageComponent} from "./depositFirstPage.component";
|
|||
import {BreadcrumbsModule} from "../utils/breadcrumbs/breadcrumbs.module";
|
||||
import {SearchInputModule} from "../sharedComponents/search-input/search-input.module";
|
||||
import {FullScreenModalModule} from '../utils/modal/full-screen-modal/full-screen-modal.module';
|
||||
import {IsPageEnabledModule} from "../utils/isPageEnabled/isPageEnabled.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
@ -19,7 +20,7 @@ import {FullScreenModalModule} from '../utils/modal/full-screen-modal/full-scree
|
|||
RouterModule,
|
||||
HelperModule,
|
||||
Schema2jsonldModule, SEOServiceModule, BreadcrumbsModule, SearchInputModule,
|
||||
FullScreenModalModule
|
||||
FullScreenModalModule, IsPageEnabledModule
|
||||
],
|
||||
declarations: [
|
||||
DepositFirstPageComponent
|
||||
|
|
|
@ -32,7 +32,7 @@ import {SearchForm} from "../searchPages/searchUtils/newSearchPage.component";
|
|||
<div search-input [(value)]="keyword" placeholder="Search by name, description, subject..." (searchEmitter)="keywordChanged()"
|
||||
[searchInputClass]="'inner background'"></div>
|
||||
<div class="uk-margin-top uk-text-center uk-margin-medium-bottom">
|
||||
<a *ngIf="zenodoInformation.hasSuggestedRepositories" class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text" routerLink="/participate/deposit/suggested">
|
||||
<a page-enabled [pageRoute]="'/participate/deposit/suggested'" *ngIf="zenodoInformation.hasSuggestedRepositories" class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text" routerLink="/participate/deposit/suggested">
|
||||
<span class="uk-flex uk-flex-middle">
|
||||
<span>Suggested repositories</span>
|
||||
</span>
|
||||
|
@ -42,8 +42,8 @@ import {SearchForm} from "../searchPages/searchUtils/newSearchPage.component";
|
|||
<span>Zenodo Repository</span><span class="custom-external custom-icon space"></span>
|
||||
</span>
|
||||
</a>
|
||||
<a *ngIf="!zenodoInformation.url" routerLink="/participate/deposit/zenodo" class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
|
||||
Related Zenodo Communities
|
||||
<a page-enabled [pageRoute]="'/participate/deposit/zenodo'" *ngIf="!zenodoInformation.url" routerLink="/participate/deposit/zenodo" class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
|
||||
<span>Related Zenodo Communities</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -12,13 +12,14 @@ import {SearchFormModule} from '../searchPages/searchUtils/searchForm.module';
|
|||
import {SearchDataProvidersModule} from "../searchPages/searchDataProviders.module";
|
||||
import {BreadcrumbsModule} from "../utils/breadcrumbs/breadcrumbs.module";
|
||||
import {SearchInputModule} from "../sharedComponents/search-input/search-input.module";
|
||||
import {IsPageEnabledModule} from "../utils/isPageEnabled/isPageEnabled.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
RouterModule,
|
||||
DataProvidersServiceModule,
|
||||
SearchFormModule, SearchResultsModule, SearchDataProvidersModule, BreadcrumbsModule, SearchInputModule
|
||||
SearchFormModule, SearchResultsModule, SearchDataProvidersModule, BreadcrumbsModule, SearchInputModule, IsPageEnabledModule
|
||||
|
||||
],
|
||||
declarations: [
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<!-- <a href="{{zenodoInformation.url}}" target="_blank" class="custom-external custom-icon">{{zenodoInformation.name}}</a>-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="173" height="56.685" viewBox="0 0 173 56.685"><defs><style>.a{fill:#191919;}</style></defs><path class="a" d="M171.749,22.311a16.158,16.158,0,0,0-3.364-4.953A15.511,15.511,0,0,0,157.4,12.837a15.213,15.213,0,0,0-6.074,1.206,16.4,16.4,0,0,0-2.63,1.424,16.2,16.2,0,0,0-2.325,1.891,14.893,14.893,0,0,0-1.242,1.383,19.241,19.241,0,0,0-1.173,1.7,19.372,19.372,0,0,0-1.482,3.343c.048-1.943.332-4.842,1.482-6.468V3.272a3.081,3.081,0,0,0-.993-2.323,3.251,3.251,0,0,0-5.556,2.323V15.765a17.084,17.084,0,0,0-4.261-2.156,14.8,14.8,0,0,0-4.781-.773,15.314,15.314,0,0,0-6.028,1.206,15.575,15.575,0,0,0-4.959,3.316,16.056,16.056,0,0,0-3.352,4.953c-.063.142-.118.286-.177.43-.056-.144-.111-.288-.173-.43a16.158,16.158,0,0,0-3.364-4.953,15.519,15.519,0,0,0-4.95-3.316,15.795,15.795,0,0,0-12.105,0,16.068,16.068,0,0,0-4.954,3.316,15.182,15.182,0,0,0-3.359,4.953c-.058.136-.109.272-.162.407-.056-.135-.109-.271-.167-.407a16.056,16.056,0,0,0-3.357-4.953,15.532,15.532,0,0,0-4.956-3.316,15.795,15.795,0,0,0-12.105,0,16.084,16.084,0,0,0-4.948,3.316,15.129,15.129,0,0,0-3.366,4.953c-.051.125-.1.253-.148.378-.051-.125-.1-.253-.155-.378a16.165,16.165,0,0,0-3.366-4.953,15.489,15.489,0,0,0-10.979-4.521,15.185,15.185,0,0,0-6.072,1.206,16.01,16.01,0,0,0-4.622,3.017v-.521A3.335,3.335,0,0,0,27.211,13.2H3.837a3.334,3.334,0,0,0,0,6.669h18.37L.658,48.884A3.333,3.333,0,0,0,0,50.872v2.176a3.337,3.337,0,0,0,3.336,3.336H28.214a3.335,3.335,0,0,0,3.324-3.09,15.693,15.693,0,0,0,3.675,2.184,15.189,15.189,0,0,0,6.031,1.207A14.892,14.892,0,0,0,49.857,54.1a15.447,15.447,0,0,0,4.827-5.188v4.5a3.245,3.245,0,0,0,3.277,3.275,3.194,3.194,0,0,0,2.281-.949,3.077,3.077,0,0,0,.991-2.326V41.733h-.012a.087.087,0,0,1,.012-.015h-8.17a3.175,3.175,0,0,0-1.851.558,3.007,3.007,0,0,0-1.161,1.507l-.535,1.1a8.969,8.969,0,0,1-8.271,5.254,9.141,9.141,0,0,1-3.493-.684,8.463,8.463,0,0,1-2.883-1.939,9.963,9.963,0,0,1-1.94-2.888,8.4,8.4,0,0,1-.729-3.447V38.252H61.234V28.34a8.74,8.74,0,0,1,.688-3.442,8.959,8.959,0,0,1,8.355-5.515,9.117,9.117,0,0,1,3.493.687,8.459,8.459,0,0,1,2.883,1.94,10.032,10.032,0,0,1,1.94,2.889,8.36,8.36,0,0,1,.734,3.442V53.409A3.233,3.233,0,0,0,82.6,56.684a3.211,3.211,0,0,0,2.286-.949,3.107,3.107,0,0,0,.986-2.326v-4.5a15.828,15.828,0,0,0,2.482,3.249,15.454,15.454,0,0,0,4.954,3.314,15.671,15.671,0,0,0,12.061,0,16.035,16.035,0,0,0,5-3.314,15.226,15.226,0,0,0,3.359-4.951c.044-.112.087-.225.129-.338.046.113.087.226.134.338a15.068,15.068,0,0,0,3.359,4.951,16.075,16.075,0,0,0,4.951,3.314,15.79,15.79,0,0,0,12.109,0,15.476,15.476,0,0,0,4.946-3.314,16.166,16.166,0,0,0,3.366-4.951c.06-.142.116-.283.173-.426.058.143.111.284.173.426a16.07,16.07,0,0,0,3.359,4.951,15.454,15.454,0,0,0,4.954,3.314,15.671,15.671,0,0,0,12.061,0,16.008,16.008,0,0,0,5-3.314A15.314,15.314,0,0,0,173,41.178V28.341A14.991,14.991,0,0,0,171.749,22.311ZM8.35,49.716,25.794,26.224a16.054,16.054,0,0,0-.143,2.117V41.178A14.759,14.759,0,0,0,26.9,47.211a16.514,16.514,0,0,0,1.366,2.5H8.35ZM50.285,31.7H32.2V28.34a8.738,8.738,0,0,1,.686-3.442,8.951,8.951,0,0,1,8.36-5.515,9.1,9.1,0,0,1,3.486.687,8.423,8.423,0,0,1,2.885,1.94,10.033,10.033,0,0,1,1.94,2.889,8.318,8.318,0,0,1,.729,3.442V31.7Zm58.093,9.48a8.7,8.7,0,0,1-.688,3.447,8.941,8.941,0,0,1-8.352,5.511,9.141,9.141,0,0,1-3.493-.684,8.417,8.417,0,0,1-2.883-1.939,9.917,9.917,0,0,1-1.94-2.888,8.353,8.353,0,0,1-.729-3.447V28.341A8.74,8.74,0,0,1,90.98,24.9a8.935,8.935,0,0,1,1.937-2.889,9.165,9.165,0,0,1,9.9-1.94,8.433,8.433,0,0,1,2.888,1.94,10.129,10.129,0,0,1,1.94,2.889,8.356,8.356,0,0,1,.729,3.442V41.178Zm29.035,0a8.32,8.32,0,0,1-.729,3.447,9.947,9.947,0,0,1-1.94,2.888,8.358,8.358,0,0,1-2.888,1.939,9.337,9.337,0,0,1-7.018,0,9.046,9.046,0,0,1-4.825-4.826,8.735,8.735,0,0,1-.69-3.447V28.341a8.439,8.439,0,0,1,.732-3.442,10.1,10.1,0,0,1,1.94-2.889,8.522,8.522,0,0,1,2.883-1.94,9.152,9.152,0,0,1,3.493-.687,8.985,8.985,0,0,1,8.357,5.515,8.775,8.775,0,0,1,.686,3.442V41.178Zm29.035,0a8.82,8.82,0,0,1-.686,3.447,9.129,9.129,0,0,1-11.85,4.826,8.424,8.424,0,0,1-2.882-1.939,9.946,9.946,0,0,1-1.942-2.888,8.337,8.337,0,0,1-.732-3.447V28.341a8.742,8.742,0,0,1,.69-3.442,8.935,8.935,0,0,1,1.937-2.889,9.169,9.169,0,0,1,9.905-1.94,8.423,8.423,0,0,1,2.885,1.94,10.088,10.088,0,0,1,1.942,2.889,8.356,8.356,0,0,1,.729,3.442V41.178Z"/></svg>
|
||||
<p>The OpenAIRE Catch-all repository hosted at CERN cloud infrastructure. Whatever your field of research is, you can deposit any type of research product, select the proper license, ask for a DOI and link it to the funding projects for easy reporting.</p>
|
||||
<a *ngIf="zenodoInformation.shareInZenodoUrl" type="submit"
|
||||
<a page-enabled [pageRoute]="'/participate/deposit/zenodo'" *ngIf="zenodoInformation.shareInZenodoUrl" type="submit"
|
||||
routerLinkActive="router-link-active" [routerLink]="zenodoInformation.shareInZenodoUrl"
|
||||
class="uk-button portal-button uk-padding uk-padding-remove-vertical uk-margin-small-left">
|
||||
<span><span>Related zenodo communities</span><span uk-icon="arrow-right"></span></span>
|
||||
|
|
|
@ -7,12 +7,13 @@ import {ErrorMessagesModule} from '../utils/errorMessages.module';
|
|||
import {SearchResultsInDepositComponent} from './searchResultsInDeposit.component';
|
||||
import {ApprovedByCommunityModule} from '../connect/approvedByCommunity/approved.module';
|
||||
import {ResultPreviewModule} from "../utils/result-preview/result-preview.module";
|
||||
import {IsPageEnabledModule} from "../utils/isPageEnabled/isPageEnabled.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule,
|
||||
RouterModule, ErrorMessagesModule,
|
||||
ApprovedByCommunityModule, ResultPreviewModule
|
||||
ApprovedByCommunityModule, ResultPreviewModule, IsPageEnabledModule
|
||||
],
|
||||
declarations: [
|
||||
SearchResultsInDepositComponent
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
Laying the foundation for new approaches and solutions.
|
||||
</h2>
|
||||
<div class="uk-width-3-4@m" uk-scrollspy-class>
|
||||
We have developed a classification scheme for UN Sustainable Development Goals, to view contributions of research towards complex challenges for humanity such as climate change, biodiversity loss, pollution and poverty reduction.
|
||||
|
||||
The classification scheme is developed for UN Sustainable Development Goals, to view contributions of research towards complex challenges for humanity such as climate change, biodiversity loss, pollution and poverty reduction.
|
||||
<div class="uk-text-meta uk-margin-top">
|
||||
For more information please visit <a href="https://www.openaire.eu/openaire-explore-introducing-sdgs-and-fos" target="_blank">https://www.openaire.eu/openaire-explore-introducing-sdgs-and-fos</a>
|
||||
</div>
|
||||
|
|
|
@ -40,7 +40,7 @@ export class EntitiesSelectionComponent {
|
|||
|
||||
/** TODO change conditions base on PortalType instead of customFilter */
|
||||
ngOnInit() {
|
||||
if ((this.customFilter && this.customFilter.queryFieldName == "communityId") || (['explore', 'aggregator', 'eosc', 'faircore4eosc'].includes(this.properties.adminToolsPortalType))) {
|
||||
if ( (['explore', 'aggregator', 'eosc', 'faircore4eosc', "community"].includes(this.properties.adminToolsPortalType))) {
|
||||
this.subscriptions.push(this.config.portalAsObservable.subscribe(data => {
|
||||
if (data) {
|
||||
let showEntity = {};
|
||||
|
@ -104,8 +104,7 @@ export class EntitiesSelectionComponent {
|
|||
this.disableSelectEmitter.emit(this.entities.length == 1);
|
||||
}
|
||||
}));
|
||||
} else if ((this.customFilter && this.customFilter.queryFieldName == "community") ||
|
||||
(this.customFilter && (this.customFilter.queryFieldName == "relfunder" || this.customFilter.queryFieldName == "funder")) ||
|
||||
} else if ((this.customFilter && (this.customFilter.queryFieldName == "relfunder" || this.customFilter.queryFieldName == "funder")) ||
|
||||
(this.customFilter && this.customFilter.queryFieldName == "relorganizationid")
|
||||
|| this.properties.dashboard == "irish") {
|
||||
this.entities.push({label: OpenaireEntities.RESULTS, value: 'result'});
|
||||
|
|
|
@ -67,10 +67,12 @@ export class ConfigurationService {
|
|||
|
||||
isPageEnabled(properties: EnvProperties, portal: string, router: string): Observable<boolean> {
|
||||
let page_route: string = router.split('?')[0].substring(1);
|
||||
console.log(portal, router, page_route)
|
||||
return from(this.isPageEnabledAsync(properties, portal, page_route));
|
||||
}
|
||||
|
||||
filtering(page_route: string) {
|
||||
console.log(page_route)
|
||||
let community: Portal = this.portal.getValue();
|
||||
let pages: Page[] = <Page[]>community.pages;
|
||||
if (pages) {
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
import {properties} from "src/environments/environment";
|
||||
import {Component, Input, OnDestroy, OnInit} from "@angular/core";
|
||||
import {EnvProperties} from "../properties/env-properties";
|
||||
import {CommunityInfo} from "../../connect/community/communityInfo";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {CommunityService} from "../../connect/community/community.service";
|
||||
import {ConfigurationService} from "../configuration/configuration.service";
|
||||
import {Subscription} from "rxjs";
|
||||
|
||||
@Component({
|
||||
selector: '[page-enabled]',
|
||||
template: `
|
||||
|
||||
<ng-container *ngIf="pageRoute && pageEnabled">
|
||||
<ng-content></ng-content>
|
||||
</ng-container>
|
||||
`
|
||||
})
|
||||
export class IsPageEnabledComponent implements OnInit, OnDestroy {
|
||||
@Input() pageRoute:string;
|
||||
public properties: EnvProperties = properties;
|
||||
pageEnabled = false;
|
||||
|
||||
public community: CommunityInfo;
|
||||
loading;
|
||||
private subs: any[] = [];
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private communityService: CommunityService,
|
||||
private configurationService: ConfigurationService) {
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
this.subs.push(this.communityService.getCommunityAsObservable().subscribe( community => {
|
||||
this.community = community;
|
||||
this.getPageStatus();
|
||||
}));
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.subs.forEach(sub => {
|
||||
if (sub instanceof Subscription) {
|
||||
sub.unsubscribe();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private getPageStatus() {
|
||||
this.configurationService.isPageEnabled(this.properties, this.community.communityId, '/' + this.pageRoute).subscribe((page) => {
|
||||
this.pageEnabled = page;
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {RouterModule} from "@angular/router";
|
||||
import {IsPageEnabledComponent} from "./isPageEnabled.component";
|
||||
|
||||
@NgModule({
|
||||
declarations: [IsPageEnabledComponent],
|
||||
imports: [
|
||||
CommonModule, RouterModule
|
||||
],
|
||||
exports:[IsPageEnabledComponent],
|
||||
providers:[]
|
||||
})
|
||||
export class IsPageEnabledModule {
|
||||
}
|
Loading…
Reference in New Issue