@@ -235,7 +234,7 @@
target="_blank"> OpenAIRE - Explore.
-
+
0">
{{searchUtils.totalResults|number}}
{{type}}, page
@@ -248,7 +247,7 @@
{{searchUtils.page | number}}
of {{(totalPages(oldTotalResults)|number)}}
-
+
diff --git a/searchPages/searchUtils/newSearchPage.component.ts b/searchPages/searchUtils/newSearchPage.component.ts
index e82b7f66..f960c800 100644
--- a/searchPages/searchUtils/newSearchPage.component.ts
+++ b/searchPages/searchUtils/newSearchPage.component.ts
@@ -58,7 +58,7 @@ export class NewSearchPageComponent {
@Input() customFilter: SearchCustomFilter;
@Input() sort: boolean = true;
@Input() sortedByChanged: string = "";
- @Input() searchFormClass: string = "searchForm";
+ @Input() searchFormClass: string = "uk-background-muted";
//From simple:
@Input() rangeFilters: RangeFilter[] = [];
@Input() rangeFields: string[][] = [];
diff --git a/searchPages/searchUtils/portal-search-result.component.html b/searchPages/searchUtils/portal-search-result.component.html
index bdf7ea2c..42e99bc3 100644
--- a/searchPages/searchUtils/portal-search-result.component.html
+++ b/searchPages/searchUtils/portal-search-result.component.html
@@ -1,30 +1,33 @@
-
+
-
+
Subscribed
-
- restricted
+ class="uk-position-top-right uk-margin-top uk-margin-right uk-flex uk-flex-column uk-flex-middle">
+
+ restricted
-
- private
+ class="uk-position-top-right uk-margin-top uk-margin-right uk-flex uk-flex-column uk-flex-middle">
+
+ private
-
- {{result.visibility.toLowerCase()}}
+ class="uk-position-top-right uk-margin-top uk-margin-right uk-flex uk-flex-column uk-flex-middle">
+
+ {{result.visibility.toLowerCase()}}
-
-
Creation Date:
-
{{result.date | date:'dd-MM-yyyy'}}
-
{{result.creationDate | date:'dd-MM-yyyy'}}
-
+
+
+ Creation Date:
+ {{result.date | date:'dd-MM-yyyy'}}
+ {{result.creationDate | date:'dd-MM-yyyy'}}
+
+
Type:
{{mapType(result.type)}}
-
-
- Type:
- {{mapType(result.type)}}
-
+
@@ -92,6 +98,7 @@
-
+
diff --git a/searchPages/searchUtils/portal-search-result.component.ts b/searchPages/searchUtils/portal-search-result.component.ts
index 96d9ef0c..e6993534 100644
--- a/searchPages/searchUtils/portal-search-result.component.ts
+++ b/searchPages/searchUtils/portal-search-result.component.ts
@@ -22,7 +22,7 @@ export class PortalSearchResultComponent implements OnInit{
@Input() properties: EnvProperties;
@ViewChild('AlertModal') modal;
visibilityIcon: Map
= new Map ([
- ["PRIVATE", 'lock'],
+ ["PRIVATE", 'incognito'],
["RESTRICTED", 'group']
]);
public urlParam: string;
@@ -64,7 +64,7 @@ export class PortalSearchResultComponent implements OnInit{
return result.status === "all" || (result.status === "manager" && result.isManager);
} else if(this.type === "stakeholder") {
return result.visibility === "PUBLIC" || (result.visibility === "RESTRICTED" && (result.isManager || result.isMember)) ||
- (result.visibility === "PRIVATE" || result.isManager);
+ (result.visibility === "PRIVATE" && result.isManager);
}
}
diff --git a/searchPages/searchUtils/portal-search-result.module.ts b/searchPages/searchUtils/portal-search-result.module.ts
index f78e95c0..05cc15c2 100644
--- a/searchPages/searchUtils/portal-search-result.module.ts
+++ b/searchPages/searchUtils/portal-search-result.module.ts
@@ -1,18 +1,16 @@
-import { NgModule} from '@angular/core';
-import { CommonModule } from '@angular/common';
-import { FormsModule } from '@angular/forms';
-import { RouterModule } from '@angular/router';
-import {ErrorMessagesModule} from '../../utils/errorMessages.module';
+import {NgModule} from '@angular/core';
+import {CommonModule} from '@angular/common';
+import {FormsModule} from '@angular/forms';
+import {RouterModule} from '@angular/router';
+import {ErrorMessagesModule} from '../../utils/errorMessages.module';
import {PortalSearchResultComponent} from "./portal-search-result.component";
import {AlertModalModule} from "../../utils/modal/alertModal.module";
import {ManageModule} from "../../utils/manage/manage.module";
import {IconsModule} from "../../utils/icons/icons.module";
import {UrlPrefixModule} from "../../utils/pipes/url-prefix.module";
import {IconsService} from "../../utils/icons/icons.service";
-import {group, lock} from "../../utils/icons/icons";
+import {incognito} from "../../utils/icons/icons";
import {LogoUrlPipeModule} from "../../utils/pipes/logoUrlPipe.module";
-// import {IconsService} from "../../utils/icons/icons.service";
-// import {group, lock} from "../../utils/icons/icons";
@NgModule({
imports: [
@@ -31,6 +29,6 @@ import {LogoUrlPipeModule} from "../../utils/pipes/logoUrlPipe.module";
})
export class PortalSearchResultModule {
constructor(private iconsService: IconsService) {
- this.iconsService.registerIcons([group, lock])
+ this.iconsService.registerIcons([incognito])
}
}
diff --git a/searchPages/searchUtils/searchFilter.component.html b/searchPages/searchUtils/searchFilter.component.html
index 73b3f769..b9ff8773 100644
--- a/searchPages/searchUtils/searchFilter.component.html
+++ b/searchPages/searchUtils/searchFilter.component.html
@@ -86,7 +86,7 @@
diff --git a/utils/HelperFunctions.class.ts b/utils/HelperFunctions.class.ts
index fc2c1cb2..f7434446 100644
--- a/utils/HelperFunctions.class.ts
+++ b/utils/HelperFunctions.class.ts
@@ -11,13 +11,10 @@ export class HelperFunctions {
public static scrollToId(elementId:string) {
if (typeof document !== 'undefined' && document.getElementById(elementId)) {
- document.getElementById(elementId).scrollIntoView();
+ document.getElementById(elementId).scrollIntoView({behavior: "smooth"});
}
}
- public static isTiny(url: string) {
- return (url.indexOf('tinyurl.com') !== -1);
- }
-
+
public static copy(obj: any): any {
let copy;
diff --git a/utils/breadcrumbs/breadcrumbs.component.ts b/utils/breadcrumbs/breadcrumbs.component.ts
index 1fe16bbc..ad3bcd43 100644
--- a/utils/breadcrumbs/breadcrumbs.component.ts
+++ b/utils/breadcrumbs/breadcrumbs.component.ts
@@ -8,7 +8,7 @@ export interface Breadcrumb {
@Component({
selector: 'breadcrumbs',
template: `
-
+
{{breadcrumb.name}}
{{breadcrumb.name}}
diff --git a/utils/icons/icons.component.ts b/utils/icons/icons.component.ts
index 98956135..7ff57455 100644
--- a/utils/icons/icons.component.ts
+++ b/utils/icons/icons.component.ts
@@ -1,6 +1,11 @@
import {AfterViewInit, ChangeDetectorRef, Component, ElementRef, Input, OnInit, ViewChild} from "@angular/core";
import {IconsService} from "./icons.service";
+export interface StopRule {
+ class: string,
+ offset: number
+}
+
/**
* By default this component uses Material Icons Library to render an icon with
* a specific @name. For custom icons you should:
@@ -17,12 +22,23 @@ import {IconsService} from "./icons.service";
*
* - Custom SVG Icon. Define a variable in your component with an SVG and give it as Input @svg.
*
+ * In case of SVGs, there is an opportunity to add gradient color by define at least a start and end stop-color rules
+ * and an id to support them. This option is enabled by giving id as input in @gradient (Optional @degrees for gradient direction)
+ *
+ * e.g #gradient .start {
+ * stop-color: red;
+ * }
+ *
+ * e.g #gradient .end {
+ * stop-color: orange;
+ * }
+ *
* */
@Component({
selector: 'icon',
template: `
-
-
+
+
{{iconName}}
{{visuallyHidden}}
@@ -37,6 +53,8 @@ export class IconsComponent implements AfterViewInit {
*/
@Input()
public svg;
+ @Input()
+ public defaultSize = false;
/**
* True if this icon should have display flex (Optional, Default: false)
*
@@ -61,6 +79,8 @@ export class IconsComponent implements AfterViewInit {
public stroke;
/**
* Size of icon (Default: 1)
+ *
+ * Disabled if defaultSize = true
* */
@Input()
public ratio = 1;
@@ -78,10 +98,22 @@ export class IconsComponent implements AfterViewInit {
this.svg = this.iconsService.getIcon(iconName);
}
/**
- *
+ * Set visually hidden name for accessibility
* */
@Input()
public visuallyHidden: string = null;
+ /**
+ * Gradient rules
+ * Available only for SVG!
+ *
+ * Define your css rules for stop-colors
+ * */
+ @Input()
+ public gradient: string = null;
+ @Input()
+ public degrees: number = 0;
+ @Input()
+ public stopRules: StopRule[]= [{class: 'start', offset: 0}, {class: 'end', offset: 100}];
@ViewChild("icon")
public icon: ElementRef;
@@ -90,13 +122,19 @@ export class IconsComponent implements AfterViewInit {
ngAfterViewInit() {
if(this.svg) {
- let svg = this.icon.nativeElement.getElementsByTagName('svg').item(0);
- svg.setAttribute("width", (this.ratio*IconsComponent.DEFAULT_ICON_SIZE).toString());
- svg.setAttribute("height", (this.ratio*IconsComponent.DEFAULT_ICON_SIZE).toString());
- this.style = {
- fill: this.fill,
- stroke: this.stroke
- };
+ let svg: Element = this.icon.nativeElement.getElementsByTagName('svg').item(0);
+ if(!this.defaultSize) {
+ svg.setAttribute("width", (this.ratio * IconsComponent.DEFAULT_ICON_SIZE).toString());
+ svg.setAttribute("height", (this.ratio * IconsComponent.DEFAULT_ICON_SIZE).toString());
+ }
+ if(this.gradient) {
+ this.addGradient(svg);
+ } else {
+ this.style = {
+ fill: this.fill,
+ stroke: this.stroke
+ };
+ }
} else {
this.style = {
"font-size.px": this.ratio*IconsComponent.DEFAULT_ICON_SIZE
@@ -104,4 +142,33 @@ export class IconsComponent implements AfterViewInit {
}
this.cdr.detectChanges();
}
+
+ addGradient(svg: Element) {
+ if(svg.children.length > 0 && typeof document !== "undefined") {
+ let gradientDefinition = document.createElementNS('http://www.w3.org/2000/svg', 'linearGradient');
+ gradientDefinition.setAttribute('id', this.gradient);
+ if(this.degrees !== 0) {
+ let angle = (this.degrees) * (Math.PI / 180);
+ gradientDefinition.setAttribute('x1', Math.round(50 + Math.sin(angle + Math.PI) * 50) + '%');
+ gradientDefinition.setAttribute('y1', Math.round(50 + Math.cos(angle + Math.PI) * 50) + '%');
+ gradientDefinition.setAttribute('x2', Math.round(50 + Math.sin(angle) * 50) + '%');
+ gradientDefinition.setAttribute('y2', Math.round(50 + Math.cos(angle) * 50) + '%');
+ }
+ for(let rule of this.stopRules) {
+ let item = document.createElementNS('http://www.w3.org/2000/svg','stop');
+ item.setAttribute('class', rule.class);
+ item.setAttribute('offset', rule.offset + '%');
+ gradientDefinition.appendChild(item);
+ }
+ let defs = document.createElementNS('http://www.w3.org/2000/svg','defs');
+ defs.appendChild(gradientDefinition);
+ for(let i = 0; i < svg.children.length; i++) {
+ let item = svg.children.item(i);
+ if(!item.hasAttribute('fill')) {
+ item.setAttribute('fill', "url('#" + this.gradient + "')");
+ }
+ }
+ svg.insertBefore(defs, svg.childNodes[0]);
+ }
+ }
}
diff --git a/utils/icons/icons.ts b/utils/icons/icons.ts
index 617b0d80..68b434fa 100644
--- a/utils/icons/icons.ts
+++ b/utils/icons/icons.ts
@@ -148,3 +148,8 @@ export const print = {
}
/** Add new icon under this line to be sure that it will be added on preview */
+
+export const incognito = {
+ name: 'incognito',
+ data: ' '
+}
diff --git a/utils/section-scroll/section-scroll.component.ts b/utils/section-scroll/section-scroll.component.ts
index ddfcbc26..64d40d9a 100644
--- a/utils/section-scroll/section-scroll.component.ts
+++ b/utils/section-scroll/section-scroll.component.ts
@@ -13,10 +13,10 @@ import {Component, HostListener, Input, OnInit, ViewEncapsulation} from "@angula
@Component({
selector: 'section-scroll',
template: `
-