Merge remote-tracking branch 'origin/develop' into data-transfer-v2
This commit is contained in:
commit
9852bdeebf
|
@ -0,0 +1,200 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -1,86 +1,102 @@
|
|||
import {properties} from "../../../../environments/environment";
|
||||
|
||||
export class Layout {
|
||||
_id:string;
|
||||
portalPid:string;
|
||||
layoutOptions:CustomizationOptions;
|
||||
_id: string;
|
||||
portalPid: string;
|
||||
layoutOptions: CustomizationOptions;
|
||||
date;
|
||||
constructor(community, options:CustomizationOptions){
|
||||
|
||||
constructor(community, options: CustomizationOptions) {
|
||||
this.portalPid = community;
|
||||
this.layoutOptions = options;
|
||||
}
|
||||
|
||||
public static getVariables(options: CustomizationOptions): {} | null {
|
||||
if(options) {
|
||||
if (options) {
|
||||
let variables = {};
|
||||
if(options.identity) {
|
||||
variables['@global-primary-background'] = options.identity.mainColor;
|
||||
variables['@global-secondary-background'] = options.identity.secondaryColor;
|
||||
if (options.identity) {
|
||||
variables['@global-primary-background'] = Layout.convertRGBAtoRGB(options.identity.mainColor);
|
||||
variables['@global-secondary-background'] = Layout.convertRGBAtoRGB(options.identity.secondaryColor);
|
||||
}
|
||||
if(options.backgrounds){
|
||||
variables['@general-search-form-background'] = options.backgrounds.form.color;
|
||||
variables['@base-body-background'] = options.backgrounds.light.color;
|
||||
variables['@hero-background-image'] = (options.backgrounds.form.imageFile?(this.getUrl(properties.utilsService + '/download/' +options.backgrounds.form.imageFile)): 'none') ;
|
||||
if (options.backgrounds) {
|
||||
variables['@general-search-form-background'] = Layout.convertRGBAtoRGB(options.backgrounds.form.color);
|
||||
variables['@global-background'] = Layout.convertRGBAtoRGB(options.backgrounds.light.color);
|
||||
variables['@hero-background-image'] = (options.backgrounds.form.imageFile ? (this.getUrl(properties.utilsService + '/download/' + options.backgrounds.form.imageFile)) : 'none');
|
||||
variables['@hero-background-position'] = options.backgrounds.form.position;
|
||||
}
|
||||
if(options.buttons){
|
||||
if (options.buttons) {
|
||||
//general
|
||||
variables['@button-border-width'] = options.buttons.lightBackground.borderWidth + "px";
|
||||
variables['@button-border-radius'] = options.buttons.lightBackground.borderRadius + "px";
|
||||
// default -> on dark background todo check again when we have sucj=h buttons
|
||||
variables['@button-default-background'] = options.buttons.darkBackground.backgroundColor;
|
||||
variables['@button-default-color'] = options.buttons.darkBackground.color;
|
||||
variables['@button-default-border'] = options.buttons.darkBackground.borderColor;
|
||||
variables['@button-default-hover-background'] = options.buttons.darkBackground.onHover.backgroundColor;
|
||||
variables['@button-default-hover-color'] = options.buttons.darkBackground.onHover.color;
|
||||
variables['@button-default-hover-border'] = options.buttons.darkBackground.onHover.borderColor;
|
||||
variables['@button-default-active-background'] = options.buttons.darkBackground.onHover.backgroundColor;
|
||||
variables['@button-default-active-color'] = options.buttons.darkBackground.onHover.color;
|
||||
variables['@button-default-active-border'] = options.buttons.darkBackground.onHover.borderColor;
|
||||
variables['@button-default-background'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.backgroundColor);
|
||||
variables['@button-default-color'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.color);
|
||||
variables['@button-default-border'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.borderColor);
|
||||
variables['@button-default-hover-background'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.backgroundColor);
|
||||
variables['@button-default-hover-color'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.color);
|
||||
variables['@button-default-hover-border'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.borderColor);
|
||||
variables['@button-default-active-background'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.backgroundColor);
|
||||
variables['@button-default-active-color'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.color);
|
||||
variables['@button-default-active-border'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.borderColor);
|
||||
|
||||
// primary
|
||||
variables['@button-primary-background'] = options.buttons.lightBackground.backgroundColor;
|
||||
variables['@button-primary-color'] = options.buttons.lightBackground.color;
|
||||
variables['@button-primary-border'] = options.buttons.lightBackground.borderColor;
|
||||
variables['@button-primary-hover-background'] = options.buttons.lightBackground.onHover.backgroundColor;
|
||||
variables['@button-primary-hover-color'] = options.buttons.lightBackground.onHover.color;
|
||||
variables['@button-primary-hover-border'] = options.buttons.lightBackground.onHover.borderColor;
|
||||
variables['@button-primary-active-background'] = options.buttons.lightBackground.onHover.backgroundColor;
|
||||
variables['@button-primary-active-color'] = options.buttons.lightBackground.onHover.color;
|
||||
variables['@button-primary-active-border'] = options.buttons.lightBackground.onHover.borderColor;
|
||||
variables['@button-primary-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.backgroundColor);
|
||||
variables['@button-primary-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.color);
|
||||
variables['@button-primary-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.borderColor);
|
||||
variables['@button-primary-hover-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.backgroundColor);
|
||||
variables['@button-primary-hover-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.color);
|
||||
variables['@button-primary-hover-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.borderColor);
|
||||
variables['@button-primary-active-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.backgroundColor);
|
||||
variables['@button-primary-active-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.color);
|
||||
variables['@button-primary-active-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.borderColor);
|
||||
|
||||
// secondary
|
||||
variables['@button-secondary-background'] = options.buttons.lightBackground.color;
|
||||
variables['@button-secondary-color'] = options.buttons.lightBackground.backgroundColor;
|
||||
variables['@button-secondary-border'] = options.buttons.lightBackground.backgroundColor;
|
||||
variables['@button-secondary-hover-background'] = options.buttons.lightBackground.backgroundColor;
|
||||
variables['@button-secondary-hover-color'] = options.buttons.lightBackground.color;
|
||||
variables['@button-secondary-hover-border'] = options.buttons.lightBackground.borderColor;
|
||||
variables['@button-secondary-active-background'] = options.buttons.lightBackground.backgroundColor;
|
||||
variables['@button-secondary-active-color'] = options.buttons.lightBackground.color;
|
||||
variables['@button-secondary-active-border'] = options.buttons.lightBackground.borderColor;
|
||||
|
||||
variables['@button-secondary-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.color);
|
||||
variables['@button-secondary-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.backgroundColor);
|
||||
variables['@button-secondary-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.backgroundColor);
|
||||
variables['@button-secondary-hover-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.backgroundColor);
|
||||
variables['@button-secondary-hover-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.color);
|
||||
variables['@button-secondary-hover-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.borderColor);
|
||||
variables['@button-secondary-active-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.backgroundColor);
|
||||
variables['@button-secondary-active-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.color);
|
||||
variables['@button-secondary-active-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.borderColor);
|
||||
|
||||
}
|
||||
return variables;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static getUrl(url){
|
||||
|
||||
public static getUrl(url) {
|
||||
return 'url("' + url + '")';
|
||||
}
|
||||
|
||||
|
||||
public static convertRGBAtoRGB(color: string): string {
|
||||
if(color.includes('rgba')) {
|
||||
const regexPattern = /rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/;
|
||||
const matches = color.match(regexPattern);
|
||||
const [, r, g, b, a] = matches;
|
||||
let R = parseInt(r)*parseFloat(a) + (1 - parseFloat(a))*255;
|
||||
let G = parseInt(g)*parseFloat(a) + (1 - parseFloat(a))*255;
|
||||
let B = parseInt(b)*parseFloat(a) + (1 - parseFloat(a))*255;
|
||||
return 'rgb(' + R + ',' + G + ',' + B + ',' + ')';
|
||||
} else {
|
||||
return color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class CustomizationOptions {
|
||||
identity: {
|
||||
mainColor: string;
|
||||
secondaryColor: string;
|
||||
};
|
||||
identityIsCustom:boolean;
|
||||
backgroundsIsCustom:boolean;
|
||||
buttonsIsCustom:boolean;
|
||||
identityIsCustom: boolean;
|
||||
backgroundsIsCustom: boolean;
|
||||
buttonsIsCustom: boolean;
|
||||
backgrounds: {
|
||||
dark: {
|
||||
color: string; //background
|
||||
color: string; //background
|
||||
}
|
||||
light: {
|
||||
color: string; //background
|
||||
|
@ -89,41 +105,41 @@ export class CustomizationOptions {
|
|||
color: string; //background
|
||||
imageUrl: string;
|
||||
imageFile: string;
|
||||
position:string;
|
||||
position: string;
|
||||
}
|
||||
};
|
||||
buttons: {
|
||||
darkBackground: ButtonsCustomization;
|
||||
lightBackground: ButtonsCustomization;
|
||||
};
|
||||
|
||||
|
||||
constructor(mainColor: string = null, secondaryColor: string = null) {
|
||||
this.identity= {
|
||||
this.identity = {
|
||||
mainColor: mainColor ? mainColor : CustomizationOptions.getIdentity().mainColor,
|
||||
secondaryColor : secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor,
|
||||
secondaryColor: secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor,
|
||||
};
|
||||
this.identityIsCustom = false;
|
||||
this.backgroundsIsCustom = false;
|
||||
this.buttonsIsCustom = false;
|
||||
this.backgrounds={
|
||||
dark : {
|
||||
this.backgrounds = {
|
||||
dark: {
|
||||
color: this.identity.mainColor,
|
||||
},
|
||||
light : {
|
||||
light: {
|
||||
color: "#f9f9f9" //CustomizationOptions.getRGBA(this.identity.mainColor,0.05),
|
||||
},
|
||||
form : {
|
||||
color: CustomizationOptions.getRGBA(this.identity.mainColor,0.15),
|
||||
imageUrl : null,
|
||||
imageFile : null,
|
||||
form: {
|
||||
color: CustomizationOptions.getRGBA(this.identity.mainColor, 0.15),
|
||||
imageUrl: null,
|
||||
imageFile: null,
|
||||
position: null
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
this.buttons = {
|
||||
darkBackground: {
|
||||
isDefault:true,
|
||||
isDefault: true,
|
||||
backgroundColor: "#ffffff",
|
||||
color: "#000000",
|
||||
borderStyle: "solid",
|
||||
|
@ -137,7 +153,7 @@ export class CustomizationOptions {
|
|||
}
|
||||
},
|
||||
lightBackground: {
|
||||
isDefault:true,
|
||||
isDefault: true,
|
||||
backgroundColor: this.identity.mainColor,
|
||||
color: '#ffffff',
|
||||
borderStyle: "solid",
|
||||
|
@ -150,15 +166,16 @@ export class CustomizationOptions {
|
|||
borderColor: this.identity.secondaryColor,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
public static checkForObsoleteVersion(current:CustomizationOptions, communityId:string){
|
||||
let defaultCO = new CustomizationOptions(CustomizationOptions.getIdentity(communityId).mainColor,CustomizationOptions.getIdentity(communityId).secondaryColor);
|
||||
|
||||
public static checkForObsoleteVersion(current: CustomizationOptions, communityId: string) {
|
||||
let defaultCO = new CustomizationOptions(CustomizationOptions.getIdentity(communityId).mainColor, CustomizationOptions.getIdentity(communityId).secondaryColor);
|
||||
let updated = Object.assign({}, defaultCO);
|
||||
if(!current){
|
||||
if (!current) {
|
||||
current = Object.assign({}, defaultCO);
|
||||
}else {
|
||||
} else {
|
||||
if (current.identity && current.identity.mainColor && current.identity.secondaryColor) {
|
||||
updated = new CustomizationOptions(current.identity.mainColor, current.identity.secondaryColor);
|
||||
}
|
||||
|
@ -195,53 +212,55 @@ export class CustomizationOptions {
|
|||
}
|
||||
}
|
||||
return current;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
public static getIdentity(community:string=null){
|
||||
let COLORS= {
|
||||
default:{
|
||||
mainColor:'#4687E6',
|
||||
|
||||
public static getIdentity(community: string = null) {
|
||||
let COLORS = {
|
||||
default: {
|
||||
mainColor: '#4687E6',
|
||||
secondaryColor: '#2D72D6'
|
||||
},
|
||||
"covid-19":{
|
||||
mainColor:"#03ADEE",
|
||||
"covid-19": {
|
||||
mainColor: "#03ADEE",
|
||||
secondaryColor: "#F15157"
|
||||
}
|
||||
};
|
||||
if(community && COLORS[community]){
|
||||
if (community && COLORS[community]) {
|
||||
return COLORS[community];
|
||||
}
|
||||
return COLORS.default;
|
||||
}
|
||||
public static getRGBA(color, A){
|
||||
if(color.indexOf("#")!=-1){
|
||||
return 'rgba('+parseInt(color.substring(1,3),16)+','+parseInt(color.substring(3,5),16)+','+parseInt(color.substring(5,7),16)+','+A+')';
|
||||
|
||||
public static getRGBA(color, A) {
|
||||
if (color.indexOf("#") != -1) {
|
||||
return 'rgba(' + parseInt(color.substring(1, 3), 16) + ',' + parseInt(color.substring(3, 5), 16) + ',' + parseInt(color.substring(5, 7), 16) + ',' + A + ')';
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
public static isForLightBackground(color:string){
|
||||
|
||||
public static isForLightBackground(color: string) {
|
||||
let L, r, g, b, a = 1;
|
||||
if(color.length == 7 || color.length == 9) {
|
||||
if (color.length == 7 || color.length == 9) {
|
||||
r = parseInt(color.substring(1, 3), 16);
|
||||
g = parseInt(color.substring(3, 5), 16);
|
||||
b = parseInt(color.substring(5, 7), 16);
|
||||
if(color.length == 9) {
|
||||
a = parseInt(color.substring(7, 9), 16);
|
||||
if (color.length == 9) {
|
||||
a = parseInt(color.substring(7, 9), 16);
|
||||
}
|
||||
}else if(color.length > 9){
|
||||
} else if (color.length > 9) {
|
||||
let array = color.split("rgba(")[1].split(")")[0].split(",");
|
||||
r = parseInt(array[0]);
|
||||
g = parseInt(array[1]);
|
||||
b = parseInt(array[2]);
|
||||
a = +array[3];
|
||||
|
||||
|
||||
}
|
||||
const brightness = r* 0.299 + g * 0.587 + b * 0.114 + (1 - a) * 255;
|
||||
|
||||
const brightness = r * 0.299 + g * 0.587 + b * 0.114 + (1 - a) * 255;
|
||||
|
||||
return (brightness < 186)
|
||||
|
||||
|
||||
// return !(r*0.299 + g*0.587 + b*0.114 > 186);
|
||||
/*for(let c of [r,g,b]){
|
||||
c = c / 255.0;
|
||||
|
@ -255,11 +274,12 @@ export class CustomizationOptions {
|
|||
return L > 0.179// (L + 0.05) / (0.05) > (1.0 + 0.05) / (L + 0.05); //use #000000 else use #ffffff
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
export class ButtonsCustomization{
|
||||
isDefault:boolean;
|
||||
|
||||
export class ButtonsCustomization {
|
||||
isDefault: boolean;
|
||||
backgroundColor: string;
|
||||
color: string;
|
||||
borderStyle: string;
|
||||
|
|
|
@ -122,8 +122,8 @@ export class CommunityService {
|
|||
} else {
|
||||
community.fos = [];
|
||||
}
|
||||
if (resData.advancedConstraint != null) {
|
||||
community.selectionCriteria = resData.advancedConstraint;
|
||||
if (resData.advancedConstraints != null) {
|
||||
community.selectionCriteria = resData.advancedConstraints;
|
||||
} else {
|
||||
community.selectionCriteria = new SelectionCriteria();
|
||||
}
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
<div page-content>
|
||||
<div header>
|
||||
<div class="uk-flex uk-flex-middle uk-margin-medium-top info">
|
||||
<div>
|
||||
<div class="uk-text-background uk-text-bold uk-text-small">Manage Classes</div>
|
||||
<h1 class="uk-h6 uk-margin-remove">Super Admin</h1>
|
||||
</div>
|
||||
</div>
|
||||
<admin-tabs tab="class"></admin-tabs>
|
||||
<ul class="uk-subnav uk-subnav-pill uk-margin-medium-top">
|
||||
<li [class.uk-active]="filterForm.get('type').value === 'all'" class="uk-margin-small-bottom"><a
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
<div page-content>
|
||||
<div header>
|
||||
<div class="uk-flex uk-flex-middle uk-margin-medium-top info">
|
||||
<a routerLink="../" [queryParams]=" { 'pageId': pageId }" class="uk-button uk-button-link uk-margin-medium-right">
|
||||
<icon name="west" ratio="2" [flex]="true"></icon>
|
||||
</a>
|
||||
<div>
|
||||
<div class="uk-text-background uk-text-bold uk-text-small">
|
||||
Admin Dashboard - {{pageHelpContent ? 'Update ' : 'Add new '}} class help text
|
||||
<div class="uk-section-xsmall uk-margin-top uk-container">
|
||||
<div class="uk-flex-middle uk-grid" uk-grid>
|
||||
<div class="uk-width-expand">
|
||||
<a routerLink="../" [queryParams]=" { 'pageId': pageId }" class="uk-flex uk-flex-middle uk-h5 uk-link-reset">
|
||||
<span class="uk-margin-right">
|
||||
<icon name="west" ratio="1.7" [flex]="true"></icon>
|
||||
</span>
|
||||
<h1 *ngIf="page" class="uk-h5 uk-margin-remove">
|
||||
{{page.name}} - {{pageHelpContent ? 'Update ' : 'Add new '}} class help text
|
||||
<span *ngIf="myForm.dirty" class="uk-text-large"> (unsaved changes)</span>
|
||||
</h1>
|
||||
</a>
|
||||
</div>
|
||||
<div class="uk-width-auto">
|
||||
<button class="uk-button uk-button-default uk-margin-right"
|
||||
(click)="resetCustom()" [class.uk-disabled]="!myForm.dirty"
|
||||
[disabled]="!myForm.dirty || showLoading">Reset
|
||||
</button>
|
||||
<button class="uk-button uk-button-primary" [class.uk-disabled]="myForm.invalid || !myForm.dirty || myForm.disabled"
|
||||
(click)="saveCustom()" [disabled]="myForm.invalid ||!myForm.dirty || myForm.disabled || showLoading">Save
|
||||
</button>
|
||||
</div>
|
||||
<h1 *ngIf="page" class="uk-h6 uk-margin-remove">{{page.name}}<span *ngIf="myForm.dirty" class="uk-text-large"> (unsaved changes)</span></h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall uk-container">
|
||||
<div class="uk-flex uk-flex-center uk-flex-right@m">
|
||||
<button class="uk-button uk-button-default uk-margin-right"
|
||||
(click)="resetCustom()" [class.uk-disabled]="!myForm.dirty"
|
||||
[disabled]="!myForm.dirty || showLoading">Reset
|
||||
</button>
|
||||
<button class="uk-button uk-button-primary" [class.uk-disabled]="myForm.invalid || !myForm.dirty || myForm.disabled"
|
||||
(click)="saveCustom()" [disabled]="myForm.invalid ||!myForm.dirty || myForm.disabled || showLoading">Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -58,7 +58,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div [ngClass]="parentClass">
|
||||
<ckeditor (change)="contentChanged()"
|
||||
<ckeditor #ckEditor (change)="contentChanged()"
|
||||
[readonly]="false"
|
||||
debounce="500"
|
||||
[formControl]="myForm.get('content')"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import {ChangeDetectorRef, Component, OnInit, ViewChild} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {UntypedFormBuilder, UntypedFormGroup, Validators} from '@angular/forms';
|
||||
import {Page} from '../../utils/entities/adminTool/page';
|
||||
|
@ -9,13 +9,14 @@ import {Subscriber, Subscription, zip} from 'rxjs';
|
|||
import {DivHelpContent} from '../../utils/entities/adminTool/div-help-content';
|
||||
import {NotificationHandler} from "../../utils/notification-handler";
|
||||
import {ClearCacheService} from "../../services/clear-cache.service";
|
||||
import {CKEditorComponent} from "ng2-ckeditor";
|
||||
|
||||
@Component({
|
||||
selector: 'class-content-form',
|
||||
templateUrl: './class-help-content-form.component.html',
|
||||
})
|
||||
export class ClassContentFormComponent implements OnInit {
|
||||
|
||||
|
||||
myForm: UntypedFormGroup;
|
||||
portal: string;
|
||||
parentClass: string;
|
||||
|
@ -27,25 +28,27 @@ export class ClassContentFormComponent implements OnInit {
|
|||
public showLoading: boolean = true;
|
||||
private subs: Subscription[] = [];
|
||||
public pageHelpContent: DivHelpContent;
|
||||
|
||||
@ViewChild('ckEditor') ckEditor: CKEditorComponent;
|
||||
|
||||
constructor(private route: ActivatedRoute, private _router: Router, private _fb: UntypedFormBuilder,
|
||||
private _helpContentService: HelpContentService, private _clearCacheService: ClearCacheService) {
|
||||
private cdr: ChangeDetectorRef, private _helpContentService: HelpContentService,
|
||||
private _clearCacheService: ClearCacheService) {
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
this.portal = (this.route.snapshot.data.portal) ? this.route.snapshot.data.portal : this.route.snapshot.params[this.route.snapshot.data.param];
|
||||
this.parentClass = this.route.snapshot.data.parentClass;
|
||||
this.subs.push(this.route.queryParams.subscribe(params => {
|
||||
this.pageId = params['pageId'];
|
||||
this.myForm = this.form;
|
||||
this.pageContentId = params['pageContentId'];
|
||||
if (!this.pageId) {
|
||||
this._router.navigate(['../'], {relativeTo: this.route});
|
||||
}
|
||||
this.getInfo(this.pageId);
|
||||
}));
|
||||
this.pageId = params['pageId'];
|
||||
this.myForm = this.form;
|
||||
this.pageContentId = params['pageContentId'];
|
||||
if (!this.pageId) {
|
||||
this._router.navigate(['../'], {relativeTo: this.route});
|
||||
}
|
||||
this.getInfo(this.pageId);
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
ngOnDestroy() {
|
||||
this.subs.forEach(value => {
|
||||
if (value instanceof Subscriber) {
|
||||
|
@ -53,7 +56,7 @@ export class ClassContentFormComponent implements OnInit {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
getInfo(pageId: string) {
|
||||
this.showLoading = true;
|
||||
let obs = zip(this._helpContentService.getPageByPortal(pageId, this.properties.adminToolsAPIURL, this.portal),
|
||||
|
@ -66,25 +69,44 @@ export class ClassContentFormComponent implements OnInit {
|
|||
}
|
||||
this.setOptions(results[1]);
|
||||
if (!this.pageContentId) {
|
||||
this.updateForm(null);
|
||||
this.updateForm(null);
|
||||
this.showLoading = false;
|
||||
this.initCKEditor();
|
||||
} else {
|
||||
this.subs.push(this._helpContentService.getDivHelpContent( this.pageContentId, this.properties.adminToolsAPIURL, this.portal).subscribe(pageHelpContent=>{
|
||||
this.pageHelpContent = pageHelpContent;
|
||||
if (this.properties.adminToolsPortalType != this.page.portalType) {
|
||||
this._router.navigate(['../'], {relativeTo: this.route});
|
||||
}
|
||||
this.updateForm(this.pageHelpContent);
|
||||
this.showLoading = false;
|
||||
},
|
||||
this.subs.push(this._helpContentService.getDivHelpContent(this.pageContentId, this.properties.adminToolsAPIURL, this.portal).subscribe(pageHelpContent => {
|
||||
this.pageHelpContent = pageHelpContent;
|
||||
if (this.properties.adminToolsPortalType != this.page.portalType) {
|
||||
this._router.navigate(['../'], {relativeTo: this.route});
|
||||
}
|
||||
this.updateForm(this.pageHelpContent);
|
||||
this.showLoading = false;
|
||||
this.initCKEditor();
|
||||
},
|
||||
error => {
|
||||
this.handleError('System error retrieving content by id '+ this.pageContentId, error)
|
||||
}));
|
||||
this.handleError('System error retrieving content by id ' + this.pageContentId, error)
|
||||
}));
|
||||
}
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
private initCKEditor() {
|
||||
this.cdr.detectChanges();
|
||||
if (this.ckEditor) {
|
||||
this.ckEditor.instance.on('mode', () => {
|
||||
let editor = this.ckEditor.instance;
|
||||
if (editor.mode === 'source') {
|
||||
let editable = editor.editable();
|
||||
editable.attachListener(editable, 'input', () => {
|
||||
this.myForm.get('content').setValue(editor.getData());
|
||||
this.myForm.get('content').markAsDirty();
|
||||
this.cdr.detectChanges();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private updateForm(pageHelpContent: DivHelpContent) {
|
||||
this.pageHelpContent = pageHelpContent;
|
||||
this.myForm = this.form;
|
||||
|
@ -93,48 +115,48 @@ export class ClassContentFormComponent implements OnInit {
|
|||
this.myForm.get('divId').disable();
|
||||
}
|
||||
this.myForm.markAsPristine();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public setOptions(divIds) {
|
||||
this.classOptions = [];
|
||||
for(let divid of divIds){
|
||||
this.classOptions.push({label:divid.name, value:divid._id});
|
||||
for (let divid of divIds) {
|
||||
this.classOptions.push({label: divid.name, value: divid._id});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public get form() {
|
||||
return this._fb.group({
|
||||
divId: ['', Validators.required],
|
||||
content: ['', Validators.required],
|
||||
isActive: true,
|
||||
portal: this.portal,
|
||||
_id : '',
|
||||
_id: '',
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public reset() {
|
||||
this.myForm.patchValue({
|
||||
divId: ['', Validators.required],
|
||||
content: ['', Validators.required],
|
||||
isActive: true,
|
||||
portal: '',
|
||||
_id : '',
|
||||
_id: '',
|
||||
});
|
||||
this.myForm.markAsPristine();
|
||||
}
|
||||
|
||||
|
||||
handleError(message: string, error = null) {
|
||||
if(error) {
|
||||
if (error) {
|
||||
console.error('Server responded: ' + error);
|
||||
}
|
||||
NotificationHandler.rise(message, 'danger');
|
||||
this.showLoading = false;
|
||||
}
|
||||
|
||||
|
||||
public saveCustom() {
|
||||
if (this.myForm.valid) {
|
||||
this.showLoading = true;
|
||||
|
@ -159,13 +181,13 @@ export class ClassContentFormComponent implements OnInit {
|
|||
this.updateForm(this.pageHelpContent);
|
||||
this.showLoading = false;
|
||||
}
|
||||
|
||||
|
||||
handleUpdateError(message: string, error) {
|
||||
console.error('Server responded: ' + error);
|
||||
NotificationHandler.rise(message, 'danger');
|
||||
this.showLoading = false;
|
||||
}
|
||||
|
||||
|
||||
changeStatus() {
|
||||
this.myForm.get('isActive').setValue(!this.myForm.get('isActive').value);
|
||||
if (this.pageHelpContent && this.myForm.get('isActive').value != this.pageHelpContent.isActive || !this.pageHelpContent && !this.myForm.get('isActive').value) {
|
||||
|
@ -174,7 +196,7 @@ export class ClassContentFormComponent implements OnInit {
|
|||
this.myForm.get('isActive').markAsPristine()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
contentChanged() {
|
||||
if (this.pageHelpContent && this.myForm.get('content').value != this.pageHelpContent.content || !this.pageHelpContent && this.myForm.get('content').value != '') {
|
||||
this.myForm.get('content').markAsDirty();
|
||||
|
|
|
@ -1,20 +1,15 @@
|
|||
<div page-content>
|
||||
<div header>
|
||||
<div class="uk-flex uk-flex-middle uk-margin-medium-top info">
|
||||
<a routerLink="../pages" class="uk-button uk-button-link uk-margin-medium-right">
|
||||
<icon name="west" ratio="2" [flex]="true"></icon>
|
||||
</a>
|
||||
<div>
|
||||
<div class="uk-text-background uk-text-bold uk-text-small">
|
||||
Admin Dashboard - Manage class help texts
|
||||
<div class="uk-section-xsmall uk-margin-top">
|
||||
<div class="uk-flex-middle uk-grid" uk-grid>
|
||||
<div class="uk-width-expand">
|
||||
<a routerLink="../pages" class="uk-flex uk-flex-middle uk-h5 uk-link-reset">
|
||||
<span class="uk-margin-right">
|
||||
<icon name="west" ratio="1.7" [flex]="true"></icon>
|
||||
</span>
|
||||
<h1 *ngIf="page" class="uk-h5 uk-margin-remove">{{page.name}}</h1>
|
||||
</a>
|
||||
</div>
|
||||
<h1 *ngIf="page" class="uk-h6 uk-margin-remove">{{page.name}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall">
|
||||
<div class="uk-flex-right@m uk-flex-center uk-flex-middle uk-grid" uk-grid>
|
||||
<div search-input [disabled]="showLoading" [expandable]="true" [searchControl]="filterForm" searchInputClass="outer" placeholder="Search helptext" class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1">
|
||||
</div>
|
||||
<div>
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
<div page-content>
|
||||
<div header>
|
||||
<div class="uk-flex uk-flex-middle uk-margin-medium-top info">
|
||||
<div>
|
||||
<div class="uk-text-background uk-text-bold uk-text-small">Manage Entities</div>
|
||||
<h1 class="uk-h6 uk-margin-remove">{{name?name:'Super Admin'}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<admin-tabs tab="entity" [portal]="portal" [type]="type"></admin-tabs>
|
||||
<ul *ngIf="!isPortalAdministrator" class="uk-subnav uk-subnav-pill uk-margin-medium-top">
|
||||
<li [class.uk-active]="filterForm.get('status').value === 'all'"><a
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
<div page-content>
|
||||
<div header>
|
||||
<div class="uk-flex uk-flex-middle uk-margin-medium-top info">
|
||||
<a routerLink="../" [queryParams]=" { 'pageId': pageId }" class="uk-button uk-button-link uk-margin-right">
|
||||
<icon name="west" ratio="2" [flex]="true"></icon>
|
||||
</a>
|
||||
<div>
|
||||
<div class="uk-text-background uk-text-bold uk-text-small">
|
||||
Admin Dashboard - {{pageHelpContent ? 'Update ' : 'Add new '}} page help text
|
||||
<div class="uk-section-xsmall uk-margin-top uk-container">
|
||||
<div class="uk-flex-middle uk-grid" uk-grid>
|
||||
<div class="uk-width-expand">
|
||||
<a routerLink="../" [queryParams]=" { 'pageId': pageId }" class="uk-flex uk-flex-middle uk-h5 uk-link-reset">
|
||||
<span class="uk-margin-right">
|
||||
<icon name="west" ratio="1.7" [flex]="true"></icon>
|
||||
</span>
|
||||
<h1 *ngIf="page" class="uk-h5 uk-margin-remove">
|
||||
{{page.name}} - {{pageHelpContent ? 'Update ' : 'Add new '}} page help text
|
||||
<span *ngIf="myForm.dirty" class="uk-text-large"> (unsaved changes)</span>
|
||||
</h1>
|
||||
</a>
|
||||
</div>
|
||||
<div class="uk-width-auto">
|
||||
<button class="uk-button uk-button-default uk-margin-right"
|
||||
(click)="resetCustom()" [class.uk-disabled]="!myForm.dirty"
|
||||
[disabled]="!myForm.dirty || showLoading">Reset
|
||||
</button>
|
||||
<button class="uk-button uk-button-primary" [class.uk-disabled]="myForm.invalid || !myForm.dirty || myForm.disabled"
|
||||
(click)="saveCustom()" [disabled]="myForm.invalid ||!myForm.dirty || myForm.disabled || showLoading">Save
|
||||
</button>
|
||||
</div>
|
||||
<h1 *ngIf="page" class="uk-h6 uk-margin-remove">{{page.name}}<span *ngIf="myForm.dirty" class="uk-text-large"> (unsaved changes)</span></h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall uk-container">
|
||||
<div class="uk-flex uk-flex-center uk-flex-right@m">
|
||||
<button class="uk-button uk-button-default uk-margin-right"
|
||||
(click)="resetCustom()" [class.uk-disabled]="!myForm.dirty"
|
||||
[disabled]="!myForm.dirty || showLoading">Reset
|
||||
</button>
|
||||
<button class="uk-button uk-button-primary" [class.uk-disabled]="myForm.invalid || !myForm.dirty || myForm.disabled"
|
||||
(click)="saveCustom()" [disabled]="myForm.invalid || !myForm.dirty || myForm.disabled || showLoading">Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -62,7 +62,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div [ngClass]="parentClass">
|
||||
<ckeditor (change)="contentChanged()"
|
||||
<ckeditor #ckEditor (change)="contentChanged()"
|
||||
[readonly]="false"
|
||||
debounce="500"
|
||||
[formControl]="myForm.get('content')"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, OnInit} from '@angular/core';
|
||||
import {ChangeDetectorRef, Component, OnInit, ViewChild} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {UntypedFormBuilder, UntypedFormGroup, Validators} from '@angular/forms';
|
||||
import {Page} from '../../utils/entities/adminTool/page';
|
||||
|
@ -10,6 +10,7 @@ import {HelperFunctions} from '../../utils/HelperFunctions.class';
|
|||
import {PageHelpContent} from '../../utils/entities/adminTool/page-help-content';
|
||||
import {ClearCacheService} from "../../services/clear-cache.service";
|
||||
import {NotificationHandler} from "../../utils/notification-handler";
|
||||
import {CKEditorComponent} from "ng2-ckeditor";
|
||||
|
||||
@Component({
|
||||
selector: 'page-content-form',
|
||||
|
@ -29,9 +30,11 @@ export class PageContentFormComponent implements OnInit {
|
|||
public showLoading: boolean = true;
|
||||
private subs: Subscription[] = [];
|
||||
public pageHelpContent: PageHelpContent;
|
||||
|
||||
@ViewChild('ckEditor') ckEditor: CKEditorComponent;
|
||||
|
||||
constructor(private route: ActivatedRoute, private _router: Router, private _fb: UntypedFormBuilder,
|
||||
private _helpContentService: HelpContentService, private _clearCacheService: ClearCacheService) {
|
||||
private cdr: ChangeDetectorRef, private _helpContentService: HelpContentService,
|
||||
private _clearCacheService: ClearCacheService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -80,12 +83,30 @@ export class PageContentFormComponent implements OnInit {
|
|||
this.updateForm(this.pageHelpContent);
|
||||
}
|
||||
this.showLoading = false;
|
||||
this.initCKEditor();
|
||||
},
|
||||
error => this.handleError('System error retrieving page with id: ' + pageId, error)
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
private initCKEditor() {
|
||||
this.cdr.detectChanges();
|
||||
if(this.ckEditor) {
|
||||
this.ckEditor.instance.on('mode', () => {
|
||||
let editor = this.ckEditor.instance;
|
||||
if (editor.mode === 'source') {
|
||||
let editable = editor.editable();
|
||||
editable.attachListener(editable, 'input', () => {
|
||||
this.myForm.get('content').setValue(editor.getData());
|
||||
this.myForm.get('content').markAsDirty();
|
||||
this.cdr.detectChanges();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private updateForm(pageHelpContent: PageHelpContent) {
|
||||
this.pageHelpContent = pageHelpContent;
|
||||
this.myForm = this.form;
|
||||
|
|
|
@ -1,20 +1,15 @@
|
|||
<div page-content>
|
||||
<div header>
|
||||
<div class="uk-flex uk-flex-middle uk-margin-medium-top info">
|
||||
<a routerLink="../pages" class="uk-button uk-button-link uk-margin-medium-right">
|
||||
<icon name="west" ratio="2" [flex]="true"></icon>
|
||||
</a>
|
||||
<div>
|
||||
<div class="uk-text-background uk-text-bold uk-text-small">
|
||||
Admin Dashboard - Manage page help texts
|
||||
<div class="uk-section-xsmall uk-margin-top">
|
||||
<div class="uk-flex-middle uk-grid" uk-grid>
|
||||
<div class="uk-width-expand">
|
||||
<a routerLink="../pages" class="uk-flex uk-flex-middle uk-h5 uk-link-reset">
|
||||
<span class="uk-margin-right">
|
||||
<icon name="west" ratio="1.7" [flex]="true"></icon>
|
||||
</span>
|
||||
<h1 *ngIf="page" class="uk-h5 uk-margin-remove">{{page.name}}</h1>
|
||||
</a>
|
||||
</div>
|
||||
<h1 *ngIf="page" class="uk-h6 uk-margin-remove">{{page.name}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall">
|
||||
<div class="uk-flex-right@m uk-flex-center uk-flex-middle uk-grid" uk-grid>
|
||||
<div search-input [disabled]="showLoading" [expandable]="true" [searchControl]="filterForm" searchInputClass="outer" placeholder="Search helptext" class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1">
|
||||
</div>
|
||||
<div>
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
<div page-content>
|
||||
<div header>
|
||||
<div class="uk-flex uk-flex-middle uk-margin-medium-top info">
|
||||
<ng-container *ngIf="showLogo">
|
||||
<img [src]="entity | logoUrl" class="uk-margin-right uk-blend-multiply">
|
||||
</ng-container>
|
||||
<div>
|
||||
<div class="uk-text-background uk-text-bold uk-text-small">Admin Dashboard - Manage Menus</div>
|
||||
<h1 class="uk-h6 uk-margin-remove">{{name ? name : 'Super Admin'}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<admin-tabs tab="menu" [portal]="portal" [type]="type"></admin-tabs>
|
||||
</div>
|
||||
<div actions>
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
<div page-content>
|
||||
<div header>
|
||||
<div class="uk-flex uk-flex-middle uk-margin-medium-top info">
|
||||
<div>
|
||||
<div class="uk-text-background uk-text-bold uk-text-small">Manage Pages</div>
|
||||
<h1 class="uk-h6 uk-margin-remove">{{name ? name : 'Super Admin'}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<admin-tabs tab="page" [portal]="portal" [type]="type"></admin-tabs>
|
||||
<ul class="uk-subnav uk-subnav-pill uk-margin-medium-top">
|
||||
<li [class.uk-active]="filterForm.get('type').value === 'all'"><a
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
<div page-content>
|
||||
<div header>
|
||||
<div class="uk-flex uk-flex-middle uk-margin-medium-top info">
|
||||
<div>
|
||||
<div class="uk-text-background uk-text-bold uk-text-small">Manage Portals</div>
|
||||
<h1 class="uk-h6 uk-margin-remove">Super Admin</h1>
|
||||
</div>
|
||||
</div>
|
||||
<admin-tabs tab="portal"></admin-tabs>
|
||||
<ul class="uk-subnav uk-subnav-pill uk-margin-medium-top">
|
||||
<li [class.uk-active]="filterForm.get('type').value === 'all'" class="uk-margin-small-bottom"><a
|
||||
|
|
|
@ -13,7 +13,6 @@ import {
|
|||
import {LayoutService, SidebarItem} from "../sidebar/layout.service";
|
||||
|
||||
declare var UIkit;
|
||||
declare var ResizeObserver;
|
||||
|
||||
@Component({
|
||||
selector: '[page-content]',
|
||||
|
@ -99,35 +98,42 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
|
||||
ngAfterViewInit() {
|
||||
if (typeof document !== "undefined") {
|
||||
this.observeStickyFooter();
|
||||
if (this.shouldSticky && typeof document !== 'undefined') {
|
||||
this.sticky.header = UIkit.sticky((this.headerSticky ? this.header.nativeElement : this.actions.nativeElement), {
|
||||
offset: this.offset
|
||||
});
|
||||
this.subscriptions.push(UIkit.util.on(document, 'active', '#' + this.sticky.header.$el.id, () => {
|
||||
this.isStickyActive = true;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
this.subscriptions.push(UIkit.util.on(document, 'inactive', '#' + this.sticky.header.$el.id, () => {
|
||||
this.isStickyActive = false;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
}
|
||||
if (this.sticky_footer) {
|
||||
let footer_offset = this.calcStickyFooterOffset(this.sticky_footer.nativeElement);
|
||||
this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {bottom: true, offset: footer_offset});
|
||||
this.initFooter();
|
||||
this.observeStickyFooter();
|
||||
}
|
||||
if (this.shouldSticky && typeof document !== 'undefined') {
|
||||
setTimeout(() => {
|
||||
this.sticky.header = UIkit.sticky((this.headerSticky ? this.header.nativeElement : this.actions.nativeElement), {
|
||||
offset: this.offset
|
||||
});
|
||||
this.subscriptions.push(UIkit.util.on(document, 'active', '#' + this.sticky.header.$el.id, () => {
|
||||
this.isStickyActive = true;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
this.subscriptions.push(UIkit.util.on(document, 'inactive', '#' + this.sticky.header.$el.id, () => {
|
||||
this.isStickyActive = false;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.subscriptions.forEach(subscription => {
|
||||
if (subscription instanceof (ResizeObserver || IntersectionObserver)) {
|
||||
if (typeof ResizeObserver !== "undefined" && subscription instanceof ResizeObserver) {
|
||||
subscription.disconnect();
|
||||
} else if (typeof IntersectionObserver !== "undefined" && subscription instanceof IntersectionObserver) {
|
||||
subscription.disconnect();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
initFooter() {
|
||||
let footer_offset = this.calcStickyFooterOffset(this.sticky_footer.nativeElement);
|
||||
this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {bottom: true, offset: footer_offset});
|
||||
}
|
||||
|
||||
/**
|
||||
* Workaround for sticky not update bug when sidebar is toggled.
|
||||
|
@ -204,8 +210,7 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
let resizeObs = new ResizeObserver(entries => {
|
||||
entries.forEach(entry => {
|
||||
setTimeout(() => {
|
||||
this.sticky.footer.offset = this.calcStickyFooterOffset(entry.target);
|
||||
this.cdr.detectChanges();
|
||||
this.initFooter();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
|
|
@ -59,7 +59,7 @@ export class LayoutService {
|
|||
/**
|
||||
* Add hasQuickContact: false on data of route config, if the quick-contact fixed button is not needed.
|
||||
*/
|
||||
private hasQuickContactSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
|
||||
private hasQuickContactSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||
/**
|
||||
* Add activeMenuItem: string on data of route config, if page should activate a specific MenuItem and route url does not match.
|
||||
*/
|
||||
|
@ -85,7 +85,7 @@ export class LayoutService {
|
|||
this.subscriptions.forEach(subscription => {
|
||||
if (subscription instanceof Subscriber) {
|
||||
subscription.unsubscribe();
|
||||
} else if (subscription instanceof ResizeObserver) {
|
||||
} else if (typeof ResizeObserver !== "undefined" && subscription instanceof ResizeObserver) {
|
||||
subscription.disconnect();
|
||||
}
|
||||
})
|
||||
|
|
|
@ -5,10 +5,14 @@
|
|||
</aside>
|
||||
<div class="uk-hidden@m">
|
||||
<div id="sidebar_offcanvas" #sidebar_offcanvas [attr.uk-offcanvas]="'overlay: true'">
|
||||
<div class="uk-offcanvas-bar uk-padding-remove-horizontal">
|
||||
<button class="uk-offcanvas-close uk-icon uk-close">
|
||||
<icon name="close" ratio="1.5" visuallyHidden="close menu"></icon>
|
||||
</button>
|
||||
<div class="uk-offcanvas-bar uk-padding-remove">
|
||||
<nav class="uk-navbar uk-background-default" uk-sticky>
|
||||
<div class="uk-navbar-right">
|
||||
<button class="uk-navbar-toggle uk-icon uk-close" (click)="closeOffcanvas()">
|
||||
<icon name="close" ratio="1.5" visuallyHidden="close menu"></icon>
|
||||
</button>
|
||||
</div>
|
||||
</nav>
|
||||
<ng-container *ngTemplateOutlet="menu; context: {mobile: true}"></ng-container>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -25,10 +29,10 @@
|
|||
</a>
|
||||
</div>
|
||||
<div *ngIf="items.length > 0" class="menu_section uk-margin-large-top" [class.mobile]="mobile" style="min-height: 30vh">
|
||||
<ul #nav class="uk-list uk-nav uk-nav-parent-icon"
|
||||
<ul #nav class="uk-list uk-nav uk-nav-parent-icon" [class.uk-list-large]="mobile"
|
||||
[class.uk-nav-default]="!mobile" [class.uk-nav-primary]="mobile" uk-nav="duration: 400">
|
||||
<ng-template ngFor [ngForOf]="items" let-item>
|
||||
<li [class.uk-active]="item.isActive"
|
||||
<li [class.uk-active]="item.isActive" [ngClass]="item.customClass"
|
||||
[class.uk-parent]="item.items.length > 0">
|
||||
<a [routerLink]="getItemRoute(item)" [title]="item.title" (click)="item.items.length === 0?closeOffcanvas():null"
|
||||
[queryParams]="item.route?item.params:null" [queryParamsHandling]="item.route?queryParamsHandling:null" class="uk-flex uk-flex-middle">
|
||||
|
@ -38,7 +42,7 @@
|
|||
<span [class.hide-on-close]="item.icon" class="uk-width-expand@l uk-text-truncate uk-margin-small-left">{{item.title}}</span>
|
||||
</a>
|
||||
<ul *ngIf="item.items?.length > 0 && (isBrowser || item.isActive)" class="uk-nav-sub">
|
||||
<li *ngFor="let subItem of item.items"
|
||||
<li *ngFor="let subItem of item.items" [ngClass]="subItem.customClass"
|
||||
[class.uk-active]="subItem.isActive">
|
||||
<a [routerLink]="subItem.route?subItem.route:null" [title]="subItem.title" (click)="closeOffcanvas()"
|
||||
[queryParams]="subItem.route?subItem.params:null" [queryParamsHandling]="subItem.route?queryParamsHandling:null">
|
||||
|
|
|
@ -32,6 +32,7 @@ export class SideBarComponent implements OnInit, AfterViewInit, OnDestroy, OnCha
|
|||
@ViewChild("sidebar_offcanvas") sidebar_offcanvas: ElementRef;
|
||||
public properties = properties;
|
||||
private subscriptions: any[] = [];
|
||||
private init: boolean = false;
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router,
|
||||
private sanitizer: DomSanitizer, private layoutService: LayoutService,
|
||||
|
@ -48,18 +49,17 @@ export class SideBarComponent implements OnInit, AfterViewInit, OnDestroy, OnCha
|
|||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
if(this.nav && typeof UIkit !== "undefined") {
|
||||
setTimeout(() => {
|
||||
if(this.items[this.activeIndex]?.items?.length > 0) {
|
||||
UIkit.nav(this.nav.nativeElement).toggle(this.activeIndex, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.toggle(true);
|
||||
});
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
if(changes.activeItem || changes.activeSubItem || changes.items) {
|
||||
this.setActiveMenuItem();
|
||||
if(this.init && changes.items) {
|
||||
this.toggle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,17 @@ export class SideBarComponent implements OnInit, AfterViewInit, OnDestroy, OnCha
|
|||
});
|
||||
}
|
||||
|
||||
toggle(init: boolean = false) {
|
||||
this.init = this.init || init;
|
||||
if(this.nav && typeof UIkit !== "undefined") {
|
||||
setTimeout(() => {
|
||||
if(this.items[this.activeIndex]?.items?.length > 0) {
|
||||
UIkit.nav(this.nav.nativeElement).toggle(this.activeIndex, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
get isBrowser() {
|
||||
return this.platformId === 'browser';
|
||||
}
|
||||
|
@ -143,10 +154,6 @@ export class SideBarComponent implements OnInit, AfterViewInit, OnDestroy, OnCha
|
|||
}
|
||||
}
|
||||
|
||||
isTheActiveUrl(menuItemURL): boolean {
|
||||
return (menuItemURL == this.router.url.split('?')[0])
|
||||
}
|
||||
|
||||
public get open() {
|
||||
return this.layoutService.open;
|
||||
}
|
||||
|
|
|
@ -5,16 +5,16 @@ import {Subscription} from "rxjs";
|
|||
@Component({
|
||||
selector: 'sidebar-mobile-toggle',
|
||||
template: `
|
||||
<a *ngIf="activeSidebarItem" href="#sidebar_offcanvas" class="sidebar_mobile_toggle uk-link-reset uk-width-2-3 uk-flex uk-flex-middle" uk-toggle>
|
||||
<a *ngIf="activeSidebarItem" href="#sidebar_offcanvas" class="sidebar_mobile_toggle uk-link-reset uk-width-3-5 uk-flex uk-flex-middle" uk-toggle>
|
||||
<div *ngIf="activeSidebarItem.icon && (activeSidebarItem.icon.svg || activeSidebarItem.icon.name)" class="uk-width-auto">
|
||||
<icon class="menu-icon" [customClass]="activeSidebarItem.icon.class" [name]="activeSidebarItem.icon.name" ratio="0.9" [svg]="activeSidebarItem.icon.svg" [flex]="true"></icon>
|
||||
<icon class="menu-icon" [customClass]="activeSidebarItem.icon.class" [name]="activeSidebarItem.icon.name" ratio="0.8" [svg]="activeSidebarItem.icon.svg" [flex]="true"></icon>
|
||||
</div>
|
||||
<span class="uk-width-expand uk-text-truncate uk-margin-small-left uk-text-bolder">
|
||||
{{activeSidebarItem.name}}
|
||||
<span *ngIf="activeSidebarItem.subItem">- {{activeSidebarItem.subItem.name}}</span>
|
||||
</span>
|
||||
<div class="uk-width-auto uk-margin-small-left">
|
||||
<icon name="arrow_drop_down" ratio="1.5" [flex]="true"></icon>
|
||||
<icon name="arrow_right" ratio="1.4" [flex]="true"></icon>
|
||||
</div>
|
||||
</a>
|
||||
`
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild} from '@angular/core';
|
||||
import {Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges, ViewChild} from '@angular/core';
|
||||
import {UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';
|
||||
import {AlertModal} from "../../../utils/modal/alert";
|
||||
import {UserRegistryService} from "../../../services/user-registry.service";
|
||||
|
@ -277,7 +277,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
}
|
||||
|
||||
public isMe(userId: string) {
|
||||
return userId.includes(this.user.id) && !this.isCurator;
|
||||
return userId && userId.includes(this.user.id) && !this.isCurator;
|
||||
}
|
||||
|
||||
public get isManager(): boolean {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import {HttpClient} from "@angular/common/http";
|
||||
import {ChangeDetectorRef, Component, ElementRef, Input, ViewChild} from "@angular/core";
|
||||
import {FormBuilder, FormControl, UntypedFormArray} from "@angular/forms";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
|
@ -8,6 +7,7 @@ import {properties} from "../../../../environments/environment";
|
|||
import {StringUtils} from "../../utils/string-utils.class";
|
||||
import {debounceTime, distinctUntilChanged} from "rxjs/operators";
|
||||
import {HelperFunctions} from "../../utils/HelperFunctions.class";
|
||||
import {ISVocabulariesService} from "../../utils/staticAutoComplete/ISVocabularies.service";
|
||||
import Timeout = NodeJS.Timeout;
|
||||
|
||||
declare var UIkit;
|
||||
|
@ -44,7 +44,7 @@ export class FosSelectionComponent {
|
|||
public sliderInit: boolean = false;
|
||||
|
||||
constructor(
|
||||
private httpClient: HttpClient,
|
||||
private vocabulariesService: ISVocabulariesService,
|
||||
private fb: FormBuilder,
|
||||
private cdr: ChangeDetectorRef,
|
||||
private route: ActivatedRoute,
|
||||
|
@ -53,7 +53,7 @@ export class FosSelectionComponent {
|
|||
|
||||
ngOnInit() {
|
||||
this.loading = true;
|
||||
this.httpClient.get(this.properties.domain+'/assets/common-assets/vocabulary/fos.json').subscribe(data => {
|
||||
this.vocabulariesService.getFos(properties).subscribe(data => {
|
||||
this.fos = data['fos'];
|
||||
this.convertFosToOptions();
|
||||
if (typeof document !== 'undefined') {
|
||||
|
@ -240,4 +240,4 @@ export class FosSelectionComponent {
|
|||
return this.contentHeight - this.searchElement.nativeElement.offsetHeight - 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import {SEOService} from "../sharedComponents/SEO/SEO.service";
|
|||
import {PiwikService} from "../utils/piwik/piwik.service";
|
||||
import {debounceTime, distinctUntilChanged} from "rxjs/operators";
|
||||
import Timeout = NodeJS.Timeout;
|
||||
import {ISVocabulariesService} from "../utils/staticAutoComplete/ISVocabularies.service";
|
||||
|
||||
declare var UIkit;
|
||||
|
||||
|
@ -49,7 +50,7 @@ export class FosComponent implements OnInit, OnDestroy {
|
|||
public sliderInit: boolean = false;
|
||||
|
||||
constructor(
|
||||
private httpClient: HttpClient,
|
||||
private vocabulariesService: ISVocabulariesService,
|
||||
private fb: FormBuilder,
|
||||
private location: Location,
|
||||
private route: ActivatedRoute,
|
||||
|
@ -70,7 +71,7 @@ export class FosComponent implements OnInit, OnDestroy {
|
|||
this.updateUrl(this.url);
|
||||
this.updateTitle(this.pageTitle);
|
||||
this.updateDescription(this.pageDescription);
|
||||
this.httpClient.get(properties.domain+'/assets/common-assets/vocabulary/fos.json').subscribe(data => {
|
||||
this.vocabulariesService.getFos(properties).subscribe(data => {
|
||||
this.fos = data['fos'];
|
||||
this.convertFosToOptions();
|
||||
if (typeof document !== 'undefined') {
|
||||
|
|
|
@ -35,8 +35,11 @@ export class HttpInterceptorService implements HttpInterceptor {
|
|||
return of(response);
|
||||
} else {
|
||||
if (isPlatformServer(this.platformId)) {
|
||||
if(request.url.startsWith('/assets') || request.url.startsWith('assets')) {
|
||||
return of(null);
|
||||
}
|
||||
let headers = new HttpHeaders();
|
||||
if(request.withCredentials) {
|
||||
if(request.withCredentials && !properties.hasMachineCache) {
|
||||
headers = headers.set('Cookie', this.req.get('Cookie'));
|
||||
}
|
||||
const authReq = request.clone({
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div *ngIf="properties.adminToolsPortalType == 'eosc'" class="eosc-explore-back-search-bar">
|
||||
<div class="uk-light uk-container uk-container-large uk-padding-small uk-height-1-1">
|
||||
<div class="uk-flex uk-flex-inline uk-flex-middle uk-height-1-1">
|
||||
<a href="https://search.marketplace.eosc-portal.eu/" target="_self" class="uk-link-reset uk-flex uk-flex-middle uk-text-light uk-text-small">
|
||||
<a [href]="eoscBackLink" target="_self" class="uk-link-reset uk-flex uk-flex-middle uk-text-light uk-text-small">
|
||||
<icon name="arrow_back" visuallyHidden="back" flex="true" ratio="0.7" customClass="uk-text-light"></icon>
|
||||
<span class="uk-margin-small-left">Go to Search</span>
|
||||
</a>
|
||||
|
@ -55,22 +55,19 @@
|
|||
</div>
|
||||
|
||||
<ng-template #graph_and_feedback_template>
|
||||
<div class="uk-flex uk-margin-small-top uk-margin-small-bottom" [class.uk-invisible]="!dataProviderInfo">
|
||||
<div class="uk-flex uk-flex-between uk-flex-wrap uk-margin-small-bottom uk-margin-small-top" [class.uk-invisible]="!dataProviderInfo">
|
||||
<!-- Last Index Info-->
|
||||
<div class="uk-width-2-3@m uk-width-1-2">
|
||||
<icon name="graph" customClass="text-graph"></icon>
|
||||
<span class="uk-margin-small-left uk-text-baseline">
|
||||
<span class="uk-text-meta">Powered by </span>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="text-graph">OpenAIRE Research Graph</a>
|
||||
</span>
|
||||
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-meta">
|
||||
. Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
</span>
|
||||
</div>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="uk-width-1-1 uk-width-auto@l">
|
||||
<img src="assets/common-assets/openaire-badge-1.png" alt="Powered by OpenAIRE graph" style="height: 15px;">
|
||||
</a>
|
||||
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-meta uk-width-1-1 uk-width-auto@l">
|
||||
Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
</span>
|
||||
|
||||
<!--Feedback-->
|
||||
<div *ngIf="properties.reCaptchaSiteKey" class="uk-width-expand uk-text-right">
|
||||
<span class="uk-text-meta uk-text-xsmall">See an issue?</span>
|
||||
<a (click)="showFeedback = true; scroll()" class="uk-text-xsmall"> Report it here</a>
|
||||
<div *ngIf="properties.reCaptchaSiteKey" class="uk-width-1-1 uk-width-auto@l">
|
||||
<span class="uk-text-meta uk-text-xsmall">Found an issue? </span>
|
||||
<a (click)="showFeedback = true; scroll()" class="uk-text-xsmall">Give us feedback</a>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
@ -118,7 +115,7 @@
|
|||
<div>
|
||||
<span class="uk-label uk-text-truncate" [class.uk-label-danger]="dataProviderInfo.compatibility.info == 'not available'" title="Compatibility">
|
||||
<a *ngIf="dataProviderInfo.compatibility.id"
|
||||
[queryParams]="{datasourceId: dataProviderInfo.compatibility.id}" routerLinkActive="router-link-active"
|
||||
[queryParams]="addEoscPrevInParams({datasourceId: dataProviderInfo.compatibility.id})" routerLinkActive="router-link-active"
|
||||
[routerLink]="properties.searchLinkToDataProvider.split('?')[0]">
|
||||
{{dataProviderInfo.compatibility.info}}
|
||||
<ng-container *ngIf="dataProviderInfo.compatibility.name">{{dataProviderInfo.compatibility.name}}</ng-container>
|
||||
|
@ -358,7 +355,7 @@
|
|||
<search-tab [fetch]="fetchProjects" resultType="project"
|
||||
[params]="getParamsForSearchLink()"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedProjects"
|
||||
[properties]="properties">
|
||||
[properties]="properties" [prevPath]="prevPath">
|
||||
</search-tab>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@ -368,7 +365,7 @@
|
|||
<search-tab [fetch]="fetchDataproviders" resultType="dataprovider"
|
||||
[params]="getParamsForSearchLink()"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedDataProviders"
|
||||
[properties]="properties">
|
||||
[properties]="properties" [prevPath]="prevPath">
|
||||
</search-tab>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@ -378,7 +375,7 @@
|
|||
<search-tab [fetch]="fetchPublications" resultType="publication"
|
||||
[params]="getParamsForSearchLink('publications')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties">
|
||||
[properties]="properties" [prevPath]="prevPath">
|
||||
</search-tab>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@ -388,7 +385,7 @@
|
|||
<search-tab [fetch]="fetchDatasets" resultType="dataset"
|
||||
[params]="getParamsForSearchLink('datasets')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties">
|
||||
[properties]="properties" [prevPath]="prevPath">
|
||||
</search-tab>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@ -398,7 +395,7 @@
|
|||
<search-tab [fetch]="fetchSoftware" resultType="software"
|
||||
[params]="getParamsForSearchLink('software')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties">
|
||||
[properties]="properties" [prevPath]="prevPath">
|
||||
</search-tab>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@ -408,7 +405,7 @@
|
|||
<search-tab [fetch]="fetchOrps" resultType="other"
|
||||
[params]="getParamsForSearchLink('other')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties">
|
||||
[properties]="properties" [prevPath]="prevPath">
|
||||
</search-tab>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@ -423,7 +420,7 @@
|
|||
[fetchResults]="fetchAggregatorsResults"
|
||||
[collectedFromName]="dataProviderInfo.title.name"
|
||||
[properties]=properties
|
||||
[modal]="relatedDatasourcesModal">
|
||||
[modal]="relatedDatasourcesModal" [prevPath]="prevPath">
|
||||
</relatedDatasourcesTab>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@ -480,7 +477,7 @@
|
|||
[attr.uk-tooltip]="organization.acronym && organization.name ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="organization.name">
|
||||
<a *ngIf="organization.id" class="uk-link-text"
|
||||
[queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active"
|
||||
[queryParams]="addEoscPrevInParams({organizationId: organization.id})" routerLinkActive="router-link-active"
|
||||
[routerLink]="properties.searchLinkToOrganization.split('?')[0]">
|
||||
{{(organization.acronym) ? organization.acronym : ''}}
|
||||
{{(!organization.acronym && organization.name) ? organization.name : ''}}
|
||||
|
|
|
@ -38,6 +38,9 @@ declare var ResizeObserver;
|
|||
})
|
||||
|
||||
export class DataProviderComponent {
|
||||
public referrer: string;
|
||||
public prevPath: string;
|
||||
|
||||
@Input() type: string = "dataprovider";
|
||||
private typeQueryPathParam: string = "datasources";
|
||||
@Input() piwikSiteId = null;
|
||||
|
@ -182,6 +185,14 @@ export class DataProviderComponent {
|
|||
this.subscriptions.push(this.route.queryParams.subscribe(data => {
|
||||
this.stickyHeader = false;
|
||||
this.updateDescription("");
|
||||
|
||||
if(data["return_path"]) {
|
||||
this.prevPath = data["return_path"] + (data["search_params"] ? ("?"+data["search_params"]) : "");
|
||||
}
|
||||
if((typeof document !== 'undefined') && document.referrer) {
|
||||
this.referrer = document.referrer;
|
||||
}
|
||||
|
||||
// this.datasourceId = data['datasourceId'];
|
||||
if (data['datasourceId']) {
|
||||
this.datasourceId = data['datasourceId'];
|
||||
|
@ -831,4 +842,23 @@ export class DataProviderComponent {
|
|||
this.descriptionModal.alertTitle = "Description";
|
||||
this.descriptionModal.open();
|
||||
}
|
||||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
public get eoscBackLink() {
|
||||
if(this.prevPath && this.referrer && ((this.referrer == "https://eosc-search-service.grid.cyfronet.pl/") || (this.referrer == "https://beta.search.marketplace.eosc-portal.eu/") || (this.referrer == "https://search.marketplace.eosc-portal.eu/"))) {
|
||||
return this.referrer+this.prevPath;
|
||||
} else {
|
||||
return "https://"+(this.properties.environment == "beta" ? "beta." : "")+"search.marketplace.eosc-portal.eu/";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ import {OpenaireEntities} from "../../utils/properties/searchFields";
|
|||
<ng-container *ngFor="let result of results; let i=index">
|
||||
<tr *ngIf="i>=(page-1)*pageSize && i<page*pageSize">
|
||||
<td>
|
||||
<a [queryParams]="{datasourceId: result.id}" routerLinkActive="router-link-active" [routerLink]="dataProviderUrl"
|
||||
<a [queryParams]="addEoscPrevInParams({datasourceId: result.id})" routerLinkActive="router-link-active" [routerLink]="dataProviderUrl"
|
||||
(click)="onLinkClick()">
|
||||
{{result.name}}
|
||||
</a>
|
||||
|
@ -73,6 +73,7 @@ import {OpenaireEntities} from "../../utils/properties/searchFields";
|
|||
})
|
||||
|
||||
export class RelatedDatasourcesTabComponent {
|
||||
@Input() prevPath: string = "";
|
||||
@Input() dataproviderId: string;
|
||||
// @Input() fetchPublications : FetchResearchResults;
|
||||
// @Input() fetchDatasets : FetchResearchResults;
|
||||
|
@ -137,4 +138,15 @@ export class RelatedDatasourcesTabComponent {
|
|||
this.modal.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import {Component, EventEmitter, Input, Output} from '@angular/core';
|
||||
import {HostedByCollectedFrom} from "../../utils/result-preview/result-preview";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
import {RouterHelper} from "../../utils/routerHelper.class";
|
||||
|
||||
@Component({
|
||||
selector: 'availableOn',
|
||||
|
@ -47,9 +48,9 @@ import {properties} from "../../../../environments/environment";
|
|||
<ng-template #elseBlock> {{instance.license}}</ng-template>
|
||||
</div>
|
||||
<div *ngIf="instance.collectedNamesAndIds?.size > 0" class="uk-text-meta">
|
||||
<span>Providers: </span>
|
||||
<span>Data sources: </span>
|
||||
<a *ngFor="let collectedName of getKeys(instance.collectedNamesAndIds); let i=index" [routerLink]="dataProviderUrl"
|
||||
[queryParams]="{datasourceId: instance.collectedNamesAndIds.get(collectedName)}" class="uk-link-text">
|
||||
[queryParams]="addEoscPrevInParams({datasourceId: instance.collectedNamesAndIds.get(collectedName)})" class="uk-link-text">
|
||||
{{collectedName}}<ng-container *ngIf="(i !== (instance.collectedNamesAndIds.size - 1))">; </ng-container>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -80,6 +81,7 @@ import {properties} from "../../../../environments/environment";
|
|||
})
|
||||
|
||||
export class AvailableOnComponent {
|
||||
@Input() prevPath: string = "";
|
||||
@Input() availableOn: HostedByCollectedFrom[];
|
||||
@Input() viewAll: boolean = false;
|
||||
@Output() viewAllClicked = new EventEmitter();
|
||||
|
@ -87,7 +89,8 @@ export class AvailableOnComponent {
|
|||
public threshold: number = 1;
|
||||
public dataProviderUrl = properties.searchLinkToDataProvider.split('?')[0];
|
||||
public title: string = "Download from";
|
||||
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
|
@ -122,4 +125,15 @@ export class AvailableOnComponent {
|
|||
public isUrl(str: string): boolean {
|
||||
return str.startsWith('http://') || str.startsWith('https://') || str.startsWith('//') || str.startsWith('www.');
|
||||
}
|
||||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ import {Component, EventEmitter, Input, Output} from '@angular/core';
|
|||
import {Project} from "../../utils/result-preview/result-preview";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
import {HelperFunctions} from '../../utils/HelperFunctions.class';
|
||||
import {RouterHelper} from "../../utils/routerHelper.class";
|
||||
|
||||
@Component({
|
||||
selector: 'fundedBy',
|
||||
|
@ -33,7 +34,7 @@ import {HelperFunctions} from '../../utils/HelperFunctions.class';
|
|||
<span>Project</span>
|
||||
<div class="uk-margin-bottom">
|
||||
<a *ngIf="item.id" class="uk-h6 uk-margin-remove portal-link"
|
||||
[queryParams]="{projectId: item.id}" [routerLink]="url">
|
||||
[queryParams]="addEoscPrevInParams({projectId: item.id})" [routerLink]="url">
|
||||
{{item['acronym'] ? item['acronym'] : item['title']}}
|
||||
</a>
|
||||
<span *ngIf="!item.id" class="uk-h6 uk-margin-remove">
|
||||
|
@ -72,6 +73,7 @@ import {HelperFunctions} from '../../utils/HelperFunctions.class';
|
|||
})
|
||||
|
||||
export class FundedByComponent {
|
||||
@Input() prevPath: string = "";
|
||||
@Input() fundedByProjects: Project[];
|
||||
@Input() viewAll: boolean = false;
|
||||
@Output() viewAllClicked = new EventEmitter();
|
||||
|
@ -81,6 +83,7 @@ export class FundedByComponent {
|
|||
public title: string = "Funded by";
|
||||
@Input() provenanceActionVocabulary = null;
|
||||
public provenancesCalculated: boolean[] = [];
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
|
||||
public viewAllClick() {
|
||||
if(this.fundedByProjects.length <= this.threshold*2) {
|
||||
|
@ -104,4 +107,15 @@ export class FundedByComponent {
|
|||
}
|
||||
return item.provenanceAction;
|
||||
}
|
||||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,9 @@ import {EnvProperties} from '../../../utils/properties/env-properties';
|
|||
import {ClickEvent} from "../../../utils/click/click-outside-or-esc.directive";
|
||||
import {NumberUtils} from "../../../utils/number-utils.class";
|
||||
import {OpenaireEntities} from "../../../utils/properties/searchFields";
|
||||
import {StringUtils} from "../../../utils/string-utils.class";
|
||||
import {properties} from "../../../../../environments/environment";
|
||||
import {RouterHelper} from "../../../utils/routerHelper.class";
|
||||
|
||||
@Component({
|
||||
selector: 'metrics',
|
||||
|
@ -77,7 +80,7 @@ import {OpenaireEntities} from "../../../utils/properties/searchFields";
|
|||
<tbody>
|
||||
<tr *ngFor="let key of getKeys(metrics.infos)">
|
||||
<td class="uk-width-1-3 uk-text-center uk-text-truncate" uk-tooltip [title]="metrics.infos.get(key).name">
|
||||
<a href="{{metrics.infos.get(key).url}}">
|
||||
<a [queryParams]="addEoscPrevInParams({datasourceId: metrics.infos.get(key).url})" [routerLink]="properties.searchLinkToDataProvider.split('?')[0]">
|
||||
{{metrics.infos.get(key).name}}
|
||||
</a>
|
||||
</td>
|
||||
|
@ -128,6 +131,7 @@ import {OpenaireEntities} from "../../../utils/properties/searchFields";
|
|||
})
|
||||
|
||||
export class MetricsComponent {
|
||||
@Input() prevPath: string = "";
|
||||
@Output() metricsResults = new EventEmitter();
|
||||
@Input() id: string;
|
||||
@Input() entityType: string;
|
||||
|
@ -150,6 +154,7 @@ export class MetricsComponent {
|
|||
public status: number;
|
||||
public state: number = -1;
|
||||
public openaireEntities = OpenaireEntities;
|
||||
public routerHelper:RouterHelper = new RouterHelper();
|
||||
|
||||
constructor(private metricsService: MetricsService, private cdr: ChangeDetectorRef) {
|
||||
}
|
||||
|
@ -312,4 +317,15 @@ export class MetricsComponent {
|
|||
let formatted = NumberUtils.roundNumber(+num);
|
||||
return formatted.number + formatted.size;
|
||||
}
|
||||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,11 @@ import {MetricsService} from '../../../services/metrics.service';
|
|||
import {ErrorMessagesModule} from '../../../utils/errorMessages.module';
|
||||
import {IFrameModule} from "../../../utils/iframe.module";
|
||||
import {IconsModule} from "../../../utils/icons/icons.module";
|
||||
import {RouterModule} from "@angular/router";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, ErrorMessagesModule, IFrameModule, IconsModule
|
||||
CommonModule, FormsModule, RouterModule, ErrorMessagesModule, IFrameModule, IconsModule
|
||||
],
|
||||
declarations: [
|
||||
MetricsComponent
|
||||
|
|
|
@ -9,10 +9,11 @@ import {StringUtils} from "../../utils/string-utils.class";
|
|||
})
|
||||
export class ParsingFunctions {
|
||||
public eoscSubjects = [
|
||||
{label: 'EOSC::Jupyter Notebook', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/services?tag=EOSC%3A%3AJupyter+Notebook', value: 'Jupyter Notebook'},
|
||||
{label: 'EOSC::RO-crate', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/datasources/eosc.psnc.6f0470e3bb9203ec3a7553f3a72a7a1f?q=ROHub', value: 'RO-crate'},
|
||||
{label: 'EOSC::Galaxy Workflow', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/services?tag=EOSC%3A%3AGalaxy+Workflow', value: 'Galaxy Workflow'},
|
||||
{label: 'EOSC::Twitter Data', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'marketplace.eosc-portal.eu/services?tag=EOSC%3A%3ATwitter+Data', value: 'Twitter Data'}
|
||||
{label: 'EOSC::Jupyter Notebook', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=tag_list:"EOSC%5C:%5C:Jupyter%20Notebook"', value: 'Jupyter Notebook'},
|
||||
{label: 'EOSC::RO-crate', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/data-source?q=*&fq=tag_list:%22eosc%5C:%5C:ro%5C-crate%22', value: 'RO-crate'},
|
||||
{label: 'EOSC::Galaxy Workflow', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=tag_list:%22eosc%5C:%5C:galaxy%20workflow%22', value: 'Galaxy Workflow'},
|
||||
{label: 'EOSC::Twitter Data', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=tag_list:%22EOSC%5C:%5C:Twitter%20Data%22', value: 'Twitter Data'},
|
||||
{label: 'EOSC::Data Cube', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=tag_list:%22EOSC%5C:%5C:Data%20Cube%22', value: 'Data Cube'}
|
||||
]
|
||||
|
||||
public notebookInSubjects: boolean = false;
|
||||
|
|
|
@ -39,7 +39,7 @@ import {OpenaireEntities} from '../../utils/properties/searchFields';
|
|||
<search-result [results]="fetchProjects.results"
|
||||
[status]="fetchProjects.searchUtils.status"
|
||||
[type]="'project'"
|
||||
[showLoading]="true" [properties]="properties">
|
||||
[showLoading]="true" [properties]="properties" [prevPath]="prevPath">
|
||||
</search-result>
|
||||
<paging-no-load *ngIf="fetchProjects.searchUtils.totalResults > size"
|
||||
(pageChange)="pageChange($event)"
|
||||
|
@ -52,6 +52,7 @@ import {OpenaireEntities} from '../../utils/properties/searchFields';
|
|||
})
|
||||
|
||||
export class ProjectsInModalComponent {
|
||||
@Input() prevPath: string = "";
|
||||
@Input() fetchProjects: FetchProjects;
|
||||
@Input() organizationId: string = "";
|
||||
@Input() properties: EnvProperties;
|
||||
|
|
|
@ -26,7 +26,8 @@ import {HelperFunctions} from "../../../utils/HelperFunctions.class";
|
|||
</no-load-paging>
|
||||
<ul class="uk-list uk-list-divider uk-margin">
|
||||
<li *ngFor="let result of results.slice((page-1)*pageSize, page*pageSize)">
|
||||
<result-preview [modal]="modal" [properties]="properties" [hasLink]="false" [result]="getResultPreview(result)" [isCard]="false"></result-preview>
|
||||
<result-preview [modal]="modal" [properties]="properties" [hasLink]="false" [result]="getResultPreview(result)"
|
||||
[isCard]="false" [prevPath]="prevPath"></result-preview>
|
||||
</li>
|
||||
</ul>
|
||||
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
||||
|
@ -38,6 +39,7 @@ import {HelperFunctions} from "../../../utils/HelperFunctions.class";
|
|||
`
|
||||
})
|
||||
export class OrganizationsDeletedByInferenceComponent {
|
||||
@Input() prevPath: string = "";
|
||||
public results: OrganizationInfo[] = [];
|
||||
@Input() id: string;
|
||||
@Input() ids: string[] = [];
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div *ngIf="properties.adminToolsPortalType == 'eosc'" class="eosc-explore-back-search-bar">
|
||||
<div class="uk-light uk-container uk-container-large uk-padding-small uk-height-1-1">
|
||||
<div class="uk-flex uk-flex-inline uk-flex-middle uk-height-1-1">
|
||||
<a href="https://search.marketplace.eosc-portal.eu/" target="_self" class="uk-link-reset uk-flex uk-flex-middle uk-text-light uk-text-small">
|
||||
<a [href]="eoscBackLink" target="_self" class="uk-link-reset uk-flex uk-flex-middle uk-text-light uk-text-small">
|
||||
<icon name="arrow_back" visuallyHidden="back" flex="true" ratio="0.7" customClass="uk-text-light"></icon>
|
||||
<span class="uk-margin-small-left">Go to Search</span>
|
||||
</a>
|
||||
|
@ -54,22 +54,19 @@
|
|||
|
||||
<!-- Graph and feedback -->
|
||||
<ng-template #graph_and_feedback_template>
|
||||
<div class="uk-flex uk-margin-small-top uk-margin-small-bottom" [class.uk-invisible]="!organizationInfo">
|
||||
<div class="uk-flex uk-flex-between uk-flex-wrap uk-margin-small-bottom uk-margin-small-top" [class.uk-invisible]="!organizationInfo">
|
||||
<!-- Last Index Info-->
|
||||
<div class="uk-width-2-3@m uk-width-1-2">
|
||||
<icon name="graph" customClass="text-graph"></icon>
|
||||
<span class="uk-margin-small-left uk-text-baseline">
|
||||
<span class="uk-text-meta">Powered by </span>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="text-graph">OpenAIRE Research Graph</a>
|
||||
</span>
|
||||
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-meta">
|
||||
. Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
</span>
|
||||
</div>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="uk-width-1-1 uk-width-auto@l">
|
||||
<img src="assets/common-assets/openaire-badge-1.png" alt="Powered by OpenAIRE graph" style="height: 15px;">
|
||||
</a>
|
||||
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-meta uk-width-1-1 uk-width-auto@l">
|
||||
Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
</span>
|
||||
|
||||
<!--Feedback-->
|
||||
<div *ngIf="properties.reCaptchaSiteKey" class="uk-width-expand uk-text-right">
|
||||
<span class="uk-text-meta uk-text-xsmall">See an issue?</span>
|
||||
<a (click)="showFeedback = true; scroll()" class="uk-text-xsmall"> Report it here</a>
|
||||
<div *ngIf="properties.reCaptchaSiteKey" class="uk-width-1-1 uk-width-auto@l">
|
||||
<span class="uk-text-meta uk-text-xsmall">Found an issue? </span>
|
||||
<a (click)="showFeedback = true; scroll()" class="uk-text-xsmall">Give us feedback</a>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
@ -179,7 +176,7 @@
|
|||
<div id="landing-sections" class="uk-text-small">
|
||||
<div id="projects" class="landing-section landing-section-height-auto uk-padding uk-padding-remove-horizontal">
|
||||
<projectsInModal [fetchProjects]="fetchProjects"
|
||||
[organizationId]="organizationId" [properties]=properties>
|
||||
[organizationId]="organizationId" [properties]=properties [prevPath]="prevPath">
|
||||
</projectsInModal>
|
||||
</div>
|
||||
<div *ngIf="fetchDataproviders && fetchDataproviders.searchUtils.totalResults > 0"
|
||||
|
@ -187,7 +184,7 @@
|
|||
<search-tab [fetch]="fetchDataproviders" resultType="dataprovider"
|
||||
[params]="getParamsForSearchLink()"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedDataProviders"
|
||||
[properties]="properties">
|
||||
[properties]="properties" [prevPath]="prevPath">
|
||||
</search-tab>
|
||||
</div>
|
||||
<div *ngIf="fetchPublications && fetchPublications.searchUtils.totalResults > 0"
|
||||
|
@ -195,7 +192,7 @@
|
|||
<search-tab [fetch]="fetchPublications" resultType="publication"
|
||||
[params]="getParamsForSearchLink('publications')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties">
|
||||
[properties]="properties" [prevPath]="prevPath">
|
||||
</search-tab>
|
||||
</div>
|
||||
<div *ngIf="fetchDatasets && fetchDatasets.searchUtils.totalResults > 0"
|
||||
|
@ -203,7 +200,7 @@
|
|||
<search-tab [fetch]="fetchDatasets" resultType="dataset"
|
||||
[params]="getParamsForSearchLink('datasets')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties">
|
||||
[properties]="properties" [prevPath]="prevPath">
|
||||
</search-tab>
|
||||
</div>
|
||||
<div *ngIf="fetchSoftware && fetchSoftware.searchUtils.totalResults > 0"
|
||||
|
@ -211,7 +208,7 @@
|
|||
<search-tab [fetch]="fetchSoftware" resultType="software"
|
||||
[params]="getParamsForSearchLink('software')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties">
|
||||
[properties]="properties" [prevPath]="prevPath">
|
||||
</search-tab>
|
||||
</div>
|
||||
<div *ngIf="fetchOrps && fetchOrps.searchUtils.totalResults > 0"
|
||||
|
@ -219,7 +216,7 @@
|
|||
<search-tab [fetch]="fetchOrps" resultType="other"
|
||||
[params]="getParamsForSearchLink('other')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties">
|
||||
[properties]="properties" [prevPath]="prevPath">
|
||||
</search-tab>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -250,7 +247,7 @@
|
|||
[id]="organizationInfo.objIdentifier"
|
||||
[ids]="organizationInfo.deletedByInferenceIds"
|
||||
[modal]="AlertModalDeletedByInference"
|
||||
[type]="'organizations'">
|
||||
[type]="'organizations'" [prevPath]="prevPath">
|
||||
</organizationsDeletedByInference>
|
||||
</modal-alert>
|
||||
<!-- Share -->
|
||||
|
|
|
@ -34,6 +34,9 @@ declare var ResizeObserver;
|
|||
templateUrl: 'organization.component.html',
|
||||
})
|
||||
export class OrganizationComponent {
|
||||
public referrer: string;
|
||||
public prevPath: string;
|
||||
|
||||
@Input() piwikSiteId = null;
|
||||
@Input() communityId = null;
|
||||
|
||||
|
@ -167,6 +170,13 @@ export class OrganizationComponent {
|
|||
this.updateTitle("Organization");
|
||||
this.updateDescription("");
|
||||
|
||||
if(params["return_path"]) {
|
||||
this.prevPath = params["return_path"] + (params["search_params"] ? ("?"+params["search_params"]) : "");
|
||||
}
|
||||
if((typeof document !== 'undefined') && document.referrer) {
|
||||
this.referrer = document.referrer;
|
||||
}
|
||||
|
||||
this.organizationId = params['organizationId'];
|
||||
|
||||
if (this.organizationId && StringUtils.isOpenAIREID(this.organizationId)) {
|
||||
|
@ -805,4 +815,12 @@ export class OrganizationComponent {
|
|||
public scroll() {
|
||||
HelperFunctions.scroll();
|
||||
}
|
||||
|
||||
public get eoscBackLink() {
|
||||
if(this.prevPath && this.referrer && ((this.referrer == "https://eosc-search-service.grid.cyfronet.pl/") || (this.referrer == "https://beta.search.marketplace.eosc-portal.eu/") || (this.referrer == "https://search.marketplace.eosc-portal.eu/"))) {
|
||||
return this.referrer+this.prevPath;
|
||||
} else {
|
||||
return "https://"+(this.properties.environment == "beta" ? "beta." : "")+"search.marketplace.eosc-portal.eu/";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div *ngIf="properties.adminToolsPortalType == 'eosc'" class="eosc-explore-back-search-bar">
|
||||
<div class="uk-light uk-container uk-container-large uk-padding-small uk-height-1-1">
|
||||
<div class="uk-flex uk-flex-inline uk-flex-middle uk-height-1-1">
|
||||
<a href="https://search.marketplace.eosc-portal.eu/" target="_self" class="uk-link-reset uk-flex uk-flex-middle uk-text-light uk-text-small">
|
||||
<a [href]="eoscBackLink" target="_self" class="uk-link-reset uk-flex uk-flex-middle uk-text-light uk-text-small">
|
||||
<icon name="arrow_back" visuallyHidden="back" flex="true" ratio="0.7" customClass="uk-text-light"></icon>
|
||||
<span class="uk-margin-small-left">Go to Search</span>
|
||||
</a>
|
||||
|
@ -94,22 +94,19 @@
|
|||
</div>
|
||||
|
||||
<ng-template #graph_and_feedback_template>
|
||||
<div class="uk-flex uk-margin-small-top uk-margin-small-bottom" [class.uk-invisible]="!projectInfo">
|
||||
<div class="uk-flex uk-flex-between uk-flex-wrap uk-margin-small-bottom uk-margin-small-top" [class.uk-invisible]="!projectInfo">
|
||||
<!-- Last Index Info-->
|
||||
<div class="uk-width-2-3@m uk-width-1-2">
|
||||
<icon name="graph" customClass="text-graph"></icon>
|
||||
<span class="uk-margin-small-left uk-text-baseline">
|
||||
<span class="uk-text-meta">Powered by </span>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="text-graph">OpenAIRE Research Graph</a>
|
||||
</span>
|
||||
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-meta">
|
||||
. Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
</span>
|
||||
</div>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="uk-width-1-1 uk-width-auto@l">
|
||||
<img src="assets/common-assets/openaire-badge-1.png" alt="Powered by OpenAIRE graph" style="height: 15px;">
|
||||
</a>
|
||||
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-meta uk-width-1-1 uk-width-auto@l">
|
||||
Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
</span>
|
||||
|
||||
<!--Feedback-->
|
||||
<div *ngIf="properties.reCaptchaSiteKey" class="uk-width-expand uk-text-right">
|
||||
<span class="uk-text-meta uk-text-xsmall">See an issue?</span>
|
||||
<a (click)="showFeedback = true; scroll()" class="uk-text-xsmall"> Report it here</a>
|
||||
<div *ngIf="properties.reCaptchaSiteKey" class="uk-width-1-1 uk-width-auto@l">
|
||||
<span class="uk-text-meta uk-text-xsmall">Found an issue? </span>
|
||||
<a (click)="showFeedback = true; scroll()" class="uk-text-xsmall">Give us feedback</a>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
@ -394,7 +391,7 @@
|
|||
<search-tab [fetch]="fetchPublications" resultType="publication"
|
||||
[params]="getParamsForSearchLink('publications')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties">
|
||||
[properties]="properties" [prevPath]="prevPath">
|
||||
</search-tab>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@ -404,7 +401,7 @@
|
|||
<search-tab [fetch]="fetchDatasets" resultType="dataset"
|
||||
[params]="getParamsForSearchLink('datasets')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties">
|
||||
[properties]="properties" [prevPath]="prevPath">
|
||||
</search-tab>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@ -413,7 +410,7 @@
|
|||
<search-tab [fetch]="fetchSoftware" resultType="software"
|
||||
[params]="getParamsForSearchLink('software')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties">
|
||||
[properties]="properties" [prevPath]="prevPath">
|
||||
</search-tab>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
@ -422,16 +419,23 @@
|
|||
<search-tab [fetch]="fetchOrps" resultType="other"
|
||||
[params]="getParamsForSearchLink('other')"
|
||||
[searchLinkToAdvancedPage]="properties.searchLinkToAdvancedResults"
|
||||
[properties]="properties">
|
||||
[properties]="properties" [prevPath]="prevPath">
|
||||
</search-tab>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container>
|
||||
<div id="dmps" class="landing-section uk-padding uk-padding-remove-horizontal">
|
||||
<search-tab [fetch]="fetchDmps" customTitle="Data Management Plans"
|
||||
[properties]="properties" resultType="DMPs">
|
||||
[properties]="properties" resultType="DMPs" [prevPath]="prevPath">
|
||||
<div class="uk-margin-medium-top uk-margin-bottom uk-width-1-1 uk-flex uk-flex-center uk-flex-middle">
|
||||
<a *ngIf="fetchDmps.searchUtils.totalResults > 0" class="uk-button uk-button-text uk-margin-right"
|
||||
<a *ngIf="properties.adminToolsPortalType == 'eosc' && fetchDmps.searchUtils.totalResults > 0"
|
||||
class="uk-button uk-button-text uk-margin-right custom-external"
|
||||
[href]="'https://explore.openaire.eu'+properties.searchLinkToAdvancedResults+
|
||||
'?f0=relprojectid&fv0='+projectId+'&type=publications&instancetypename=Data Management Plan&qf=false&sortBy=resultdateofacceptance,descending'"
|
||||
target="_blank">
|
||||
View all in OpenAIRE
|
||||
</a>
|
||||
<a *ngIf="properties.adminToolsPortalType != 'eosc' && fetchDmps.searchUtils.totalResults > 0" class="uk-button uk-button-text uk-margin-right"
|
||||
[queryParams]="getParamsForSearchLink('publications', 'Data Management Plan')"
|
||||
[routerLink]="properties.searchLinkToAdvancedResults">
|
||||
View all
|
||||
|
@ -595,7 +599,7 @@
|
|||
[attr.uk-tooltip]="organization.acronym && organization.name ? 'pos:right; delay:10' : 'cls: uk-invisible'"
|
||||
[title]="organization.name">
|
||||
<a *ngIf="organization.id" class="uk-link-text"
|
||||
[queryParams]="{organizationId: organization.id}" routerLinkActive="router-link-active"
|
||||
[queryParams]="addEoscPrevInParams({organizationId: organization.id})" routerLinkActive="router-link-active"
|
||||
[routerLink]="properties.searchLinkToOrganization.split('?')[0]">
|
||||
{{(organization.acronym) ? organization.acronym : ''}}
|
||||
{{(!organization.acronym && organization.name) ? organization.name : ''}}
|
||||
|
|
|
@ -38,6 +38,9 @@ declare var ResizeObserver;
|
|||
})
|
||||
|
||||
export class ProjectComponent {
|
||||
public referrer: string;
|
||||
public prevPath: string;
|
||||
|
||||
@Input() piwikSiteId = null;
|
||||
@Input() communityId = null;
|
||||
public projectInfo: ProjectInfo;
|
||||
|
@ -210,6 +213,14 @@ export class ProjectComponent {
|
|||
|
||||
this.updateTitle(title);
|
||||
this.updateDescription(description);
|
||||
|
||||
if(params["return_path"]) {
|
||||
this.prevPath = params["return_path"] + (params["search_params"] ? ("?"+params["search_params"]) : "");
|
||||
}
|
||||
if((typeof document !== 'undefined') && document.referrer) {
|
||||
this.referrer = document.referrer;
|
||||
}
|
||||
|
||||
this.projectId = params['projectId'];
|
||||
var grantId = params['grantId'];
|
||||
var funder = params['funder'];
|
||||
|
@ -965,4 +976,23 @@ export class ProjectComponent {
|
|||
this.descriptionModal.alertTitle = "Description";
|
||||
this.descriptionModal.open();
|
||||
}
|
||||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
public get eoscBackLink() {
|
||||
if(this.prevPath && this.referrer && ((this.referrer == "https://eosc-search-service.grid.cyfronet.pl/") || (this.referrer == "https://beta.search.marketplace.eosc-portal.eu/") || (this.referrer == "https://search.marketplace.eosc-portal.eu/"))) {
|
||||
return this.referrer+this.prevPath;
|
||||
} else {
|
||||
return "https://"+(this.properties.environment == "beta" ? "beta." : "")+"search.marketplace.eosc-portal.eu/";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,8 @@ import {HelperFunctions} from "../../../utils/HelperFunctions.class";
|
|||
</no-load-paging>
|
||||
<ul class="uk-list uk-list-divider uk-margin">
|
||||
<li *ngFor="let result of results.slice((page-1)*pageSize, page*pageSize)">
|
||||
<result-preview [modal]="modal" [properties]="properties" [hasLink]="false" [result]="getResultPreview(result)" [showOrcid]="false" [isCard]="false"></result-preview>
|
||||
<result-preview [modal]="modal" [properties]="properties" [hasLink]="false" [result]="getResultPreview(result)"
|
||||
[showOrcid]="false" [isCard]="false" [prevPath]="prevPath"></result-preview>
|
||||
</li>
|
||||
</ul>
|
||||
<no-load-paging *ngIf="results.length > pageSize" [type]="type"
|
||||
|
@ -38,6 +39,7 @@ import {HelperFunctions} from "../../../utils/HelperFunctions.class";
|
|||
`
|
||||
})
|
||||
export class DeletedByInferenceComponent {
|
||||
@Input() prevPath: string = "";
|
||||
public results: ResultLandingInfo[] = [];
|
||||
@Input() id: string;
|
||||
@Input() ids: string[] = [];
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div *ngIf="properties.adminToolsPortalType == 'eosc'" class="eosc-explore-back-search-bar">
|
||||
<div class="uk-light uk-container uk-container-large uk-padding-small uk-height-1-1">
|
||||
<div class="uk-flex uk-flex-inline uk-flex-middle uk-height-1-1">
|
||||
<a href="https://search.marketplace.eosc-portal.eu/" target="_self" class="uk-link-reset uk-flex uk-flex-middle uk-text-light uk-text-small">
|
||||
<a [href]="eoscBackLink" target="_self" class="uk-link-reset uk-flex uk-flex-middle uk-text-light uk-text-small">
|
||||
<icon name="arrow_back" visuallyHidden="back" flex="true" ratio="0.7" customClass="uk-text-light"></icon>
|
||||
<span class="uk-margin-small-left">Go to Search</span>
|
||||
</a>
|
||||
|
@ -23,7 +23,8 @@
|
|||
[pageViews]="pageViews"
|
||||
[id]="id" [entityType]="'results'" [entity]="title"
|
||||
[viewsFrameUrl]="viewsFrameUrl" [downloadsFrameUrl]="downloadsFrameUrl"
|
||||
(metricsResults)="metricsResults($event)" [properties]=properties>
|
||||
(metricsResults)="metricsResults($event)" [properties]=properties
|
||||
[prevPath]="prevPath">
|
||||
</metrics>
|
||||
<altmetrics *ngIf="hasAltMetrics" id="{{resultLandingInfo.identifiers?.get('doi')[0]}}" type="doi"></altmetrics>
|
||||
</ng-container>
|
||||
|
@ -90,21 +91,18 @@
|
|||
</div>
|
||||
|
||||
<ng-template #graph_and_feedback_template>
|
||||
<div class="uk-flex uk-margin-small-bottom uk-margin-small-top" [class.uk-invisible]="!resultLandingInfo">
|
||||
<div class="uk-flex uk-flex-between uk-flex-wrap uk-margin-small-bottom uk-margin-small-top" [class.uk-invisible]="!resultLandingInfo">
|
||||
<!-- Last Index Info-->
|
||||
<div class="uk-width-2-3@m uk-width-1-2">
|
||||
<icon name="graph" customClass="text-graph"></icon>
|
||||
<span class="uk-margin-small-left uk-text-baseline">
|
||||
<span class="uk-text-meta">Powered by </span>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="text-graph">OpenAIRE Research Graph</a>
|
||||
</span>
|
||||
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-meta">
|
||||
. Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
</span>
|
||||
</div>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="uk-width-1-1 uk-width-auto@l">
|
||||
<img src="assets/common-assets/openaire-badge-1.png" alt="Powered by OpenAIRE graph" style="height: 15px;">
|
||||
</a>
|
||||
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-meta uk-width-1-1 uk-width-auto@l">
|
||||
Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}}
|
||||
</span>
|
||||
|
||||
<!--Feedback-->
|
||||
<div *ngIf="properties.reCaptchaSiteKey" class="uk-width-expand uk-text-right">
|
||||
<span class="uk-text-meta uk-text-xsmall">See an issue? </span>
|
||||
<div *ngIf="properties.reCaptchaSiteKey" class="uk-width-1-1 uk-width-auto@l">
|
||||
<span class="uk-text-meta uk-text-xsmall">Found an issue? </span>
|
||||
<a (click)="feedbackClicked()" class="uk-text-xsmall">Give us feedback</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -331,7 +329,7 @@
|
|||
[<a *ngIf="id.type !== 'openaire'" href="{{getReferenceUrl(id)}}"
|
||||
target="_blank">{{getReferenceIdName(id)}}</a>
|
||||
<a *ngIf="id.type === 'openaire'" [routerLink]="properties.searchLinkToResult.split('?')[0]"
|
||||
[queryParams]="{id: id.value}"
|
||||
[queryParams]="addEoscPrevInParams({id: id.value})"
|
||||
target="_blank">OpenAIRE</a>]
|
||||
</span>
|
||||
</ng-container>
|
||||
|
@ -466,7 +464,7 @@
|
|||
<img src="assets/common-assets/eosc-logo.png"
|
||||
loading="lazy" alt="eosc_logo" style="width:27px; height:27px">
|
||||
<div class="uk-margin-small-left uk-flex uk-flex-column uk-flex-center">
|
||||
<div *ngFor="let subject of resultLandingInfo.eoscSubjects; let i=index" class="uk-text-truncate">
|
||||
<div *ngFor="let subject of resultLandingInfo.eoscSubjects; let i=index" class="uk-text-truncate" uk-tooltip="This interoperability link will provide you with a list of services able to process it in EOSC.">
|
||||
<a [href]="subject.link" target="_blank" class="custom-external">{{subject.value}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -481,7 +479,8 @@
|
|||
</div>
|
||||
<!-- Funded By -->
|
||||
<div *ngIf="resultLandingInfo.fundedByProjects && resultLandingInfo.fundedByProjects.length > 0 && (!viewAll || viewAll=='fundedBy')">
|
||||
<fundedBy [fundedByProjects]="resultLandingInfo.fundedByProjects" [provenanceActionVocabulary]="provenanceActionVocabulary" (viewAllClicked)="viewAll=$event"></fundedBy>
|
||||
<fundedBy [fundedByProjects]="resultLandingInfo.fundedByProjects" [provenanceActionVocabulary]="provenanceActionVocabulary" (viewAllClicked)="viewAll=$event"
|
||||
[prevPath]="prevPath"></fundedBy>
|
||||
</div>
|
||||
<!-- Communities -->
|
||||
<div *ngIf="resultLandingInfo.contexts && resultLandingInfo.contexts.length > 0 && !noCommunities && (!viewAll || viewAll=='relatedTo')">
|
||||
|
@ -490,7 +489,7 @@
|
|||
</div>
|
||||
<!-- Download From -->
|
||||
<div *ngIf="resultLandingInfo.hostedBy_collectedFrom && resultLandingInfo.hostedBy_collectedFrom.length > 0 && (!viewAll || viewAll=='availableOn')">
|
||||
<availableOn [availableOn]="resultLandingInfo.hostedBy_collectedFrom" (viewAllClicked)="viewAll=$event"></availableOn>
|
||||
<availableOn [availableOn]="resultLandingInfo.hostedBy_collectedFrom" (viewAllClicked)="viewAll=$event" [prevPath]="prevPath"></availableOn>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
@ -508,22 +507,22 @@
|
|||
[id]="resultLandingInfo.record['result']['header']['dri:objIdentifier']"
|
||||
[ids]="resultLandingInfo.deletedByInferenceIds"
|
||||
[modal]="AlertModalDeletedByInference"
|
||||
[resultType]="type" [type]="openaireEntities.PUBLICATIONS"></deletedByInference>
|
||||
[resultType]="type" [type]="openaireEntities.PUBLICATIONS" [prevPath]="prevPath"></deletedByInference>
|
||||
<deletedByInference *ngIf="type == 'dataset' && deleteByInferenceOpened"
|
||||
[id]="resultLandingInfo.record['result']['header']['dri:objIdentifier']"
|
||||
[ids]="resultLandingInfo.deletedByInferenceIds"
|
||||
[modal]="AlertModalDeletedByInference"
|
||||
[resultType]="'dataset'" [type]="openaireEntities.DATASETS"></deletedByInference>
|
||||
[resultType]="'dataset'" [type]="openaireEntities.DATASETS" [prevPath]="prevPath"></deletedByInference>
|
||||
<deletedByInference *ngIf="type == 'software' && deleteByInferenceOpened"
|
||||
[id]="resultLandingInfo.record['result']['header']['dri:objIdentifier']"
|
||||
[ids]="resultLandingInfo.deletedByInferenceIds"
|
||||
[modal]="AlertModalDeletedByInference"
|
||||
[resultType]="type" [type]="openaireEntities.SOFTWARE"></deletedByInference>
|
||||
[resultType]="type" [type]="openaireEntities.SOFTWARE" [prevPath]="prevPath"></deletedByInference>
|
||||
<deletedByInference *ngIf="type == 'orp' && deleteByInferenceOpened"
|
||||
[id]="resultLandingInfo.record['result']['header']['dri:objIdentifier']"
|
||||
[ids]="resultLandingInfo.deletedByInferenceIds"
|
||||
[modal]="AlertModalDeletedByInference"
|
||||
[resultType]="'other'" [type]="openaireEntities.OTHER"></deletedByInference>
|
||||
[resultType]="'other'" [type]="openaireEntities.OTHER" [prevPath]="prevPath"></deletedByInference>
|
||||
</modal-alert>
|
||||
<modal-alert *ngIf="resultLandingInfo" #citeModal>
|
||||
<citeThis *ngIf="citeThisClicked" [result]="resultLandingInfo" [id]="id"
|
||||
|
@ -547,7 +546,7 @@
|
|||
<ng-template #organizations_template let-threshold="threshold">
|
||||
<ul class="uk-list organizations uk-margin-remove-top">
|
||||
<li *ngFor="let organization of resultLandingInfo.organizations.slice(0, threshold)" class="uk-tile uk-tile-default uk-padding-small">
|
||||
<a [routerLink]="properties.searchLinkToOrganization.split('?')[0]" [queryParams]="{organizationId: organization.id}" class="uk-link-text uk-text-bold">
|
||||
<a [routerLink]="properties.searchLinkToOrganization.split('?')[0]" [queryParams]="addEoscPrevInParams({organizationId: organization.id})" class="uk-link-text uk-text-bold">
|
||||
{{(organization.name ? organization.name : (organization.shortname?organization.shortname:'[No title available]'))}}
|
||||
<span *ngIf="!organization.name && organization.shortname">({{organization.shortname}})</span>
|
||||
</a>
|
||||
|
@ -576,7 +575,7 @@
|
|||
<result-preview [modal]="relationModal" [properties]="properties"
|
||||
[result]="getResultPreview(item)" [provenanceActionVocabulary]="provenanceActionVocabulary"
|
||||
[relationsVocabulary]="relationsVocabulary"
|
||||
[isCard]="false"></result-preview>
|
||||
[isCard]="false" [prevPath]="prevPath"></result-preview>
|
||||
</li>
|
||||
</ul>
|
||||
<paging-no-load *ngIf="researchResults.length > pageSize"
|
||||
|
|
|
@ -33,6 +33,9 @@ declare var ResizeObserver;
|
|||
templateUrl: 'resultLanding.component.html',
|
||||
})
|
||||
export class ResultLandingComponent {
|
||||
public referrer: string;
|
||||
public prevPath: string;
|
||||
|
||||
@Input() type: string = "publication";
|
||||
@Input() piwikSiteId = properties.piwikSiteId;
|
||||
@Input() communityId = null;
|
||||
|
@ -205,6 +208,12 @@ export class ResultLandingComponent {
|
|||
this.egiTransferModalOpen = true;
|
||||
}
|
||||
this.updateDescription("");
|
||||
if(data["return_path"]) {
|
||||
this.prevPath = data["return_path"] + (data["search_params"] ? ("?"+data["search_params"]) : "");
|
||||
}
|
||||
if((typeof document !== 'undefined') && document.referrer) {
|
||||
this.referrer = document.referrer;
|
||||
}
|
||||
|
||||
this.metricsClicked = false;
|
||||
if(this.resultFromInput){
|
||||
|
@ -713,7 +722,7 @@ export class ResultLandingComponent {
|
|||
}
|
||||
if(!this.identifier) {
|
||||
this._location.go(( pid ? (this.linkToLandingPage.split("?")[0] + "?pid=" + pid.id):
|
||||
(this.linkToLandingPage + this.id)));
|
||||
(this.linkToLandingPage + this.id)) + this.getEoscParams());
|
||||
}
|
||||
// else {
|
||||
// this._location.go(this.linkToLandingPage.split("?")[0] + "?pid=" + this.identifier.id);
|
||||
|
@ -913,4 +922,36 @@ export class ResultLandingComponent {
|
|||
this.descriptionModal.alertTitle = "Abstract";
|
||||
this.descriptionModal.open();
|
||||
}
|
||||
|
||||
public getEoscParams() {
|
||||
let params = "";
|
||||
if(this.prevPath) {
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
params = "&return_path="+StringUtils.URIEncode(splitted[0]);
|
||||
if(splitted.length > 0) {
|
||||
params += "&search_params="+StringUtils.URIEncode(splitted[1]);
|
||||
}
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
public get eoscBackLink() {
|
||||
if(this.prevPath && this.referrer && ((this.referrer == "https://eosc-search-service.grid.cyfronet.pl/") || (this.referrer == "https://beta.search.marketplace.eosc-portal.eu/") || (this.referrer == "https://search.marketplace.eosc-portal.eu/"))) {
|
||||
return this.referrer+this.prevPath;
|
||||
} else {
|
||||
return "https://"+(this.properties.environment == "beta" ? "beta." : "")+"search.marketplace.eosc-portal.eu/";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ export class UserComponent {
|
|||
this.loginUrl = this.properties.loginUrl;
|
||||
if (typeof document !== 'undefined') {
|
||||
this.server = false;
|
||||
this.userManagementsService.updateUserInfo(() => {
|
||||
this.userManagementsService.updateUserInfo( () => {
|
||||
this.user = this.userManagementsService.user;
|
||||
this.loggedIn = !!this.user;
|
||||
this.errorMessage = "";
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
import {Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges} from '@angular/core';
|
||||
import {Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Session, User} from './utils/helper.class';
|
||||
import {RouterHelper} from '../utils/routerHelper.class';
|
||||
import {Subscriber} from "rxjs";
|
||||
import {MenuItem} from "../sharedComponents/menu";
|
||||
import {UserManagementService} from "../services/user-management.service";
|
||||
import {
|
||||
NotificationConfiguration,
|
||||
NotificationsSidebarComponent
|
||||
} from "../notifications/notifications-sidebar/notifications-sidebar.component";
|
||||
|
||||
declare var UIkit;
|
||||
|
||||
@Component({
|
||||
selector: 'user-mini',
|
||||
|
@ -25,6 +31,7 @@ import {UserManagementService} from "../services/user-management.service";
|
|||
<ul class="uk-nav uk-navbar-dropdown-nav">
|
||||
<ng-container *ngFor="let item of userMenuItems ">
|
||||
<li *ngIf="item.needsAuthorization && isAuthorized || !item.needsAuthorization"
|
||||
[ngClass]="item.customClass"
|
||||
[class.uk-active]="isTheActiveSubMenu(item)">
|
||||
<a *ngIf="item.route" [routerLink]="item.route"
|
||||
[queryParams]="item.params">{{item.title}}</a>
|
||||
|
@ -41,42 +48,67 @@ import {UserManagementService} from "../services/user-management.service";
|
|||
<icon name="login" ratio="1.5" [flex]="true"></icon>
|
||||
</a>
|
||||
<a *ngIf="loggedIn && mobileView" href="#account" class="login uk-icon" uk-toggle>
|
||||
<svg height="30" width="30">
|
||||
<circle cx="15" cy="15" r="15" stroke-width="2"></circle>
|
||||
<text x="50%" y="50%" text-anchor="middle" dy=".35em" font-size="14">
|
||||
{{firstLetters ? firstLetters : 'AN'}}
|
||||
</text>
|
||||
</svg>
|
||||
<span class="uk-position-relative">
|
||||
<svg height="30" width="30">
|
||||
<circle cx="15" cy="15" r="15" stroke-width="2"></circle>
|
||||
<text x="50%" y="50%" text-anchor="middle" dy=".35em" font-size="14">
|
||||
{{firstLetters ? firstLetters : 'AN'}}
|
||||
</text>
|
||||
</svg>
|
||||
<span *ngIf="notificationsSidebar?.unreadCount > 0" class="uk-text-secondary notification">
|
||||
<icon name="circle" ratio="0.8"></icon>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
<div *ngIf="loggedIn" id="account" class="uk-offcanvas" uk-offcanvas="flip: true; overlay: true">
|
||||
<div class="uk-offcanvas-bar uk-padding-remove-horizontal">
|
||||
<button class="uk-offcanvas-close uk-icon uk-close">
|
||||
<icon name="close" ratio="1.5" visuallyHidden="close menu"></icon>
|
||||
</button>
|
||||
<div class="uk-padding uk-flex uk-flex-middle">
|
||||
<div class="login">
|
||||
<svg height="60" width="60" style="max-width: 60px; height: 60px;">
|
||||
<circle cx="30" cy="30" r="20" stroke-width="2"></circle>
|
||||
<text x="50%" y="50%" text-anchor="middle" dy=".4em" font-size="16">
|
||||
{{firstLetters ? firstLetters : 'AN'}}
|
||||
</text>
|
||||
</svg>
|
||||
<div *ngIf="loggedIn" #account id="account" class="uk-offcanvas" uk-offcanvas="flip: true; overlay: true;">
|
||||
<div class="uk-offcanvas-bar uk-padding-remove">
|
||||
<nav class="uk-navbar uk-background-default" uk-sticky>
|
||||
<div class="uk-navbar-right">
|
||||
<button class="uk-navbar-toggle uk-icon uk-close" (click)="closeCanvas(account)">
|
||||
<icon name="close" ratio="1.5" visuallyHidden="close account"></icon>
|
||||
</button>
|
||||
</div>
|
||||
<h5 class="uk-margin-small-left uk-margin-remove-bottom uk-margin-remove-top uk-text-truncate">
|
||||
{{user.fullname}}
|
||||
</h5>
|
||||
</div>
|
||||
<ul class="uk-nav uk-nav-primary uk-list uk-margin-top uk-nav-parent-icon" uk-nav>
|
||||
<ng-container *ngFor="let item of userMenuItems ">
|
||||
<li *ngIf="item.needsAuthorization && isAuthorized || !item.needsAuthorization">
|
||||
<a *ngIf="item.route" [routerLink]="item.route" (click)="closeCanvas()">{{item.title}}</a>
|
||||
<a *ngIf="!item.route && item.url" (click)="closeCanvas()" [href]="item.url" [class.custom-external]="item.target != '_self'"
|
||||
[target]="item.target">{{item.title}}</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
<li *ngIf="userMenuItems.length > 0" class="uk-nav-divider"></li>
|
||||
<li><a (click)="logOut()">Log out</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<ng-container *ngIf="!showNotifications">
|
||||
<div class="uk-padding uk-padding-remove-top uk-flex uk-flex-middle">
|
||||
<div class="login">
|
||||
<svg height="60" width="60" style="max-width: 60px; height: 60px;">
|
||||
<circle cx="30" cy="30" r="20" stroke-width="2"></circle>
|
||||
<text x="50%" y="50%" text-anchor="middle" dy=".4em" font-size="16">
|
||||
{{firstLetters ? firstLetters : 'AN'}}
|
||||
</text>
|
||||
</svg>
|
||||
</div>
|
||||
<h5 class="uk-margin-small-left uk-margin-remove-bottom uk-margin-remove-top uk-text-truncate">
|
||||
{{user.fullname}}
|
||||
</h5>
|
||||
</div>
|
||||
<ul class="uk-nav uk-nav-primary uk-list uk-margin-top uk-nav-parent-icon" uk-nav>
|
||||
<ng-container *ngFor="let item of userMenuItems ">
|
||||
<li *ngIf="item.needsAuthorization && isAuthorized || !item.needsAuthorization" [ngClass]="item.customClass">
|
||||
<a *ngIf="item.route" [routerLink]="item.route" (click)="closeCanvas(account)">{{item.title}}</a>
|
||||
<a *ngIf="!item.route && item.url" (click)="closeCanvas(account)" [href]="item.url" [class.custom-external]="item.target != '_self'"
|
||||
[target]="item.target">{{item.title}}</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="notificationConfiguration">
|
||||
<li *ngIf="userMenuItems.length > 0" class="uk-nav-divider"></li>
|
||||
<li *ngIf="notificationConfiguration">
|
||||
<a (click)="toggleNotifications()">
|
||||
<div class="uk-flex uk-flex-middle uk-width-1-1">
|
||||
<span class="uk-width-expand">Notifications</span>
|
||||
<icon *ngIf="notificationsSidebar?.unreadCount > 0" class="uk-margin-small-left uk-text-secondary uk-margin-right" name="circle" [flex]="true" ratio="0.8"></icon>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
<li *ngIf="userMenuItems.length > 0" class="uk-nav-divider"></li>
|
||||
<li><a (click)="logOut()">Log out</a></li>
|
||||
</ul>
|
||||
</ng-container>
|
||||
<notification-sidebar [class.uk-hidden]="!showNotifications" #notificationsSidebar *ngIf="notificationConfiguration" [mobile]="true"
|
||||
(showNotificationsEmitter)="showNotifications = $event"
|
||||
[configuration]="notificationConfiguration" [user]="user"></notification-sidebar>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -95,7 +127,9 @@ export class UserMiniComponent implements OnInit, OnChanges {
|
|||
@Input() logInUrl;
|
||||
@Input() logOutUrl;
|
||||
@Input() cookieDomain;
|
||||
@Output() closeCanvasEmitter: EventEmitter<boolean> = new EventEmitter<boolean>();
|
||||
@Input() notificationConfiguration: NotificationConfiguration;
|
||||
@ViewChild('notificationsSidebar') notificationsSidebar: NotificationsSidebarComponent;
|
||||
public showNotifications = false;
|
||||
private subscriptions = [];
|
||||
|
||||
constructor(private router: Router, private route: ActivatedRoute, private userManagementService: UserManagementService) {
|
||||
|
@ -122,8 +156,8 @@ export class UserMiniComponent implements OnInit, OnChanges {
|
|||
});
|
||||
}
|
||||
|
||||
closeCanvas() {
|
||||
this.closeCanvasEmitter.emit(true);
|
||||
closeCanvas(canvas) {
|
||||
UIkit.offcanvas(canvas).hide();
|
||||
}
|
||||
|
||||
initUser() {
|
||||
|
@ -166,4 +200,8 @@ export class UserMiniComponent implements OnInit, OnChanges {
|
|||
this.firstLetters += matches.join('');
|
||||
}
|
||||
}
|
||||
|
||||
toggleNotifications() {
|
||||
this.showNotifications = !this.showNotifications;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,10 +7,11 @@ import {UserMiniComponent} from "./userMini.component";
|
|||
import {IconsModule} from "../utils/icons/icons.module";
|
||||
import {IconsService} from "../utils/icons/icons.service";
|
||||
import {login} from "../utils/icons/icons";
|
||||
import {NotificationsSidebarModule} from "../notifications/notifications-sidebar/notifications-sidebar.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule, IconsModule
|
||||
CommonModule, FormsModule, RouterModule, IconsModule, NotificationsSidebarModule
|
||||
],
|
||||
declarations: [
|
||||
UserMiniComponent
|
||||
|
|
|
@ -165,6 +165,7 @@ export class Indicator {
|
|||
visibility: Visibility;
|
||||
defaultId: string;
|
||||
indicatorPaths: IndicatorPath[];
|
||||
descriptionOverlay: boolean = false;
|
||||
|
||||
constructor(name: string, description: string, additionalDescription:string, type: IndicatorType, width: IndicatorSize,height: IndicatorSize, visibility: Visibility, indicatorPaths: IndicatorPath[], defaultId: string = null) {
|
||||
this._id = null;
|
||||
|
|
|
@ -1,299 +0,0 @@
|
|||
@import "~src/assets/openaire-theme/less/_import-variables";
|
||||
|
||||
@media only screen and (min-width: @breakpoint-small) {
|
||||
.how .first > div:first-child {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.how .first > div:first-child:after {
|
||||
content: "we";
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
padding-bottom: 5%;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/1.svg");
|
||||
right: -21%;
|
||||
top: 33%;
|
||||
width: 20%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom center;
|
||||
}
|
||||
|
||||
.how .second > div:first-child {
|
||||
position: relative;
|
||||
padding: 0 10% 0 20%;
|
||||
}
|
||||
|
||||
.how .second > div:first-child:after {
|
||||
content: "and";
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
padding-bottom: 5%;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/2.svg");
|
||||
right: -17%;
|
||||
top: 33%;
|
||||
width: 30%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom center;
|
||||
}
|
||||
|
||||
.how .third {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.how .third > div:first-child {
|
||||
padding: 0 14% 0 13%;
|
||||
}
|
||||
|
||||
.how .third:after {
|
||||
content: "on which";
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
padding-right: 30%;
|
||||
padding-top: 5%;
|
||||
padding-bottom: 5%;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/3.svg");
|
||||
bottom: -6%;
|
||||
left: 13%;
|
||||
transform: translateY(100%);
|
||||
width: 140px;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.how .fourth {
|
||||
padding: 10% 3% 0 3%;
|
||||
}
|
||||
|
||||
.how .fourth > div:first-child {
|
||||
position: relative;
|
||||
padding: 0 16% 0 16%;
|
||||
}
|
||||
|
||||
.how .fourth> div:first-child:after {
|
||||
content: "and";
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
padding-bottom: 5%;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/4.svg");
|
||||
left: -18%;
|
||||
top: 36%;
|
||||
width: 30%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom center;
|
||||
}
|
||||
|
||||
.how .fifth {
|
||||
padding: 11% 2% 0 2%;
|
||||
}
|
||||
|
||||
.how .fifth > div:first-child {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.how .fifth > div:first-child:after {
|
||||
content: "We";
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
padding-bottom: 5%;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/5.svg");
|
||||
left: -35%;
|
||||
top: 36%;
|
||||
width: 30%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom center;
|
||||
}
|
||||
|
||||
.how .sixth {
|
||||
padding: 10% 5% 0 0;
|
||||
}
|
||||
|
||||
.how .sixth > div:first-child {
|
||||
padding: 0 15% 0 15%;
|
||||
}
|
||||
|
||||
.how .final {
|
||||
padding: 10% 20% 0 20%;
|
||||
}
|
||||
|
||||
.how .final > div:first-child {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.how .final > div:first-child:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/6.svg");
|
||||
left: -26%;
|
||||
top: -20%;
|
||||
height: 70%;
|
||||
width: 30%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom center;
|
||||
}
|
||||
|
||||
.how .final > div:first-child:after {
|
||||
content: "We make visualizations, graphs, reports and deliver all in a customisable tool";
|
||||
font-size: 20px;
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
width: 250px;
|
||||
padding: 8% 0 5% 0;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom center;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: @breakpoint-xsmall-max) {
|
||||
.how .first {
|
||||
position: relative;
|
||||
padding-bottom: 30%;
|
||||
}
|
||||
|
||||
.how .first:after {
|
||||
content: "we";
|
||||
text-align: center;
|
||||
padding: 10% 34% 10% 0;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/3.svg");
|
||||
left: 26%;
|
||||
top: 79%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.how .second {
|
||||
position: relative;
|
||||
padding: 0 10% 30% 10%;
|
||||
}
|
||||
|
||||
.how .second:after {
|
||||
content: "and";
|
||||
text-align: center;
|
||||
padding: 10% 34% 10% 0;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/3.svg");
|
||||
left: 25%;
|
||||
top: 80%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.how .third {
|
||||
position: relative;
|
||||
padding: 0 5% 30% 5%;
|
||||
}
|
||||
|
||||
.how .third:after {
|
||||
content: "on which";
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
padding: 10% 41% 10% 0;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/3.svg");
|
||||
left: 15%;
|
||||
top: 83%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.how .fourth {
|
||||
position: relative;
|
||||
padding: 0 0 30% 0;
|
||||
}
|
||||
|
||||
.how .fourth > div:first-child {
|
||||
padding: 0 10% 0 10%;
|
||||
}
|
||||
|
||||
.how .fourth:after {
|
||||
content: "and";
|
||||
text-align: center;
|
||||
padding: 10% 34% 10% 0;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/3.svg");
|
||||
left: 26%;
|
||||
top: 79%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.how .fifth {
|
||||
position: relative;
|
||||
padding: 0 2% 30% 2%;
|
||||
}
|
||||
|
||||
.how .fifth:after {
|
||||
content: "We";
|
||||
text-align: center;
|
||||
padding: 10% 34% 10% 0;
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/3.svg");
|
||||
left: 27%;
|
||||
top: 76%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.how .sixth {
|
||||
padding: 0 5% 30% 0;
|
||||
}
|
||||
|
||||
.how .sixth > div:first-child {
|
||||
padding: 0 15% 0 15%;
|
||||
}
|
||||
|
||||
.how .final {
|
||||
padding: 20% 0 20% 0;
|
||||
}
|
||||
|
||||
.how .final > div:first-child {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.how .final > div:first-child:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
background-image: url("~src/assets/common-assets/monitor-assets/green-arrows/6.svg");
|
||||
left: 34%;
|
||||
top: -70%;
|
||||
height: 70%;
|
||||
width: 30%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.how .final > div:first-child:after {
|
||||
content: "We make visualizations, graphs, reports and deliver all in a customisable tool";
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
left: -62%;
|
||||
top: 85%;
|
||||
width: 300px;
|
||||
padding: 12% 0 0 54%;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
import {Component} from "@angular/core";
|
||||
|
||||
@Component({
|
||||
selector: 'how',
|
||||
template: `
|
||||
<div class="how" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-fade; delay: 100">
|
||||
<div class="uk-flex uk-flex-wrap">
|
||||
<div class="uk-width-1-3@s first" uk-scrollspy-class>
|
||||
<div>
|
||||
<img src="assets/common-assets/monitor-assets/how/1.png" loading="lazy">
|
||||
</div>
|
||||
<div class="uk-text-center uk-text-large">
|
||||
<span class="uk-text-uppercase uk-text-bold">Starting</span> from existing<br>research-related data sources
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-3@s second" uk-scrollspy-class>
|
||||
<div>
|
||||
<img src="assets/common-assets/monitor-assets/how/2.png" loading="lazy">
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-3@s third" uk-scrollspy-class>
|
||||
<div>
|
||||
<img src="assets/common-assets/monitor-assets/how/3.png" loading="lazy">
|
||||
</div>
|
||||
<div class="uk-text-center uk-text-large">
|
||||
build an open, global<br>and trusted Research graph
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-flex uk-flex-wrap">
|
||||
<div class="uk-width-1-3@s fourth uk-flex-last@s" uk-scrollspy-class>
|
||||
<div>
|
||||
<img src="assets/common-assets/monitor-assets/how/4.png" loading="lazy">
|
||||
</div>
|
||||
<div class="uk-text-center">
|
||||
we perform <span class="uk-text-uppercase uk-text-bold">Statistical <br> Analysis</span> and produce <br>
|
||||
<span class="uk-text-primary">Open Science Indicators</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-3@s fifth" uk-scrollspy-class>
|
||||
<div>
|
||||
<img src="assets/common-assets/monitor-assets/how/5.png" loading="lazy">
|
||||
</div>
|
||||
<div class="uk-text-center">
|
||||
furthermore <span class="uk-text-uppercase uk-text-bold">Network<br>Analysis</span> producing <br>
|
||||
<span class="uk-text-primary">Collaboration Indicators</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-3@s sixth uk-flex-first@s" uk-scrollspy-class>
|
||||
<div>
|
||||
<img src="assets/common-assets/monitor-assets/how/6.png" loading="lazy">
|
||||
</div>
|
||||
<div class="uk-text-center">
|
||||
Often combine with external data <br>
|
||||
(patents, social, company) and
|
||||
perform <br><span class="uk-text-uppercase uk-text-bold">Impact Analysis</span> to
|
||||
produce <br><span class="uk-text-primary">Innovation Indicators</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="final" uk-scrollspy-class>
|
||||
<div>
|
||||
<img src="assets/common-assets/monitor-assets/how/7.png" loading="lazy">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
styleUrls: ['how.component.less']
|
||||
})
|
||||
export class HowComponent {
|
||||
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
import {NgModule} from "@angular/core";
|
||||
import {CommonModule} from "@angular/common";
|
||||
import {HowComponent} from "./how.component";
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule],
|
||||
declarations: [HowComponent],
|
||||
exports: [HowComponent]
|
||||
})
|
||||
export class HowModule {
|
||||
|
||||
}
|
|
@ -26,7 +26,7 @@ import {Subscriber} from "rxjs";
|
|||
<div>
|
||||
<h5>Indicator themes that we are covering in the Monitor dashboards.</h5>
|
||||
<p>
|
||||
This is the current set of indicator themes we cover. We’ll keep enriching it as new requests and data are coming into the <a href="https://graph.openaire.eu" class="text-graph" target="_blank">OpenAIRE Research Graph</a>. We are at your disposal, should you have any recommendations!
|
||||
This is the current set of indicator themes we cover. We’ll keep enriching it as new requests and data are coming into the <a href="https://graph.openaire.eu" class="text-graph" target="_blank">OpenAIRE Graph</a>. We are at your disposal, should you have any recommendations!
|
||||
</p>
|
||||
<p>
|
||||
Check out the indicator pages (for <a [routerLink]="['../funder']" [relativeTo]="route">funders</a>,
|
||||
|
@ -50,7 +50,7 @@ import {Subscriber} from "rxjs";
|
|||
<div>
|
||||
<h5 class="uk-margin-large-top uk-margin-large-bottom">Indicator themes that we are covering in the Monitor dashboards.</h5>
|
||||
<p>
|
||||
This is the current set of indicator themes we cover. We’ll keep enriching it as new requests and data are coming into the <a href="https://graph.openaire.eu" class="text-graph" target="_blank">OpenAIRE Research Graph</a>. We are at your disposal, should you have any recommendations!
|
||||
This is the current set of indicator themes we cover. We’ll keep enriching it as new requests and data are coming into the <a href="https://graph.openaire.eu" class="text-graph" target="_blank">OpenAIRE Graph</a>. We are at your disposal, should you have any recommendations!
|
||||
</p>
|
||||
<p>
|
||||
Check out the indicator pages (for <a [routerLink]="['../funder']" [relativeTo]="route">funders</a>,
|
||||
|
|
|
@ -32,7 +32,7 @@ import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
|
|||
</li>
|
||||
<li><span class="uk-text-bold">Coverage and accuracy:</span> As detailed in <a
|
||||
href="https://graph.openaire.eu/" target="_blank">graph.openaire.eu</a>
|
||||
multiple data sources are ingested in the OpenAIRE research graph for coverage to the fullest extent
|
||||
multiple data sources are ingested in the OpenAIRE Graph for coverage to the fullest extent
|
||||
possible, in order to provide meaningful indicators.
|
||||
</li>
|
||||
<li><span class="uk-text-bold">Clarity and replicability:</span> We describe our construction methodology in
|
||||
|
@ -69,7 +69,7 @@ import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
|
|||
<h2 class="uk-margin-small-top">How? It’s about open data and collaboration<span class="text-graph">.</span></h2>
|
||||
<ul class="uk-list uk-list-bullet uk-margin-large-top">
|
||||
<li class="uk-flex uk-flex-column uk-margin-medium-bottom">
|
||||
<span class="uk-text-large uk-margin-small-bottom">Built on the <span class="uk-text-bold">OpenAire Research Graph</span></span>
|
||||
<span class="uk-text-large uk-margin-small-bottom">Built on the <span class="uk-text-bold">OpenAire Graph</span></span>
|
||||
<span>Linked scholarly information from open initiatives around the world. Beyond publications.</span>
|
||||
</li>
|
||||
<li class="uk-flex uk-flex-column uk-margin-medium-bottom">
|
||||
|
@ -84,7 +84,7 @@ import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
|
|||
</div>
|
||||
</div>
|
||||
<div class="uk-position-relative">
|
||||
<img class="uk-visible@m uk-height-1-1 uk-position-center-right" src="assets/common-assets/common/graph-nodes.svg" alt="OpenAIRE Research Graph" loading="lazy">
|
||||
<img class="uk-visible@m uk-height-1-1 uk-position-center-right" src="assets/common-assets/common/graph-nodes.svg" alt="OpenAIRE Graph" loading="lazy">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -105,7 +105,7 @@ import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
|
|||
</li>
|
||||
<li class="uk-margin-small-bottom"><span class="uk-text-bold">Coverage and accuracy:</span> As detailed in <a
|
||||
href="https://graph.openaire.eu/" target="_blank">graph.openaire.eu</a>
|
||||
multiple data sources are ingested in the OpenAIRE research graph for coverage to the fullest extent
|
||||
multiple data sources are ingested in the OpenAIRE Graph for coverage to the fullest extent
|
||||
possible, in order to provide meaningful indicators.
|
||||
</li>
|
||||
<li class="uk-margin-small-bottom"><span class="uk-text-bold">Clarity and replicability:</span> We describe our construction methodology in
|
||||
|
@ -131,7 +131,7 @@ import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
|
|||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-xlarge-top uk-padding-large">
|
||||
<img src="assets/common-assets/common/graph-nodes.svg" alt="OpenAIRE Research Graph" loading="lazy">
|
||||
<img src="assets/common-assets/common/graph-nodes.svg" alt="OpenAIRE Graph" loading="lazy">
|
||||
</div>
|
||||
<div class="uk-margin-top uk-margin-large-bottom">
|
||||
<span class="uk-text-large text-graph">Completeness, inclusion, transparency and replicability</span>
|
||||
|
@ -139,7 +139,7 @@ import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
|
|||
<h2 class="uk-margin-remove-top uk-padding uk-padding-remove-vertical uk-padding-remove-left">It’s about open data and collaboration<span class="text-graph">.</span></h2>
|
||||
<ul class="uk-list uk-list-bullet uk-margin-large-top">
|
||||
<li class="uk-flex uk-flex-column uk-margin-medium-bottom">
|
||||
<span class="uk-text-large uk-margin-small-bottom">Built on the <span class="uk-text-bold">OpenAire Research Graph</span></span>
|
||||
<span class="uk-text-large uk-margin-small-bottom">Built on the <span class="uk-text-bold">OpenAire Graph</span></span>
|
||||
<span>Linked scholarly information from open initiatives around the world. Beyond publications.</span>
|
||||
</li>
|
||||
<li class="uk-flex uk-flex-column uk-margin-medium-bottom">
|
||||
|
|
|
@ -5,10 +5,7 @@ import {MethodolocigalApproachComponent} from "./methodological-approach.compone
|
|||
import {RouterModule} from "@angular/router";
|
||||
import {PreviousRouteRecorder} from "../../utils/piwik/previousRouteRecorder.guard";
|
||||
import {PageContentModule} from "../../dashboard/sharedComponents/page-content/page-content.module";
|
||||
import {HowModule} from "../how/how.module";
|
||||
import {IconsModule} from "../../utils/icons/icons.module";
|
||||
import {IconsService} from "../../utils/icons/icons.service";
|
||||
import {graph} from "../../utils/icons/icons";
|
||||
import {BreadcrumbsModule} from "../../utils/breadcrumbs/breadcrumbs.module";
|
||||
import {SliderTabsModule} from "../../sharedComponents/tabs/slider-tabs.module";
|
||||
import {HelperModule} from "../../utils/helper/helper.module";
|
||||
|
@ -32,11 +29,8 @@ import {HelperModule} from "../../utils/helper/helper.module";
|
|||
component: MethodolocigalApproachComponent,
|
||||
canDeactivate: [PreviousRouteRecorder]
|
||||
}
|
||||
]), PageContentModule, HowModule, IconsModule, BreadcrumbsModule, SliderTabsModule, HelperModule],
|
||||
]), PageContentModule, IconsModule, BreadcrumbsModule, SliderTabsModule, HelperModule],
|
||||
exports: [TerminologyComponent, MethodolocigalApproachComponent]
|
||||
})
|
||||
export class MethodologyModule {
|
||||
constructor(private iconsService: IconsService) {
|
||||
this.iconsService.registerIcons([graph]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
.uk-width-medium {
|
||||
width: 350px;
|
||||
}
|
|
@ -42,15 +42,14 @@ declare var ResizeObserver;
|
|||
<div id="graph_element" #graph_element class="uk-blur-background" uk-sticky="bottom: true"
|
||||
[attr.offset]="graph_offset">
|
||||
<div class="uk-container uk-container-large uk-margin-small-top uk-margin-small-bottom">
|
||||
<icon name="graph" customClass="text-graph"></icon>
|
||||
<span class="uk-margin-small-left uk-text-meta">More information for </span>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="text-graph">OpenAIRE Research Graph</a>
|
||||
<span class="uk-text-meta">.</span>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="uk-width-1-1 uk-width-auto@m">
|
||||
<img src="assets/common-assets/openaire-badge-1.png" alt="Powered by OpenAIRE graph" style="height: 17px;">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-section uk-container uk-container-large" uk-scrollspy-class>
|
||||
<div id="parentContainer" class="uk-grid uk-grid-large" uk-grid>
|
||||
<div class="uk-width-1-4 uk-margin-top">
|
||||
<div class="uk-width-medium uk-margin-top">
|
||||
<div class="uk-sticky" uk-sticky="bottom: !#parentContainer; offset: 100;">
|
||||
<slider-tabs type="scrollable" position="left">
|
||||
<slider-tab tabId="entities" tabTitle="1. Entities"></slider-tab>
|
||||
|
@ -87,10 +86,9 @@ declare var ResizeObserver;
|
|||
<div id="graph_element" #graph_element class="uk-blur-background" uk-sticky="bottom: true"
|
||||
[attr.offset]="graph_offset">
|
||||
<div class="uk-container uk-container-large uk-margin-small-top uk-margin-small-bottom uk-text-xsmall uk-text-right">
|
||||
<icon name="graph" customClass="text-graph"></icon>
|
||||
<span class="uk-margin-small-left uk-text-meta">More information for </span>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="text-graph">OpenAIRE Research Graph</a>
|
||||
<span class="uk-text-meta">.</span>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="uk-width-1-1 uk-width-auto@m">
|
||||
<img src="assets/common-assets/openaire-badge-1.png" alt="Powered by OpenAIRE graph" style="height: 17px;">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -116,7 +114,8 @@ declare var ResizeObserver;
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
`,
|
||||
styleUrls: ['terminology.component.less']
|
||||
})
|
||||
export class TerminologyComponent implements OnInit, OnDestroy, AfterViewInit, AfterContentChecked {
|
||||
public tab: 'entities' | 'attributes' = 'entities';
|
||||
|
|
|
@ -58,7 +58,10 @@ export class StakeholderService {
|
|||
}
|
||||
|
||||
async getStakeholderAsync() {
|
||||
await this.promise;
|
||||
if(this.promise) {
|
||||
await this.promise;
|
||||
this.promise = null;
|
||||
}
|
||||
this.clearSubscriptions();
|
||||
return this.stakeholderSubject.getValue();
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
}
|
||||
|
||||
#notifications .notification-list {
|
||||
padding: @global-medium-gutter 0 @global-medium-gutter @global-medium-gutter;
|
||||
padding: 0 @global-medium-gutter;
|
||||
}
|
||||
|
||||
#notifications .notification-list:not(:last-child) {
|
||||
|
@ -17,7 +17,7 @@
|
|||
#notifications .notification-list ul {
|
||||
overflow: auto;
|
||||
padding: 20px @global-medium-gutter 20px 0;
|
||||
height: calc(100% - 104px);
|
||||
height: calc(100% - 150px);
|
||||
}
|
||||
|
||||
#notifications .notification-list ul > li:nth-child(n+2){
|
||||
|
@ -29,6 +29,6 @@
|
|||
}
|
||||
|
||||
#notifications .notification {
|
||||
padding: @global-medium-gutter @global-medium-gutter;
|
||||
padding: 0 @global-medium-gutter @global-medium-gutter @global-medium-gutter;
|
||||
overflow: auto;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
import {Component, Input, OnDestroy, OnInit, ViewEncapsulation} from "@angular/core";
|
||||
import {
|
||||
Component,
|
||||
ElementRef,
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
Output,
|
||||
ViewChild,
|
||||
ViewEncapsulation
|
||||
} from "@angular/core";
|
||||
import {Notification} from "../notifications";
|
||||
import {NotificationService} from "../notification.service";
|
||||
import {Subscription} from "rxjs";
|
||||
|
@ -8,71 +18,92 @@ import {Option} from "../../sharedComponents/input/input.component";
|
|||
|
||||
declare var UIkit;
|
||||
|
||||
export class NotificationConfiguration {
|
||||
availableGroups: Option[] = [];
|
||||
entities: string[] = [];
|
||||
service: string;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'notification-sidebar',
|
||||
template: `
|
||||
<div id="notifications-switcher" uk-toggle="" href="#notifications" class="uk-offcanvas-switcher uk-flex uk-flex-middle uk-flex-center">
|
||||
<div *ngIf="!mobile" id="notifications-switcher" uk-toggle="" href="#notifications" class="uk-offcanvas-switcher uk-flex uk-flex-middle uk-flex-center">
|
||||
<icon name="mail" ratio="1.5" customClass="uk-text-background" flex="true" visuallyHidden="Notifications"></icon>
|
||||
<span [class.uk-hidden]="unreadCount === 0" class="uk-offcanvas-count uk-flex uk-flex-middle uk-flex-center">
|
||||
{{unreadCount}}
|
||||
</span>
|
||||
</div>
|
||||
<div id="notifications" class="uk-offcanvas" uk-offcanvas="flip: true; overlay: true;">
|
||||
<div class="uk-offcanvas-bar uk-padding-remove">
|
||||
<button class="uk-offcanvas-close uk-close uk-icon" type="button">
|
||||
<icon name="close" ratio="1.5" visuallyHidden="close"></icon>
|
||||
</button>
|
||||
<ng-template [ngIf]="!notification">
|
||||
<div class="notification-list uk-position-relative">
|
||||
<h4>Notifications</h4>
|
||||
<div class="uk-flex uk-flex-right@m uk-flex-center uk-padding uk-padding-remove-vertical">
|
||||
<button [disabled]="unreadCount === 0" (click)="readAll()" class="uk-button uk-button-link">Mark As Read ({{unreadCount}})</button>
|
||||
</div>
|
||||
<h6 *ngIf="notifications.length == 0" class="uk-position-center uk-margin-remove">No notifications</h6>
|
||||
<ul *ngIf="notifications.length > 0" class="uk-list">
|
||||
<li *ngFor="let notification of notifications; let i=index" class="clickable" (click)="select(notification)">
|
||||
<div class="uk-grid uk-grid-small" uk-grid>
|
||||
<notification-user [name]="notification.name" [surname]="notification.surname" [outline]="true"
|
||||
colorClass="uk-text-secondary"></notification-user>
|
||||
<div class="uk-width-expand">
|
||||
<div class="uk-width-1-1 uk-flex uk-flex-middle">
|
||||
<div class="uk-width-expand multi-line-ellipsis lines-2">
|
||||
<p class="uk-margin-remove" [class.uk-text-light-grey]="notification.read">
|
||||
{{notification.preview}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="uk-margin-left uk-flex uk-flex-center uk-text-secondary">
|
||||
<icon *ngIf="!notification.read" name="circle" ratio="0.6" visuallyHidden="unread"></icon>
|
||||
</div>
|
||||
</div>
|
||||
<span class="uk-text-secondary uk-text-small">{{getDate(notification.date)}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div *ngIf="availableGroups.length > 0" [availableGroups]="availableGroups" [entities]="entities" [service]="service" notify-form class="notify"></div>
|
||||
</ng-template>
|
||||
<div *ngIf="notification" class="notification">
|
||||
<div class="uk-flex uk-flex-middle uk-margin-medium-bottom">
|
||||
<span class="uk-text-secondary clickable" (click)="back($event)">
|
||||
<icon ratio="1.5" name="west" visuallyHidden="back"></icon>
|
||||
<ng-template #main>
|
||||
<ng-container *ngIf="!notification">
|
||||
<div class="notification-list uk-position-relative">
|
||||
<h4 class="uk-flex uk-flex-middle clickable uk-margin-remove-top uk-margin-medium-bottom" (click)="showNotificationsEmitter.emit(false)">
|
||||
<span *ngIf="mobile" class="uk-margin-right">
|
||||
<icon ratio="1.5" name="west" visuallyHidden="back" [flex]="true"></icon>
|
||||
</span>
|
||||
<h4 *ngIf="notification.title" class="uk-text-bold uk-margin-left">{{notification.title}}</h4>
|
||||
<div class="uk-text-bold">Notifications</div>
|
||||
</h4>
|
||||
<div class="uk-flex uk-flex-right@m uk-flex-center uk-padding uk-padding-remove-vertical">
|
||||
<button [disabled]="unreadCount === 0" (click)="readAll()" class="uk-button uk-button-link">Mark As Read ({{unreadCount}})</button>
|
||||
</div>
|
||||
<div class="uk-flex uk-flex-middle uk-margin-medium-bottom">
|
||||
<notification-user [name]="notification.name" [surname]="notification.surname" colorClass="uk-text-secondary" [outline]="true"></notification-user>
|
||||
<div class="uk-margin-left">
|
||||
{{notification.name + ' ' + notification.surname}}<br>
|
||||
<span style="opacity: 0.8;" class="uk-text-small uk-margin-small-top">
|
||||
<h6 *ngIf="notifications.length == 0" class="uk-position-center uk-margin-remove">No notifications</h6>
|
||||
<ul *ngIf="notifications.length > 0" class="uk-list">
|
||||
<li *ngFor="let notification of notifications; let i=index" class="clickable" (click)="select(notification)">
|
||||
<div class="uk-grid uk-grid-small" uk-grid>
|
||||
<notification-user [name]="notification.name" [surname]="notification.surname" [outline]="true"
|
||||
colorClass="uk-text-secondary"></notification-user>
|
||||
<div class="uk-width-expand">
|
||||
<div class="uk-width-1-1 uk-flex uk-flex-middle">
|
||||
<div class="uk-width-expand multi-line-ellipsis lines-2">
|
||||
<p class="uk-margin-remove" [class.uk-text-light-grey]="notification.read">
|
||||
{{notification.preview}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="uk-margin-left uk-flex uk-flex-center uk-text-secondary">
|
||||
<icon *ngIf="!notification.read" name="circle" ratio="0.6" visuallyHidden="unread"></icon>
|
||||
</div>
|
||||
</div>
|
||||
<span class="uk-text-secondary uk-text-small">{{getDate(notification.date)}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div *ngIf="configuration.availableGroups.length > 0" [availableGroups]="configuration.availableGroups" [entities]="configuration.entities" [service]="configuration.service" notify-form class="notify"></div>
|
||||
</ng-container>
|
||||
<div *ngIf="notification" class="notification">
|
||||
<h4 class="uk-flex uk-flex-middle clickable uk-margin-remove-top uk-margin-medium-bottom" (click)="back($event)">
|
||||
<span class="uk-margin-right">
|
||||
<icon ratio="1.5" name="west" visuallyHidden="back" [flex]="true"></icon>
|
||||
</span>
|
||||
<div *ngIf="notification.title" class="uk-text-bold">{{notification.title}}</div>
|
||||
</h4>
|
||||
<div class="uk-flex uk-flex-middle uk-margin-medium-bottom">
|
||||
<notification-user [name]="notification.name" [surname]="notification.surname" colorClass="uk-text-secondary" [outline]="true"></notification-user>
|
||||
<div class="uk-margin-left">
|
||||
{{notification.name + ' ' + notification.surname}}<br>
|
||||
<span style="opacity: 0.8;" class="uk-text-small uk-margin-small-top">
|
||||
{{notification.date | date:'medium'}} ({{getDate(notification.date)}})
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div [innerHTML]="notification.message | safeHtml">
|
||||
</div>
|
||||
</div>
|
||||
<div [innerHTML]="notification.message | safeHtml">
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<div *ngIf="!mobile" #canvas id="notifications" class="uk-offcanvas" uk-offcanvas="flip: true; overlay: true;">
|
||||
<div class="uk-offcanvas-bar uk-padding-remove">
|
||||
<nav class="uk-navbar uk-background-default" uk-sticky>
|
||||
<div class="uk-navbar-right">
|
||||
<button class="uk-navbar-toggle uk-icon uk-close" (click)="closeCanvas(canvas)">
|
||||
<icon name="close" ratio="1.5" visuallyHidden="close account"></icon>
|
||||
</button>
|
||||
</div>
|
||||
</nav>
|
||||
<ng-container *ngTemplateOutlet="main"></ng-container>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="mobile" id="notifications">
|
||||
<ng-container *ngTemplateOutlet="main"></ng-container>
|
||||
</div>
|
||||
`,
|
||||
styleUrls: ['notification-sidebar.component.less'],
|
||||
|
@ -81,21 +112,21 @@ declare var UIkit;
|
|||
export class NotificationsSidebarComponent implements OnInit, OnDestroy {
|
||||
@Input()
|
||||
public user: User;
|
||||
@Input()
|
||||
public mobile: boolean = false;
|
||||
@Input()
|
||||
public configuration: NotificationConfiguration;
|
||||
@Output()
|
||||
public showNotificationsEmitter: EventEmitter<boolean> = new EventEmitter<boolean>();
|
||||
public notifications: Notification[] = [];
|
||||
@Input()
|
||||
public availableGroups: Option[] = [];
|
||||
@Input()
|
||||
public entities: string[] = [];
|
||||
@Input()
|
||||
public service: string;
|
||||
public notification: Notification;
|
||||
private subscriptions: any[] = [];
|
||||
|
||||
|
||||
constructor(private notificationService: NotificationService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.subscriptions.push(this.notificationService.getNotifications(this.service).subscribe(notifications => {
|
||||
this.subscriptions.push(this.notificationService.getNotifications(this.configuration.service).subscribe(notifications => {
|
||||
this.notifications = notifications;
|
||||
}, error => {
|
||||
this.notifications = [];
|
||||
|
@ -141,8 +172,12 @@ export class NotificationsSidebarComponent implements OnInit, OnDestroy {
|
|||
this.notification = null;
|
||||
}
|
||||
|
||||
closeCanvas(canvas) {
|
||||
UIkit.offcanvas(canvas).hide();
|
||||
}
|
||||
|
||||
readAll() {
|
||||
this.notificationService.markAllAsRead(this.service).subscribe(() => {
|
||||
this.notificationService.markAllAsRead(this.configuration.service).subscribe(() => {
|
||||
this.notifications.forEach(notification => {
|
||||
notification.read = true;
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {AfterViewInit, Component, Input, OnDestroy, OnInit, ViewChild} from "@angular/core";
|
||||
import {AfterViewInit, ChangeDetectorRef, Component, Input, OnDestroy, OnInit, ViewChild} from "@angular/core";
|
||||
import {User} from "../login/utils/helper.class";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {UserManagementService} from "../services/user-management.service";
|
||||
|
@ -35,7 +35,7 @@ import {ClearCacheService} from "../services/clear-cache.service";
|
|||
</div>
|
||||
</modal-alert>
|
||||
<modal-alert #memberModal [overflowBody]="false" *ngIf="service == 'monitor'" (cancelOutput)="cancel()"
|
||||
(alertOutput)="verifyMember()" [okDisabled]="code.invalid || loading">
|
||||
(alertOutput)="verifyMember()" [okDisabled]="(code.invalid || loading) && !isMember">
|
||||
<div *ngIf="!isMember">
|
||||
<div>
|
||||
You have been invited to join <span class="uk-text-bold">{{name}}</span> Monitor Dashboard as a member.
|
||||
|
@ -108,7 +108,8 @@ export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewIn
|
|||
private emailService: EmailService,
|
||||
private userManagementService: UserManagementService,
|
||||
private userRegistryService: UserRegistryService,
|
||||
private clearCacheService: ClearCacheService) {
|
||||
private clearCacheService: ClearCacheService,
|
||||
private cdr: ChangeDetectorRef) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -122,33 +123,42 @@ export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewIn
|
|||
this.paramsSubscription.unsubscribe();
|
||||
}
|
||||
this.paramsSubscription = this.route.queryParams.subscribe(params => {
|
||||
if (params && params['verify']) {
|
||||
if (this.user) {
|
||||
this.subscriptions.push(this.userRegistryService.getInvitation(params['verify']).subscribe(verification => {
|
||||
this.verification = verification;
|
||||
if (this.user.email === this.verification.email.toLowerCase() && this.id === this.verification.entity && this.type === this.verification.type) {
|
||||
if (this.verification.verificationType === 'manager') {
|
||||
this.openManagerModal();
|
||||
} else if (this.verification.verificationType === 'member' && this.service === "monitor") {
|
||||
this.openMemberModal();
|
||||
if (params) {
|
||||
this.isMember = !!params['isMember'];
|
||||
this.cdr.detectChanges();
|
||||
if(params['verify'] && !this.isMember) {
|
||||
if (this.user) {
|
||||
this.subscriptions.push(this.userRegistryService.getInvitation(params['verify']).subscribe(verification => {
|
||||
this.verification = verification;
|
||||
if (this.user.email === this.verification.email.toLowerCase() && this.id === this.verification.entity && this.type === this.verification.type) {
|
||||
if (this.verification.verificationType === 'manager') {
|
||||
this.openManagerModal();
|
||||
} else if (this.verification.verificationType === 'member' && this.service === "monitor") {
|
||||
this.openMemberModal();
|
||||
} else {
|
||||
this.openErrorModal();
|
||||
}
|
||||
} else {
|
||||
this.openErrorModal();
|
||||
}
|
||||
} else {
|
||||
}, error => {
|
||||
this.openErrorModal();
|
||||
}
|
||||
}, error => {
|
||||
this.openErrorModal();
|
||||
}));
|
||||
} else {
|
||||
this.router.navigate(['user-info'], {
|
||||
queryParams: {
|
||||
'errorCode': LoginErrorCodes.NOT_LOGIN,
|
||||
'redirectUrl': this.router.url
|
||||
},
|
||||
relativeTo: this.route
|
||||
});
|
||||
}));
|
||||
} else {
|
||||
this.router.navigate(['user-info'], {
|
||||
queryParams: {
|
||||
'errorCode': LoginErrorCodes.NOT_LOGIN,
|
||||
'redirectUrl': this.router.url
|
||||
},
|
||||
relativeTo: this.route
|
||||
});
|
||||
}
|
||||
} else if(this.isMember) {
|
||||
this.openMemberModal();
|
||||
}
|
||||
} else {
|
||||
this.isMember = false;
|
||||
this.cdr.detectChanges();
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
@ -177,12 +187,18 @@ export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewIn
|
|||
|
||||
public openMemberModal() {
|
||||
this.error = null;
|
||||
this.isMember = false;
|
||||
if(this.isMember) {
|
||||
this.memberModal.cancelButton = false;
|
||||
this.memberModal.okButtonText = 'Close';
|
||||
} else {
|
||||
this.memberModal.cancelButton = true;
|
||||
this.memberModal.okButtonText = 'Accept';
|
||||
}
|
||||
this.memberModal.okButtonLeft = false;
|
||||
this.memberModal.okButtonText = 'Accept';
|
||||
this.memberModal.stayOpen = true;
|
||||
this.memberModal.cancelButtonText = 'Cancel';
|
||||
this.memberModal.alertTitle = 'Member Invitation';
|
||||
this.cdr.detectChanges();
|
||||
this.memberModal.open();
|
||||
}
|
||||
|
||||
|
@ -239,9 +255,7 @@ export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewIn
|
|||
this.loading = false;
|
||||
this.error = null;
|
||||
this.userManagementService.updateUserInfo(() => {
|
||||
this.memberModal.cancelButton = false;
|
||||
this.memberModal.okButtonText = 'Close';
|
||||
this.isMember = true;
|
||||
this.router.navigate([], {queryParams: {'verify': null, 'isMember': true}});
|
||||
});
|
||||
}, error => {
|
||||
this.loading = false;
|
||||
|
@ -257,6 +271,6 @@ export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewIn
|
|||
}
|
||||
|
||||
cancel() {
|
||||
this.router.navigate([this.router.url.split('?')[0]]);
|
||||
this.router.navigate([], {queryParams: {'verify': null, 'isMember': null}});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import {UntypedFormArray, UntypedFormBuilder} from "@angular/forms";
|
|||
import {properties} from "../../../../environments/environment";
|
||||
import {EnvProperties} from "../../utils/properties/env-properties";
|
||||
import {StringUtils} from "../../utils/string-utils.class";
|
||||
import {ISVocabulariesService} from "../../utils/staticAutoComplete/ISVocabularies.service";
|
||||
|
||||
@Component({
|
||||
selector: 'sdg-selection',
|
||||
|
@ -20,14 +21,14 @@ export class SdgSelectionComponent {
|
|||
public sdgs: UntypedFormArray;
|
||||
|
||||
constructor(
|
||||
private httpClient: HttpClient,
|
||||
private vocabulariesService: ISVocabulariesService,
|
||||
private fb: UntypedFormBuilder
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.loading = true;
|
||||
this.sdgs = this.fb.array([]);
|
||||
this.httpClient.get(this.properties.domain+'/assets/common-assets/vocabulary/sdg.json').subscribe(data => {
|
||||
this.vocabulariesService.getSDGs(properties).subscribe(data => {
|
||||
data['sdg'].forEach(element => {
|
||||
// this.sdgs.push({code: element.code, id: element.id, label: element.label, html: element.html, checked: this.subjects?.includes(element.id)});
|
||||
this.sdgs.push(this.fb.group({
|
||||
|
@ -80,4 +81,4 @@ export class SdgSelectionComponent {
|
|||
private getEntityName (entityType:string) {
|
||||
return StringUtils.getEntityName(entityType, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import {Router} from '@angular/router';
|
|||
import {Meta, Title} from "@angular/platform-browser";
|
||||
import {SEOService} from "../sharedComponents/SEO/SEO.service";
|
||||
import {PiwikService} from "../utils/piwik/piwik.service";
|
||||
import {ISVocabulariesService} from "../utils/staticAutoComplete/ISVocabularies.service";
|
||||
|
||||
@Component({
|
||||
selector: 'sdg',
|
||||
|
@ -36,7 +37,7 @@ export class SdgComponent implements OnInit, OnDestroy {
|
|||
subscriptions: Subscription[] = [];
|
||||
|
||||
constructor(
|
||||
private httpClient: HttpClient, private refineFieldResultsService: RefineFieldResultsService,
|
||||
private vocabulariesService: ISVocabulariesService, private refineFieldResultsService: RefineFieldResultsService,
|
||||
private _router: Router,
|
||||
private _meta: Meta,
|
||||
private _title: Title,
|
||||
|
@ -54,26 +55,26 @@ export class SdgComponent implements OnInit, OnDestroy {
|
|||
this.updateUrl(this.url);
|
||||
this.updateTitle(this.pageTitle);
|
||||
this.updateDescription(this.pageDescription);
|
||||
this.httpClient.get(properties.domain+'/assets/common-assets/vocabulary/sdg.json').subscribe(data => {
|
||||
this.subscriptions.push(this.vocabulariesService.getSDGs(properties).subscribe(data => {
|
||||
this.sdgs = data['sdg'];
|
||||
});
|
||||
this.subscriptions.push(this.refineFieldResultsService.getRefineFieldsResultsByEntityName(['sdg'], 'result', this.properties, refineParams).subscribe(data => {
|
||||
this.sdgsResearchOutcomes = data[1][0].values;
|
||||
let merged =[];
|
||||
for(let i=0; i<this.sdgs.length; i++){
|
||||
merged.push({
|
||||
...this.sdgs[i],
|
||||
...(this.sdgsResearchOutcomes.find((innerItem) => innerItem.id === this.sdgs[i].id))
|
||||
});
|
||||
}
|
||||
this.displayedSdgs = merged;
|
||||
this.loading = false;
|
||||
}));
|
||||
}));
|
||||
let refineParams = null;
|
||||
if(this.customFilter) {
|
||||
let refineValue = StringUtils.URIEncode(this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId)));
|
||||
refineParams = '&fq=' + refineValue;
|
||||
}
|
||||
this.refineFieldResultsService.getRefineFieldsResultsByEntityName(['sdg'], 'result', this.properties, refineParams).subscribe(data => {
|
||||
this.sdgsResearchOutcomes = data[1][0].values;
|
||||
let merged =[];
|
||||
for(let i=0; i<this.sdgs.length; i++){
|
||||
merged.push({
|
||||
...this.sdgs[i],
|
||||
...(this.sdgsResearchOutcomes.find((innerItem) => innerItem.id === this.sdgs[i].id))
|
||||
});
|
||||
}
|
||||
this.displayedSdgs = merged;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
|
||||
public ngOnDestroy() {
|
||||
|
|
|
@ -56,6 +56,7 @@ export class EntitiesSelectionComponent {
|
|||
showPage["" + data['pages'][i]["route"] + ""] = data['pages'][i]["isEnabled"];
|
||||
}
|
||||
}
|
||||
this.entities = [];
|
||||
if(this.onlyresults) {
|
||||
if(this.simpleView) {
|
||||
this.entities.push({label: 'All ' + OpenaireEntities.RESULTS.toLowerCase(), value: 'all'});
|
||||
|
|
|
@ -326,16 +326,12 @@
|
|||
[isDisabled]="disabled" [isMobile]="mobile">
|
||||
</search-paging>
|
||||
</div>
|
||||
<div *ngIf="showIndexInfo && searchUtils.status !== errorCodes.LOADING" class="uk-margin-large-top uk-grid uk-child-width-1-2 uk-text-small">
|
||||
<div *ngIf="showIndexInfo && searchUtils.status !== errorCodes.LOADING" class="uk-margin-large-top uk-flex uk-flex-between uk-flex-wrap uk-text-small">
|
||||
<!-- Last Index Info-->
|
||||
<div>
|
||||
<icon name="graph" customClass="text-graph"></icon>
|
||||
<span class="uk-margin-small-left uk-text-baseline">
|
||||
<span class="uk-text-meta">Powered by </span>
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="text-graph">OpenAIRE Research Graph</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="uk-text-right">
|
||||
<a href="https://graph.openaire.eu" target="_blank" class="uk-width-1-1 uk-width-auto@m">
|
||||
<img src="assets/common-assets/openaire-badge-1.png" alt="Powered by OpenAIRE graph" style="height: 17px;">
|
||||
</a>
|
||||
<div class="uk-width-1-1 uk-width-auto@m">
|
||||
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-meta">
|
||||
<a *ngIf="properties.showLastIndexInformationLink" class="uk-link" [href]="properties.lastIndexInformationLink" target="_blank">Last update</a>
|
||||
<span *ngIf="!(properties.showLastIndexInformationLink)">Last update</span>
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
uk-height-match="target: .uk-card-default; row: false">
|
||||
<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"
|
||||
<div class="uk-card uk-card-default uk-position-relative uk-flex uk-flex-column uk-flex-center"
|
||||
[ngClass]="result.type" [class.uk-disabled]="!hasPermission(result)">
|
||||
<div *ngIf="type === 'community' && result.isSubscribed" [class.uk-position-top-left]="!isMobile" [class.uk-position-top-right]="isMobile" class="uk-text-background uk-text-center uk-padding-small uk-text-uppercase uk-text-bold">
|
||||
<span>Member</span>
|
||||
</div>
|
||||
<div [ngClass]="isMobile?'uk-flex uk-flex-middle uk-margin-bottom':'uk-position-top-right uk-margin-top uk-margin-right uk-flex uk-flex-column uk-flex-middle'">
|
||||
<div [ngClass]="isMobile?'uk-flex uk-flex-middle uk-margin-left uk-margin-small-top':'uk-position-top-right uk-margin-top uk-margin-right uk-flex uk-flex-column uk-flex-middle'">
|
||||
<div *ngIf="type === 'community' && result.status === 'manager'">
|
||||
<icon [name]="visibilityIcon.get('RESTRICTED')" [ratio]="isMobile?0.8:1.2" [flex]="true"></icon>
|
||||
<span class="uk-text-small uk-text-capitalize" [class.uk-text-xsmall]="isMobile" [class.uk-margin-xsmall-left]="isMobile">restricted</span>
|
||||
|
@ -21,51 +21,53 @@
|
|||
<span class="uk-text-small uk-text-capitalize" [class.uk-text-xsmall]="isMobile" [class.uk-margin-xsmall-left]="isMobile">{{result.visibility.toLowerCase()}}</span>
|
||||
</ng-container>
|
||||
</div>
|
||||
<div class="uk-grid uk-flex uk-flex-middle uk-margin-medium-right" uk-grid>
|
||||
<div class="uk-width-expand">
|
||||
<h5 [class.uk-h5]="!isMobile" [class.uk-h6]="isMobile">
|
||||
<div *ngIf="type === 'community'" [title]="result.shortTitle" class="uk-margin-bottom">
|
||||
<a *ngIf="directLink && hasPermission(result)" [href]="getCommunityPageUrl(result)" class="uk-link-heading uk-text-truncate uk-display-inline-block" target="_blank">{{(result.title) ? result.title : result.shortTitle}}</a>
|
||||
<a *ngIf="!directLink && hasPermission(result)" (click)="confirmModalOpen(result)" class="uk-link-heading uk-text-truncate uk-display-inline-block">{{(result.title) ? result.title : result.shortTitle}}</a>
|
||||
<div *ngIf="!hasPermission(result)" class="uk-text-truncate uk-display-inline-block">{{(result.title) ? result.title : result.shortTitle}}</div>
|
||||
<div class="uk-card-body">
|
||||
<div class="uk-grid uk-flex uk-flex-middle uk-margin-medium-right" uk-grid>
|
||||
<div class="uk-width-expand">
|
||||
<h5 [class.uk-h5]="!isMobile" [class.uk-h6]="isMobile">
|
||||
<div *ngIf="type === 'community'" [title]="result.shortTitle" class="uk-margin-bottom">
|
||||
<a *ngIf="directLink && hasPermission(result)" [href]="getCommunityPageUrl(result)" class="uk-link-heading uk-text-truncate uk-display-inline-block" target="_blank">{{(result.title) ? result.title : result.shortTitle}}</a>
|
||||
<a *ngIf="!directLink && hasPermission(result)" (click)="confirmModalOpen(result)" class="uk-link-heading uk-text-truncate uk-display-inline-block">{{(result.title) ? result.title : result.shortTitle}}</a>
|
||||
<div *ngIf="!hasPermission(result)" class="uk-text-truncate uk-display-inline-block">{{(result.title) ? result.title : result.shortTitle}}</div>
|
||||
</div>
|
||||
<div *ngIf="type === 'stakeholder'" [title]="result.index_shortName" class="uk-margin-bottom">
|
||||
<a *ngIf="directLink && hasPermission(result)" [href]="getStakeholderPageUrl(result)" class="uk-link-heading uk-text-truncate uk-display-inline-block" target="_blank">{{(result.name) ? result.name : result.index_shortName}}</a>
|
||||
<a *ngIf="!directLink && hasPermission(result)" (click)="confirmModalOpen(result)" class="uk-link-heading uk-text-truncate uk-display-inline-block">{{(result.name) ? result.name : result.index_shortName}}</a>
|
||||
<div *ngIf="!hasPermission(result)" class="uk-text-truncate uk-display-inline-block">{{(result.name) ? result.name : result.index_shortName}}</div>
|
||||
</div>
|
||||
</h5>
|
||||
<div class="uk-text-small">
|
||||
<div *ngIf="result.date || result.creationDate" class="uk-flex uk-flex-middle uk-margin-small-bottom">
|
||||
<span class="uk-text-meta">Creation Date: </span>
|
||||
<span class="uk-margin-small-left" *ngIf="result.date">{{result.date | date:'dd-MM-yyyy'}}</span>
|
||||
<span class="uk-margin-small-left"
|
||||
*ngIf="result.creationDate">{{result.creationDate | date:'dd-MM-yyyy'}}</span>
|
||||
</div>
|
||||
<div *ngIf="showType && result.type" class="uk-flex uk-flex-middle">
|
||||
<span class="uk-text-meta">Type:</span>
|
||||
<span class="uk-margin-small-left uk-text-capitalize">{{mapType(result.type)}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="type === 'stakeholder'" [title]="result.index_shortName" class="uk-margin-bottom">
|
||||
<a *ngIf="directLink && hasPermission(result)" [href]="getStakeholderPageUrl(result)" class="uk-link-heading uk-text-truncate uk-display-inline-block" target="_blank">{{(result.name) ? result.name : result.index_shortName}}</a>
|
||||
<a *ngIf="!directLink && hasPermission(result)" (click)="confirmModalOpen(result)" class="uk-link-heading uk-text-truncate uk-display-inline-block">{{(result.name) ? result.name : result.index_shortName}}</a>
|
||||
<div *ngIf="!hasPermission(result)" class="uk-text-truncate uk-display-inline-block">{{(result.name) ? result.name : result.index_shortName}}</div>
|
||||
</div>
|
||||
</h5>
|
||||
<div class="uk-text-small">
|
||||
<div *ngIf="result.date || result.creationDate" class="uk-flex uk-flex-middle uk-margin-small-bottom">
|
||||
<span class="uk-text-meta">Creation Date: </span>
|
||||
<span class="uk-margin-small-left" *ngIf="result.date">{{result.date | date:'dd-MM-yyyy'}}</span>
|
||||
<span class="uk-margin-small-left"
|
||||
*ngIf="result.creationDate">{{result.creationDate | date:'dd-MM-yyyy'}}</span>
|
||||
</div>
|
||||
<div *ngIf="showType && result.type" class="uk-flex uk-flex-middle">
|
||||
<span class="uk-text-meta">Type:</span>
|
||||
<span class="uk-margin-small-left uk-text-capitalize">{{mapType(result.type)}}</span>
|
||||
<div *ngIf="result.description && !isMobile" class="uk-margin-top uk-text-small multi-line-ellipsis lines-3">
|
||||
<p class="uk-text-meta" [innerHTML]="result.description"></p>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="result.description && !isMobile" class="uk-margin-top uk-text-small multi-line-ellipsis lines-3">
|
||||
<p class="uk-text-meta" [innerHTML]="result.description"></p>
|
||||
<div class="uk-width-1-5@m uk-width-1-3 uk-flex-first@m">
|
||||
<a *ngIf="directLink && hasPermission(result)" [href]="(type === 'community')?getCommunityPageUrl(result):getStakeholderPageUrl(result)" target="_blank">
|
||||
<ng-container *ngTemplateOutlet="resultPreview; context: {result: result}"></ng-container>
|
||||
</a>
|
||||
<a *ngIf="!directLink && hasPermission(result)" (click)="confirmModalOpen(result)">
|
||||
<ng-container *ngTemplateOutlet="resultPreview; context: {result: result}"></ng-container>
|
||||
</a>
|
||||
<div *ngIf="!hasPermission(result)">
|
||||
<ng-container *ngTemplateOutlet="resultPreview; context: {result: result}"></ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-1-5@m uk-width-1-3 uk-flex-first@m">
|
||||
<a *ngIf="directLink && hasPermission(result)" [href]="(type === 'community')?getCommunityPageUrl(result):getStakeholderPageUrl(result)" target="_blank">
|
||||
<ng-container *ngTemplateOutlet="resultPreview; context: {result: result}"></ng-container>
|
||||
</a>
|
||||
<a *ngIf="!directLink && hasPermission(result)" (click)="confirmModalOpen(result)">
|
||||
<ng-container *ngTemplateOutlet="resultPreview; context: {result: result}"></ng-container>
|
||||
</a>
|
||||
<div *ngIf="!hasPermission(result)">
|
||||
<ng-container *ngTemplateOutlet="resultPreview; context: {result: result}"></ng-container>
|
||||
</div>
|
||||
<div *ngIf="result.isManager" class="uk-flex uk-flex-right uk-margin-top">
|
||||
<manage [communityId]="result.communityId" [alias]="result.alias"></manage>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="result.isManager" class="uk-flex uk-flex-right uk-margin-top">
|
||||
<manage [communityId]="result.communityId" [alias]="result.alias"></manage>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<li *ngFor="let result of previewResults">
|
||||
<result-preview [properties]="properties" [showOrganizations]="showOrganizations"
|
||||
[showSubjects]="showSubjects" [result]="result" [showEnermaps]="showEnermaps"
|
||||
[isCard]="true">
|
||||
[isCard]="true" [prevPath]="prevPath">
|
||||
</result-preview>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -12,6 +12,7 @@ import {properties} from "../../../../environments/environment";
|
|||
templateUrl: 'searchResult.component.html'
|
||||
})
|
||||
export class SearchResultComponent implements OnInit, OnChanges {
|
||||
@Input() prevPath: string = "";
|
||||
@Input() results: SearchResult[];
|
||||
previewResults:ResultPreview[];
|
||||
@Input() status: number;
|
||||
|
|
|
@ -58,7 +58,7 @@ export class MetricsService {
|
|||
info = {};
|
||||
|
||||
info.name = result[2];
|
||||
info.url = properties.searchLinkToDataProvider+id;
|
||||
info.url = id;
|
||||
info.numOfDownloads = "0";
|
||||
info.openaireDownloads = "0";
|
||||
info.numOfViews = "0";
|
||||
|
|
|
@ -15,22 +15,30 @@ import {
|
|||
ViewChild,
|
||||
ViewChildren
|
||||
} from "@angular/core";
|
||||
import {AbstractControl, UntypedFormArray, UntypedFormControl, ValidatorFn} from "@angular/forms";
|
||||
import {AbstractControl, UntypedFormArray, UntypedFormControl, UntypedFormGroup, ValidatorFn} from "@angular/forms";
|
||||
import {HelperFunctions} from "../../utils/HelperFunctions.class";
|
||||
import {BehaviorSubject, Subscription} from "rxjs";
|
||||
import {EnvProperties} from "../../utils/properties/env-properties";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
import {ClickEvent} from "../../utils/click/click-outside-or-esc.directive";
|
||||
import {element} from "protractor";
|
||||
|
||||
export type InputType = 'text' | 'URL' | 'logoURL' | 'autocomplete' | 'autocomplete_soft' | 'textarea' | 'select' | 'chips';
|
||||
export type InputType =
|
||||
'text'
|
||||
| 'URL'
|
||||
| 'logoURL'
|
||||
| 'autocomplete'
|
||||
| 'autocomplete_soft'
|
||||
| 'textarea'
|
||||
| 'select'
|
||||
| 'chips'
|
||||
| 'year-range';
|
||||
|
||||
export interface Option {
|
||||
icon?: string,
|
||||
iconClass?: string,
|
||||
value: any,
|
||||
label: string,
|
||||
tooltip?: string,
|
||||
tooltip?: string,
|
||||
disabled?: boolean,
|
||||
hidden?: boolean
|
||||
}
|
||||
|
@ -40,6 +48,16 @@ export interface Placeholder {
|
|||
static?: boolean
|
||||
}
|
||||
|
||||
export interface YearRange {
|
||||
from: ControlConfiguration,
|
||||
to: ControlConfiguration
|
||||
}
|
||||
|
||||
export interface ControlConfiguration {
|
||||
control: string,
|
||||
placeholder: string
|
||||
}
|
||||
|
||||
declare var UIkit;
|
||||
|
||||
/**
|
||||
|
@ -55,11 +73,11 @@ declare var UIkit;
|
|||
<div *ngIf="formControl" [id]="id">
|
||||
<div class="input-wrapper" [class.disabled]="formControl.disabled" [class.opened]="opened"
|
||||
[class.focused]="focused" [ngClass]="inputClass" [class.hint]="hint"
|
||||
[class.active]="(formAsControl?.value || selectable || formAsArray?.length > 0 || getLabel(formAsControl?.value)) && !focused"
|
||||
[class.active]="!focused && (formAsControl?.value || selectable || formAsArray?.length > 0 || getLabel(formAsControl?.value) || yearRangeActive)"
|
||||
[class.danger]="(formControl.invalid && (formControl.touched || !!searchControl?.touched)) || (!!searchControl?.invalid && !!searchControl?.touched)">
|
||||
<div #inputBox class="input-box" [class.select]="selectable" click-outside-or-esc
|
||||
[class.static]="placeholderInfo?.static" (clickOutside)="click($event)">
|
||||
<div *ngIf="!placeholderInfo?.static && placeholderInfo.label" class="placeholder">
|
||||
<div *ngIf="!placeholderInfo?.static && placeholderInfo?.label" class="placeholder">
|
||||
<label>{{placeholderInfo.label}} <sup *ngIf="required">*</sup></label>
|
||||
</div>
|
||||
<div class="uk-flex" [class.uk-flex-middle]="type !== 'textarea'"
|
||||
|
@ -112,7 +130,7 @@ declare var UIkit;
|
|||
<div *ngFor="let chip of formAsArray.controls; let i=index" #chip
|
||||
[class.uk-hidden]="!focused && i > visibleChips - 1"
|
||||
class="chip">
|
||||
<div class="uk-label uk-label-small uk-flex uk-flex-middle"
|
||||
<div class="uk-label uk-label-small uk-text-transform-none uk-flex uk-flex-middle"
|
||||
[attr.uk-tooltip]="(tooltip)?('title: ' + getLabel(chip.value) + '; delay: 500; pos: bottom-left'):null">
|
||||
<span class="uk-text-truncate uk-width-expand">{{getLabel(chip.value)}}</span>
|
||||
<icon *ngIf="focused" (click)="remove(i, $event)"
|
||||
|
@ -132,6 +150,17 @@ declare var UIkit;
|
|||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template [ngIf]="type === 'year-range' && yearRange && formAsGroup">
|
||||
<div class="uk-width-2-5">
|
||||
<input #input class="input uk-text-center uk-text-truncate" [attr.placeholder]="yearRange.from.placeholder"
|
||||
maxlength="4" (click)="activeIndex = 0;$event.preventDefault()" [formControl]="getFormByName(yearRange.from.control)">
|
||||
</div>
|
||||
<div class="uk-width-1-5 uk-text-center">-</div>
|
||||
<div class="uk-width-2-5">
|
||||
<input #input class="input uk-text-center uk-text-truncate" [attr.placeholder]="yearRange.to.placeholder"
|
||||
maxlength="4" (click)="activeIndex = 1;$event.preventDefault()" [formControl]="getFormByName(yearRange.to.control)">
|
||||
</div>
|
||||
</ng-template>
|
||||
<div
|
||||
*ngIf="(formControl.disabled && disabledIcon) || icon || (selectable && selectArrow) || type === 'autocomplete' || searchable"
|
||||
class="uk-margin-small-left icon">
|
||||
|
@ -149,6 +178,7 @@ declare var UIkit;
|
|||
</button>
|
||||
</ng-template>
|
||||
</div>
|
||||
<!-- use action-icon class in order to apply css in your icon button-->
|
||||
<ng-content select="[action]"></ng-content>
|
||||
</div>
|
||||
<div class="tools">
|
||||
|
@ -171,7 +201,7 @@ declare var UIkit;
|
|||
</div>
|
||||
</div>
|
||||
<span *ngIf="formControl?.invalid && formControl?.touched" class="uk-text-danger">
|
||||
<span *ngIf="formControl.errors.error">{{formControl.errors.error}}</span>
|
||||
<span *ngIf="errors?.error">{{errors?.error}}</span>
|
||||
<span *ngIf="type === 'URL' || type === 'logoURL'">Please provide a valid URL (e.g. https://example.com)</span>
|
||||
</span>
|
||||
<span class="uk-text-small uk-text-danger">
|
||||
|
@ -205,7 +235,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
@Input() tooltip: boolean = false;
|
||||
@Input() searchable: boolean = false;
|
||||
/** Text */
|
||||
@ViewChild('input') input: ElementRef;
|
||||
@ViewChildren('input') input: QueryList<ElementRef>;
|
||||
/** Textarea options */
|
||||
@ViewChild('textArea') textArea: ElementRef;
|
||||
@Input('rows') rows: number = 3;
|
||||
|
@ -219,7 +249,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
public searchControl: UntypedFormControl;
|
||||
public activeElement: BehaviorSubject<ElementRef> = new BehaviorSubject<ElementRef>(null);
|
||||
/** Use modifier's class(es) to change view of your Input */
|
||||
@Input() inputClass: string = 'inner';
|
||||
@Input() inputClass: string = 'flat';
|
||||
/** Icon on the input */
|
||||
@Input() icon: string = null;
|
||||
/** Chip options */
|
||||
|
@ -228,6 +258,10 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
@Input() visibleChips: number = 1;
|
||||
@Input() separators: string[] = [];
|
||||
@Input() noWrap: boolean = false;
|
||||
/** Year Range Configuration */
|
||||
@Input() yearRange: YearRange;
|
||||
public activeIndex: 0 | 1 | null = null;
|
||||
|
||||
@Input() visibleRows: number = -1;
|
||||
@Input() extendEnter: () => void = null;
|
||||
@Output() focusEmitter: EventEmitter<boolean> = new EventEmitter<boolean>();
|
||||
|
@ -251,7 +285,9 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
|
||||
@Input()
|
||||
set placeholder(placeholder: string | Placeholder) {
|
||||
if (typeof placeholder === 'string') {
|
||||
if(this.type === 'year-range') {
|
||||
this.placeholderInfo = null;
|
||||
} else if (typeof placeholder === 'string') {
|
||||
this.placeholderInfo = {label: placeholder, static: false};
|
||||
} else {
|
||||
if (placeholder.static && (this.type === 'autocomplete' || this.hint)) {
|
||||
|
@ -274,10 +310,10 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
return option;
|
||||
}
|
||||
});
|
||||
if(!this.tooltip) {
|
||||
if (!this.tooltip) {
|
||||
this.tooltip = this.optionsArray.length > 0;
|
||||
}
|
||||
if(this.type === "select") {
|
||||
if (this.type === "select") {
|
||||
if (this.optionsArray.length > this.optionsBreakpoint) {
|
||||
this.type = 'autocomplete';
|
||||
this.showOptionsOnEmpty = true;
|
||||
|
@ -317,11 +353,11 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
|
||||
@HostListener('window:keydown.arrowLeft', ['$event'])
|
||||
arrowLeft(event: KeyboardEvent) {
|
||||
if(this.focused) {
|
||||
event.preventDefault();
|
||||
if(this.activeElement.getValue()) {
|
||||
if (this.type === 'chips' && this.focused) {
|
||||
if (this.activeElement.getValue()) {
|
||||
event.preventDefault();
|
||||
let index = this.chips.toArray().indexOf(this.activeElement.getValue());
|
||||
if(index > 0) {
|
||||
if (index > 0) {
|
||||
this.activeElement.next(this.chips.get(index - 1));
|
||||
return;
|
||||
}
|
||||
|
@ -331,11 +367,11 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
|
||||
@HostListener('window:keydown.arrowRight', ['$event'])
|
||||
arrowRight(event: KeyboardEvent) {
|
||||
if(this.focused) {
|
||||
event.preventDefault();
|
||||
if(this.activeElement.getValue()) {
|
||||
if (this.type === 'chips' && this.focused) {
|
||||
if (this.activeElement.getValue()) {
|
||||
event.preventDefault();
|
||||
let index = this.chips.toArray().indexOf(this.activeElement.getValue());
|
||||
if(index < this.chips.length - 1) {
|
||||
if (index < this.chips.length - 1) {
|
||||
this.activeElement.next(this.chips.get(index + 1));
|
||||
return;
|
||||
}
|
||||
|
@ -355,7 +391,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
} else {
|
||||
this.focus(false, event);
|
||||
}
|
||||
if(this.extendEnter) {
|
||||
if (this.extendEnter) {
|
||||
this.extendEnter();
|
||||
}
|
||||
}
|
||||
|
@ -389,7 +425,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
}
|
||||
}
|
||||
this.activeElement.subscribe(element => {
|
||||
if(element) {
|
||||
if (element) {
|
||||
element.nativeElement.scrollIntoView({behavior: 'smooth'});
|
||||
}
|
||||
})
|
||||
|
@ -404,7 +440,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
if (changes.value) {
|
||||
this.formControl.setValue(this.value);
|
||||
}
|
||||
if(changes.validators) {
|
||||
if (changes.validators) {
|
||||
this.updateValidators();
|
||||
}
|
||||
if (changes.formControl || changes.validators || changes.options) {
|
||||
|
@ -424,6 +460,22 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
this.unsubscribe();
|
||||
}
|
||||
|
||||
getFormByName(name: string): UntypedFormControl {
|
||||
if (this.formControl instanceof UntypedFormGroup) {
|
||||
return <UntypedFormControl>this.formControl.get(name);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
get formAsGroup(): UntypedFormGroup {
|
||||
if (this.formControl instanceof UntypedFormGroup) {
|
||||
return this.formControl;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
get formAsControl(): UntypedFormControl {
|
||||
if (this.formControl instanceof UntypedFormControl) {
|
||||
return this.formControl;
|
||||
|
@ -440,6 +492,25 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
}
|
||||
}
|
||||
|
||||
get yearRangeActive(): boolean {
|
||||
if(this.yearRange) {
|
||||
return this.formAsGroup && (this.getFormByName(this.yearRange.from.control)?.value || this.getFormByName(this.yearRange.to.control)?.value);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
get errors(): any {
|
||||
if(this.formAsGroup) {
|
||||
return (this.formAsGroup.errors
|
||||
?this.formAsGroup.errors:(this.getFormByName(this.yearRange.from.control).errors
|
||||
?this.getFormByName(this.yearRange.from.control).errors:this.getFormByName(this.yearRange.to.control).errors));
|
||||
} else if(this.formAsControl) {
|
||||
return this.formAsControl.errors;
|
||||
} else {
|
||||
return this.searchControl.errors;
|
||||
}
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.secure = true;
|
||||
this.unsubscribe();
|
||||
|
@ -447,7 +518,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
if (this.type === 'logoURL') {
|
||||
this.secure = (!this.initValue || this.initValue.includes('https://'));
|
||||
}
|
||||
if (this.optionsArray) {
|
||||
if (this.optionsArray?.length > 0) {
|
||||
this.filteredOptions = this.filter('');
|
||||
this.cdr.detectChanges();
|
||||
}
|
||||
|
@ -467,26 +538,28 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
}
|
||||
}));
|
||||
}
|
||||
if (this.formControl.validator) {
|
||||
if (this.formAsControl?.validator) {
|
||||
let validator = this.formControl.validator({} as AbstractControl);
|
||||
this.required = (validator && validator.required);
|
||||
}
|
||||
this.subscriptions.push(this.formControl.valueChanges.subscribe(value => {
|
||||
if (this.formControl.enabled) {
|
||||
value = (value === '') ? null : value;
|
||||
if (this.type === 'logoURL') {
|
||||
this.secure = (!value || value.includes('https://'));
|
||||
}
|
||||
if (this.initValue === value || (this.initValue === '' && value === null)) {
|
||||
this.formControl.markAsPristine();
|
||||
} else {
|
||||
this.formControl.markAsDirty();
|
||||
}
|
||||
if (this.type === 'autocomplete_soft') {
|
||||
this.filteredOptions = this.filter(value);
|
||||
this.cdr.detectChanges();
|
||||
if (this.focused) {
|
||||
this.open(true);
|
||||
if(this.type !== 'year-range') {
|
||||
value = (value === '') ? null : value;
|
||||
if (this.type === 'logoURL') {
|
||||
this.secure = (!value || value.includes('https://'));
|
||||
}
|
||||
if (this.initValue === value || (this.initValue === '' && value === null)) {
|
||||
this.formControl.markAsPristine();
|
||||
} else {
|
||||
this.formControl.markAsDirty();
|
||||
}
|
||||
if (this.type === 'autocomplete_soft') {
|
||||
this.filteredOptions = this.filter(value);
|
||||
this.cdr.detectChanges();
|
||||
if (this.focused) {
|
||||
this.open(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((this.value && value && this.value !== value) || (!this.value && value) || this.value && !value) {
|
||||
|
@ -494,8 +567,36 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
}
|
||||
}
|
||||
}));
|
||||
if(this.formAsGroup) {
|
||||
let fromControl = this.formAsGroup.get(this.yearRange.from.control);
|
||||
this.subscriptions.push(fromControl.valueChanges.subscribe(value => {
|
||||
let from = this.initValue[this.yearRange.from.control];
|
||||
if (from === value || (from === '' && value === null)) {
|
||||
fromControl.markAsPristine();
|
||||
} else {
|
||||
fromControl.markAsDirty();
|
||||
}
|
||||
if(fromControl.valid) {
|
||||
if(this.activeIndex === 0 && value) {
|
||||
this.activeIndex = 1;
|
||||
this.input.get(this.activeIndex).nativeElement.focus();
|
||||
}
|
||||
}
|
||||
}));
|
||||
let toControl = this.formAsGroup.get(this.yearRange.to.control);
|
||||
this.subscriptions.push(toControl.valueChanges.subscribe(value => {
|
||||
let to = this.initValue[this.yearRange.to.control];
|
||||
if (to === value || (to === '' && value === null)) {
|
||||
toControl.markAsPristine();
|
||||
} else {
|
||||
toControl.markAsDirty();
|
||||
}
|
||||
}));
|
||||
}
|
||||
if (this.input) {
|
||||
this.input.nativeElement.disabled = this.formControl.disabled;
|
||||
this.input.forEach(input => {
|
||||
input.nativeElement.disabled = this.formControl.disabled;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -508,7 +609,7 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
}
|
||||
|
||||
updateValidators() {
|
||||
if(this.formAsArray) {
|
||||
if (this.formAsArray) {
|
||||
this.formAsArray.controls.forEach(control => {
|
||||
control.setValidators(this.validators);
|
||||
control.updateValueAndValidity();
|
||||
|
@ -548,15 +649,33 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
}
|
||||
|
||||
add(event, addChips = false) {
|
||||
if (addChips && this.searchControl.value && this.searchControl.valid) {
|
||||
if (event && event.stopPropagation) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
this.formAsArray.push(new UntypedFormControl(this.searchControl.value, this.validators));
|
||||
this.formAsArray.markAsDirty();
|
||||
if (addChips && this.searchControl.value) {
|
||||
this.splitSearchControl();
|
||||
} else if (!this.focused) {
|
||||
this.searchControl.setValue('');
|
||||
}
|
||||
}
|
||||
|
||||
splitSearchControl() {
|
||||
let values = [this.searchControl.value];
|
||||
this.separators.forEach(separator => {
|
||||
values = ([] as string[]).concat(...values.map(value => {
|
||||
if (Array.isArray(value)) {
|
||||
return ([] as string[]).concat(...value.map(element => element.split(separator)));
|
||||
} else {
|
||||
return value.split(separator);
|
||||
}
|
||||
}));
|
||||
});
|
||||
values.forEach(value => {
|
||||
let control = new UntypedFormControl(value.trim(), this.validators);
|
||||
if (control.valid) {
|
||||
this.formAsArray.push(control);
|
||||
this.formAsArray.markAsDirty();
|
||||
}
|
||||
});
|
||||
if (this.formAsArray.dirty) {
|
||||
this.activeElement.next(this.chips.last);
|
||||
} else if(!this.focused) {
|
||||
this.searchControl.setValue('');
|
||||
}
|
||||
}
|
||||
|
@ -565,21 +684,24 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
let option = this.optionsArray.find(option => HelperFunctions.equals(option.value, value));
|
||||
return (option) ? option.label : (value);
|
||||
}
|
||||
|
||||
getTooltip(value: any): string {
|
||||
|
||||
getTooltip(value: any): string {
|
||||
let option = this.optionsArray.find(option => HelperFunctions.equals(option.value, value));
|
||||
return (option) ? (option.tooltip ? option.tooltip : option.label) : (value);
|
||||
}
|
||||
|
||||
focus(value: boolean, event = null) {
|
||||
if(!this.activeIndex) {
|
||||
this.activeIndex = 0;
|
||||
}
|
||||
if (this.focused) {
|
||||
this.formControl.markAsTouched();
|
||||
}
|
||||
this.focused = value;
|
||||
this.cdr.detectChanges();
|
||||
if (this.focused) {
|
||||
if (this.input) {
|
||||
this.input.nativeElement.focus();
|
||||
if (this.input?.length > 0) {
|
||||
this.input.get(this.activeIndex).nativeElement.focus();
|
||||
} else if (this.textArea) {
|
||||
this.textArea.nativeElement.focus();
|
||||
} else if (this.searchInput) {
|
||||
|
@ -592,9 +714,12 @@ export class InputComponent implements OnInit, OnDestroy, AfterViewInit, OnChang
|
|||
this.open(true);
|
||||
}
|
||||
} else {
|
||||
this.activeIndex = null;
|
||||
this.open(false);
|
||||
if (this.input) {
|
||||
this.input.nativeElement.blur();
|
||||
this.input.forEach(input => {
|
||||
input.nativeElement.blur();
|
||||
})
|
||||
} else if (this.textArea) {
|
||||
this.textArea.nativeElement.blur();
|
||||
} else if (this.searchInput) {
|
||||
|
|
|
@ -12,137 +12,144 @@
|
|||
</div>
|
||||
<div *ngIf="!onlyTop || userMenu" class="uk-navbar-right" [class.uk-light]='activeHeader.darkBg'>
|
||||
<ng-container *ngIf="userMenu">
|
||||
<user-mini [user]="user" mobileView=true (closeCanvasEmitter)="closeCanvas(canvas)"
|
||||
[userMenuItems]=userMenuItems [logInUrl]=properties.loginUrl
|
||||
<user-mini [user]="user" mobileView=true
|
||||
[userMenuItems]=userMenuItems [logInUrl]=properties.loginUrl [notificationConfiguration]="notificationConfiguration"
|
||||
[logOutUrl]=properties.logoutUrl [cookieDomain]=properties.cookieDomain></user-mini>
|
||||
</ng-container>
|
||||
</div>
|
||||
</nav>
|
||||
<div #canvas id="tm-mobile" [attr.uk-offcanvas]="'overlay: true'"
|
||||
<div #canvas id="tm-mobile" [attr.uk-offcanvas]="'mode: none; overlay: true'"
|
||||
class="uk-offcanvas">
|
||||
<div class="uk-offcanvas-bar uk-padding-remove-horizontal">
|
||||
<button class="uk-offcanvas-close uk-icon uk-close">
|
||||
<icon name="close" ratio="1.5" visuallyHidden="close menu"></icon>
|
||||
</button>
|
||||
<div class="uk-offcanvas-bar uk-padding-remove">
|
||||
<nav class="uk-navbar uk-background-default" uk-sticky>
|
||||
<div class="uk-navbar-left">
|
||||
<button class="uk-navbar-toggle uk-icon uk-close" (click)="closeCanvas(canvas)">
|
||||
<icon name="close" ratio="1.5" visuallyHidden="close menu" style="margin-left: -0.5em"></icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="uk-navbar-center">
|
||||
<ng-container *ngTemplateOutlet="header_template; context: {mobile: true}"></ng-container>
|
||||
</div>
|
||||
</nav>
|
||||
<ul class="uk-nav uk-nav-primary uk-list uk-list-large uk-margin-large-top uk-nav-parent-icon" uk-nav>
|
||||
<ng-container *ngIf="!onlyTop">
|
||||
<li *ngIf="showHomeMenuItem && currentRoute.route !== '/'">
|
||||
<a routerLink="/" (click)="closeCanvas(canvas)">Home</a>
|
||||
</li>
|
||||
<ng-container *ngFor="let menu of menuItems">
|
||||
<li [class.uk-active]="isTheActiveMenu(menu)" [class.uk-parent]="menu.items.length > 0" [ngClass]="menu.customClass"
|
||||
*ngIf="isAtleastOneEnabled(menu.entitiesRequired,showEntity) && isAtleastOneEnabled(menu.routeRequired, showPage)">
|
||||
<!--a routerLink="{{menu.rootItem.route}}" [queryParams]=menu.rootItem.params class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}</a-->
|
||||
<a *ngIf="menu.route && (isEnabled([menu.route], showPage) || !menu.routeRequired)"
|
||||
routerLink="{{menu.route}}" (click)="menu.items.length === 0?closeCanvas(canvas):null"
|
||||
[queryParams]="menu.params"
|
||||
[fragment]="menu.fragment">{{menu.title}}</a>
|
||||
<a *ngIf="!menu.route && menu.url"
|
||||
href="{{menu.url}}" (click)="menu.items.length === 0?closeCanvas(canvas):null" [class.custom-external]="menu.target != '_self'"
|
||||
target="{{menu.target}}">{{menu.title}}</a>
|
||||
<a *ngIf="(!menu.route && !menu.url) ||
|
||||
<ng-container *ngIf="!onlyTop">
|
||||
<li *ngIf="showHomeMenuItem && currentRoute.route !== '/'">
|
||||
<a routerLink="/" (click)="closeCanvas(canvas)">Home</a>
|
||||
</li>
|
||||
<ng-container *ngFor="let menu of menuItems">
|
||||
<li [class.uk-active]="isTheActiveMenu(menu)" [class.uk-parent]="menu.items.length > 0" [ngClass]="menu.customClass"
|
||||
*ngIf="isAtleastOneEnabled(menu.entitiesRequired,showEntity) && isAtleastOneEnabled(menu.routeRequired, showPage)">
|
||||
<!--a routerLink="{{menu.rootItem.route}}" [queryParams]=menu.rootItem.params class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}</a-->
|
||||
<a *ngIf="menu.route && (isEnabled([menu.route], showPage) || !menu.routeRequired)"
|
||||
routerLink="{{menu.route}}" (click)="menu.items.length === 0?closeCanvas(canvas):null"
|
||||
[queryParams]="menu.params"
|
||||
[fragment]="menu.fragment">{{menu.title}}</a>
|
||||
<a *ngIf="!menu.route && menu.url"
|
||||
href="{{menu.url}}" (click)="menu.items.length === 0?closeCanvas(canvas):null" [class.custom-external]="menu.target != '_self'"
|
||||
target="{{menu.target}}">{{menu.title}}</a>
|
||||
<a *ngIf="(!menu.route && !menu.url) ||
|
||||
(menu.route && menu.routeRequired && !isEnabled([menu.route], showPage)
|
||||
&& isAtleastOneEnabled(menu.routeRequired, showPage))"
|
||||
(click)="menu.items.length === 0?closeCanvas(canvas):null">{{menu.title}}</a>
|
||||
<ul *ngIf="menu.items.length > 0" class="uk-nav-sub">
|
||||
<ng-container *ngFor="let submenu of menu.items">
|
||||
<li [class.uk-active]="isTheActiveMenu(submenu)" [ngClass]="submenu.customClass"
|
||||
*ngIf="isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage) && (submenu.route.length > 0 || submenu.url.length > 0)"
|
||||
[class.uk-parent]="submenu.items && submenu.items.length > 0">
|
||||
<a *ngIf="submenu.route.length > 0" (click)="closeCanvas(canvas)"
|
||||
routerLink="{{submenu.route}}" [queryParams]=submenu.params
|
||||
[fragment]="submenu.fragment">{{submenu.title}}</a>
|
||||
<a *ngIf="submenu.route.length == 0 && submenu.url.length > 0"
|
||||
href="{{submenu.url}}" (click)="closeCanvas(canvas)" [class.custom-external]="submenu.target != '_self'"
|
||||
target="{{submenu.target}}">{{submenu.title}}</a>
|
||||
<ul *ngIf="submenu.items && submenu.items.length > 0" class="uk-nav-sub">
|
||||
<ng-container *ngFor="let subsubmenu of submenu.items">
|
||||
<li [class.uk-active]="isTheActiveMenu(subsubmenu)" [ngClass]="subsubmenu.customClass">
|
||||
<a *ngIf="subsubmenu.route.length > 0"
|
||||
routerLink="{{subsubmenu.route}}" [queryParams]="subsubmenu.params"
|
||||
[fragment]="subsubmenu.fragment" (click)="closeCanvas(canvas)">{{subsubmenu.title}}</a>
|
||||
<a *ngIf="subsubmenu.route.length == 0 && subsubmenu.url.length > 0"
|
||||
href="{{subsubmenu.url}}" (click)="closeCanvas(canvas)" [class.custom-external]="subsubmenu.target != '_self'"
|
||||
target="{{subsubmenu.target}}">{{subsubmenu.title}}</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</li>
|
||||
<li *ngIf="submenu.route.length == 0 && submenu.url.length == 0 && isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage)"
|
||||
class="uk-nav-header">{{submenu.title}}</li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
<ul *ngIf="menu.route === '/' && isFeaturedMenuEnabled && featuredMenuItems?.length > 0" class="uk-nav-sub">
|
||||
<li [class.uk-active]="isTheActiveMenu(item)" *ngFor="let item of featuredMenuItems" [ngClass]="item.customClass">
|
||||
<a *ngIf="item.type == 'internal' && item.route && isEnabled([item.route], showPage)"
|
||||
routerLink="{{item.route}}"
|
||||
[queryParams]="item.params"
|
||||
[fragment]="item.fragment"
|
||||
(click)="closeCanvas(canvas)">
|
||||
{{item.title}}
|
||||
</a>
|
||||
<a *ngIf="item.type == 'external' && item.url"
|
||||
href="{{item.url}}" class="custom-external"
|
||||
target="_blank"
|
||||
(click)="closeCanvas(canvas)">
|
||||
{{item.title}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="isMenuEnabled && additionalMenuItems?.length > 0">
|
||||
<ng-container *ngFor="let menu of additionalMenuItems">
|
||||
<li [class.uk-active]="isTheActiveMenu(menu)" [class.uk-parent]="menu.items.length > 0" [ngClass]="menu.customClass">
|
||||
<a *ngIf="menu.type == 'internal' && menu.route && isEnabled([menu.route], showPage)"
|
||||
routerLink="{{menu.route}}"
|
||||
[queryParams]="menu.params"
|
||||
[fragment]="menu.fragment"
|
||||
(click)="menu.items.length === 0?closeCanvas(canvas):null">
|
||||
{{menu.title}}
|
||||
</a>
|
||||
<a *ngIf="menu.type == 'external' && menu.url"
|
||||
href="{{menu.url}}"
|
||||
target="_blank" class="custom-external"
|
||||
(click)="menu.items.length === 0?closeCanvas(canvas):null">
|
||||
{{menu.title}}
|
||||
</a>
|
||||
<a *ngIf="menu.type == 'noAction'">
|
||||
{{menu.title}}
|
||||
</a>
|
||||
<ul class="uk-nav-sub">
|
||||
<ng-container *ngIf="menu.items?.length">
|
||||
<ng-container *ngFor="let submenu of menu.items">
|
||||
<li [class.uk-active]="isTheActiveMenu(submenu)" [ngClass]="submenu.customClass">
|
||||
<a *ngIf="submenu.type == 'internal' && submenu.route && isEnabled([submenu.route], showPage)"
|
||||
routerLink="{{submenu.route}}"
|
||||
[queryParams]="submenu.params"
|
||||
[fragment]="submenu.fragment"
|
||||
(click)="menu.items.length === 0?closeCanvas(canvas):null">
|
||||
{{submenu.title}}
|
||||
</a>
|
||||
<a *ngIf="submenu.type == 'external' && submenu.url"
|
||||
href="{{submenu.url}}"
|
||||
target="_blank" class="custom-external"
|
||||
(click)="menu.items.length === 0?closeCanvas(canvas):null">
|
||||
{{submenu.title}}
|
||||
</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
(click)="menu.items.length === 0?closeCanvas(canvas):null">{{menu.title}}</a>
|
||||
<ul *ngIf="menu.items.length > 0" class="uk-nav-sub">
|
||||
<ng-container *ngFor="let submenu of menu.items">
|
||||
<li [class.uk-active]="isTheActiveMenu(submenu)" [ngClass]="submenu.customClass"
|
||||
*ngIf="isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage) && (submenu.route.length > 0 || submenu.url.length > 0)"
|
||||
[class.uk-parent]="submenu.items && submenu.items.length > 0">
|
||||
<a *ngIf="submenu.route.length > 0" (click)="closeCanvas(canvas)"
|
||||
routerLink="{{submenu.route}}" [queryParams]=submenu.params
|
||||
[fragment]="submenu.fragment">{{submenu.title}}</a>
|
||||
<a *ngIf="submenu.route.length == 0 && submenu.url.length > 0"
|
||||
href="{{submenu.url}}" (click)="closeCanvas(canvas)" [class.custom-external]="submenu.target != '_self'"
|
||||
target="{{submenu.target}}">{{submenu.title}}</a>
|
||||
<ul *ngIf="submenu.items && submenu.items.length > 0" class="uk-nav-sub">
|
||||
<ng-container *ngFor="let subsubmenu of submenu.items">
|
||||
<li [class.uk-active]="isTheActiveMenu(subsubmenu)" [ngClass]="subsubmenu.customClass">
|
||||
<a *ngIf="subsubmenu.route.length > 0"
|
||||
routerLink="{{subsubmenu.route}}" [queryParams]="subsubmenu.params"
|
||||
[fragment]="subsubmenu.fragment" (click)="closeCanvas(canvas)">{{subsubmenu.title}}</a>
|
||||
<a *ngIf="subsubmenu.route.length == 0 && subsubmenu.url.length > 0"
|
||||
href="{{subsubmenu.url}}" (click)="closeCanvas(canvas)" [class.custom-external]="subsubmenu.target != '_self'"
|
||||
target="{{subsubmenu.target}}">{{subsubmenu.title}}</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</li>
|
||||
<li *ngIf="submenu.route.length == 0 && submenu.url.length == 0 && isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage)"
|
||||
class="uk-nav-header">{{submenu.title}}</li>
|
||||
</ng-container>
|
||||
</ul>
|
||||
<ul *ngIf="menu.route === '/' && isFeaturedMenuEnabled && featuredMenuItems?.length > 0" class="uk-nav-sub">
|
||||
<li [class.uk-active]="isTheActiveMenu(item)" *ngFor="let item of featuredMenuItems" [ngClass]="item.customClass">
|
||||
<a *ngIf="item.type == 'internal' && item.route && isEnabled([item.route], showPage)"
|
||||
routerLink="{{item.route}}"
|
||||
[queryParams]="item.params"
|
||||
[fragment]="item.fragment"
|
||||
(click)="closeCanvas(canvas)">
|
||||
{{item.title}}
|
||||
</a>
|
||||
<a *ngIf="item.type == 'external' && item.url"
|
||||
href="{{item.url}}" class="custom-external"
|
||||
target="_blank"
|
||||
(click)="closeCanvas(canvas)">
|
||||
{{item.title}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="isMenuEnabled && additionalMenuItems?.length > 0">
|
||||
<ng-container *ngFor="let menu of additionalMenuItems">
|
||||
<li [class.uk-active]="isTheActiveMenu(menu)" [class.uk-parent]="menu.items.length > 0" [ngClass]="menu.customClass">
|
||||
<a *ngIf="menu.type == 'internal' && menu.route && isEnabled([menu.route], showPage)"
|
||||
routerLink="{{menu.route}}"
|
||||
[queryParams]="menu.params"
|
||||
[fragment]="menu.fragment"
|
||||
(click)="menu.items.length === 0?closeCanvas(canvas):null">
|
||||
{{menu.title}}
|
||||
</a>
|
||||
<a *ngIf="menu.type == 'external' && menu.url"
|
||||
href="{{menu.url}}"
|
||||
target="_blank" class="custom-external"
|
||||
(click)="menu.items.length === 0?closeCanvas(canvas):null">
|
||||
{{menu.title}}
|
||||
</a>
|
||||
<a *ngIf="menu.type == 'noAction'">
|
||||
{{menu.title}}
|
||||
</a>
|
||||
<ul class="uk-nav-sub">
|
||||
<ng-container *ngIf="menu.items?.length">
|
||||
<ng-container *ngFor="let submenu of menu.items">
|
||||
<li [class.uk-active]="isTheActiveMenu(submenu)" [ngClass]="submenu.customClass">
|
||||
<a *ngIf="submenu.type == 'internal' && submenu.route && isEnabled([submenu.route], showPage)"
|
||||
routerLink="{{submenu.route}}"
|
||||
[queryParams]="submenu.params"
|
||||
[fragment]="submenu.fragment"
|
||||
(click)="menu.items.length === 0?closeCanvas(canvas):null">
|
||||
{{submenu.title}}
|
||||
</a>
|
||||
<a *ngIf="submenu.type == 'external' && submenu.url"
|
||||
href="{{submenu.url}}"
|
||||
target="_blank" class="custom-external"
|
||||
(click)="menu.items.length === 0?closeCanvas(canvas):null">
|
||||
{{submenu.title}}
|
||||
</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</li>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-content select="[extra-s]"></ng-content>
|
||||
</ng-container>
|
||||
<ng-content select="[extra-s]"></ng-content>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="main-menu" class="uk-visible@m">
|
||||
<div *ngIf="activeHeader" [class.uk-light]='activeHeader.darkBg'>
|
||||
<div class="uk-navbar-container" uk-sticky="media@m">
|
||||
<div class="uk-navbar-container" uk-sticky>
|
||||
<div *ngIf="(properties.environment =='beta' || properties.environment =='development') && showLogo && activeHeader.badge">
|
||||
<img class="uk-position-top-left"
|
||||
[src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')"
|
||||
|
@ -310,7 +317,7 @@
|
|||
</div>
|
||||
<ng-template #header_template let-mobile="mobile">
|
||||
<a *ngIf="!activeHeader.url" [routerLink]="activeHeader.route" [class.uk-padding-remove]="!isHeaderLeft"
|
||||
class="uk-logo uk-navbar-item uk-flex uk-flex-middle uk-animation-scale-up">
|
||||
class="uk-logo uk-navbar-item uk-flex uk-flex-middle" [class.small]="activeHeader.logoInfo">
|
||||
<img *ngIf="(mobile && activeHeader.logoSmallUrl) || (!mobile && activeHeader.logoUrl)"
|
||||
[src]="!mobile?activeHeader.logoUrl:activeHeader.logoSmallUrl"
|
||||
[alt]="activeHeader.title">
|
||||
|
@ -322,7 +329,7 @@
|
|||
</ng-container>
|
||||
</a>
|
||||
<a *ngIf="activeHeader.url" [href]="activeHeader.url" [class.uk-padding-remove]="!isHeaderLeft"
|
||||
class="uk-logo uk-navbar-item uk-flex uk-flex-middle uk-animation-scale-up">
|
||||
class="uk-logo uk-navbar-item uk-flex uk-flex-middle" [class.small]="activeHeader.logoInfo">
|
||||
<img *ngIf="(mobile && activeHeader.logoSmallUrl) || (!mobile && activeHeader.logoUrl)"
|
||||
[src]="!mobile?activeHeader.logoUrl:activeHeader.logoSmallUrl"
|
||||
[alt]="activeHeader.title">
|
||||
|
|
|
@ -8,6 +8,7 @@ import {Subscription} from 'rxjs';
|
|||
import {HelpContentService} from '../services/help-content.service';
|
||||
import {properties} from "../../../environments/environment";
|
||||
import {LayoutService} from "../dashboard/sharedComponents/sidebar/layout.service";
|
||||
import {NotificationConfiguration} from "../notifications/notifications-sidebar/notifications-sidebar.component";
|
||||
|
||||
declare var UIkit;
|
||||
|
||||
|
@ -48,6 +49,7 @@ export class NavigationBarComponent implements OnInit, OnDestroy, OnChanges {
|
|||
@Input() searchRoute: string = '/search/find';
|
||||
@Input() searchPlaceHolder: string = 'Search for research results';
|
||||
@Input() showLogo: boolean = true;
|
||||
@Input() notificationConfiguration: NotificationConfiguration;
|
||||
replaceHeader: boolean = false;
|
||||
public activeHeader: Header;
|
||||
keyword: string = '';
|
||||
|
|
|
@ -5,7 +5,7 @@ import { BehaviorSubject, Observable } from "rxjs";
|
|||
providedIn: "root"
|
||||
})
|
||||
export class QuickContactService {
|
||||
private display: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
|
||||
private display: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||
|
||||
public get isDisplayed(): Observable<boolean> {
|
||||
return this.display.asObservable();
|
||||
|
|
|
@ -3,7 +3,7 @@ import {Component, Input} from "@angular/core";
|
|||
@Component({
|
||||
selector: 'slider-arrow',
|
||||
template: `
|
||||
<div *ngIf="type" class="uk-slider-arrow" [ngClass]="positionClasses" [attr.uk-slider-item]="type">
|
||||
<div *ngIf="type" class="uk-slider-arrow uk-visible@m" [ngClass]="positionClasses" [attr.uk-slider-item]="type">
|
||||
<button class="uk-icon-button uk-icon-button-small uk-box-no-shadow uk-box-no-shadow-hover uk-border">
|
||||
<icon [name]="icon" [flex]="true" visuallyHidden="download"></icon>
|
||||
</button>
|
||||
|
@ -22,4 +22,4 @@ export class SliderArrowComponent {
|
|||
get icon() {
|
||||
return (this.type == 'previous')?'chevron_left':'chevron_right'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,21 +27,21 @@ declare var UIkit;
|
|||
[attr.uk-switcher]="type === 'static'?('connect:' + connect):null"
|
||||
[ngClass]="'uk-flex-' + flexPosition + ' ' + tabsClass">
|
||||
<ng-container *ngIf="type === 'static'">
|
||||
<li *ngFor="let tab of leftTabs" style="max-width: 50%" class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||
<li *ngFor="let tab of leftTabs" [ngStyle]="" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||
<a>{{tab.title}}</a>
|
||||
</li>
|
||||
<li *ngFor="let tab of rightTabs; let i=index;" style="max-width: 50%" [ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''"
|
||||
<li *ngFor="let tab of rightTabs; let i=index;" [style.max-width]="(position === 'horizontal')?'50%':null" [ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''"
|
||||
class="uk-text-capitalize uk-text-truncate uk-display-block">
|
||||
<a [ngClass]="tab.customClass">{{tab.title}}</a>
|
||||
</li>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="type === 'dynamic'">
|
||||
<li *ngFor="let tab of leftTabs; let i=index;" [class.uk-active]="tab.active" style="max-width: 50%">
|
||||
<li *ngFor="let tab of leftTabs; let i=index;" [class.uk-active]="tab.active" [style.max-width]="(position === 'horizontal')?'50%':null">
|
||||
<a [routerLink]="tab.routerLink" [queryParams]="tab.queryParams" [ngClass]="tab.customClass"
|
||||
(click)="showActive(i)"
|
||||
class="uk-text-capitalize uk-text-truncate uk-display-block">{{tab.title}}</a>
|
||||
</li>
|
||||
<li *ngFor="let tab of rightTabs; let i=index;" style="max-width: 50%" [class.uk-active]="tab.active"
|
||||
<li *ngFor="let tab of rightTabs; let i=index;" [style.max-width]="(position === 'horizontal')?'50%':null" [class.uk-active]="tab.active"
|
||||
[ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''">
|
||||
<a [routerLink]="tab.routerLink" [queryParams]="tab.queryParams" [ngClass]="tab.customClass"
|
||||
(click)="showActive(i)"
|
||||
|
@ -49,10 +49,10 @@ declare var UIkit;
|
|||
</li>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="type === 'scrollable'">
|
||||
<li *ngFor="let tab of leftTabs" style="max-width: 50%" class="uk-text-capitalize uk-text-truncate uk-display-block" [class.uk-active]="tab.active">
|
||||
<li *ngFor="let tab of leftTabs" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block" [class.uk-active]="tab.active">
|
||||
<a routerLink="./" [fragment]="tab.id" queryParamsHandling="merge" [ngClass]="tab.customClass">{{tab.title}}</a>
|
||||
</li>
|
||||
<li *ngFor="let tab of rightTabs; let i=index;" style="max-width: 50%" class="uk-text-capitalize uk-text-truncate uk-display-block"
|
||||
<li *ngFor="let tab of rightTabs; let i=index;" [style.max-width]="(position === 'horizontal')?'50%':null" class="uk-text-capitalize uk-text-truncate uk-display-block"
|
||||
[ngClass]="i === 0?'uk-flex-1 uk-flex uk-flex-right':''"
|
||||
[class.uk-active]="tab.active">
|
||||
<a routerLink="./" [fragment]="tab.id" queryParamsHandling="merge" [ngClass]="tab.customClass">{{tab.title}}</a>
|
||||
|
@ -206,6 +206,7 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
|||
|
||||
public showActive(index) {
|
||||
this.activeIndex = index;
|
||||
this.activeEmitter.emit(this.tabs.get(this.activeIndex).id);
|
||||
if(this.slider) {
|
||||
this.slider.show(this.activeIndex);
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ export class EGIDataTransferComponent {
|
|||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
if(this.isOpen){
|
||||
if(this.isOpen && typeof document !== 'undefined'){
|
||||
this.open();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,16 +4,10 @@ import {FullPageSliderComponent} from "./full-page-slider.component";
|
|||
import {SlideComponent} from "./slide.component";
|
||||
import {BottomModule} from '../../sharedComponents/bottom.module';
|
||||
import {IconsModule} from '../icons/icons.module';
|
||||
import {IconsService} from '../icons/icons.service';
|
||||
import {arrow_down, arrow_up} from '../icons/icons';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, BottomModule, IconsModule],
|
||||
declarations: [FullPageSliderComponent, SlideComponent],
|
||||
exports: [FullPageSliderComponent, SlideComponent],
|
||||
})
|
||||
export class FullPageSliderModule {
|
||||
constructor(private iconsService: IconsService) {
|
||||
this.iconsService.registerIcons([arrow_up, arrow_down]);
|
||||
}
|
||||
}
|
||||
export class FullPageSliderModule {}
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
import {Component, ElementRef, EventEmitter, Input, Output, ViewChild, ViewEncapsulation} from '@angular/core';
|
||||
import {
|
||||
AfterViewInit,
|
||||
Component,
|
||||
ElementRef,
|
||||
EventEmitter,
|
||||
Input, OnDestroy,
|
||||
OnInit,
|
||||
Output,
|
||||
ViewChild,
|
||||
ViewEncapsulation
|
||||
} from '@angular/core';
|
||||
|
||||
declare var UIkit: any;
|
||||
|
||||
|
@ -48,7 +58,7 @@ declare var UIkit: any;
|
|||
/**
|
||||
* API to an open alert window.
|
||||
*/
|
||||
export class AlertModal {
|
||||
export class AlertModal implements OnInit, AfterViewInit, OnDestroy {
|
||||
private static MODAL_COUNTER: number = 0;
|
||||
|
||||
id: string = "modal";
|
||||
|
@ -136,6 +146,7 @@ export class AlertModal {
|
|||
@Output() public cancelOutput: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
@ViewChild('element') element: ElementRef;
|
||||
private subscriptions: any[] = [];
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
@ -145,6 +156,14 @@ export class AlertModal {
|
|||
this.id = 'modal-' + AlertModal.MODAL_COUNTER;
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
if(this.element && typeof document !== "undefined") {
|
||||
this.subscriptions.push(UIkit.util.on(document, 'hide', '#' + this.id, () => {
|
||||
this.cancelOutput.emit(true);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
if(typeof document !== "undefined") {
|
||||
const element = document.getElementById("modal-container");
|
||||
|
@ -155,20 +174,27 @@ export class AlertModal {
|
|||
}
|
||||
}
|
||||
}
|
||||
this.subscriptions.forEach(subscription => {
|
||||
if(subscription instanceof Function) {
|
||||
subscription();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens an alert window creating backdrop.
|
||||
*/
|
||||
open() {
|
||||
UIkit.modal(this.element.nativeElement).show();
|
||||
if(typeof UIkit !== "undefined") {
|
||||
UIkit.modal(this.element.nativeElement).show();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ok method closes the modal and emits modalOutput.
|
||||
*/
|
||||
ok() {
|
||||
if (!this.stayOpen) {
|
||||
if (!this.stayOpen && typeof UIkit !== "undefined") {
|
||||
UIkit.modal(this.element.nativeElement).hide();
|
||||
}
|
||||
if (!this.choice) {
|
||||
|
@ -185,7 +211,8 @@ export class AlertModal {
|
|||
* cancel method closes the modal.
|
||||
*/
|
||||
cancel() {
|
||||
UIkit.modal(this.element.nativeElement).hide();
|
||||
this.cancelOutput.emit(true);
|
||||
if(typeof UIkit !== "undefined") {
|
||||
UIkit.modal(this.element.nativeElement).hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
export enum Level {
|
||||
NONE,
|
||||
ALL,
|
||||
K,
|
||||
M,
|
||||
B
|
||||
|
@ -14,7 +14,8 @@ export interface NumberSize {
|
|||
|
||||
export class NumberUtils {
|
||||
|
||||
public static roundNumber(num: number, level: Level = Level.NONE, decimal = 0): any {
|
||||
public static roundNumber(num: number | string, level: Level = Level.ALL, decimal = 0): any {
|
||||
num = Number.parseFloat(num.toString());
|
||||
let roundNum: NumberSize;
|
||||
let initialNum = num;
|
||||
let variance = Math.pow(10, decimal);
|
||||
|
@ -30,11 +31,6 @@ export class NumberUtils {
|
|||
num = num / 1000;
|
||||
num = Math.round(num * variance) / variance;
|
||||
roundNum = {number: num, size: "K", count: initialNum};
|
||||
} else if (num >= 100) {
|
||||
num = num / 100;
|
||||
num = Math.round(num * variance) / variance;
|
||||
num = num * 100;
|
||||
roundNum = {number: num, size: "", count: initialNum};
|
||||
} else {
|
||||
roundNum = {number: num, size: "", count: initialNum};
|
||||
}
|
||||
|
|
|
@ -5,19 +5,24 @@ import {DecimalPipe} from "@angular/common";
|
|||
@Pipe({name: 'numberRound'})
|
||||
export class NumberRoundPipe implements PipeTransform {
|
||||
decimalPipe: DecimalPipe = new DecimalPipe("en");
|
||||
|
||||
constructor() {}
|
||||
|
||||
transform(value: number, ...args: any[]): any {
|
||||
let level = Level.NONE;
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Args: Level: 0 (default): ALL, 1: K, 2: M, 3:B
|
||||
* Decimal: how many decimals should be shown (e.g 1 -> 62.1)
|
||||
* */
|
||||
transform(value: number | string, ...args: any[]): any {
|
||||
let level = Level.ALL;
|
||||
let decimal = 0;
|
||||
if(args[0]) {
|
||||
if (args[0]) {
|
||||
level = args[0];
|
||||
}
|
||||
if(args[1]) {
|
||||
if (args[1]) {
|
||||
decimal = args[1];
|
||||
}
|
||||
let size: NumberSize = NumberUtils.roundNumber(value, level, decimal);
|
||||
return this.decimalPipe.transform(size.number) + (size.size?'<span class="number-size">' + size.size + '</span>':'');
|
||||
return this.decimalPipe.transform(size.number) + (size.size ? '<span class="number-size">' + size.size + '</span>' : '');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -145,4 +145,5 @@ export interface EnvProperties {
|
|||
eoscDataTransferAPI?;
|
||||
eoscDataTransferLoginUrl?;
|
||||
eoscDataTransferDestinations?;
|
||||
hasMachineCache?: boolean;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<!-- Title -->
|
||||
<div>
|
||||
<h2 class="uk-margin-remove uk-text-break uk-inline-block uk-h6">
|
||||
<a *ngIf="!externalUrl && result.id" (click)="onClick()" [queryParams]="createParam()"
|
||||
<a *ngIf="!externalUrl && result.id" (click)="onClick()" [queryParams]="addEoscPrevInParams(createParam())"
|
||||
[routerLink]="url" class="uk-link uk-link-heading uk-width-expand">
|
||||
<div *ngIf="(result.title) || result.acronym">
|
||||
<span *ngIf="result.acronym">
|
||||
|
@ -273,7 +273,7 @@
|
|||
<span class="provider uk-display-inline-block">
|
||||
<span class="uk-text-meta">Provider: </span>
|
||||
<a *ngFor="let collectedName of from.collectedNamesAndIds.keys(); let i=index" [routerLink]="dataProviderUrl"
|
||||
[queryParams]="{datasourceId: from.collectedNamesAndIds.get(collectedName)}" (click)="onClick();">
|
||||
[queryParams]="addEoscPrevInParams({datasourceId: from.collectedNamesAndIds.get(collectedName)})" (click)="onClick();">
|
||||
{{collectedName}}<ng-container *ngIf="(i !== (from.collectedNamesAndIds.size - 1))">; </ng-container>
|
||||
</a>
|
||||
</span>
|
||||
|
|
|
@ -15,6 +15,7 @@ import {HelperFunctions} from "../HelperFunctions.class";
|
|||
styleUrls: ['result-preview.component.less']
|
||||
})
|
||||
export class ResultPreviewComponent implements OnInit, OnChanges {
|
||||
@Input() prevPath: string = "";
|
||||
@Input() result: ResultPreview;
|
||||
@Input() properties: EnvProperties;
|
||||
public openaireEntities = OpenaireEntities;
|
||||
|
@ -176,4 +177,15 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
|||
return this.result.resultType == "publication" || this.result.resultType == "dataset" ||
|
||||
this.result.resultType == "software" || this.result.resultType == "other" || this.result.resultType == "result";
|
||||
}
|
||||
|
||||
public addEoscPrevInParams(obj) {
|
||||
if(properties.adminToolsPortalType == "eosc" && this.prevPath) {
|
||||
let splitted: string[] = this.prevPath.split("?");
|
||||
obj = this.routerHelper.addQueryParam("return_path", splitted[0], obj);
|
||||
if(splitted.length > 0) {
|
||||
obj = this.routerHelper.addQueryParam("search_params", splitted[1], obj);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,15 @@ export class RouterHelper {
|
|||
//Use this class function to create queryParams Objects in format {key1:value1} or {key1:value1,key2:value2,key3:value3,...} for multiple parameters
|
||||
constructor(){}
|
||||
// <a [queryParams]="RouterHelper.createQueryParam(filter.filterId,value.id)" routerLinkActive="router-link-active" [routerLink]=baseUrl>Link</a>
|
||||
|
||||
public addQueryParam(key:string,value:string, obj){
|
||||
if(!obj) {
|
||||
obj = {};
|
||||
}
|
||||
obj[key] = value;
|
||||
return obj;
|
||||
}
|
||||
|
||||
public createQueryParam(key:string,value:string){
|
||||
var obj ={};
|
||||
obj[key]=value;
|
||||
|
|
|
@ -107,21 +107,28 @@ export class ISVocabulariesService {
|
|||
|
||||
getLocalVocabularyFromService(vocabularyName: string, properties: EnvProperties): Observable<AutoCompleteValue[]> {
|
||||
if(vocabularyName == "sdg"){
|
||||
let url = properties.domain+"/assets/common-assets/vocabulary/sdg.json";
|
||||
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
||||
//.map(res => <any> res.json())
|
||||
return this.getSDGs(properties)
|
||||
.pipe(map(res => res['sdg']))
|
||||
.pipe(map(res => this.parseSDGs(res)))
|
||||
.pipe(catchError(this.handleError));
|
||||
}else if( vocabularyName == "fos"){
|
||||
let url = properties.domain+"/assets/common-assets/vocabulary/fos.json";
|
||||
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
||||
//.map(res => <any> res.json())
|
||||
return this.getFos(properties)
|
||||
.pipe(map(res => res['fos']))
|
||||
.pipe(map(res => this.parseFOS(res)))
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
getFos(properties: EnvProperties): Observable<any> {
|
||||
let url = "/assets/common-assets/vocabulary/fos.json";
|
||||
return this.http.get(url).pipe(map(res => (res && res['fos'])?res:{fos: []}));
|
||||
}
|
||||
|
||||
getSDGs(properties: EnvProperties): Observable<any> {
|
||||
let url = "/assets/common-assets/vocabulary/sdg.json";
|
||||
return this.http.get(url).pipe(map(res => (res && res['sdg'])?res:{sdg: []}));
|
||||
}
|
||||
|
||||
parseSDGs(data: any): AutoCompleteValue[] {
|
||||
var array: AutoCompleteValue[] = []
|
||||
|
@ -160,6 +167,7 @@ export class ISVocabulariesService {
|
|||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
parse(data: any, vocabularyName: string): AutoCompleteValue[] {
|
||||
var array: AutoCompleteValue[] = []
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
|
|
|
@ -261,9 +261,9 @@ export class Identifier {
|
|||
|
||||
export class StringUtils {
|
||||
|
||||
public static urlRegex = 'https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.' +
|
||||
'[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.' +
|
||||
'[a-zA-Z0-9]+\.[^\s]{2,}';
|
||||
public static urlRegex = 'https?:\\/\\/(?:www(2?)\\.|(?!www(2?)))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|www(2?)\\.' +
|
||||
'[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|https?:\\/\\/(?:www(2?)\\.|(?!www(2?)))[a-zA-Z0-9]+\\.[^\\s]{2,}|www(2?)\\.' +
|
||||
'[a-zA-Z0-9]+\\.[^\\s]{2,}';
|
||||
|
||||
public static routeRegex = '^[a-zA-Z0-9\/][a-zA-Z0-9\/-]*$';
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ import {StringUtils} from "../../string-utils.class";
|
|||
<search-result [properties]="properties"
|
||||
[results]="results"
|
||||
[status]="fetch.searchUtils.status"
|
||||
[type]="resultType" [showEnermaps]="showEnermaps">
|
||||
[type]="resultType" [showEnermaps]="showEnermaps" [prevPath]="prevPath">
|
||||
</search-result>
|
||||
|
||||
<!-- <div *ngIf="searchLinkToAdvancedPage && fetch.results?.length > 0" class="uk-text-right">-->
|
||||
|
@ -57,6 +57,7 @@ import {StringUtils} from "../../string-utils.class";
|
|||
})
|
||||
|
||||
export class SearchTabComponent {
|
||||
@Input() prevPath: string = "";
|
||||
@Input() public fetch;
|
||||
@Input() public resultType: string;
|
||||
@Input() public params: any;
|
||||
|
|
Loading…
Reference in New Issue