From ac25e160fe41df9fd9e2169e4bb4089f0bceb6e9 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Thu, 29 Sep 2022 12:09:37 +0300 Subject: [PATCH 1/6] Monitor - Add color coding in browse dashboards --- .../portal-search-result.component.html | 2 +- .../portal-search-result.component.less | 23 +++++++++++++++++++ .../portal-search-result.component.ts | 3 ++- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 searchPages/searchUtils/portal-search-result.component.less diff --git a/searchPages/searchUtils/portal-search-result.component.html b/searchPages/searchUtils/portal-search-result.component.html index 60975ab2..3a3b6c91 100644 --- a/searchPages/searchUtils/portal-search-result.component.html +++ b/searchPages/searchUtils/portal-search-result.component.html @@ -3,7 +3,7 @@
  • + [ngClass]="result.type" [class.uk-disabled]="!hasPermission(result)">
    diff --git a/searchPages/searchUtils/portal-search-result.component.less b/searchPages/searchUtils/portal-search-result.component.less new file mode 100644 index 00000000..0381bcbf --- /dev/null +++ b/searchPages/searchUtils/portal-search-result.component.less @@ -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); + } +} \ No newline at end of file diff --git a/searchPages/searchUtils/portal-search-result.component.ts b/searchPages/searchUtils/portal-search-result.component.ts index 28f0036f..dfc77c92 100644 --- a/searchPages/searchUtils/portal-search-result.component.ts +++ b/searchPages/searchUtils/portal-search-result.component.ts @@ -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{ From 7da81d02b59a387d36c9bc1ee478591214edff9a Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Mon, 3 Oct 2022 13:39:35 +0300 Subject: [PATCH 2/6] create new function for composing email for explore (contact-us page) --- utils/email/composer.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/utils/email/composer.ts b/utils/email/composer.ts index 7176f299..4fc023a1 100644 --- a/utils/email/composer.ts +++ b/utils/email/composer.ts @@ -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 = "
    " + + "Name: " + contactForm.name + "
    " + + "Surname: " + contactForm.surname + "
    " + + "Email: " + contactForm.email + "
    " + + "Affiliation: " + contactForm.affiliation ? contactForm.affiliation : '-' + "
    " + + "

    " + contactForm.message + "

    " + + "
    "; + email.recipients = admins; + return email; + } + public static composeEmailForUsageCounts(contactForm: any, admins: any): Email { let email: Email = new Email(); From f0a6ce40a95d23e7e03f1d558ee27db56275bff3 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Mon, 3 Oct 2022 13:58:03 +0300 Subject: [PATCH 3/6] deposit page: rename button "Get tarted" to "Find Repository" --- deposit/depositFirstPage.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deposit/depositFirstPage.component.ts b/deposit/depositFirstPage.component.ts index e07921e9..7ac0a784 100644 --- a/deposit/depositFirstPage.component.ts +++ b/deposit/depositFirstPage.component.ts @@ -30,7 +30,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc Find the appropriate repository to deposit your research.
    From bae33e0a51c2c3a7c5ce60930e1dac56e8a33c88 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Mon, 3 Oct 2022 15:45:00 +0300 Subject: [PATCH 4/6] update hero title for deposit page --- deposit/depositFirstPage.component.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/deposit/depositFirstPage.component.ts b/deposit/depositFirstPage.component.ts index 7ac0a784..7db06db4 100644 --- a/deposit/depositFirstPage.component.ts +++ b/deposit/depositFirstPage.component.ts @@ -25,10 +25,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
    -

    Deposit or publish your research in Open Access.

    -
    - Find the appropriate repository to deposit your research. -
    +

    Find a repository to deposit or publish your research in Open Access.

    From 3c1623d12c2ae6a9a244ee34b3b22ede23f6680c Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 3 Oct 2022 20:25:37 +0300 Subject: [PATCH 5/6] [Aggregator]: Updates in css | Bug fix in isRouteEnabled check. 1. portal.ts & aggregators.ts: [Bug fix] In method "getMockCommunityInfo()" set also pid for community (isRouteEnabled.guard needs it) | Updates in less files (overrides of colors) 2. styles.less: Updated imports (added linking, landing and canada-custom and removed aggregator-custom). 3. numbers.component.ts: Updated default value of @Input() colorClass to "uk-text-primary". 4. connectHelper.ts: In method "getCommunityFromDomain()" added also "aggregator" and "eosc" portal types to set domain on development. --- connect/connectHelper.ts | 6 ++++-- sharedComponents/numbers/numbers.component.ts | 2 +- utils/entities/adminTool/portal.ts | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/connect/connectHelper.ts b/connect/connectHelper.ts index ed8fb090..252e25c0 100644 --- a/connect/connectHelper.ts +++ b/connect/connectHelper.ts @@ -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) { diff --git a/sharedComponents/numbers/numbers.component.ts b/sharedComponents/numbers/numbers.component.ts index a9a83872..c80d116a 100644 --- a/sharedComponents/numbers/numbers.component.ts +++ b/sharedComponents/numbers/numbers.component.ts @@ -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; diff --git a/utils/entities/adminTool/portal.ts b/utils/entities/adminTool/portal.ts index 0c7f62c7..909d8930 100644 --- a/utils/entities/adminTool/portal.ts +++ b/utils/entities/adminTool/portal.ts @@ -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) { From 9ac7ed93d4420cf904609b1fbfbe341cc4ae8836 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 4 Oct 2022 11:39:44 +0300 Subject: [PATCH 6/6] [Eosc Explore]: ISVocabularies.service.ts: [Bug fix] Added check if type is "service" (used to return null when selecting vocabulary fields in advanced search). --- utils/staticAutoComplete/ISVocabularies.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/staticAutoComplete/ISVocabularies.service.ts b/utils/staticAutoComplete/ISVocabularies.service.ts index 833d6ea9..5823091f 100644 --- a/utils/staticAutoComplete/ISVocabularies.service.ts +++ b/utils/staticAutoComplete/ISVocabularies.service.ts @@ -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") {