Merge remote-tracking branch 'origin/master' into angular-12

This commit is contained in:
Konstantina Galouni 2022-10-04 13:50:10 +03:00
commit 6b28663496
9 changed files with 53 additions and 14 deletions

View File

@ -5,8 +5,10 @@ import {Session} from "../login/utils/helper.class";
export class ConnectHelper {
public static getCommunityFromDomain(domain: string): string{
if(properties.environment == "development" && (properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community")) {
domain = "covid-19.openaire.eu"; //for testing
if(properties.environment == "development" &&
(properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community"
|| properties.adminToolsPortalType == "aggregator" || properties.adminToolsPortalType == "eosc")) {
domain = "canada.explore.openaire.eu"; //for testing
}
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
if (domain.indexOf('eosc-portal.eu') != -1) {

View File

@ -25,12 +25,9 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
<div class="uk-grid uk-grid-large uk-grid-stack uk-padding-small" uk-grid>
<div class="uk-width-3-5@m uk-width-1-1@s uk-flex uk-flex-column uk-flex-center">
<div style="max-width: 600px;">
<h1 class="uk-h2" uk-scrollspy-class>Deposit or publish your research in Open Access.</h1>
<div class="uk-text-large uk-margin-medium-top" uk-scrollspy-class>
Find the appropriate repository to deposit your research.
</div>
<h1 class="uk-h2" uk-scrollspy-class>Find a repository to deposit or publish your research in Open Access.</h1>
<div class="uk-margin-medium-top" uk-scrollspy-class>
<a class="uk-button uk-button-primary uk-text-uppercase" (click)="openFsModal()">Get Started</a>
<a class="uk-button uk-button-primary uk-text-uppercase" (click)="openFsModal()">Find Repository</a>
</div>
</div>
</div>

View File

@ -3,7 +3,7 @@
<errorMessages [status]="[status]" [type]="'results'"></errorMessages>
<li *ngFor="let result of results">
<div class="uk-card uk-card-default uk-card-body uk-position-relative uk-flex uk-flex-column uk-flex-center"
[class.uk-disabled]="!hasPermission(result)">
[ngClass]="result.type" [class.uk-disabled]="!hasPermission(result)">
<div>
<div *ngIf="type === 'community' && result.isSubscribed"
class="uk-text-background uk-text-center uk-position-top-left uk-padding-small uk-text-uppercase uk-text-bold">

View File

@ -0,0 +1,23 @@
@import (reference) "~src/assets/openaire-theme/less/color.less";
.setType(@color) {
border-left: 4px solid fade(@color, 30%);
& .type {
color: @color;
}
}
.uk-card {
&.funder {
.setType(@funder-color);
}
&.ri {
.setType(@ri-color);
}
&.organization {
.setType(@organization-color);
}
}

View File

@ -10,7 +10,8 @@ import {StringUtils} from '../../utils/string-utils.class';
@Component({
selector: 'portal-search-result',
templateUrl: 'portal-search-result.component.html'
templateUrl: 'portal-search-result.component.html',
styleUrls: ['portal-search-result.component.less']
})
export class PortalSearchResultComponent implements OnInit{

View File

@ -143,7 +143,7 @@ interface Link {
`,
})
export class NumbersComponent implements OnInit, OnDestroy {
@Input() colorClass = 'portal-color';
@Input() colorClass = 'uk-text-primary';
@Input() backgroundClass = null;
/** Add a value if you want to apply refine query*/
@Input() refineValue = null;

View File

@ -77,7 +77,22 @@ export class Composer {
email.recipients = admins;
return email;
}
public static composeEmailForExplore(contactForm: any, admins: any): Email {
let email: Email = new Email();
email.subject = "OpenAIRE - Explore [" + properties.environment.toUpperCase() + "]";
email.body = "<div style='font-size:" + this.noteBodySize + "'>"
+ "<span><b>Name</b>: " + contactForm.name + "</span><br>"
+ "<span><b>Surname</b>: " + contactForm.surname + "</span><br>"
+ "<span><b>Email</b>: " + contactForm.email + "</span><br>"
+ "<span><b>Affiliation</b>: " + contactForm.affiliation ? contactForm.affiliation : '-' + "</span><br>"
+ "<p>" + contactForm.message + "</p>"
+ "</div>";
email.recipients = admins;
return email;
}
public static composeEmailForUsageCounts(contactForm: any, admins: any): Email {
let email: Email = new Email();

View File

@ -184,8 +184,9 @@ export class Portal {
};;
};
public static getMockCommunityInfo(disabledEntities:string[],disabledPages:string[]): any {
public static getMockCommunityInfo(pid: string, disabledEntities:string[],disabledPages:string[]): any {
let communityInfo = Object.assign({}, Portal.getmockPortalInfo());
communityInfo.pid = pid;
for(let disabledPage of disabledPages) {
for (var i = 0; i < communityInfo.pages.length; i++) {
if (communityInfo.pages[i].route == disabledPage) {

View File

@ -46,11 +46,11 @@ export class ISVocabulariesService {
} else if (field == "access" && (entity == "publication" || entity == "dataset" || entity == "software" || entity == "other" || entity == "result")) {
vocabulary = "dnet:access_modes.json";
return this.getVocabularyFromServiceAsync(vocabulary, properties);
} else if ((field == "type") && (entity == "dataprovider")) {
} else if ((field == "type") && (entity == "dataprovider" || entity == "service")) {
vocabulary = "dnet:datasource_typologies.json";
return this.getVocabularyFromServiceAsync(vocabulary, properties);
} else if (field == "compatibility" && (entity == "dataprovider")) {
} else if (field == "compatibility" && (entity == "dataprovider" || entity == "service")) {
vocabulary = "dnet:datasourceCompatibilityLevel.json";
return this.getVocabularyFromServiceAsync(vocabulary, properties);
} else if (field == "country") {