Compare commits

...

121 Commits

Author SHA1 Message Date
argirok 8486fea501 Merge branch 'develop' 2024-02-15 12:18:17 +02:00
argirok 9ddc866ec9 [develop | DONE | FIXED] Search communities: add missing attribute in method signature 2024-02-14 13:05:09 +02:00
argirok 194778e639 [develop | DONE | REMOVED] Remove my orcid links from user menu for beta 2024-02-14 12:29:41 +02:00
Konstantinos Triantafyllou 7805be2e0b [develop | REMOVED]: Remove userInfoUrl usage 2024-02-13 12:16:04 +02:00
Alex Martzios c122ce01e1 [develop | DONE] update submodule 2024-01-11 12:50:33 +02:00
Alex Martzios 6efcd9df60 [develop | FIXED | DONE] add missing parameter (staticFields) in search dataproviders+projects for function prepareSearchPage() 2024-01-11 12:16:43 +02:00
Konstantinos Triantafyllou 8bb4862a7f Merge branch 'develop' of code-repo.d4science.org:MaDgIK/connect into develop 2023-12-01 18:38:49 +02:00
Konstantinos Triantafyllou c390216c22 [develop | DONE | FIXED]: Fixed dropdown position in entities selection of home page search. 2023-12-01 18:38:36 +02:00
argirok c51efd5713 [develop | DONE | FIXED] : in home and subjects page remove quoted from the advanced search link to make it work 2023-12-01 18:06:41 +02:00
Konstantinos Triantafyllou 89f8011e76 [develop | DONE]: Fix search input placeholders in home page. 2023-12-01 17:02:10 +02:00
argirok 3599fc3742 Merge branch 'develop' 2023-11-08 12:32:20 +02:00
argirok b9e3c7130f commit libraries 2023-11-08 12:30:45 +02:00
argirok 9db0195119 [DONE] :update properties - use common properties from library 2023-11-01 16:36:39 +02:00
Konstantinos Triantafyllou b37994307d Merge pull request 'angular-16' (#9) from angular-16 into develop
Reviewed-on: #9
2023-11-01 13:04:06 +01:00
Konstantinos Triantafyllou c1a35ce967 Merge pull request '[angular-16-community-projects-availableSince | DONE | UPDATE] : for the community projects, check if there is the date added, and when db is loaded to set id to "-1"' (#8) from angular-16-community-projects-availableSince into angular-16
Reviewed-on: #8
2023-10-26 15:48:19 +02:00
argirok 0c2c02b659 [angular-16-community-projects-availableSince | DONE | UPDATE] : for the community projects, check if there is the date added, and when db is loaded to set id to "-1" 2023-10-26 16:33:44 +03:00
Konstantinos Triantafyllou 295b56b0e1 Merge pull request '[angular-16-update-zenodo-api | DONE] : update zenodo community API - update method signature' (#7) from angular-16-update-zenodo-api into angular-16
Reviewed-on: #7
2023-10-26 14:29:37 +02:00
argirok 39ce7a7656 [angular-16-update-zenodo-api | DONE] : update zenodo community API - update method signature 2023-10-23 14:33:41 +03:00
argirok 23c6d4aebd Merge remote-tracking branch 'origin/develop' into angular-16
# Conflicts:
#	src/app/community/community.component.html
2023-10-18 09:06:09 +03:00
argirok d55480d830 change claims api to new 2023-10-17 09:17:58 +03:00
argirok 9e5505c297 fix issue with enermaps tab: use search-results instead of search-tab 2023-10-16 12:13:42 +03:00
argirok 62de83cf5a fix issue with enermaps feature tab 2023-10-13 13:25:29 +03:00
Konstantinos Triantafyllou 3427707d7f Remove opacity from search-from background for connect 2023-10-12 14:07:24 +03:00
Konstantinos Triantafyllou 31f7375e7d Merge remote-tracking branch 'origin/develop' into angular-16 2023-10-11 12:56:07 +03:00
Konstantinos Triantafyllou cc5d3cbdb3 Enable invite button for byInvitation commmunities with a link to admin portal. 2023-10-11 12:55:11 +03:00
Konstantinos Triantafyllou fba2d9161f Merge from Develop 2023-10-10 22:48:18 +03:00
Konstantinos Triantafyllou 7841e84ca1 Hide invite and join buttons in case of byInvitation membership. 2023-10-10 22:40:55 +03:00
Konstantinos Triantafyllou d900650016 Change slider nav items, period and infinite 2023-10-10 17:33:27 +03:00
Konstantinos Triantafyllou 0193362596 Merge from Develop 2023-10-06 19:52:40 +03:00
Konstantinos Triantafyllou c61927fa23 Update library 2023-10-06 19:50:52 +03:00
Konstantinos Triantafyllou 630bce44c9 Update library 2023-10-06 19:48:45 +03:00
argirok 38246614e1 Merge branch 'develop' 2023-10-06 17:56:08 +03:00
argirok 096d601d29 Merge branch 'new-api' into develop 2023-10-06 17:51:55 +03:00
argirok bd85954ece commit libraries 2023-10-06 17:51:26 +03:00
argirok bfcbaa6b7b Browse projects with new API: get results for the first load, after loading the funders 2023-10-06 17:28:37 +03:00
argirok 65da725887 Merge branch 'develop' into new-api 2023-10-06 16:43:50 +03:00
Konstantina Galouni 42d6aaf6eb Connect | develop: environments/: Added property swhURL 2023-10-06 15:39:32 +03:00
argirok 6824746d8a use new community API for filters and paging 2023-10-06 15:30:10 +03:00
Konstantinos Triantafyllou e9cfa28d5b Update theme and library 2023-10-06 14:51:06 +03:00
Konstantinos Triantafyllou 414cc8af19 Add connect logo in background of slider section in home page. Update theme. 2023-10-06 10:14:53 +03:00
Konstantinos Triantafyllou 48f04f313d Change scroll section with slider in home page of connect. 2023-10-05 17:06:54 +03:00
argirok 9603b117f9 Merge branch 'develop' into new-api 2023-10-02 15:09:49 +03:00
Konstantinos Triantafyllou 0de04c4017 Merge remote-tracking branch 'origin/develop' into angular-16 2023-09-26 11:55:28 +03:00
Konstantinos Triantafyllou 77b080ca9d Update types/node to version 16 2023-09-26 11:53:49 +03:00
Konstantinos Triantafyllou 80498eaa5c Merge from develop 2023-09-12 16:25:13 +03:00
Konstantinos Triantafyllou 9129ace1f8 Revert stepper in search in community's home page 2023-09-12 15:36:41 +03:00
Konstantinos Triantafyllou 2e50a4ff57 Merge remote-tracking branch 'origin/develop' 2023-09-05 17:46:58 +03:00
Konstantinos Triantafyllou 8da7eafe81 Change style of private community when user is not logged in. 2023-09-05 17:46:42 +03:00
Konstantinos Triantafyllou 88da038d24 Update library. Resolved Connect Release 5th September 2023 #6 2023-09-05 13:25:07 +03:00
Konstantinos Triantafyllou 33c6252484 Merge remote-tracking branch 'origin/develop' 2023-09-05 13:22:44 +03:00
Konstantinos Triantafyllou cd83db1b6a Update libraries 2023-09-05 13:19:57 +03:00
Konstantinos Triantafyllou c31205bec8 Merge from Develop 2023-08-30 16:49:36 +03:00
Konstantinos Triantafyllou c79a65c0e2 Add bipFrameAPIURL in properties 2023-08-30 16:48:51 +03:00
Konstantinos Triantafyllou c04c32fa00 Fix get-started button in mobile and add hasStickyHeaderInMobile for home and about pages. 2023-08-30 12:36:29 +03:00
Konstantinos Triantafyllou 0cc7d8ba10 Update uikit to version 3.16.24 2023-08-23 16:19:12 +03:00
Konstantinos Triantafyllou f4b62d391a Delete ServerTranferStateModule 2023-08-04 15:51:14 +03:00
Konstantinos Triantafyllou 3accce265c Update material to angular 16. 2023-08-04 13:41:12 +03:00
Konstantinos Triantafyllou e503f70782 Update angular to version 16 2023-08-04 13:40:26 +03:00
Konstantinos Triantafyllou b1a7906892 Update Zone to 0.13.1 2023-08-04 13:36:29 +03:00
Konstantinos Triantafyllou 16e7a9ff0a Update material to angular 15. 2023-08-04 13:35:48 +03:00
Konstantinos Triantafyllou 0d0c71b03d Migrate angular core and cli to version 15 and update dependencies to be compatible with the newer version. 2023-08-04 13:32:54 +03:00
Konstantinos Triantafyllou 3d7cba5343 Update typescript to version 4.9.5 2023-08-04 13:30:30 +03:00
Konstantinos Triantafyllou 6e74a775ce Update libraries 2023-08-04 13:29:26 +03:00
argirok 6e37f65d5d comment text about statistics 2023-07-28 11:30:42 +03:00
Konstantina Galouni 216cf172bd [Connect | develop]: In search bars, set in placeholder the portal name according to the configuration name | Removed stepper from search bars in community home page, search projects and search datasources pages.
1. community.component: Get portalName by config.portalAsObservable>name and set placeholder to "Search "+portalName | Replaced input directive with search-input to remove stepper from search bar in community home page.
2. searchDataproviders.component.ts & searchProjects.component.ts: In <new-search-page> set [entitiesSelection]="false" to remove stepper from search bar in search projects and search datasources pages.
2023-07-24 19:19:26 +03:00
argirok b978fb087b my communities: change status check 2023-07-19 14:37:26 +03:00
argirok 7eb2335c20 use methods isPublic, isRestricted, isPrivate instead of using the previous checks and add validateStatus method 2023-07-19 14:21:39 +03:00
argirok a275a4d0bf Merge remote-tracking branch 'origin/develop' into develop 2023-07-18 12:14:32 +03:00
argirok e0ecdb2a2b develop: section for dumps - update according to mocks 2023-07-18 12:14:14 +03:00
Konstantinos Triantafyllou 6920159b10 Fix intersaction Observer in app, communities and learn-how. 2023-07-17 12:41:32 +03:00
argirok 8aae6d6d80 Deposit: show zenodo communities page if there is main OR other related communities 2023-07-17 12:09:49 +03:00
argirok f53af36929 apply changes to projects and zenodo communities pages and queries 2023-07-14 14:54:58 +03:00
Konstantinos Triantafyllou a03d41be9c Merging from dynamic piwik 2023-07-13 14:42:26 +03:00
Konstantinos Triantafyllou 72ae14a5bc Change piwik base on the new dynamic piwik. 2023-07-13 11:48:23 +03:00
Konstantina Galouni deff734962 [Connect & Library | develop]: [Bug fix] Refactor code for showing help button or not.
1. app-routing.module.ts: Set for routes with no help button, data: {hasQuickContact: false} | Set in landing routes data: {hasMenuSearchBar: true} to show search bar in menu.
2. communities.component.ts: Removed field "showQuickContact" | In constructor set quickContactService.setDisplay(false) | Refactor intersectionObserver.
3. app.component.ts: Updated checks for <quick-contact> | Added public bottomNotIntersecting: boolean; and public displayQuickContact: boolean; (check if intersecting with specific section in home page) | Added disconnect in ngOnDestroy for IntersectionObserver subscriptions.
2023-07-07 10:12:25 +03:00
Konstantinos Triantafyllou 1c5b428ea2 Merge remote-tracking branch 'origin/develop' 2023-06-30 11:14:29 +03:00
Konstantinos Triantafyllou 961bd57501 Update libraries before deployment 2023-06-30 11:13:24 +03:00
argirok fc44d3acb0 server.ts: remove check for variables, to build css for connect 2023-06-30 10:55:00 +03:00
argirok 5ecda2ba44 learn how: replace mock image 2023-06-30 10:54:23 +03:00
argirok 2923b218ef Develop: add section about community dumps 2023-06-30 10:53:54 +03:00
Konstantinos Triantafyllou d6f9a12eac Update library 2023-06-29 10:21:17 +03:00
Konstantinos Triantafyllou 4d87865c43 Featured Page: Add breadcrumbs if data.breadcrumbs exists. Add new pages /faqs and /roadmap for Community Gateway 2023-06-27 16:52:37 +03:00
Konstantinos Triantafyllou c0fc4608f2 Merge remote-tracking branch 'origin/develop' 2023-06-19 14:55:44 +03:00
Konstantinos Triantafyllou e3f88bdfd9 Update library 2023-06-19 14:55:21 +03:00
argirok 9f88a58a30 add checkForObsoleteVersion when creating the css for the dashboards 2023-06-19 11:24:13 +03:00
argirok 6ef9463216 update library before prod deployment 2023-06-16 14:46:32 +03:00
argirok 219c00722e Merge remote-tracking branch 'origin/develop' 2023-06-16 14:45:16 +03:00
Konstantinos Triantafyllou 302419dd5d Merge from origin/develop 2023-06-09 21:08:31 +03:00
argirok b20d0f0039 update community.less to enable light fonts for dark backgrounds 2023-06-09 13:56:32 +03:00
argirok 4396510205 add new community piwik id 2023-06-08 11:04:54 +03:00
Konstantinos Triantafyllou 4394b63736 Update library 2023-05-27 22:49:43 +03:00
Konstantina Galouni 2213efc403 Merged develop into master 2023-05-26 15:43:24 +03:00
Konstantina Galouni 90af1fbce7 Updating openaireLibrary before release 2023-05-26 15:41:36 +03:00
Konstantina Galouni b5d95fbac8 [Library | develop]: ISVocabularies.service.ts: [Bug fix] In methods getFos() and getSDGs(), removed check and call to cache - these files are always local | sdg.component.ts: Set customFilter and pass it as parameter to <sdg>. 2023-05-26 14:37:34 +03:00
Konstantinos Triantafyllou 4571812fe6 Merge remote-tracking branch 'origin/master' into develop 2023-05-25 17:14:53 +03:00
Konstantinos Triantafyllou ff4be90cfc Update library, assets and theme before release 2023-05-25 17:13:38 +03:00
Konstantinos Triantafyllou 59b6d14342 Add hasMachineCache: true in production. Fix css loading bug when a community is restricted. 2023-05-25 16:38:18 +03:00
Konstantina Galouni a855a7491d [Connect | develop]: app.component.ts: Updated when and how "initAdminToolCommunity()" is called to init css - for community gateway, always display its customized css when exists | Updating libraries. 2023-05-25 12:24:47 +03:00
Konstantinos Triantafyllou 27511be14e App component: Check this.document instead of client document. 2023-05-24 14:31:50 +03:00
Konstantinos Triantafyllou c9d02ebcd7 Update assets and theme 2023-05-24 12:38:04 +03:00
Konstantinos Triantafyllou bb67b6a668 Community home page: Init resultTypes to empty array before adding entities. 2023-05-24 12:37:20 +03:00
Konstantinos Triantafyllou 4060fd9fad Fix login property. Fix bottom observer in server side. Update library 2023-05-11 14:36:54 +03:00
Konstantinos Triantafyllou 482f0e2816 Update library before beta deployment 2023-05-02 14:31:15 +03:00
Konstantinos Triantafyllou 3f9dc502b3 Merge branch 'develop' into dynamic-piwik 2023-04-27 16:52:32 +03:00
Konstantinos Triantafyllou 46081dc193 Update UIKit to 3.13.10 2023-04-27 11:49:57 +03:00
Konstantinos Triantafyllou 4701eae560 Change piwik service methods in order to get the piwik from portal configuration 2023-04-26 14:27:41 +03:00
Konstantinos Triantafyllou 620b924cbe Update library and theme 2023-04-26 10:51:14 +03:00
Konstantinos Triantafyllou 3c622ae568 Update UIkit to version 3.13.0 2023-04-25 17:06:38 +03:00
Konstantina Galouni e6e9e06dfa [Connect | master]: Added FoS and SDGs pages in Community Gateways | Bug fixes in piwik siteIds.
1. app.component.ts: Added MenuItems for Fields of Science and Sustainable Development Goals.
2. app-routing.module.ts: Added routing paths for /sdgs and /fields-of-science.
3. /fos & /sdgs: Added folders and files for new SDGs and FoS pages.
4. piwikHelper.ts: Added piwik for "egrise", "euconexus", "dth".
5. affiliations.component.ts: [Bug fix] Comment piwik track call (this component is called with/in other pages that are already tracked).
6. htmlPage.component.ts: [Bug fix] Get piwik siteId from PiwikHelper (TODO: Should get it by API).
2023-04-21 15:09:22 +03:00
Konstantinos Triantafyllou 8da98e7959 Update assets and theme 2023-04-20 15:02:55 +03:00
Konstantinos Triantafyllou c8cdfb1417 Update library to the latest connect production 2023-04-20 14:40:18 +03:00
Konstantinos Triantafyllou cea93177be Update libraries before beta deploy 2023-03-28 12:04:10 +03:00
Alex Martzios 6e6676003d display new subjects (sdg/fos) in home and subjects pages of the community gateways 2023-03-16 16:38:37 +02:00
Alex Martzios 8c7933a1ea create develop branch 2023-03-15 12:41:13 +02:00
Konstantina Galouni 206d18c60a [Connect]: community.component.html: Remove properties.environment != 'production' check for enermaps "Featured Datasets" tab | app.component.ts: [Bug fix] Added undefined check before creating intersection observers. 2023-01-18 12:34:24 +02:00
Konstantinos Triantafyllou 1e78ba1c28 Update library before production release 2022-12-21 10:50:00 +02:00
Konstantinos Triantafyllou d90bd267ce Update libraries before beta deployment 2022-12-16 16:03:38 +02:00
Konstantina Galouni 04ac994085 [Library | angular-14]: navigationBar.component: Added field "public featuredAlignment: string = MenuAlignment.CENTER.valueOf();" and align custom menu according to this, dynamically. 2022-12-09 16:49:07 +02:00
Konstantina Galouni 3ea51a7e02 [Connect]: inviteBasic.module.ts: Deleted this.iconsService.registerIcons([cog]) and unused icon "send". 2022-12-09 16:47:32 +02:00
Konstantinos Triantafyllou 79a9e7cd05 Add argo-france and knowmad in piwikHelper 2022-12-08 10:18:15 +02:00
Konstantina Galouni 59c0a3552c [Connect]: featured/featuredPage.component.ts & featured/featuredPage.module.ts & featured/featuredPage-routing.module.ts: Added files for loading custom, gateway specific pages | app-routing.module.ts: Added commented route resolving for loading custom, gateway specific pages. 2022-12-07 12:48:47 +02:00
88 changed files with 2563 additions and 2305 deletions

View File

@ -212,13 +212,16 @@
"main": "server.ts",
"tsConfig": "src/tsconfig.server.json",
"sourceMap": true,
"optimization": false
"optimization": false,
"buildOptimizer": false
},
"configurations": {
"development": {
"outputHashing": "media",
"sourceMap": false,
"optimization": true
"optimization": true,
"vendorChunk": true,
"buildOptimizer": true
},
"beta": {
"outputHashing": "media",
@ -229,7 +232,8 @@
}
],
"sourceMap": false,
"optimization": true
"optimization": true,
"buildOptimizer": true
},
"production": {
"outputHashing": "media",
@ -240,7 +244,8 @@
}
],
"sourceMap": false,
"optimization": true
"optimization": true,
"buildOptimizer": true
}
},
"defaultConfiguration": ""

View File

@ -21,19 +21,19 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^14.2.3",
"@angular/cdk": "^14.2.2",
"@angular/common": "^14.2.3",
"@angular/compiler": "^14.2.3",
"@angular/core": "^14.2.3",
"@angular/forms": "^14.2.3",
"@angular/localize": "^14.2.3",
"@angular/material": "^14.2.2",
"@angular/platform-browser": "^14.2.3",
"@angular/platform-browser-dynamic": "^14.2.3",
"@angular/platform-server": "^14.2.3",
"@angular/router": "^14.2.3",
"@nguniversal/express-engine": "^14.2.0",
"@angular/animations": "^16.1.8",
"@angular/cdk": "^16.1.7",
"@angular/common": "^16.1.8",
"@angular/compiler": "^16.1.8",
"@angular/core": "^16.1.8",
"@angular/forms": "^16.1.8",
"@angular/localize": "^16.1.8",
"@angular/material": "^16.1.7",
"@angular/platform-browser": "^16.1.8",
"@angular/platform-browser-dynamic": "^16.1.8",
"@angular/platform-server": "^16.1.8",
"@angular/router": "^16.1.8",
"@nguniversal/express-engine": "^16.1.1",
"@node-minify/clean-css": "^6.2.0",
"@node-minify/core": "^6.2.0",
"axios": "^0.27.2",
@ -41,25 +41,25 @@
"core-js": "^2.5.4",
"express": "^4.15.2",
"jquery": "^3.4.1",
"ng-recaptcha": "^10.0.0",
"ng-recaptcha": "^12.0.2",
"ng2-ckeditor": "1.3.7",
"rxjs": "^6.5.1",
"ts-md5": "^1.2.0",
"tslib": "^2.0.0",
"uikit": "3.12.0",
"zone.js": "~0.11.4"
"uikit": "3.16.24",
"zone.js": "~0.13.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.2.3",
"@angular/cli": "^14.2.3",
"@angular/compiler-cli": "^14.2.3",
"@angular/language-service": "^14.2.3",
"@nguniversal/builders": "^14.2.0",
"@angular-devkit/build-angular": "^16.1.7",
"@angular/cli": "^16.1.7",
"@angular/compiler-cli": "^16.1.8",
"@angular/language-service": "^16.1.8",
"@nguniversal/builders": "^16.1.1",
"@types/compression": "^1.7.0",
"@types/express": "^4.17.0",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"@types/node": "^16.18.50",
"@types/ckeditor": "^4.9.10",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.8.0",
@ -71,6 +71,6 @@
"karma-jasmine-html-reporter": "^1.6.0",
"protractor": "~7.0.0",
"ts-node": "~7.0.0",
"typescript": "~4.6.4"
"typescript": "~4.9.5"
}
}

View File

@ -11,7 +11,7 @@ import {existsSync} from 'fs';
import {REQUEST, RESPONSE} from "./src/app/openaireLibrary/utils/tokens";
import {isArray} from "util";
import {properties} from "./src/environments/environment";
import {Layout} from "./src/app/openaireLibrary/connect/community/CustomizationOptions";
import {CustomizationOptions, Layout} from "./src/app/openaireLibrary/connect/community/CustomizationOptions";
import {Response} from "express";
const fs = require('fs');
@ -79,7 +79,7 @@ function buildAll(res: Response = null) {
axios.get(layoutsURL).then(response => {
if (response.data && Array.isArray(response.data) && response.data.length > 0) {
response.data.forEach((layout: Layout) => {
let variables = Layout.getVariables(layout.layoutOptions);
let variables = Layout.getVariables(CustomizationOptions.checkForObsoleteVersion(layout.layoutOptions, layout.portalPid));
buildCss(layout.portalPid, layout.date ? layout.date : null, variables);
});
if (res) {
@ -185,26 +185,18 @@ export function app() {
});
server.post('/build-css/:id/:suffix', jsonParser,(req, res) => {
let variables = Layout.getVariables(req.body);
if (variables) {
let variables = Layout.getVariables(CustomizationOptions.checkForObsoleteVersion(req.body, req.params.id));
buildCss(req.params.id , req.params.suffix, variables);
res.status(200).send({
code: 200,
message: 'CSS build for ' + req.params.id + ' layout was successful'
});
} else {
res.status(500).send({code: 500, message: 'No variables found'});
}
});
server.post('/build-css/preview/:id/:suffix', jsonParser, (req, res) => {
let variables = Layout.getVariables(req.body);
if (variables) {
let variables = Layout.getVariables(CustomizationOptions.checkForObsoleteVersion(req.body, req.params.id));
buildCss(req.params.id, req.params.suffix, variables);
res.status(200).send({code: 200, message: 'CSS build for ' + req.params.id + ' layout was successful'});
} else {
res.status(500).send({code: 500, message: 'No layout found'});
}
});
// Example Express Rest API endpoints
// server.get('/api/**', (req, res) => { });

View File

@ -1,5 +1,3 @@
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
<ng-template #card let-organization="organization" let-fullView="fullView">
<div [class]="fullView?'uk-card-body uk-height-1-1 uk-flex uk-flex-column uk-flex-around':''">
<div class="affiliation-logo">

View File

@ -1,20 +1,16 @@
import {Component, Input} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {Title, Meta} from '@angular/platform-browser';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import {AffiliationService} from "../openaireLibrary/connect/affiliations/affiliation.service";
import {Affiliation} from "../openaireLibrary/utils/entities/CuratorInfo";
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
import {PiwikHelper} from "../utils/piwikHelper";
import {Component, Input} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import {AffiliationService} from "../openaireLibrary/connect/affiliations/affiliation.service";
import {Affiliation} from "../openaireLibrary/utils/entities/CuratorInfo";
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
import {Subscriber} from "rxjs";
import {properties} from "../../environments/environment";
@Component({
selector: 'affiliations',
templateUrl: './affiliations.component.html',
styleUrls: ['./affiliations.component.less']
styleUrls: ['./affiliations.component.less']
})
export class AffiliationsComponent {
@Input() getAffiliationsFromAPI: boolean = false;
@ -24,61 +20,33 @@ export class AffiliationsComponent {
@Input() affiliations: Affiliation[] = [];
@Input() sliderOptions = '';
@Input() arrows = true;
public showLoading: boolean = false;
communityId: string;
properties:EnvProperties;
subscriptions = [];
public url: string = null;
public pageTitle: string = "Related Organizations";
constructor ( private route: ActivatedRoute, private _router: Router,
private _meta: Meta,
private _title: Title,
private seoService: SEOService,
private _piwikService: PiwikService,
private affiliationService: AffiliationService) {}
public ngOnInit() {
this.subscriptions.push(this.route.queryParams.subscribe(
communityId => {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
if(!this.communityId) {
this.communityId = communityId['communityId'];
}
this.properties = properties;
if(this.longView) {
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.communityId)).subscribe());
}
this.url = this.properties.domain + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url);
this.updateTitle(this.pageTitle);
this.updateDescription("OpenAIRE - Connect, Community Gateway, research community, organizations");
}
if(this.getAffiliationsFromAPI) {
this.showLoading = true;
this.affiliationService.initAffiliations(this.communityId);
this.subscriptions.push(this.affiliationService.affiliations.subscribe(
affiliations => {
this.affiliations = affiliations.filter((affiliation) => this.longView || !!affiliation['logo_url']);
this.showLoading = false;
},
error => {
console.error("Affiliations Component: Error getting affiliations for community with id: " + this.communityId, error);
this.showLoading = false;
}
));
}
}));
public communityId: string;
public properties: EnvProperties = properties;
private subscriptions = [];
constructor(private route: ActivatedRoute, private affiliationService: AffiliationService) {
}
public ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
if (this.getAffiliationsFromAPI) {
this.showLoading = true;
this.affiliationService.initAffiliations(this.communityId);
this.subscriptions.push(this.affiliationService.affiliations.subscribe(
affiliations => {
this.affiliations = affiliations.filter((affiliation) => this.longView || !!affiliation['logo_url']);
this.showLoading = false;
},
error => {
console.error("Affiliations Component: Error getting affiliations for community with id: " + this.communityId, error);
this.showLoading = false;
}
));
}
}
ngOnDestroy() {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) {
@ -87,19 +55,4 @@ export class AffiliationsComponent {
});
this.affiliationService.clearSubscriptions();
}
private updateDescription(description: string) {
this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'");
}
private updateTitle(title: string) {
var _title = ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");
}
private updateUrl(url: string) {
this._meta.updateTag({content: url}, "property='og:url'");
}
}

View File

@ -1,4 +1,4 @@
import { NgModule } from '@angular/core';
import {NgModule} from '@angular/core';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard'
@ -7,15 +7,11 @@ import {RouterModule} from '@angular/router';
import {AffiliationsComponent} from './affiliations.component';
import {AffiliationService} from "../openaireLibrary/connect/affiliations/affiliation.service";
import {CommonModule} from "@angular/common";
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
import {PiwikServiceModule} from "../openaireLibrary/utils/piwik/piwikService.module";
import {UrlPrefixModule} from "../openaireLibrary/utils/pipes/url-prefix.module";
@NgModule({
imports: [
CommonModule, RouterModule, Schema2jsonldModule, SEOServiceModule,
PiwikServiceModule, UrlPrefixModule
CommonModule, RouterModule, UrlPrefixModule
],
declarations: [
AffiliationsComponent

View File

@ -6,91 +6,161 @@ import {IsCommunity} from "./openaireLibrary/connect/communityGuard/isCommunity.
const routes: Routes = [
// ORCID Pages
{path: 'orcid', loadChildren: () => import('./orcid/orcid.module').then(m => m.LibOrcidModule)},
{path: 'my-orcid-links', loadChildren: () => import('./orcid/my-orcid-links/myOrcidLinks.module').then(m => m.LibMyOrcidLinksModule)},
{
path: 'orcid',
loadChildren: () => import('./orcid/orcid.module').then(m => m.LibOrcidModule),
data: {hasQuickContact: false}
},
{
path: 'my-orcid-links',
loadChildren: () => import('./orcid/my-orcid-links/myOrcidLinks.module').then(m => m.LibMyOrcidLinksModule),
data: {hasQuickContact: false}
},
/** Other Pages */
{path: '', loadChildren: () => import('./communitywrapper/communityWrapper.module').then(m => m.CommunityWrapperModule)},
{
path: '',
loadChildren: () => import('./communitywrapper/communityWrapper.module').then(m => m.CommunityWrapperModule),
data: {hasStickyHeaderOnMobile: true}
},
{path: 'about', redirectTo: 'about/learn-how', pathMatch: 'full'},
{path: 'about/learn-how', loadChildren: () => import('./learn-how/learn-how.module').then(m => m.LearnHowModule)},
{path: 'about/faq', loadChildren: () => import('./learn-how/faqs/faqs.module').then(m => m.FaqsModule)},
{path: 'about/learn-how', loadChildren: () => import('./learn-how/learn-how.module').then(m => m.LearnHowModule), data: {hasStickyHeaderOnMobile: true}},
{path: 'about/faq', loadChildren: () => import('./learn-how/faqs/faqs.module').then(m => m.FaqsModule), data: {hasStickyHeaderOnMobile: true}},
{path: 'get-started', loadChildren: () => import('./get-started/get-started.module').then(m => m.GetStartedModule)},
{path: 'contact-us', loadChildren: () => import('./contact/contact.module').then(m => m.ContactModule)},
{path: 'invite', loadChildren: () => import('./utils/subscribe/invite/invite.module').then(m => m.InviteModule)},
{path: 'content', loadChildren: () => import('./content/contentPage.module').then(m => m.ContentPageModule), canActivate: [IsCommunity]},
{
path: 'contact-us',
loadChildren: () => import('./contact/contact.module').then(m => m.ContactModule),
data: {hasQuickContact: false}
},
{
path: 'invite',
loadChildren: () => import('./utils/subscribe/invite/invite.module').then(m => m.InviteModule),
data: {hasQuickContact: false}
},
{
path: 'content',
loadChildren: () => import('./content/contentPage.module').then(m => m.ContentPageModule),
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'sdgs',
loadChildren: () => import('./sdg/sdg.module').then(m => m.LibSdgModule),
data: {hasQuickContact: false}
},
{
path: 'fields-of-science',
loadChildren: () => import('./fos/fos.module').then(m => m.LibFosModule),
data: {extraOffset: 100, hasQuickContact: false}
},
{
path: 'organizations',
loadChildren: () => import('./htmlPages/organizations/organizationsPage.module').then(m => m.OrganizationsPageModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'publications',
loadChildren: () => import('./htmlPages/publications/publications-page.module').then(m => m.PublicationsPageModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'projects',
loadChildren: () => import('./htmlPages/projects/projectsPage.module').then(m => m.ProjectsPageModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'national-bulletins',
loadChildren: () => import('./htmlPages/nationalBulletins/nationalBulletinsPage.module').then(m => m.NaionalBulletinPageModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'faqs',
loadChildren: () => import('./htmlPages/featured/featuredPage.module').then(m => m.FeaturedPageModule),
data: {hasQuickContact: false}
},
{
path: 'roadmap',
loadChildren: () => import('./htmlPages/featured/featuredPage.module').then(m => m.FeaturedPageModule),
data: {hasQuickContact: false}
},
// {
// path: 'featured',
// children: [
// {
// path: '',
// loadChildren: () => import('./htmlPages/featured/featuredPage.module').then(m => m.FeaturedPageModule),
// data: {hasQuickContact: false}, canActivateChild: [IsCommunity],
// },
// {
// path: '**',
// loadChildren: () => import('./htmlPages/featured/featuredPage.module').then(m => m.FeaturedPageModule),
// data: {hasQuickContact: false}, canActivateChild: [IsCommunity],
// },
// ]
// },
{
path: 'curators',
loadChildren: () => import('./curators/curators.module').then(m => m.CuratorsModule),
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'subjects',
loadChildren: () => import('./subjects/subjects.module').then(m => m.SubjectsModule),
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'myCommunities',
loadChildren: () => import('./my-communities/my-communities.module').then(m => m.MyCommunitiesModule)
},
{
path: 'develop',
loadChildren: () => import('./develop/develop.module').then(m => m.DevelopModule),
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{path: 'curators', loadChildren: () => import('./curators/curators.module').then(m => m.CuratorsModule), canActivate: [IsCommunity]},
{path: 'subjects', loadChildren: () => import('./subjects/subjects.module').then(m => m.SubjectsModule), canActivate: [IsCommunity]},
{path: 'myCommunities', loadChildren: () => import('./my-communities/my-communities.module').then(m => m.MyCommunitiesModule)},
{
path: 'develop',
loadChildren: () => import('./develop/develop.module').then(m => m.DevelopModule), canActivate: [IsCommunity]
},
/** Testing Page for help contents */
{path: 'helper-test', loadChildren: () => import('./helper-test/helper-test.module').then(m => m.HelperTestModule)},
/** Landing Pages */
{
path: 'search/result',
loadChildren: () => import('./landingPages/result/libResult.module').then(m => m.LibResultModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
},
{
path: 'search/publication',
loadChildren: () => import('./landingPages/publication/libPublication.module').then(m => m.LibPublicationModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
},
{
path: 'search/dataset',
loadChildren: () => import('./landingPages/dataset/libDataset.module').then(m => m.LibDatasetModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
},
{
path: 'search/software',
loadChildren: () => import('./landingPages/software/libSoftware.module').then(m => m.LibSoftwareModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
},
{
path: 'search/other', loadChildren: () => import('./landingPages/orp/libOrp.module').then(m => m.LibOrpModule),
data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
},
{path: 'search/other', loadChildren: () => import('./landingPages/orp/libOrp.module').then(m => m.LibOrpModule), canActivate: [IsCommunity]},
{
path: 'search/project',
loadChildren: () => import('./landingPages/project/libProject.module').then(m => m.LibProjectModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
},
{
path: 'search/dataprovider',
loadChildren: () => import('././landingPages/dataProvider/libDataProvider.module').then(m => m.LibDataProviderModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
},
{
path: 'search/organization',
loadChildren: () => import('./landingPages/organization/libOrganization.module').then(m => m.LibOrganizationModule),
canActivate: [IsCommunity]
},
{
path: 'project-report',
loadChildren: () => import('./landingPages/htmlProjectReport/libHtmlProjectReport.module').then(m => m.LibHtmlProjectReportModule)
data: {hasQuickContact: false, hasMenuSearchBar: true}, canActivate: [IsCommunity]
},
/** Search Pages */
{path: 'search/find', redirectTo: 'search/find/research-outcomes', pathMatch: 'full'},
{
path: 'search/find/communities',
loadChildren: () => import('./searchPages/communities/searchCommunities.module').then(m => m.SearchCommunitiesModule)
@ -98,46 +168,86 @@ const routes: Routes = [
{
path: 'search/find/research-outcomes',
loadChildren: () => import('./searchPages/simple/searchResearchResults.module').then(m => m.OpenaireSearchResearchResultsModule),
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'search/find/publications',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity]
},
{
path: 'search/find/datasets',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity]
},
{
path: 'search/find/software',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity]
},
{
path: 'search/find/other',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity]
},
{path: 'search/find/publications', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{path: 'search/find/datasets', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{path: 'search/find/software', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{path: 'search/find/other', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{
path: 'search/find/projects',
loadChildren: () => import('./searchPages/simple/searchProjects.module').then(m => m.LibSearchProjectsModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'search/find/dataproviders',
loadChildren: () => import('./searchPages/simple/searchDataProviders.module').then(m => m.LibSearchDataProvidersModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
/** Advanced Search Pages */
{
path: 'search/advanced/research-outcomes',
loadChildren: () => import('./searchPages/advanced/searchResearchResults.module').then(m => m.OpenaireAdvancedSearchResearchResultsModule),
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'search/advanced/publications',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity]
},
{
path: 'search/advanced/datasets',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity]
},
{
path: 'search/advanced/software',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity]
},
{
path: 'search/advanced/other',
component: PageURLResolverComponent,
data: {hasQuickContact: false},
canActivate: [IsCommunity]
},
{path: 'search/advanced/publications', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{path: 'search/advanced/datasets', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{path: 'search/advanced/software', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{path: 'search/advanced/other', component: PageURLResolverComponent, canActivate: [IsCommunity]},
{
path: 'search/advanced/organizations',
loadChildren: () => import('./searchPages/advanced/advancedSearchOrganizations.module').then(m => m.LibAdvancedSearchOrganizationsModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'search/advanced/dataproviders',
loadChildren: () => import('./searchPages/advanced/advancedSearchDataProviders.module').then(m => m.LibAdvancedSearchDataProvidersModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'search/advanced/projects',
loadChildren: () => import('./searchPages/advanced/advancedSearchProjects.module').then(m => m.LibAdvancedSearchProjectsModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
/** Deposit Pages */
{ path: 'participate/deposit-datasets',
@ -161,41 +271,56 @@ const routes: Routes = [
{
path: 'participate/deposit/learn-how',
loadChildren: () => import('./deposit/deposit.module').then(m => m.LibDepositModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'participate/deposit/search',
loadChildren: () => import('./deposit/searchDataprovidersToDeposit.module').then(m => m.LibSearchDataprovidersToDepositModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'participate/deposit/zenodo',
loadChildren: () => import('./deposit/zenodo/shareInZenodo.module').then(m => m.ShareInZenodoModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
/** Linking Pages */
{path: 'myclaims', loadChildren: () => import('./claims/myClaims/myClaims.module').then(m => m.LibMyClaimsModule), canActivate: [IsCommunity]},
{
path: 'myclaims', loadChildren: () => import('./claims/myClaims/myClaims.module').then(m => m.LibMyClaimsModule),
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'participate/claim',
loadChildren: () => import('./claims/linking/linkingGeneric.module').then(m => m.LibLinkingGenericModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'participate/direct-claim',
loadChildren: () => import('./claims/directLinking/directLinking.module').then(m => m.LibDirectLinkingModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
{
path: 'preview',
loadChildren: () => import('./demo/demo.module').then(m => m.DemoModule),
canActivate: [IsCommunity]
data: {hasQuickContact: false}, canActivate: [IsCommunity]
},
/** help pages - do not exist in Admin portal/api/db */
{path: 'reload', loadChildren: () => import('./reload/libReload.module').then(m => m.LibReloadModule)},
{path: 'user-info', loadChildren: () => import('./login/libUser.module').then(m => m.LibUserModule)},
{path: 'error', component: OpenaireErrorPageComponent},
{path: 'theme', loadChildren: () => import('./openaireLibrary/utils/theme/theme.module').then(m => m.ThemeModule)},
{path: '**', pathMatch: 'full', component: OpenaireErrorPageComponent}
{
path: 'reload',
loadChildren: () => import('./reload/libReload.module').then(m => m.LibReloadModule),
data: {hasQuickContact: false}
},
{
path: 'user-info',
loadChildren: () => import('./login/libUser.module').then(m => m.LibUserModule),
data: {hasQuickContact: false}
},
{path: 'error', component: OpenaireErrorPageComponent, data: {hasQuickContact: false}},
{
path: 'theme',
loadChildren: () => import('./openaireLibrary/utils/theme/theme.module').then(m => m.ThemeModule),
data: {hasQuickContact: false}
},
{path: '**', pathMatch: 'full', component: OpenaireErrorPageComponent, data: {hasQuickContact: false}}
];
@NgModule({

View File

@ -1,4 +1,14 @@
import {Component, ElementRef, Inject, OnDestroy, OnInit, RendererFactory2, ViewChild, ViewEncapsulation} from '@angular/core';
import {
ChangeDetectorRef,
Component,
ElementRef,
Inject,
OnDestroy,
OnInit, PLATFORM_ID,
RendererFactory2,
ViewChild,
ViewEncapsulation
} from '@angular/core';
import {ActivatedRoute, NavigationEnd, Router} from '@angular/router';
import {EnvProperties} from './openaireLibrary/utils/properties/env-properties';
@ -11,14 +21,14 @@ import {UserManagementService} from "./openaireLibrary/services/user-management.
import {ConfigurationService} from "./openaireLibrary/utils/configuration/configuration.service";
import {properties} from '../environments/environment';
import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component";
import {AsyncSubject, Subscriber} from "rxjs";
import {Subscriber} from "rxjs";
import {CommunityService} from "./openaireLibrary/connect/community/community.service";
import {StringUtils} from "./openaireLibrary/utils/string-utils.class";
import {LoginErrorCodes} from "./openaireLibrary/login/utils/guardHelper.class";
import {CustomizationOptions, Layout} from "./openaireLibrary/connect/community/CustomizationOptions";
import {Layout} from "./openaireLibrary/connect/community/CustomizationOptions";
import {CustomizationService} from "./openaireLibrary/services/customization.service";
import {SmoothScroll} from "./openaireLibrary/utils/smooth-scroll";
import {Meta} from "@angular/platform-browser";
import {makeStateKey, StateKey, TransferState} from "@angular/core";
import {CommunityInfo} from "./openaireLibrary/connect/community/communityInfo";
import {SEOService} from "./openaireLibrary/sharedComponents/SEO/SEO.service";
import {UntypedFormBuilder, UntypedFormGroup, Validators} from "@angular/forms";
@ -29,22 +39,25 @@ import {QuickContactComponent} from "./openaireLibrary/sharedComponents/quick-co
import {Composer} from "./openaireLibrary/utils/email/composer";
import {NotificationHandler} from "./openaireLibrary/utils/notification-handler";
import {OpenaireEntities} from "./openaireLibrary/utils/properties/searchFields";
import {DOCUMENT} from "@angular/common";
import {DOCUMENT, isPlatformServer} from "@angular/common";
import {AdvancedAsyncSubject} from "./openaireLibrary/utils/AdvancedAsyncSubject";
import {LayoutService} from "./openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
import {Meta} from "@angular/platform-browser";
@Component({
selector: 'app-root',
template: `
<div [class]="(community)?(community.communityId +'App communityApp'):'connectApp'">
<div id="modal-container"></div>
<navbar *ngIf="properties && showMenu && !community && header" [portal]="properties.dashboard" [onlyTop]=false
<navbar #navbar *ngIf="properties && showMenu && !community && header" [portal]="properties.dashboard" [onlyTop]=false
[userMenuItems]=userMenuItems [menuItems]=menuItems [user]="user" [header]="header"
[showMenu]=showMenu [properties]="properties" [showHomeMenuItem]="false" communityId="connect">
<ul *ngIf="showGetStarted" extra-s class="uk-nav uk-nav-default uk-margin-small-top">
<li routerLinkActive="uk-active">
<a routerLink="/get-started">Get Started</a>
</li>
</ul>
<a *ngIf="showGetStarted" extra-m class="uk-button uk-button-small uk-button-primary uk-text-uppercase uk-margin-left" routerLink="/get-started">Get Started</a>
<div *ngIf="showGetStarted" extra-s class="uk-margin-large-top uk-margin-left">
<a class="uk-button uk-button-primary uk-text-uppercase" routerLink="/get-started" (click)="navbar.closeCanvas()">Get Started</a>
</div>
<a *ngIf="showGetStarted" extra-m
class="uk-button uk-button-small uk-button-primary uk-text-uppercase uk-margin-left"
routerLink="/get-started">Get Started</a>
</navbar>
<navbar *ngIf="properties && showMenu && community && header" [portal]="community.communityId" [onlyTop]=false
[communityId]="community.communityId" [header]="header"
@ -65,7 +78,8 @@ import {DOCUMENT} from "@angular/common";
<schema2jsonld *ngIf="properties && showMenu && communityId && communityId.length > 0 && community"
[URL]="properties.domain + properties.baseLink"
[logoURL]="community.logoUrl" type="home" [searchActionRoute]="properties.searchLinkToResults"
[name]="(community.shortTitle) ? community.shortTitle : community.title" [description]="community.description">
[name]="(community.shortTitle) ? community.shortTitle : community.title"
[description]="community.description">
</schema2jsonld>
<div class="custom-main-content">
<main>
@ -73,8 +87,8 @@ import {DOCUMENT} from "@angular/common";
</main>
</div>
<div id="joinAndInviteBtn" *ngIf="isClient && communityId && community">
<subscribe [communityId]="community.communityId"></subscribe>
<invite *ngIf="isManager" [longView]="false"></invite>
<subscribe *ngIf="community.isOpen()" [communityId]="community.communityId"></subscribe>
<invite *ngIf="isManager" [longView]="false" [communityId]="communityId" [isOpen]="community.isOpen()"></invite>
</div>
<!--feedback *ngIf= "isClient && properties" portalName="Connect" [feedbackQuestionaire]=properties.feedbackQuestionaire></feedback-->
<cookie-law *ngIf="isClient" position="bottom">
@ -88,18 +102,22 @@ import {DOCUMENT} from "@angular/common";
points="7 4 13 10 7 16"></polyline></svg>
</span></a>
</cookie-law>
<bottom #bottom *ngIf="properties && isClient && showMenu && !community" [grantAdvance]="false"
[properties]="properties"></bottom>
[properties]="properties"></bottom>
<bottom *ngIf="properties && isClient && showMenu && community" class=" communityPanelBackground "
[showSocialButtons]="true" [showMenuItems]="true" [grantAdvance]="false" [showOpenaire]="true"
[communityId]="community.communityId" [menuItems]=bottomMenuItems [properties]="properties"
[darkBackground]="true" [centered]="true"></bottom>
<quick-contact #quickContact *ngIf="showQuickContact && contactForm" (sendEmitter)="send($event)"
[contact]="'Help'" [images]="images" [background]="{class: 'uk-background-primary', dark: false}"
[contactForm]="contactForm" [sending]="sending"></quick-contact>
[showSocialButtons]="true" [showMenuItems]="true" [grantAdvance]="false" [showOpenaire]="true"
[communityId]="community.communityId" [menuItems]=bottomMenuItems [properties]="properties"
[centered]="true"></bottom>
<quick-contact #quickContact
*ngIf="!community && bottomNotIntersecting && displayQuickContact && showQuickContact && contactForm"
(sendEmitter)="send($event)"
[contact]="'Help'" [images]="images" [background]="{class: 'uk-background-primary', dark: false}"
[contactForm]="contactForm" [sending]="sending"></quick-contact>
<modal-alert #modal [overflowBody]="false"></modal-alert>
<role-verification *ngIf="community" service="connect"
[id]="community.communityId" [name]="community.title" [type]="community.type"></role-verification>
[id]="community.communityId" [name]="community.title"
[type]="community.type"></role-verification>
</div>
`
@ -109,7 +127,7 @@ export class AppComponent implements OnInit, OnDestroy {
userMenuItems: MenuItem[] = [];
menuItems: MenuItem [] = [];
bottomMenuItems: MenuItem[] = [];
public community:CommunityInfo = null;
public community: CommunityInfo = null;
properties: EnvProperties = properties;
showMenu: boolean = false;
communities = null;
@ -117,32 +135,44 @@ export class AppComponent implements OnInit, OnDestroy {
communityId: string = "";
header: Header;
logoPath: string = 'assets/common-assets/logo-services/connect/';
public showGetStarted: boolean = true;
/* Contact */
public showQuickContact: boolean;
public showGetStarted: boolean = true;
public bottomNotIntersecting: boolean;
public displayQuickContact: boolean; // intersecting with specific section in home page
public contactForm: UntypedFormGroup;
public sending = false;
public images: string[] = [];
@ViewChild('modal') modal: AlertModal;
@ViewChild('quickContact') quickContact: QuickContactComponent;
@ViewChild('bottom', {read: ElementRef}) bottom: ElementRef;
@ViewChild('bottom', {read: ElementRef}) bottom: ElementRef;
private subscriptions = [];
layout: Layout = null;
layouts: Layout[] = null;
layoutDefault: Layout = null;
layoutConnect: Layout = null;
layoutSub = new AsyncSubject();
layoutSub = new AdvancedAsyncSubject<Layout[]>();
previewLayout = null;
constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService,
/**
* key for portal identity check (client - server: using transfer state
* */
key: StateKey<string> = makeStateKey<string>('portal');
constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService,
private _communitiesService: CommunitiesService, private smoothScroll: SmoothScroll,
private router: Router, private userManagementService: UserManagementService,
private configurationService: ConfigurationService, private _communityService: CommunityService,
private customizationService: CustomizationService, private _meta: Meta, private seoService: SEOService,
private quickContactService: QuickContactService,
private layoutService: LayoutService,
private fb: UntypedFormBuilder,
private emailService: EmailService,
@Inject(DOCUMENT) private document, private rendererFactory: RendererFactory2
) {
@Inject(DOCUMENT) private document,
private transferState: TransferState,
@Inject(PLATFORM_ID) private platformId: any,
private rendererFactory: RendererFactory2,
private cdr: ChangeDetectorRef
) {
this.subscriptions.push(router.events.forEach((event) => {
if (event instanceof NavigationEnd) {
if (event.url === '/contact-us') {
@ -157,15 +187,14 @@ export class AppComponent implements OnInit, OnDestroy {
}
ngOnInit() {
this.subscriptions.push(this.route.queryParams.subscribe(data => {
this.previewLayout = (data['previewLayout'] && data['previewLayout'].length >0 ? data['previewLayout']: null);
if (this.properties.environment == "production" || this.properties.environment == "development") {
this._meta.updateTag({content: 'all', name: 'robots'});
this.seoService.removeLinkForPrevURL();
this.seoService.removeLinkForNextURL();
}
}));
this.subscriptions.push(this.route.queryParams.subscribe(data => {
this.previewLayout = (data['previewLayout'] && data['previewLayout'].length > 0 ? data['previewLayout'] : null);
if (this.properties.environment == "production" || this.properties.environment == "development") {
this._meta.updateTag({content: 'all', name: 'robots'});
this.seoService.removeLinkForPrevURL();
this.seoService.removeLinkForNextURL();
}
}));
this._communitiesService.updateCommunities(this.properties, this.properties.communitiesAPI);
if (typeof document !== 'undefined') {
try {
@ -177,9 +206,19 @@ export class AppComponent implements OnInit, OnDestroy {
this.user = user;
this.init();
}, error => {
this.init()}));
this.init();
}));
this.subscriptions.push(this.layoutService.hasQuickContact.subscribe(hasQuickContact => {
if (this.showQuickContact !== hasQuickContact) {
this.showQuickContact = hasQuickContact;
this.cdr.detectChanges();
}
}));
this.subscriptions.push(this.quickContactService.isDisplayed.subscribe(display => {
this.showQuickContact = display;
if (this.displayQuickContact !== display) {
this.displayQuickContact = display;
this.cdr.detectChanges();
}
}));
}
@ -187,6 +226,8 @@ export class AppComponent implements OnInit, OnDestroy {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) {
subscription.unsubscribe();
} else if (typeof IntersectionObserver !== "undefined" && subscription instanceof IntersectionObserver) {
subscription.disconnect();
}
});
this._communitiesService.clearSubscriptions();
@ -195,32 +236,31 @@ export class AppComponent implements OnInit, OnDestroy {
this._communityService.clearSubscriptions();
this.smoothScroll.clearSubscriptions();
}
createObservers() {
let options = {
root: null,
rootMargin: '0px',
threshold: 0.1
};
let intersectionObserver = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting && this.showQuickContact) {
this.showQuickContact = false;
this.quickContactService.setDisplay(this.showQuickContact);
} else if (!entry.isIntersecting && !this.showQuickContact) {
this.showQuickContact = true;
this.quickContactService.setDisplay(this.showQuickContact);
createObservers() {
let options = {
root: null,
rootMargin: '0px',
threshold: 0.1
};
let intersectionObserver = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (this.bottomNotIntersecting !== (!entry.isIntersecting)) {
this.bottomNotIntersecting = !entry.isIntersecting;
this.cdr.detectChanges();
}
});
}, options);
intersectionObserver.observe(this.bottom.nativeElement);
this.subscriptions.push(intersectionObserver);
}
}, options);
if (this.bottom) {
intersectionObserver.observe(this.bottom.nativeElement);
this.subscriptions.push(intersectionObserver);
}
}
get isManager() {
return Session.isCommunityCurator(this.user) || Session.isPortalAdministrator(this.user) || (this.communityId && Session.isManager('community', this.communityId, this.user))
}
get isPrivate() {
return this.community && !ConnectHelper.isPrivate(this.community, this.user)
}
@ -228,7 +268,7 @@ export class AppComponent implements OnInit, OnDestroy {
private init() {
let communityId: string = ConnectHelper.getCommunityFromDomain(this.properties.domain);
this.showMenu = false;
this.initAdminToolCommunity(communityId);
// this.initAdminToolCommunity(communityId);
this.buildMenu(communityId);
// this.communityId = communityId;
if (!communityId) {
@ -238,9 +278,9 @@ export class AppComponent implements OnInit, OnDestroy {
this.userManagementService.fixRedirectURL = null;
}
}
initCss(communityId, suffix=null) {
initCss(communityId, suffix = null) {
try {
const renderer = this.rendererFactory.createRenderer(this.document, {
id: '-1',
encapsulation: ViewEncapsulation.None,
@ -251,70 +291,74 @@ export class AppComponent implements OnInit, OnDestroy {
if (head === null) {
throw new Error('<head> not found within DOCUMENT.');
}
if(!this.document.getElementById("dashboardStyle")) {
if (!this.document.getElementById("dashboardStyle")) {
const script = renderer.createElement('link');
renderer.setAttribute(script, "id", "dashboardStyle");
renderer.setAttribute(script, "href", ((communityId) ? communityId : this.properties.adminToolsPortalType) + (suffix?"-"+suffix:"") + ".css");
renderer.setAttribute(script, "href", ((communityId) ? communityId : this.properties.adminToolsPortalType) + (suffix ? "-" + suffix : "") + ".css");
renderer.setAttribute(script, "rel", "stylesheet");
renderer.appendChild(head, script);
}else if(!this.previewLayout){
this.document.getElementById("dashboardStyle").href = ((communityId) ? communityId : this.properties.adminToolsPortalType)+ (suffix?"-"+suffix:"") + ".css";
// console.log(this.document.getElementById("dashboardStyle"));
} else if (!this.previewLayout) {
this.document.getElementById("dashboardStyle").href = ((communityId) ? communityId : this.properties.adminToolsPortalType) + (suffix ? "-" + suffix : "") + ".css";
}
} catch (e) {
console.error('Renderrer Error to append style ', e);
}
}
initAdminToolCommunity(communityId) {
if (communityId) {
this.properties.adminToolsPortalType = "community";
if (typeof document === 'undefined') {
if (this.document) {
this.initLayout(communityId);
}
}else{
} else {
this.properties.adminToolsPortalType = "connect";
if (typeof document === 'undefined') {
this.initLayout('connect');
if (this.document) {
this.initLayout(this.communityId?this.communityId:'connect');
}
}
this.configurationService.initCommunityInformation(this.properties, (communityId) ? communityId : this.properties.adminToolsPortalType);
this.configurationService.initPortal(this.properties, (communityId) ? communityId : this.properties.adminToolsPortalType);
}
getLayouts(){
getLayouts() {
this.customizationService.getLayouts(this.properties).subscribe(
layouts => {
this.layouts = layouts;
this.layoutDefault = layouts.filter(layout => layout.portalPid == 'default')[0];
this.layoutConnect = layouts.filter(layout => layout.portalPid == 'connect')[0];
this.layoutSub.next(this.layouts);
this.layoutSub.complete();
},
error => {
}
);
layouts => {
this.layouts = layouts;
this.layoutDefault = layouts.filter(layout => layout.portalPid == 'default')[0];
this.layoutConnect = layouts.filter(layout => layout.portalPid == 'connect')[0];
this.layoutSub.next(this.layouts);
},
error => {
this.layoutSub.next([]);
}
);
}
initLayout(communityId){
if(!this.layout && (typeof location == 'undefined') && !this.previewLayout) {
initLayout(communityId) {
let portal = this.transferState.get<string>(this.key, null);
if(isPlatformServer(this.platformId)) {
this.transferState.set(this.key, communityId);
}
if (!this.layout && (portal !== communityId) && !this.previewLayout) {
// if((typeof location == 'undefined') && !this.previewLayout) {
this.subscriptions.push(this.layoutSub.subscribe(value => {
this.layout = this.layouts.filter(layout => layout.portalPid == communityId)[0]?this.layouts.filter(layout => layout.portalPid == communityId)[0]:this.layouts.filter(layout => layout.portalPid == 'default')[0];
this.initCss(this.layout.portalPid, this.layout.date?this.layout.date:null)
this.layouts = value;
this.layout = this.layouts.filter(layout => layout.portalPid == communityId)[0] ? this.layouts.filter(layout => layout.portalPid == communityId)[0] : this.layouts.filter(layout => layout.portalPid == 'default')[0];
this.initCss(this.layout.portalPid, this.layout.date ? this.layout.date : null)
}));
}else if(this.previewLayout && this.previewLayout.split("-preview-")[0] == communityId){
} else if (this.previewLayout && this.previewLayout.split("-preview-")[0] == communityId) {
this.initCss(communityId, this.previewLayout.split(communityId)[1]);
}
}
public buildMenu(communityId: string) {
if (communityId) {
if (!this.community || this.communityId !== communityId) {
this.subscriptions.push(this._communityService.getCommunity(communityId).subscribe(community => {
if (community) {
this.community = community;
}else{
this.community = community;
} else {
this.community = null;
this.communityId = null;
}
@ -327,10 +371,11 @@ export class AppComponent implements OnInit, OnDestroy {
this.buildConnectMenu();
}
}
buildCommunityMenu(){
buildCommunityMenu() {
if (this.community && !ConnectHelper.isPrivate(this.community, this.user)) {
this.communityId = this.community.communityId;
this.initAdminToolCommunity(this.communityId);
this.header = {
// url: 'https://' + (this.properties.environment == 'beta' ? 'beta.' : '') + this.community.id + '.openaire.eu',
route: "/",
@ -377,10 +422,14 @@ export class AppComponent implements OnInit, OnDestroy {
new MenuItem("", "National Bulletins", "", "/national-bulletins", false, [], ["/national-bulletins"], {}),
new MenuItem("", "Subjects", "", "/subjects", false, [], ["/subjects"], {}),
new MenuItem("", "Projects and funding Opportunities", "", "/projects", false, [], ["/projects"], {}),
new MenuItem("", "Fields of Science", "", "/fields-of-science", false, [], ["/fields-of-science"], {}),
new MenuItem("", "Sustainable Development Goals", "", "/sdgs", false, [], ["/sdgs"], {}),
new MenuItem("", "FAQs", "", "/faqs", false, [], ["/faqs"], {}),
new MenuItem("", "Roadmap", "", "/roadmap", false, [], ["/roadmap"], {}),
]
));
this.menuItems.push(
new MenuItem("develop", "Develop", "", "/develop", false, [], ["/develop"], {}),
this.menuItems.push(
new MenuItem("develop", "Develop", "", "/develop", false, [], ["/develop"], {}),
);
if (this.isManager) {
this.menuItems.push(
@ -394,25 +443,26 @@ export class AppComponent implements OnInit, OnDestroy {
this.bottomMenuItems.push(new MenuItem("", "Sources and methodology", "", "/content", false, [], [], {}));
}
if (this.user) {
this.userMenuItems = [ /*new MenuItem("","My profile","","",false,[],[],{}),*/
new MenuItem("", "My ORCID links", "", "/my-orcid-links", false, [], [], {}),
this.userMenuItems = [
new MenuItem("", "My links", "", "/myclaims", false, [], ["/myclaims"], {}),
new MenuItem("", "Invite users", "", "/invite", false, [], [], {}),
];
if(properties.environment != 'beta'){
this.userMenuItems = [new MenuItem("", "My ORCID links", "", "/my-orcid-links", false, [], [], {})]
.concat(this.userMenuItems)
}
if (this.isManager) {
this.userMenuItems.push(new MenuItem("", "Support", "https://tools.openaire.eu/group/openaire_rcd", "", false, [], [], {}))
}
}
this.showMenu = true;
} else {
this.communityId = null;
this.properties.adminToolsPortalType = "connect";
this.configurationService.initCommunityInformation(this.properties, "connect");
this.initAdminToolCommunity(null);
this.communityId = (this.community && ConnectHelper.isPrivate(this.community, this.user))?this.community.communityId:null;
this.configurationService.initPortal(this.properties, "connect");
this.buildConnectMenu(true);
if (this.community && this.community.status == "manager") {
if (!this.user ) {
if(typeof location !== 'undefined' && location.pathname.indexOf("user-info") == -1) {
if (this.community && this.community.isRestricted()) {
if (!this.user) {
if (typeof location !== 'undefined' && location.pathname.indexOf("user-info") == -1) {
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_LOGIN,
@ -420,19 +470,21 @@ export class AppComponent implements OnInit, OnDestroy {
}
});
}
} else {
if(typeof location !== 'undefined' && location.pathname.indexOf("user-info") == -1) {
} else {
if (typeof location !== 'undefined' && location.pathname.indexOf("user-info") == -1) {
this.router.navigate(['/'], {queryParamsHandling: "merge"});
}
}
}else if (this.community && this.community.status == "hidden") {
} else if (this.community && (this.community.isPrivate())) {
this.router.navigate([this.properties.errorLink]);
}else{
this.router.navigate(['/'], this.community && this.community.status ? { queryParamsHandling: "merge" } : {});
} else {
this.router.navigate(['/'], this.community && this.community.status ? {queryParamsHandling: "merge"} : {});
}
}
}
buildConnectMenu(restrictedData: boolean = false) {
this.initAdminToolCommunity(null);
let url = "https://" + (properties.environment != "production" ? "beta." : "") + "connect.openaire.eu";
this.header = {
route: restrictedData ? "" : "/",
@ -474,9 +526,11 @@ export class AppComponent implements OnInit, OnDestroy {
restrictedData ? "" : "/myCommunities", false, [], [], {}));
}
this.showMenu = true;
setTimeout(() => {
this.createObservers();
});
if (typeof IntersectionObserver !== "undefined") {
setTimeout(() => {
this.createObservers();
});
}
}
/**

View File

@ -1,8 +1,8 @@
import {NgModule} from '@angular/core';
import {APP_ID, NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {CommonModule} from '@angular/common';
import {HTTP_INTERCEPTORS, HttpClientModule} from "@angular/common/http";
import {BrowserModule, BrowserTransferStateModule} from '@angular/platform-browser';
import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {AppComponent} from './app.component';
@ -41,9 +41,8 @@ import {CustomizationService} from "./openaireLibrary/services/customization.ser
BottomModule,
CookieLawModule,
SubscribeModule.forRoot(), InviteBasicModule,
BrowserModule.withServerTransition({appId: 'serverApp'}),
BrowserModule,
AppRoutingModule,
BrowserTransferStateModule,
BrowserAnimationsModule,
PageURLResolverModule, Schema2jsonldModule, RoleVerificationModule, QuickContactModule, AlertModalModule
],
@ -51,6 +50,7 @@ import {CustomizationService} from "./openaireLibrary/services/customization.ser
exports: [AppComponent],
providers: [
CommunitiesService, CustomizationService, IsCommunity, SubscribeService,
{provide: APP_ID, useValue: 'serverApp'},
{
provide: HTTP_INTERCEPTORS,
useClass: HttpInterceptorService,

View File

@ -1,5 +1,5 @@
import { NgModule } from '@angular/core';
import {ServerModule, ServerTransferStateModule} from '@angular/platform-server';
import {ServerModule} from '@angular/platform-server';
import { AppModule } from './app.module';
import { AppComponent } from './app.component';
@ -8,7 +8,6 @@ import { AppComponent } from './app.component';
imports: [
AppModule,
ServerModule,
ServerTransferStateModule
],
bootstrap: [AppComponent],
})

View File

@ -1,22 +1,19 @@
import {Component} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {PiwikHelper} from "../../utils/piwikHelper";
import {Subscriber} from "rxjs";
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-directLinking',
template: `
<directLinking [communityId]=communityId [piwikSiteId]="piwikSiteId"></directLinking>`
<directLinking [communityId]=communityId></directLinking>`
})
export class OpenaireDirectLinkingComponent {
communityId: string;
public piwikSiteId = null;
sub;
constructor(private route: ActivatedRoute) {
}
constructor(private route: ActivatedRoute) {}
ngOnDestroy() {
if (this.sub instanceof Subscriber) {
@ -24,15 +21,12 @@ export class OpenaireDirectLinkingComponent {
}
}
public ngOnInit() {
this.sub =
this.route.queryParams.subscribe(
this.sub = this.route.queryParams.subscribe(
communityId => {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
if (!this.communityId) {
this.communityId = communityId['communityId'];
}
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
});
}
}

View File

@ -1,23 +1,23 @@
import {Component} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {PiwikHelper} from "../../utils/piwikHelper";
import {Subscriber} from "rxjs";
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-linking-generic',
template: `<linking-generic [communityId]=communityId [piwikSiteId]="piwikSiteId" pageTitle="Linking"></linking-generic>`
template: `<linking-generic [communityId]=communityId pageTitle="Linking"></linking-generic>`
})
export class OpenaireLinkingComponent {
communityId:string;
public piwikSiteId = null;
sub;
ngOnDestroy() {
if (this.sub instanceof Subscriber) {
this.sub.unsubscribe();
}
}
constructor (private route: ActivatedRoute) {
this.route.queryParams.subscribe(
communityId => {
@ -25,7 +25,6 @@ export class OpenaireLinkingComponent {
if(!this.communityId) {
this.communityId = communityId['communityId'];
}
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
});
}
}

View File

@ -1,7 +1,6 @@
import {Component} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../../utils/piwikHelper";
import {Subscriber} from "rxjs";
import {properties} from "../../../environments/environment";
@ -9,35 +8,31 @@ import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-my-claims',
template: `
<my-claims [claimsInfoURL]=claimsInfoURL [userInfoURL]="userInfoURL" [communityId]=communityId [piwikSiteId]="piwikSiteId"></my-claims>
<my-claims [claimsInfoURL]="claimsInfoURL" [communityId]=communityId></my-claims>
`
})
export class OpenaireMyClaimsComponent {
claimsInfoURL:string;
userInfoURL: string;
communityId:string;
public piwikSiteId = null;
sub;
constructor (private route: ActivatedRoute) {}
sub;
ngOnDestroy() {
if (this.sub instanceof Subscriber) {
this.sub.unsubscribe();
}
}
public ngOnInit() {
this.claimsInfoURL = properties.claimsInformationLink;
this.userInfoURL = properties.userInfoUrl;
this.claimsInfoURL = properties.claimsInformationLink;
this.sub = this.route.queryParams.subscribe(
communityId => {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
if(!this.communityId) {
this.communityId = communityId['communityId'];
}
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
});
}
}

View File

@ -12,12 +12,12 @@
class="uk-text-background uk-text-small uk-position-top-left uk-padding-small uk-text-uppercase uk-text-bold">
Member
</div>
<div *ngIf="community.status === 'manager'"
<div *ngIf="community.isRestricted()"
class="uk-position-top-right uk-margin-small-top uk-margin-small-right uk-flex uk-flex-column uk-flex-middle">
<icon [name]="visibilityIcon.get('RESTRICTED')" ratio="1.2" [flex]="true"></icon>
<span class="uk-text-small uk-text-capitalize">restricted</span>
</div>
<div *ngIf="community.status === 'hidden'"
<div *ngIf="community.isPrivate()"
class="uk-position-top-right uk-margin-small-top uk-margin-small-right uk-flex uk-flex-column uk-flex-middle">
<icon [name]="visibilityIcon.get('PRIVATE')" ratio="1.2" [flex]="true"></icon>
<span class="uk-text-small uk-text-capitalize">private</span>

View File

@ -1,302 +1,287 @@
<div>
<div class="uk-overflow-hidden uk-tile-default">
<div class="uk-section uk-padding-remove-bottom uk-background-norepeat hero-background">
<div class="uk-container uk-container-large" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200">
<div class="uk-grid uk-flex-middle" uk-grid>
<div class="uk-width-3-5 uk-margin-large-bottom">
<h1 class="uk-heading-large" uk-scrollspy-class>
Build a <span class="uk-text-primary">Gateway</span>
for your Community<span class="uk-text-primary">.</span>
</h1>
<div class="uk-text-large uk-margin-medium-top" uk-scrollspy-class>
<div>Turn Open Science into Practice.</div>
<div>It takes your open and linked {{entities.RESULTS | lowercase}}.</div>
<div>A service customized to your needs.</div>
</div>
<div class="uk-margin-medium-top" uk-scrollspy-class>
<a class="uk-button uk-button-primary uk-text-uppercase" routerLink="/about/learn-how">Learn More</a>
</div>
</div>
<div class="uk-width-expand uk-visible@m" uk-scrollspy-class>
<div class="uk-position-relative">
<img style="padding: 1px" src="assets/connect-assets/home/connect-hero.jpg" uk-parallax="y: 300">
<img class="uk-position-top-left" src="assets/connect-assets/home/connect-hero-mask.svg">
</div>
</div>
</div>
</div>
</div>
</div>
<ng-template #scrolling_text let-position_class="position_class">
<div #scrolling_element [class]="position_class" uk-parallax="target: #js-sticky-parallax-images-all; start: 15%; end: 100% + 100vh - 150vh; opacity: 0,1 20%,1 99%,0">
<h3 class="uk-h2">
<span class="uk-text-primary">Find a repository to deposit </span>
<span>your {{entities.RESULT | lowercase}}</span>
<span class="uk-text-primary">.</span>
</h3>
</div>
<div #scrolling_element [class]="position_class" uk-parallax="target: #js-sticky-parallax-images-all; start: 150vh; end: 100% + 100vh - 200vh; opacity: 0,1 20%,1 99%,0">
<h3 class="uk-h2">
<span class="uk-text-primary">Link your {{entities.RESULT | lowercase}} </span>
<span>with your community, funding, and other {{entities.RESULTS | lowercase}}</span>
<span class="uk-text-primary">.</span>
</h3>
</div>
<div #scrolling_element [class]="position_class" uk-parallax="target: #js-sticky-parallax-images-all; start: 200vh; end: 100% + 100vh - 250vh; opacity: 0,1 20%,1 99%,0">
<h3 class="uk-h2">
<span>View community's </span>
<span class="uk-text-primary">overview at a glance.</span>
</h3>
</div>
<div #scrolling_element [class]="position_class" uk-parallax="target: #js-sticky-parallax-images-all; start: 250vh; end: 100% + 100vh - 300vh; opacity: 0,1 20%,1">
<h3 class="uk-h2">
<span class="uk-text-primary">Search & browse </span>
<span>your community's {{entities.RESULTS | lowercase}}</span>
<span class="uk-text-primary">.</span>
</h3>
</div>
<!-- <div #scrolling_element [class]="position_class" uk-parallax="target: #js-sticky-parallax-images-all; start: 300vh; end: 100% + 100vh - 350vh; opacity: 0,1 20%,1">
<h3 class="uk-h2">
<span class="uk-text-primary">View statistics </span>
<span>for your community's {{entities.RESULTS | lowercase}}</span>
<span class="uk-text-primary">.</span>
</h3>
</div> -->
</ng-template>
<div class="uk-section uk-section-secondary">
<div class="uk-container uk-container-large">
<div class="uk-width-1-1">
<span class="uk-h6 uk-text-primary">Benefits.</span>
<h2 class="uk-h1 uk-margin-remove-top uk-width-1-2@m">
Find the best for your community<span class="uk-text-primary">.</span>
</h2>
</div>
<div id="js-sticky-parallax-images-all" style="min-height: 400vh">
<div class="uk-visible@m uk-height-viewport connect-dark-logo-background uk-sticky" uk-sticky="bottom: #js-sticky-parallax-images-all; target-offset: true">
<div class="uk-grid" uk-grid style="height: 100vh;">
<div class="uk-width-expand uk-first-column uk-position-relative uk-height-1-1">
<div class="connect-dark-logo-background">
<div uk-parallax="target: #js-sticky-parallax-images-all;">
<img class="uk-position-center uk-position-z-index" src="assets/connect-assets/home/tablet.png" alt="ipad" loading="lazy"
style="width: 100%;">
<img class="uk-position-center" src="assets/connect-assets/home/1.png" alt="ipad" loading="lazy"
uk-parallax="target: #js-sticky-parallax-images-all; start: 100vh; end: 100% + 100vh - 160vh; opacity: 1,1 99%,0; easing:0"
style="width: 100%;">
<img class="uk-position-center" src="assets/connect-assets/home/2.png" alt="ipad" loading="lazy"
uk-parallax="target: #js-sticky-parallax-images-all; start: 150vh; end: 100% + 100vh - 210vh; opacity: 0,1 20%,1 99%,0; easing:0"
style="width: 100%;">
<img class="uk-position-center" src="assets/connect-assets/home/3.png" alt="ipad" loading="lazy"
uk-parallax="target: #js-sticky-parallax-images-all; start: 200vh; end: 100% + 100vh - 260vh; opacity: 0,1 20%,1 99%,0; easing:0"
style="width: 100%;">
<img class="uk-position-center" src="assets/connect-assets/home/4.png" alt="ipad" loading="lazy"
uk-parallax="target: #js-sticky-parallax-images-all; start: 250vh; end: 100% + 100vh - 310vh; opacity: 0,1 20%,1; easing:0"
style="width: 100%;">
</div>
</div>
</div>
<div class="uk-inline uk-width-expand uk-height-1-1 uk-margin-large-left">
<div class="uk-width-3-4@l">
<div uk-parallax="target: #js-sticky-parallax-images-all; y: 55vh, 40vh;">
<ng-container *ngTemplateOutlet="scrolling_text; context: {position_class: 'uk-position-center-left'}"></ng-container>
</div>
</div>
</div>
</div>
</div>
<div class="uk-hidden@m uk-height-viewport connect-dark-logo-background" uk-sticky="bottom: #js-sticky-parallax-images-all">
<div class="uk-flex uk-flex-column uk-flex-middle">
<div class="connect-dark-logo-background uk-inline uk-width-1-1" style="height: 40vh;">
<img class="uk-position-center uk-position-z-index" src="assets/connect-assets/home/tablet.png" alt="ipad" loading="lazy"
uk-parallax="target: #js-sticky-parallax-images-all;" style="width: 70%;">
<img class="uk-position-center" src="assets/connect-assets/home/1.png" alt="ipad" loading="lazy"
uk-parallax="target: #js-sticky-parallax-images-all; start: 100vh; end: 100% + 100vh - 160vh; opacity: 1,1 99%,0; easing:0" style="width: 70%;">
<img class="uk-position-center" src="assets/connect-assets/home/2.png" alt="ipad" loading="lazy"
uk-parallax="target: #js-sticky-parallax-images-all; start: 150vh; end: 100% + 100vh - 210vh; opacity: 0,1 20%,1 99%,0; easing:0" style="width: 70%;">
<img class="uk-position-center" src="assets/connect-assets/home/3.png" alt="ipad" loading="lazy"
uk-parallax="target: #js-sticky-parallax-images-all; start: 200vh; end: 100% + 100vh - 260vh; opacity: 0,1 20%,1 99%,0; easing:0" style="width: 70%;">
<img class="uk-position-center" src="assets/connect-assets/home/4.png" alt="ipad" loading="lazy"
uk-parallax="target: #js-sticky-parallax-images-all; start: 250vh; end: 100% + 100vh - 310vh; opacity: 0,1 20%,1; easing:0" style="width: 70%;">
<div class="uk-overflow-hidden uk-tile-default">
<div class="uk-section uk-padding-remove-bottom uk-background-norepeat hero-background">
<div class="uk-container uk-container-large"
uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200">
<div class="uk-grid uk-flex-middle" uk-grid>
<div class="uk-width-3-5 uk-margin-large-bottom">
<h1 class="uk-heading-large" uk-scrollspy-class>
Build a <span class="uk-text-primary">Gateway</span>
for your Community<span class="uk-text-primary">.</span>
</h1>
<div class="uk-text-large uk-margin-medium-top" uk-scrollspy-class>
<div>Turn Open Science into Practice.</div>
<div>It takes your open and linked {{entities.RESULTS | lowercase}}.</div>
<div>A service customized to your needs.</div>
</div>
<div class="uk-margin-medium-top" uk-scrollspy-class>
<a class="uk-button uk-button-primary uk-text-uppercase" routerLink="/about/learn-how">Learn
More</a>
</div>
</div>
<div class="uk-width-expand uk-visible@m" uk-scrollspy-class>
<div class="uk-position-relative">
<img style="padding: 1px" src="assets/connect-assets/home/connect-hero.jpg"
uk-parallax="y: 300">
<img class="uk-position-top-left" src="assets/connect-assets/home/connect-hero-mask.svg">
</div>
</div>
</div>
</div>
<div class="uk-inline uk-width-2-3">
<ng-container *ngTemplateOutlet="scrolling_text; context: {position_class: 'uk-position-top-center'}"></ng-container>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div #parent class="uk-section uk-section-secondary connect-dark-logo-background">
<div class="uk-container uk-container-large uk-margin-large-bottom">
<div class="uk-width-1-1 uk-margin-medium-bottom">
<span class="uk-h6 uk-text-primary">Benefits.</span>
<h2 class="uk-margin-remove-top uk-width-1-2@m">
Find the best for your community<span class="uk-text-primary">.</span>
</h2>
</div>
<slider-container [total]="4" [navigation]="'progress'" [period]="6000" [infinite]="true" [parent]="parent">
<slider-column type="slider">
<slider-item type="static">
<img class="uk-position-center uk-position-z-index" src="assets/connect-assets/home/tablet.png"
alt="ipad" loading="lazy">
</slider-item>
<slider-item type="slide" [start]="0">
<img src="assets/connect-assets/home/1.png" alt="ipad" loading="lazy">
</slider-item>
<slider-item type="slide" [start]="1">
<img src="assets/connect-assets/home/2.png" alt="ipad" loading="lazy">
</slider-item>
<slider-item type="slide" [start]="2">
<img src="assets/connect-assets/home/3.png" alt="ipad" loading="lazy">
</slider-item>
<slider-item type="slide" [start]="3">
<img src="assets/connect-assets/home/4.png" alt="ipad" loading="lazy">
</slider-item>
</slider-column>
<slider-column type="nav" class="slider-nav">
<slider-nav-item [start]="0">
<h5 class="uk-margin-remove">
<i class="uk-text-primary">Find a repository </i>
<span>to deposit your {{entities.RESULT | lowercase}}</span>
<span class="uk-text-primary">.</span>
</h5>
</slider-nav-item>
<slider-nav-item [start]="1">
<h5 class="uk-margin-remove">
<i class="uk-text-primary">Link your {{entities.RESULT | lowercase}} </i>
<span>with your community, funding, and other {{entities.RESULTS | lowercase}}</span>
<span class="uk-text-primary">.</span>
</h5>
</slider-nav-item>
<slider-nav-item [start]="2">
<h5 class="uk-margin-remove">
<span>View community's </span>
<i class="uk-text-primary">overview at a glance.</i>
</h5>
</slider-nav-item>
<slider-nav-item [start]="3">
<h5 class="uk-margin-remove">
<i class="uk-text-primary">Search & browse </i>
<span>your community's {{entities.RESULTS | lowercase}}</span>
<span class="uk-text-primary">.</span>
</h5>
</slider-nav-item>
</slider-column>
</slider-container>
</div>
</div>
<div class="uk-section uk-section-large uk-container uk-container-large">
<div class="uk-margin-medium-top">
<h2 class="uk-h1">
Our mission for an Open and FAIR science<span class="uk-text-primary">.</span>
</h2>
<div class="uk-margin-large-top">
<div class="uk-child-width-1-3@m uk-child-width-1-1@s uk-grid-large uk-grid-match uk-grid" uk-grid=""
uk-height-match=".target">
<div class="uk-first-column">
<div class="uk-card uk-card-default uk-padding">
<div class="uk-card-media-top uk-flex uk-flex-middle uk-flex-center
<div class="uk-section uk-section-large uk-container uk-container-large">
<div class="uk-margin-medium-top">
<h2 class="uk-h1">
Our mission for an Open and FAIR science<span class="uk-text-primary">.</span>
</h2>
<div class="uk-margin-large-top">
<div class="uk-child-width-1-3@m uk-child-width-1-1@s uk-grid-large uk-grid-match uk-grid" uk-grid=""
uk-height-match=".target">
<div class="uk-first-column">
<div class="uk-card uk-card-default uk-padding">
<div class="uk-card-media-top uk-flex uk-flex-middle uk-flex-center
uk-padding-small uk-padding-remove-vertical uk-margin-top uk-margin-bottom">
<div>
<img src="assets/connect-assets/home/virtual.svg" alt="A Virtual Research Environment" style="height:60px; width:67px"/>
</div>
</div>
<div class="uk-card-body uk-padding-remove uk-margin-small-bottom">
<div class="target uk-text-center">
<h3 class="uk-6 uk-card-title uk-margin-small-bottom">A Virtual Research Environment</h3>
<div>An overlay platform making it easy to share, link, disseminate and monitor all your {{entities.PUBLICATIONS | lowercase}},
{{entities.DATASETS | lowercase}}, {{entities.SOFTWARE | lowercase}}, methods. In one place.
</div>
</div>
<hr/>
<div>
<ul class="uk-list uk-text-small">
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon>
Access to OpenAIRE research graph
</li>
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon>
Moderated, front-end linking
</li>
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon>
Cross-platform search
</li>
</ul>
</div>
</div>
</div>
</div>
<div>
<div class="uk-card uk-card-default uk-padding">
<div class="uk-card-media-top uk-flex uk-flex-middle uk-flex-center
<div>
<img src="assets/connect-assets/home/virtual.svg"
alt="A Virtual Research Environment" style="height:60px; width:67px"/>
</div>
</div>
<div class="uk-card-body uk-padding-remove uk-margin-small-bottom">
<div class="target uk-text-center">
<h3 class="uk-6 uk-card-title uk-margin-small-bottom">A Virtual Research
Environment</h3>
<div>An overlay platform making it easy to share, link, disseminate and monitor all
your {{entities.PUBLICATIONS | lowercase}},
{{entities.DATASETS | lowercase}}, {{entities.SOFTWARE | lowercase}}, methods.
In one place.
</div>
</div>
<hr/>
<div>
<ul class="uk-list uk-text-small">
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85"
flex="true"></icon>
Access to OpenAIRE research graph
</li>
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85"
flex="true"></icon>
Moderated, front-end linking
</li>
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85"
flex="true"></icon>
Cross-platform search
</li>
</ul>
</div>
</div>
</div>
</div>
<div>
<div class="uk-card uk-card-default uk-padding">
<div class="uk-card-media-top uk-flex uk-flex-middle uk-flex-center
uk-padding-small uk-padding-remove-vertical uk-margin-top uk-margin-bottom">
<div>
<img src="assets/connect-assets/home/open_science.svg" alt="Open science in action" style="height:60px; width:67px"/>
</div>
</div>
<div class="uk-card-body uk-padding-remove uk-margin-small-bottom">
<div class="target uk-text-center" style="">
<h3 class="uk-h6 uk-card-title uk-margin-small-bottom">Open Science in action</h3>
<div>A time-saving bundle of services for researchers to effortlessly practice open science. An integral
part of the&nbsp;European Open Science Cloud.
</div>
</div>
<hr>
<div>
<ul class="uk-list uk-text-small">
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon>
Use of OpenAIRE Guidelines
</li>
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon>
Publish and get DOIs with Zenodo
</li>
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon>
EOSC Single Sign-On
</li>
</ul>
</div>
</div>
</div>
</div>
<div>
<div class="uk-card uk-card-default uk-padding">
<div class="uk-card-media-top uk-flex uk-flex-middle uk-flex-center
<div>
<img src="assets/connect-assets/home/open_science.svg" alt="Open science in action"
style="height:60px; width:67px"/>
</div>
</div>
<div class="uk-card-body uk-padding-remove uk-margin-small-bottom">
<div class="target uk-text-center" style="">
<h3 class="uk-h6 uk-card-title uk-margin-small-bottom">Open Science in action</h3>
<div>A time-saving bundle of services for researchers to effortlessly practice open
science. An integral
part of the&nbsp;European Open Science Cloud.
</div>
</div>
<hr>
<div>
<ul class="uk-list uk-text-small">
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85"
flex="true"></icon>
Use of OpenAIRE Guidelines
</li>
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85"
flex="true"></icon>
Publish and get DOIs with Zenodo
</li>
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85"
flex="true"></icon>
EOSC Single Sign-On
</li>
</ul>
</div>
</div>
</div>
</div>
<div>
<div class="uk-card uk-card-default uk-padding">
<div class="uk-card-media-top uk-flex uk-flex-middle uk-flex-center
uk-padding-small uk-padding-remove-vertical uk-margin-top uk-margin-bottom">
<div>
<img src="assets/connect-assets/home/customize.svg" alt="Customized to your needs" style="height:60px; width:67px"/>
</div>
</div>
<div class="uk-card-body uk-padding-remove uk-margin-small-bottom">
<div class="target uk-text-center" style="">
<h3 class="uk-h6 uk-card-title uk-margin-small-bottom">Customized to your needs</h3>
<div>A Gateway with your own brand, rules for aggregation, text &amp; data mining, and presentation. Run
by you via a simple, yet powerful backend administration tool.
</div>
</div>
<hr>
<div>
<ul class="uk-list uk-text-small">
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon>
Access control
</li>
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon>
Analytics: rich set of indicators
</li>
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon>
Look &amp; feel to match your brand
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<img src="assets/connect-assets/home/customize.svg" alt="Customized to your needs"
style="height:60px; width:67px"/>
</div>
</div>
<div class="uk-card-body uk-padding-remove uk-margin-small-bottom">
<div class="target uk-text-center" style="">
<h3 class="uk-h6 uk-card-title uk-margin-small-bottom">Customized to your needs</h3>
<div>A Gateway with your own brand, rules for aggregation, text &amp; data mining,
and presentation. Run
by you via a simple, yet powerful backend administration tool.
</div>
</div>
<hr>
<div>
<ul class="uk-list uk-text-small">
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85"
flex="true"></icon>
Access control
</li>
<!--<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85" flex="true"></icon>
Analytics: rich set of indicators
</li>-->
<li class="uk-flex uk-flex-middle">
<icon class="uk-margin-small-right uk-text-primary" name="done" ratio="0.85"
flex="true"></icon>
Look &amp; feel to match your brand
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div *ngIf="researchCommunities.length === 0" class="uk-container uk-container-large uk-margin-large-bottom">
<errorMessages [status]="[status]" [type]="'communities'"></errorMessages>
</div>
<div *ngIf="!loading && researchCommunities.length > 0" class="uk-section uk-container uk-container-large">
<h2 class="uk-h1">Community Gateways already in action<span class="uk-text-primary">.</span></h2>
<div class="uk-margin-large-top uk-margin-large-bottom">
<div class="uk-visible@xl">
<div class="uk-grid-match uk-grid-medium uk-child-width-1-4 uk-flex-center uk-text-center" uk-grid>
<div *ngFor="let community of researchCommunities.slice(0, 4); let i = index">
<div class="uk-card uk-card-default uk-card-hover" [class.uk-disabled]="!hasPermission(community)">
<browse-community [community]=community></browse-community>
</div>
</div>
</div>
<div class="uk-text-center uk-margin-medium-top">
<a *ngIf="researchCommunities.length > 4"
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text"
routerLinkActive="router-link-active" routerLink="/search/find/communities">
<div *ngIf="researchCommunities.length === 0" class="uk-container uk-container-large uk-margin-large-bottom">
<errorMessages [status]="[status]" [type]="'communities'"></errorMessages>
</div>
<div *ngIf="!loading && researchCommunities.length > 0" class="uk-section uk-container uk-container-large">
<h2 class="uk-h1">Community Gateways already in action<span class="uk-text-primary">.</span></h2>
<div class="uk-margin-large-top uk-margin-large-bottom">
<div class="uk-visible@xl">
<div class="uk-grid-match uk-grid-medium uk-child-width-1-4 uk-flex-center uk-text-center" uk-grid>
<div *ngFor="let community of researchCommunities.slice(0, 4); let i = index">
<div class="uk-card uk-card-default uk-card-hover"
[class.uk-disabled]="!hasPermission(community)">
<browse-community [community]=community></browse-community>
</div>
</div>
</div>
<div class="uk-text-center uk-margin-medium-top">
<a *ngIf="researchCommunities.length > 4"
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text"
routerLinkActive="router-link-active" routerLink="/search/find/communities">
<span class="uk-flex uk-flex-middle">
<span>View All</span>
</span>
</a>
</div>
</div>
</a>
</div>
</div>
<div class="uk-hidden@xl">
<div class="uk-grid-match uk-grid-medium uk-child-width-1-3@m uk-child-width-1-1 uk-flex-center uk-text-center" uk-grid>
<div *ngFor="let community of researchCommunities.slice(0, 3); let i = index">
<div class="uk-card uk-card-default uk-card-hover">
<browse-community [community]=community></browse-community>
</div>
</div>
</div>
<div class="uk-text-center uk-margin-medium-top">
<a *ngIf="researchCommunities.length > 3"
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text"
routerLinkActive="router-link-active" routerLink="/search/find/communities">
<div class="uk-hidden@xl">
<div class="uk-grid-match uk-grid-medium uk-child-width-1-3@m uk-child-width-1-1 uk-flex-center uk-text-center"
uk-grid>
<div *ngFor="let community of researchCommunities.slice(0, 3); let i = index">
<div class="uk-card uk-card-default uk-card-hover"
[class.uk-disabled]="!hasPermission(community)">
<browse-community [community]=community></browse-community>
</div>
</div>
</div>
<div class="uk-text-center uk-margin-medium-top">
<a *ngIf="researchCommunities.length > 3"
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text"
routerLinkActive="router-link-active" routerLink="/search/find/communities">
<span class="uk-flex uk-flex-middle">
<span>View All</span>
</span>
</a>
</div>
</div>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
<div #contact class="uk-section uk-container uk-container-large uk-margin-large-bottom uk-flex uk-flex-middle uk-flex-column">
<h2 class="uk-text-center uk-width-3-4@m">
<div>Let us Help you Develop a Collaborative Science Gateway<span class="uk-text-primary">.</span></div>
<div>It is fast<span class="uk-text-primary">.</span> It is reliable<span class="uk-text-primary">.</span></div>
</h2>
<a class="uk-button uk-button-primary uk-margin-medium-top uk-margin-medium-bottom" routerLink="/contact-us">Contact us</a>
</div>
<div #contact
class="uk-section uk-container uk-container-large uk-margin-large-bottom uk-flex uk-flex-middle uk-flex-column">
<h2 class="uk-text-center uk-width-3-4@m">
<div>Let us Help you Develop a Collaborative Science Gateway<span class="uk-text-primary">.</span></div>
<div>It is fast<span class="uk-text-primary">.</span> It is reliable<span class="uk-text-primary">.</span>
</div>
</h2>
<a class="uk-button uk-button-primary uk-margin-medium-top uk-margin-medium-bottom" routerLink="/contact-us">Contact
us</a>
</div>
</div>

View File

@ -7,7 +7,11 @@
.connect-dark-logo-background {
background-image: url("~src/assets/connect-assets/home/connect-dark-logo.svg");
background-repeat: no-repeat;
background-position: left 95%;
background-size: 65%;
background-position: -5% 102%;
background-size: 35%;
}
}
.slider-nav {
max-width: 650px;
}
}

View File

@ -39,7 +39,6 @@ export class CommunitiesComponent implements OnInit, OnDestroy, AfterViewInit {
public subscriberErrorMessage: string = "";
public errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent;
public showQuickContact: boolean = true;
@ViewChildren('scrolling_element') elements: QueryList<ElementRef>;
@ViewChild('contact') contact: ElementRef;
public entities = OpenaireEntities;
@ -70,15 +69,14 @@ export class CommunitiesComponent implements OnInit, OnDestroy, AfterViewInit {
this.errorCodes = new ErrorCodes();
this.errorMessages = new ErrorMessagesComponent();
this.status = this.errorCodes.LOADING;
this.quickContactService.setDisplay(false);
}
public ngOnInit() {
var url = this.properties.domain + this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(url, false);
this._meta.updateTag({content: url}, "property='og:url'");
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Connect", this.properties.piwikSiteId).subscribe());
}
this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Connect").subscribe());
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
this.user = user;
this.getCommunities();
@ -94,14 +92,16 @@ export class CommunitiesComponent implements OnInit, OnDestroy, AfterViewInit {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) {
subscription.unsubscribe();
} else if (subscription instanceof IntersectionObserver || subscription instanceof MutationObserver) {
subscription.disconnect();
}
} else if ((typeof MutationObserver != 'undefined' && subscription instanceof MutationObserver) ||
(typeof IntersectionObserver != 'undefined' && subscription instanceof IntersectionObserver)) {
subscription.disconnect();
}
});
this.quickContactService.setDisplay(true);
}
ngAfterViewInit() {
if(typeof window !== "undefined") {
if(typeof IntersectionObserver !== "undefined" && typeof MutationObserver !== "undefined") {
this.createObservers();
}
}
@ -126,13 +126,7 @@ export class CommunitiesComponent implements OnInit, OnDestroy, AfterViewInit {
};
let intersectionObserver = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting && this.showQuickContact) {
this.showQuickContact = false;
this.quickContactService.setDisplay(this.showQuickContact);
} else if (!entry.isIntersecting && !this.showQuickContact) {
this.showQuickContact = true;
this.quickContactService.setDisplay(this.showQuickContact);
}
this.quickContactService.setDisplay(!entry.isIntersecting);
});
}, options);
intersectionObserver.observe(this.contact.nativeElement);
@ -181,7 +175,7 @@ export class CommunitiesComponent implements OnInit, OnDestroy, AfterViewInit {
let showCommunity: boolean = true;
community.isSubscribed = Session.isSubscribedTo('community', community.communityId, this.user);
if (community['status'] == "hidden" || community['status'] == "manager") {
if (community.isPrivate() || community.isRestricted()) {
showCommunity = false;
}
if (showCommunity) {
@ -199,7 +193,7 @@ export class CommunitiesComponent implements OnInit, OnDestroy, AfterViewInit {
}
hasPermission(communityInfo: CommunityInfo) {
return communityInfo.status === "all" || (communityInfo.status === "manager" && communityInfo.isManager);
return communityInfo.isPublic() || (communityInfo.isRestricted() && communityInfo.isManager);
}
private sort(results: CommunityInfo[]) {

View File

@ -14,19 +14,19 @@ import {ErrorMessagesModule} from '../openaireLibrary/utils/errorMessages.m
import {SearchFormModule} from '../openaireLibrary/searchPages/searchUtils/searchForm.module';
import {BrowseCommunityModule} from './browseCommunity/browse-community.module';
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
import {GifSliderModule} from "../openaireLibrary/utils/gif-slider/gif-slider.module";
import {OtherPortalsModule} from "../openaireLibrary/sharedComponents/other-portals/other-portals.module";
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
import {SectionScrollModule} from "../openaireLibrary/utils/section-scroll/section-scroll.module";
import {IconsModule} from "../openaireLibrary/utils/icons/icons.module";
import {SliderUtilsModule} from "../openaireLibrary/sharedComponents/slider-utils/slider-utils.module";
@NgModule({
imports: [
CommonModule, FormsModule, RouterModule,
ManageModule, ErrorMessagesModule,
SearchFormModule, BrowseCommunityModule, GifSliderModule, OtherPortalsModule,
HelperModule, SEOServiceModule, SectionScrollModule, IconsModule
SearchFormModule, BrowseCommunityModule, OtherPortalsModule,
HelperModule, SEOServiceModule, SectionScrollModule, IconsModule, SliderUtilsModule
],
declarations: [
CommunitiesComponent

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,6 @@ import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'
import {CommunityService} from "../openaireLibrary/connect/community/community.service";
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {SearchZenodoCommunitiesService} from '../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service';
import {ZenodoCommunitiesService} from '../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service';
import {Session, User} from '../openaireLibrary/login/utils/helper.class';
import {StatisticsForDashboardComponent} from '../statistics/statistics.component';
@ -29,20 +28,20 @@ import {OpenaireEntities} from '../openaireLibrary/utils/properties/searchFields
@Component({
selector: 'community',
templateUrl: 'community.component.html',
styles: [
styles: [
`
#mytabs .uk-tab::before {
border-bottom: none;
}
#mytabs::before {
content: "";
position: absolute;
bottom: 0;
left: 0;
right: 0;
border-bottom: 1px solid #eaeaea;
}
`
#mytabs .uk-tab::before {
border-bottom: none;
}
#mytabs::before {
content: "";
position: absolute;
bottom: 0;
left: 0;
right: 0;
border-bottom: 1px solid #eaeaea;
}
`
]
})
@ -77,7 +76,7 @@ export class CommunityComponent {
@Input() communityId = null;
public community = null;
public communityInfo = null;
public portal = null;
public showLoading: boolean = true;
masterZenodoCommunity = null;
@ -86,13 +85,18 @@ export class CommunityComponent {
public thresholdDescription: number = 500;
public descriptionDiff: number = 100;
page = 1;
size = 5;
page = 1;
size = 5;
subscribers: number = 0;
subs: Subscription[] = [];
displayedAllSubjects = [];
displayedSubjects = [];
displayedSdg = [];
displayedFos = [];
@ViewChild(StatisticsForDashboardComponent) statistics: StatisticsForDashboardComponent = null;
public activeTab = "summary";
public show: string = 'overview';
@ -110,7 +114,7 @@ export class CommunityComponent {
selectedEntity = 'result';
selectedEntitySimpleUrl;
selectedEntityAdvancedUrl;
resultTypes: Filter = {
resultTypes: Filter = {
values: [],
filterId: "type",
countSelectedValues: 0,
@ -120,7 +124,7 @@ export class CommunityComponent {
title: "Type",
filterOperator: "or"
};
showPublications: boolean = false;
showPublications: boolean = false;
showDatasets: boolean = false;
showSoftware: boolean = false;
showOrp: boolean = false;
@ -135,9 +139,8 @@ export class CommunityComponent {
filterId: "resultbestaccessright",
value: "Open Access"
};
disableSelect: boolean = true;
openaireEntities= OpenaireEntities;
piwikSiteId;
disableSelect: boolean = true;
openaireEntities= OpenaireEntities;
constructor(
private element: ElementRef,
@ -152,13 +155,12 @@ export class CommunityComponent {
private _searchCommunityDataprovidersService: SearchCommunityDataprovidersService,
private _searchCommunityProjectsService: SearchCommunityProjectsService,
private _searchResearchResultsService: SearchResearchResultsService,
private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService,
private _zenodoCommunitieService: ZenodoCommunitiesService,
private seoService: SEOService,
private userManagementService: UserManagementService,
private _renderer2: Renderer2,
private cdr: ChangeDetectorRef,
@Inject(DOCUMENT) private _document: Document) {
private _renderer2: Renderer2,
private cdr: ChangeDetectorRef,
@Inject(DOCUMENT) private _document: Document) {
var description = "OpenAIRE - Connect, Community Dashboard, research community";
var title = "OpenAIRE - Connect";
@ -192,6 +194,18 @@ export class CommunityComponent {
community => {
this.community = community;
if(community && !ConnectHelper.isPrivate(community, this.user)) {
this.displayedSubjects = community.subjects;
this.displayedSdg = community.sdg;
this.displayedFos = community.fos;
this.displayedSubjects.forEach(element => {
this.displayedAllSubjects.push({value: element, type: 'resultsubject'});
});
this.displayedSdg.forEach(element => {
this.displayedAllSubjects.push({value: element, type: 'sdg'});
});
this.displayedFos.forEach(element => {
this.displayedAllSubjects.push({value: element, type: 'fos'});
});
if (community.description != null && (community.description.length - this.thresholdDescription <= this.descriptionDiff)) {
this.thresholdDescription = community.description.length;
}
@ -203,16 +217,9 @@ export class CommunityComponent {
this._meta.updateTag({content: community.description}, "property='og:description'");
this._meta.updateTag({content: community.title}, "property='og:title'");
this._title.setTitle(community.title);
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subs.push(this.config.communityInformationState.subscribe(portal => {
if(portal && portal.piwik) {
this.piwikSiteId = portal.piwik;
this.subs.push(this._piwikService.trackView(this.properties, community.title, this.piwikSiteId).subscribe());
}
}));
}
this.subs.push(this._piwikService.trackView(this.properties, community.title).subscribe());
if (this.community.zenodoCommunity) {
this.subs.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties, this.properties.zenodoCommunities + this.community.zenodoCommunity, null).subscribe(
this.subs.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties, this.community.zenodoCommunity).subscribe(
result => {
this.masterZenodoCommunity = result;
},
@ -221,14 +228,7 @@ export class CommunityComponent {
}
));
}
this.subs.push(this._searchZenodoCommunitiesService.searchZCommunities(this.properties, this.communityId).subscribe(
result => {
this.zenodoCommunityIdS = result;
},
error => {
this.handleError("Error getting list of zenodo communities for community with openaire id: " + this.communityId, error);
}
));
this.zenodoCommunityIdS = this.community.otherZenodoCommunities;
}
}));
@ -264,13 +264,13 @@ export class CommunityComponent {
this.contentProvidersCalculated = true;
}
));
this.subs.push(this.config.communityInformationState.subscribe(
this.subs.push(this.config.portalAsObservable.subscribe(
res => {
this.communityInfo = res;
this.portal = res;
// loading twitter widget script conditionally
if (properties.environment == "development") {
if (this.communityInfo && this.communityInfo.twitterAccount) {
if (this.portal && this.portal.twitterAccount) {
let script = this._renderer2.createElement('script');
script.charset = "utf-8";
script.src = "https://platform.twitter.com/widgets.js";
@ -283,47 +283,48 @@ export class CommunityComponent {
this.handleError("Error getting community with id: " + this.communityId, error);
}
));
this.subs.push(this.config.communityInformationState.subscribe(data => {
if (data) {
var showEntity = {};
for (var i = 0; i < data['entities'].length; i++) {
showEntity["" + data['entities'][i]["pid"] + ""] = data['entities'][i]["isEnabled"];
}
this.showPublications = !!showEntity["publication"];
this.showDatasets = !!showEntity["dataset"];
this.showSoftware = !!showEntity["software"];
this.showOrp = !!showEntity["orp"];
this.showProjects = !!showEntity["project"];
this.showDataProviders = !!showEntity["datasource"];
if (this.showPublications) {
this.resultTypes.values.push({
name: this.openaireEntities.PUBLICATIONS,
id: "publications",
selected: false,
number: 0
});
}
if (this.showDatasets) {
this.resultTypes.values.push({
name: this.openaireEntities.DATASETS,
id: "datasets",
selected: false,
number: 0
});
}
if (this.showSoftware) {
this.resultTypes.values.push({
name: this.openaireEntities.SOFTWARE,
id: "software",
selected: false,
number: 0
});
}
if (this.showOrp) {
this.resultTypes.values.push({name: this.openaireEntities.OTHER, id: "other", selected: false, number: 0});
}
}
}));
this.subs.push(this.config.portalAsObservable.subscribe(data => {
if (data) {
var showEntity = {};
for (var i = 0; i < data['entities'].length; i++) {
showEntity["" + data['entities'][i]["pid"] + ""] = data['entities'][i]["isEnabled"];
}
this.showPublications = !!showEntity["publication"];
this.showDatasets = !!showEntity["dataset"];
this.showSoftware = !!showEntity["software"];
this.showOrp = !!showEntity["orp"];
this.showProjects = !!showEntity["project"];
this.showDataProviders = !!showEntity["datasource"];
this.resultTypes.values = [];
if (this.showPublications) {
this.resultTypes.values.push({
name: this.openaireEntities.PUBLICATIONS,
id: "publications",
selected: false,
number: 0
});
}
if (this.showDatasets) {
this.resultTypes.values.push({
name: this.openaireEntities.DATASETS,
id: "datasets",
selected: false,
number: 0
});
}
if (this.showSoftware) {
this.resultTypes.values.push({
name: this.openaireEntities.SOFTWARE,
id: "software",
selected: false,
number: 0
});
}
if (this.showOrp) {
this.resultTypes.values.push({name: this.openaireEntities.OTHER, id: "other", selected: false, number: 0});
}
}
}));
}
private searchPublications(page: number, size: number) {
@ -385,7 +386,6 @@ export class CommunityComponent {
)
) {
this.fetchFeaturedDatasets.getAllResultsForCommunity("dataset", this.communityId, page, size, this.properties, "enermaps::selection");
// console.log(this.fetchFeaturedDatasets);
}
this.reloadFeaturedDatasets = false;
}
@ -421,11 +421,11 @@ export class CommunityComponent {
}
isEntityEnabled(entity: string) {
return this.communityInfo.entities.some(x => x['pid'] == entity && x['isEnabled'] === true);
return this.portal.entities.some(x => x['pid'] == entity && x['isEnabled'] === true);
}
isRouteEnabled(route: string) {
return this.communityInfo.pages.some(x => x['route'] == route && x['isEnabled'] === true);
return this.portal.pages.some(x => x['route'] == route && x['isEnabled'] === true);
}
showInvite() {
@ -478,7 +478,7 @@ export class CommunityComponent {
}
createParams(param) {
return StringUtils.quote(StringUtils.URIEncode(param));
return StringUtils.URIEncode(param);
}
private setActiveTab(entityType: string) {
@ -522,9 +522,9 @@ export class CommunityComponent {
return tooltipContent;
}
public buildContentProvidersTooltip(): string {
public buildContentProvidersTooltip(): string {
let tooltipContent: string = "<div>";
if (this.contentProviderTotal != null && this.contentProviderTotal > 0 && this.isEntityEnabled('datasource') && this.isRouteEnabled(this.searchLinkToDataProviders)) {
tooltipContent += "<span class='uk-text-bold'>Content Providers</span>";
}
@ -541,7 +541,7 @@ export class CommunityComponent {
tooltipContent += "<span class='uk-text-bold'>Zenodo</span> is a catch-all repository for OpenAIRE.";
tooltipContent += "<div class='uk-margin-small-top'>A <span class='uk-text-bold'>Zenodo Community</span> is created and curated by Zenodo users.</div>";
tooltipContent += "</div>";
return tooltipContent;
}
@ -643,24 +643,26 @@ export class CommunityComponent {
this.activeTab = 'mapping';
} else if (activeTabId == 'enermaps') {
this.show = 'enermaps';
this.activeTab = 'enermaps';
this.activeTab = 'enermaps';
this.searchFeaturedDatasets(1, this.fetchFeaturedDatasets.searchUtils.totalResults);
} else if (activeTabId == 'twitter') {
this.show = 'twitter';
this.activeTab = 'twitter';
}
this.show = 'twitter';
this.activeTab = 'twitter';
}
}
}
isPrivate(){
return ConnectHelper.isPrivate(this.community, this.user);
}
disableSelectChange(event: boolean) {
disableSelectChange(event: boolean) {
this.disableSelect = event;
this.cdr.detectChanges();
}
public updatePage(event) {
public updatePage(event) {
this.page = event.value;
this.fetchFeaturedDatasets.searchUtils.page = event.value;
this.fetchFeaturedDatasets.results = this.fetchFeaturedDatasets.allResults.slice((this.page - 1) * this.searchNumber, this.page * this.searchNumber) ;
}
}

View File

@ -12,24 +12,30 @@ import {InviteModule} from '../utils/subscribe/invite/invite.module';
import {ManageModule} from '../openaireLibrary/utils/manage/manage.module';
import {StatisticsModule} from "../statistics/statistics.module";
import {SearchZenodoCommunitiesServiceModule} from '../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunitiesService.module';
import {ZenodoCommunitiesServiceModule} from '../openaireLibrary/connect/zenodoCommunities/zenodo-communitiesService.module';
import {
ZenodoCommunitiesServiceModule
} from '../openaireLibrary/connect/zenodoCommunities/zenodo-communitiesService.module';
import {SearchFormModule} from '../openaireLibrary/searchPages/searchUtils/searchForm.module';
import {SearchDataprovidersServiceModule} from "../openaireLibrary/connect/contentProviders/searchDataprovidersService.module";
import {
SearchDataprovidersServiceModule
} from "../openaireLibrary/connect/contentProviders/searchDataprovidersService.module";
import {SearchProjectsServiceModule} from '../openaireLibrary/connect/projects/searchProjectsService.module';
import {SearchResearchResultsServiceModule} from "../openaireLibrary/services/searchResearchResultsService.module";
import {SearchResultsModule} from "../openaireLibrary/searchPages/searchUtils/searchResults.module";
import {CuratorsModule} from "../curators/curators.module";
import {AffiliationsModule} from "../affiliations/affiliations.module";
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
import { MatSelectModule } from "@angular/material/select";
import {MatSelectModule} from "@angular/material/select";
import {EntitiesSelectionModule} from "../openaireLibrary/searchPages/searchUtils/entitiesSelection.module";
import {TabsModule} from "../openaireLibrary/utils/tabs/tabs.module";
import {SearchTabModule} from "../openaireLibrary/utils/tabs/contents/search-tab.module";
import {ErrorMessagesModule} from "../openaireLibrary/utils/errorMessages.module";
import {SafeHtmlPipeModule} from '../openaireLibrary/utils/pipes/safeHTMLPipe.module';
import {ErrorModule} from "../openaireLibrary/error/error.module";
import {AdvancedSearchInputModule} from '../openaireLibrary/sharedComponents/advanced-search-input/advanced-search-input.module';
import {
AdvancedSearchInputModule
} from '../openaireLibrary/sharedComponents/advanced-search-input/advanced-search-input.module';
import {InputModule} from '../openaireLibrary/sharedComponents/input/input.module';
import {QuickSelectionsModule} from '../openaireLibrary/searchPages/searchUtils/quick-selections.module';
import {IconsModule} from '../openaireLibrary/utils/icons/icons.module';
@ -39,11 +45,11 @@ import {NoLoadPaging} from '../openaireLibrary/searchPages/searchUtils/no-load-p
imports: [
CommonModule, FormsModule, RouterModule,
SubscribeModule, StatisticsModule, ManageModule, InviteModule,
SearchZenodoCommunitiesServiceModule, ZenodoCommunitiesServiceModule, SearchFormModule, SearchDataprovidersServiceModule, SearchProjectsServiceModule,
ZenodoCommunitiesServiceModule, SearchFormModule, SearchDataprovidersServiceModule, SearchProjectsServiceModule,
SearchResearchResultsServiceModule, SearchResultsModule, CuratorsModule, AffiliationsModule,
SEOServiceModule, MatSelectModule, EntitiesSelectionModule,
TabsModule, SearchTabModule, ErrorMessagesModule, SafeHtmlPipeModule, ErrorModule,
AdvancedSearchInputModule, InputModule, QuickSelectionsModule, IconsModule, NoLoadPaging
AdvancedSearchInputModule, InputModule, QuickSelectionsModule, IconsModule, NoLoadPaging
],
declarations: [
CommunityComponent

View File

@ -58,10 +58,7 @@ export class ContactComponent implements OnInit {
this.properties = properties;
this.email = {body: '', subject: '', recipients: []};
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push( this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
}
this.subscriptions.push( this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
this.url = this.properties.domain + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url);

View File

@ -8,7 +8,6 @@ import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
import {Meta, Title} from "@angular/platform-browser";
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
import {PiwikHelper} from "../utils/piwikHelper";
import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
import {Subscription} from "rxjs";
import {properties} from "../../environments/environment";
@ -78,9 +77,7 @@ export class CuratorsComponent {
this.subs.push(this.communityService.getCommunityAsObservable().subscribe(community => {
if (community) {
this.community = community;
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subs.push(this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.community.communityId)).subscribe());
}
this.subs.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
this.url = this.properties.domain + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url);

View File

@ -6,22 +6,19 @@ import {ZenodoInformationClass} from "../openaireLibrary/deposit/utils/zenodoInf
import {FetchZenodoInformation} from "./utils/fetchZenodoInformation.class";
import {ZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service";
import {CommunityService} from "../openaireLibrary/connect/community/community.service";
import {SearchZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service";
import {PiwikHelper} from "../utils/piwikHelper";
import {Subscriber, Subscription} from "rxjs";
import {properties} from "../../environments/environment";
@Component({
selector: 'openaire-deposit',
template: `
<deposit-first-page [piwikSiteId]=piwikSiteId [zenodoInformation]="zenodoInformation"
<deposit-first-page [zenodoInformation]="zenodoInformation"
[communityId]="communityId" [assetsPath]="'assets/connect-assets'"></deposit-first-page>
`
})
export class OpenaireDepositComponent {
properties: EnvProperties = properties;
piwikSiteId = null;
public pageContents = null;
public divContents = null;
public communityId = null;
@ -33,19 +30,17 @@ export class OpenaireDepositComponent {
constructor(private route: ActivatedRoute,
private _zenodoCommunitieService: ZenodoCommunitiesService,
private _communityService: CommunityService,
private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService) {
this.fetchZenodoInformation = new FetchZenodoInformation(this._zenodoCommunitieService, this._searchZenodoCommunitiesService);
private _communityService: CommunityService) {
this.fetchZenodoInformation = new FetchZenodoInformation(this._zenodoCommunitieService);
}
public ngOnInit() {
this.subs.push(this._communityService.getCommunityAsObservable().subscribe(
community => {
if(community) {
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
this.communityId = community.communityId
let masterZenodoCommunityId = community.zenodoCommunity;
if (masterZenodoCommunityId) {
if (masterZenodoCommunityId || (community.otherZenodoCommunities && community.otherZenodoCommunities.length > 0)) {
this.zenodoInformation.shareInZenodoUrl = this.properties.shareInZenodoPage;
} else {
this.zenodoInformation.url = this.properties.zenodo;

View File

@ -9,7 +9,6 @@ import {DepositRoutingModule} from "./deposit-routing.module";
import {DepositFirstPageModule} from "../openaireLibrary/deposit/depositFirstPage.module";
import {ZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service";
import {SearchZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service";
@NgModule({
imports: [
@ -23,6 +22,6 @@ import {SearchZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoC
OpenaireDepositComponent,
],
providers: [PreviousRouteRecorder, IsRouteEnabled,
ZenodoCommunitiesService, SearchZenodoCommunitiesService]
ZenodoCommunitiesService]
})
export class LibDepositModule { }

View File

@ -1,11 +1,8 @@
import {Component} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {PiwikHelper} from '../utils/piwikHelper';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import {ZenodoCommunitiesService} from '../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service';
import {SearchZenodoCommunitiesService} from '../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service';
import {CommunityService} from '../openaireLibrary/connect/community/community.service';
import {ZenodoInformationClass} from '../openaireLibrary/deposit/utils/zenodoInformation.class';
@ -16,7 +13,7 @@ import {properties} from "../../environments/environment";
@Component({
selector: 'openaire-search-deposit',
template: `
<deposit-search-dataproviders [piwikSiteId]=piwikSiteId [zenodoInformation]="zenodoInformation"
<deposit-search-dataproviders [zenodoInformation]="zenodoInformation"
[communityId]="communityId" [searchForm]="{dark: false, class: 'search-form'}"></deposit-search-dataproviders>
`
})
@ -25,16 +22,14 @@ export class OpenaireSearchDataprovidersToDepositComponent {
public zenodoInformation: ZenodoInformationClass = new ZenodoInformationClass();
properties: EnvProperties = properties;
fetchZenodoInformation: FetchZenodoInformation;
piwikSiteId = null;
communityId: string = null;
subs: Subscription[] = [];
constructor(private route: ActivatedRoute,
private _zenodoCommunitieService: ZenodoCommunitiesService,
private _communityService: CommunityService, private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService) {
this.fetchZenodoInformation = new FetchZenodoInformation(this._zenodoCommunitieService, this._searchZenodoCommunitiesService);
private _communityService: CommunityService) {
this.fetchZenodoInformation = new FetchZenodoInformation(this._zenodoCommunitieService);
}
public ngOnInit() {
@ -42,9 +37,8 @@ export class OpenaireSearchDataprovidersToDepositComponent {
community => {
if(community) {
this.communityId = community.communityId;
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
let masterZenodoCommunityId = community.zenodoCommunity;
if (masterZenodoCommunityId) {
if (masterZenodoCommunityId || (community.otherZenodoCommunities && community.otherZenodoCommunities.length > 0)) {
this.zenodoInformation.shareInZenodoUrl = this.properties.shareInZenodoPage;
} else {
this.zenodoInformation.url = this.properties.zenodo;

View File

@ -9,14 +9,13 @@ import {SearchDataprovidersToDepositModule} from '../openaireLibrary/deposit/sea
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard';
import {ZenodoCommunitiesServiceModule} from '../openaireLibrary/connect/zenodoCommunities/zenodo-communitiesService.module';
import {SearchZenodoCommunitiesServiceModule} from '../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunitiesService.module';
@NgModule({
imports: [
CommonModule, FormsModule,
SearchDataprovidersToDepositModule,
SearchDataprovidersToDepositRoutingModule,
ZenodoCommunitiesServiceModule, SearchZenodoCommunitiesServiceModule
ZenodoCommunitiesServiceModule
],
declarations: [
OpenaireSearchDataprovidersToDepositComponent

View File

@ -1,6 +1,5 @@
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {ZenodoCommunitiesService} from '../../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service';
import {SearchZenodoCommunitiesService} from '../../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service';
import {ZenodoInformationClass} from '../../openaireLibrary/deposit/utils/zenodoInformation.class';
import {Subscriber} from "rxjs";
@ -11,8 +10,7 @@ import {Injectable} from "@angular/core";
})
export class FetchZenodoInformation {
private subscriptions = [];
constructor ( private _zenodoCommunitieService: ZenodoCommunitiesService,
private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService ) { }
constructor ( private _zenodoCommunitieService: ZenodoCommunitiesService ) { }
public ngOnDestroy() {
this.clearSubscriptions();
@ -26,7 +24,7 @@ export class FetchZenodoInformation {
});
}
public getZenodoCommunityNameAndUrlById(masterZenodoCommunityId: string, properties:EnvProperties, zenodoInformation: ZenodoInformationClass){
this.subscriptions.push(this._zenodoCommunitieService.getZenodoCommunityById(properties, properties.zenodoCommunities+masterZenodoCommunityId, null).subscribe(
this.subscriptions.push(this._zenodoCommunitieService.getZenodoCommunityById(properties, masterZenodoCommunityId).subscribe(
result => {
console.info("getZenodoCommunityNameAndUrlById", result);
var masterZenodoCommunity = result;
@ -38,22 +36,4 @@ export class FetchZenodoInformation {
}
));
}
public searchNumberOfZCommunities(communityId: string, properties: EnvProperties, zenodoInformation: ZenodoInformationClass) {
this.subscriptions.push(this._searchZenodoCommunitiesService.searchZCommunities(properties,communityId).subscribe (
result => {
console.info("searchNumberOfZCommunities", result);
var CommunityIds = result;
var totalResults = CommunityIds.length;
if(totalResults > 0) {
zenodoInformation.shareInZenodoUrl = properties.shareInZenodoPage;
console.info(zenodoInformation.shareInZenodoUrl);
}
},
error => {
console.error("list of zenodo communities couldn't be loaded");
}
));
}
}

View File

@ -19,7 +19,7 @@
<div class="uk-width-auto" *ngIf="masterZenodoCommunity.logoUrl">
<a target="_blank" [href]="masterZenodoCommunity.link">
<img *ngIf="masterZenodoCommunity.logoUrl"
src="{{masterZenodoCommunity.logoUrl}}" width="80" height="80" alt="{{masterZenodoCommunity.title}}">
src="{{masterZenodoCommunity.logoUrl}}" width="80" height="80" alt="">
</a>
</div>
<div class="uk-width-expand">
@ -76,7 +76,6 @@
</div>
</div>
</div>
<div *ngIf="zenodoSearchUtils.status == errorCodes.LOADING"
class="uk-animation-fade uk-margin-large uk-padding-large uk-padding-remove-horizontal" role="alert">
<loading></loading>
@ -86,7 +85,13 @@
No zenodo communities found
</div>
<div class="uk-section">
<h6 class="uk-margin-medium-bottom">Other related Zenodo communities</h6>
<h6 *ngIf="masterZenodoCommunity" class="uk-margin-medium-bottom">Other related Zenodo communities</h6>
<h6 *ngIf="!masterZenodoCommunity" class="uk-margin-medium-bottom">Related Zenodo communities</h6>
<div *ngIf="!masterZenodoCommunity" class="uk-margin-top uk-text-center uk-margin-medium-bottom">
<a routerLink="/participate/deposit/search" target="_blank" class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
OpenAIRE Compliant Repositories
</a>
</div>
<no-load-paging *ngIf="communityIds && communityIds.length > size" [type]="'Zenodo communities'"
(pageChange)="getCommunities($event)"
[page]="page" [pageSize]="size"
@ -95,36 +100,36 @@
<div *ngIf="communityIds && communityIds.length > 0" class="uk-grid uk-grid-medium uk-grid-match uk-child-width-1-2@m uk-margin-top" uk-grid
uk-height-match="target: .header, .body">
<ng-template ngFor let-item [ngForOf]="communityIds" let-i="index">
<div *ngIf="i>=((page-1)*size) && i < communityIds.length && i< this.page * this.size && communities[this.communityIds[i]['zenodoid']]"
<div *ngIf="i>=((page-1)*size) && i < communityIds.length && i< this.page * this.size && communities[this.communityIds[i]]"
class="uk-animation-fade">
<div class="uk-card uk-card-default">
<div class="uk-card-body">
<div class="header uk-grid uk-grid-medium uk-flex-middle" uk-grid>
<div class="uk-width-auto" *ngIf="communities[this.communityIds[i]['zenodoid']].logoUrl">
<a target="_blank" [href]="communities[this.communityIds[i]['zenodoid']].link">
<img *ngIf="communities[this.communityIds[i]['zenodoid']].logoUrl"
src="{{communities[this.communityIds[i]['zenodoid']].logoUrl}}" width="80" height="80" alt="{{communities[this.communityIds[i]['zenodoid']].title}}">
<div class="uk-width-auto" *ngIf="communities[this.communityIds[i]].logoUrl">
<a target="_blank" [href]="communities[this.communityIds[i]].link">
<img *ngIf="communities[this.communityIds[i]].logoUrl"
src="{{communities[this.communityIds[i]].logoUrl}}" width="80" height="80" alt="">
</a>
</div>
<div class="uk-width-expand">
<h2 class="uk-margin-remove uk-text-break uk-inline-block uk-h6">
<a class="custom-external uk-link uk-link-heading uk-width-expand" target="_blank"
href="{{communities[this.communityIds[i]['zenodoid']].link}}">
<span *ngIf="communities[this.communityIds[i]['zenodoid']].title">{{communities[this.communityIds[i]['zenodoid']].title}}</span>
<span *ngIf="!communities[this.communityIds[i]['zenodoid']].title">[no name available]</span>
href="{{communities[this.communityIds[i]].link}}">
<span *ngIf="communities[this.communityIds[i]].title">{{communities[this.communityIds[i]].title}}</span>
<span *ngIf="!communities[this.communityIds[i]].title">[no name available]</span>
</a>
</h2>
<div class="uk-text-small uk-margin-small-top">
<span class="uk-text-meta">Last update: </span>{{communities[this.communityIds[i]['zenodoid']].date | date:'yyyy/MM/dd'}}
<span class="uk-text-meta">Last update: </span>{{communities[this.communityIds[i]].date | date:'yyyy/MM/dd'}}
</div>
</div>
</div>
<div class="body uk-margin-top uk-margin-bottom uk-text-small multi-line-ellipsis lines-3"> <!-- uk-height-max-small uk-overflow-auto -->
<p *ngIf="communities[this.communityIds[i]['zenodoid']].description" class="uk-margin-remove" [innerHtml]="communities[this.communityIds[i]['zenodoid']].description"></p>
<p *ngIf="communities[this.communityIds[i]].description" class="uk-margin-remove" [innerHtml]="communities[this.communityIds[i]].description"></p>
</div>
<div>
<span class="uk-width-expand uk-flex-right">
<a [href]="depositLink + communities[this.communityIds[i]['zenodoid']].id" target="_blank" type="submit"
<a [href]="depositLink + communities[this.communityIds[i]].id" target="_blank" type="submit"
class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
<span class="uk-flex uk-flex-middle">
<icon name="file_upload" type="outlined" [flex]="true" class="uk-margin-small-right"></icon>

View File

@ -3,7 +3,6 @@ import {ActivatedRoute, Router} from '@angular/router';
import {Meta, Title} from '@angular/platform-browser';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {ZenodoCommunitiesService} from '../../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service';
import {SearchZenodoCommunitiesService} from '../../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service';
import {CommunityService} from '../../openaireLibrary/connect/community/community.service';
import {CommunityInfo} from '../../openaireLibrary/connect/community/communityInfo';
import {SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
@ -12,7 +11,6 @@ import {HelperService} from "../../openaireLibrary/utils/helper/helper.service";
import {RouterHelper} from "../../openaireLibrary/utils/routerHelper.class";
import {SEOService} from "../../openaireLibrary/sharedComponents/SEO/SEO.service";
import {PiwikService} from "../../openaireLibrary/utils/piwik/piwik.service";
import {PiwikHelper} from "../../utils/piwikHelper";
import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
import {properties} from "../../../environments/environment";
import {Subscriber, Subscription} from "rxjs";
@ -24,9 +22,6 @@ import {Subscriber, Subscription} from "rxjs";
export class ShareInZenodoComponent {
public url: string = null;
public title: string = "Share in Zenodo";
public piwikSiteId = null;
properties: EnvProperties = properties;
communityId: string = null;
private community: CommunityInfo = null;
@ -60,7 +55,6 @@ export class ShareInZenodoComponent {
private _title: Title,
private _zenodoCommunitieService: ZenodoCommunitiesService,
private _communityService: CommunityService,
private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService,
private helper: HelperService,
private _piwikService: PiwikService,
private seoService: SEOService) {
@ -84,14 +78,11 @@ export class ShareInZenodoComponent {
community => {
if (community) {
this.communityId = community.communityId;
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subs.push(this._piwikService.trackView(this.properties, this.title, this.piwikSiteId).subscribe());
}
this.subs.push(this._piwikService.trackView(this.properties, this.title).subscribe());
this.community = community;
this.masterZenodoCommunityId = this.community.zenodoCommunity;
if (this.masterZenodoCommunityId) {
this.subs.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties, this.properties.zenodoCommunities + this.masterZenodoCommunityId, null).subscribe(
this.subs.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties, this.masterZenodoCommunityId).subscribe(
result => {
this.masterZenodoCommunity = result;
@ -103,22 +94,14 @@ export class ShareInZenodoComponent {
));
}
this.zenodoSearchUtils.status = this.errorCodes.LOADING;
this.subs.push(this._searchZenodoCommunitiesService.searchZCommunities(this.properties, this.communityId).subscribe(
result => {
this.communityIds = result;
this.communityIds = this.community.otherZenodoCommunities;
this.zenodoSearchUtils.totalResults = this.communityIds.length;
if (this.communityIds.length == 0) {
this.zenodoSearchUtils.status = this.errorCodes.NONE;
}
this.getCommunities()
},
error => {
//console.error("list of zenodo communities couldn't be loaded");
this.handleError("Error getting list of zenodo communities for community with openaire id: " + this.communityId, error);
this.zenodoSearchUtils.status = this.errorCodes.ERROR;
} //this.handleError('System error retrieving community profile', error)
));
}
}));
@ -159,8 +142,8 @@ export class ShareInZenodoComponent {
}));
}
getZenodoCommunityById(zenodoid, openaireId) {
this.subs.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties, this.properties.zenodoCommunities + zenodoid, openaireId).subscribe(
getZenodoCommunityById(zenodoid) {
this.subs.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties, zenodoid).subscribe(
result => {
this.communities[zenodoid] = result;
this.zenodoCommunitiesLoadedCount++;
@ -181,7 +164,7 @@ export class ShareInZenodoComponent {
this.zenodoSearchUtils.status = this.errorCodes.DONE;
}
//console.error("Zenodo community'"+zenodoid+"' couldn't be loaded");
this.handleError("Error getting Zenodo community with id: " + zenodoid + " and openaire id: " + openaireId, error);
this.handleError("Error getting Zenodo community with id: " + zenodoid, error);
}
));
@ -195,7 +178,7 @@ export class ShareInZenodoComponent {
this.page = $event.value;
for (let i = (this.page - 1) * this.size; i < this.communityIds.length && i < this.page * this.size; i++) {
if (!this.communities[this.communityIds[i]["zenodoid"]]) {
this.getZenodoCommunityById(this.communityIds[i]["zenodoid"], this.communityIds[i]["id"]);
this.getZenodoCommunityById(this.communityIds[i]);
}
}
}

View File

@ -7,7 +7,6 @@ import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {ShareInZenodoComponent} from './shareInZenodo.component';
import {ShareInZenodoRoutingModule} from './shareInZenodo-routing.module';
import {ZenodoCommunitiesServiceModule} from '../../openaireLibrary/connect/zenodoCommunities/zenodo-communitiesService.module';
import {SearchZenodoCommunitiesServiceModule} from '../../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunitiesService.module';
import {RouterModule} from "@angular/router";
import {HelperModule} from "../../openaireLibrary/utils/helper/helper.module";
@ -21,7 +20,7 @@ import {LoadingModule} from 'src/app/openaireLibrary/utils/loading/loading.modul
@NgModule({
imports: [
CommonModule, ShareInZenodoRoutingModule, ZenodoCommunitiesServiceModule, SearchZenodoCommunitiesServiceModule,
CommonModule, ShareInZenodoRoutingModule, ZenodoCommunitiesServiceModule,
RouterModule, HelperModule, LoadingModule,
PiwikServiceModule, Schema2jsonldModule, SEOServiceModule, BreadcrumbsModule, NoLoadPaging, IconsModule
],

View File

@ -75,7 +75,44 @@ import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties"
</div>
</div>
</div>
</div>
<div class="uk-container uk-container-large uk-text-center">
<h1>Download records<span class="uk-text-primary">.</span></h1>
<div class="uk-width-1-1 uk-flex uk-flex-center">
<div class="uk-width-large">
To get all metadata records of the community in bulk, use the dump of research communities on Zenodo.
It contains one tar file per community.
Each tar file contains gzipped tar files with one JSON per line.
<br>
<a href="https://graph.openaire.eu/docs/downloads/subgraphs#the-dumps-about-research-communities-initiatives-and-infrastructures" target="_blank">
Learn more <span uk-icon="icon:chevron-right; ratio:0.7"></span></a>
</div>
</div>
</div>
<div class="uk-section uk-container uk-container-small">
<div class="uk-grid uk-grid-large uk-flex uk-flex-center" uk-grid>
<div class="uk-flex uk-flex-middle uk-flex-center uk-card uk-card-default uk-padding uk-width-medium">
<a class="uk-display-inline-block uk-button uk-button-text"
href="https://doi.org/10.5281/zenodo.3974604" target="_blank">
<span class="uk-flex uk-flex-middle">
<span>Community dump</span>
</span>
</a>
</div>
<div class="uk-flex uk-flex-middle uk-flex-center uk-card uk-card-default uk-padding uk-width-medium uk-margin-large-left">
<a class="uk-display-inline-block uk-button uk-button-text"
href="https://doi.org/10.5281/zenodo.3974225" target="_blank">
<span class="uk-flex uk-flex-middle">
<span>Schema</span>
</span>
</a>
</div>
</div>
</div>
</div>
`
})
export class DevelopComponent implements OnInit, OnDestroy {

View File

@ -0,0 +1,20 @@
import {NgModule} from "@angular/core";
import {RouterModule} from "@angular/router";
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
import {CommunityFosComponent} from "./fos.component";
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
@NgModule({
imports: [
RouterModule.forChild([
{
path: '',
component: CommunityFosComponent,
canActivate: [IsRouteEnabled],
canDeactivate: [PreviousRouteRecorder]
}
])
]
})
export class LibFosRoutingModule {
}

View File

@ -0,0 +1,21 @@
import {Component} from "@angular/core";
import {properties} from "../../environments/environment";
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
@Component({
selector: 'community-fos',
template: `
<fos></fos>
`
})
export class CommunityFosComponent {
communityId;
constructor() {
}
ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
}
}

27
src/app/fos/fos.module.ts Normal file
View File

@ -0,0 +1,27 @@
import {CommonModule} from "@angular/common";
import {NgModule} from "@angular/core";
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
import {LibFosRoutingModule} from "./fos-routing.module";
import {FosRoutingModule} from "../openaireLibrary/fos/fos-routing.module";
import {FosModule} from "../openaireLibrary/fos/fos.module";
import {CommunityFosComponent} from "./fos.component";
@NgModule({
imports: [
CommonModule,
LibFosRoutingModule,
FosRoutingModule,
FosModule
],
declarations: [
CommunityFosComponent
],
exports: [
CommunityFosComponent
],
providers: [
PreviousRouteRecorder
]
})
export class LibFosModule {
}

View File

@ -51,9 +51,7 @@ export class GetStartedComponent implements OnInit {
}
ngOnInit() {
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
}
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
this.url = this.properties.domain + this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url);

View File

@ -0,0 +1,21 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {FeaturedPageComponent} from './featuredPage.component';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
@NgModule({
imports: [
RouterModule.forChild([
{
path: '',
component: FeaturedPageComponent,
canActivate: [IsRouteEnabled],
canDeactivate: [PreviousRouteRecorder]
}
])
]
})
export class FeaturedPageRoutingModule {
}

View File

@ -0,0 +1,47 @@
import {Component} from '@angular/core';
import {ActivatedRoute, Router} from "@angular/router";
import {Subscription} from "rxjs";
import {ConfigurationService} from "../../openaireLibrary/utils/configuration/configuration.service";
import {Portal} from "../../openaireLibrary/utils/entities/adminTool/portal";
import {Page} from "../../openaireLibrary/utils/entities/adminTool/page";
import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
@Component({
selector: 'featured',
template: `
<div class="uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom">
<div *ngIf="breadcrumbs" class="uk-padding-small uk-padding-remove-horizontal">
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
</div>
<html-page [description]="page ? page.name : 'Featured'" [pageTitle]="page ? page.name : 'Featured'"></html-page>
</div>
`
})
export class FeaturedPageComponent {
public breadcrumbs: Breadcrumb[];
public page: Page;
subs: Subscription[] = [];
constructor(private config: ConfigurationService, private _router: Router, private route: ActivatedRoute) {
}
ngOnInit() {
this.subs.push(this.route.data.subscribe(data => {
if(data?.breadcrumbs) {
this.breadcrumbs = data.breadcrumbs;
}
}))
this.subs.push(this.config.portalAsObservable.subscribe((portal: Portal) => {
if (portal) {
let pages: Page[] = <Page[]>portal.pages;
this.page = pages.find(page => (page.route == this._router.url));
}
}));
}
ngOnDestroy() {
for (let sub of this.subs) {
sub.unsubscribe();
}
}
}

View File

@ -0,0 +1,27 @@
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {FeaturedPageComponent} from './featuredPage.component';
import {CommonModule} from "@angular/common";
import {HtmlPagesModule} from "../htmlPages.module";
import {FeaturedPageRoutingModule} from "./featuredPage-routing.module";
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
import {BreadcrumbsModule} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.module";
@NgModule({
imports: [
FeaturedPageRoutingModule, RouterModule, CommonModule, HtmlPagesModule, BreadcrumbsModule
],
declarations: [
FeaturedPageComponent
],
providers: [PreviousRouteRecorder, IsRouteEnabled],
exports: [
FeaturedPageComponent
]
})
export class FeaturedPageModule {
}

View File

@ -8,6 +8,7 @@ import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
import {Subscriber} from "rxjs";
import {properties} from "../../environments/environment";
import {ConfigurationService} from "../openaireLibrary/utils/configuration/configuration.service";
@Component({
selector: 'html-page',
@ -21,28 +22,26 @@ export class HtmlPageComponent {
properties: EnvProperties = properties;
public pageContents = null;
public divContents = null;
@Input() url: string = null;
@Input() pageTitle: string;
@Input() description: string;
private subscriptions = [];
communityId;
constructor(private route: ActivatedRoute, private _router: Router,
constructor(private route: ActivatedRoute, private _router: Router,
private _meta: Meta,
private _title: Title,
private seoService: SEOService,
private _piwikService: PiwikService,
private configurationService: ConfigurationService,
private helper: HelperService) {
}
public ngOnInit() {
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
}
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
//TODO set the proper URL
this.url = this.properties.domain + this._router.url;
this.url = this.properties.domain + this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url);
this.updateTitle(this.pageTitle);

View File

@ -11,7 +11,7 @@ import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.co
</div>
<div class="uk-container uk-container-large uk-section uk-section-small uk-margin-medium-bottom">
<h1 class="uk-margin-top uk-margin-large-bottom uk-width-1-2@m">Supporting Organizations</h1>
<html-page description="Organizations" pageTitle="Supporting Organizations"></html-page>
<html-page description="OpenAIRE - Connect, Community Gateway, research community, organizations" pageTitle="Supporting Organizations"></html-page>
<affiliations [longView]="true" [getAffiliationsFromAPI]="true"></affiliations>
</div>
`

View File

@ -1,15 +1,13 @@
import {Component, OnInit} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-dataprovider',
template: `
<dataprovider [piwikSiteId]=piwikSiteId [communityId]="communityId"></dataprovider>`,
<dataprovider [communityId]="communityId"></dataprovider>`,
})
export class OpenaireDataProviderComponent implements OnInit {
piwikSiteId;
communityId;
constructor() {
@ -17,6 +15,5 @@ export class OpenaireDataProviderComponent implements OnInit {
ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
}
}

View File

@ -1,16 +1,14 @@
import {Component, OnInit} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-dataset',
template: `
<result-landing type="dataset" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing>
<result-landing type="dataset" [communityId]="communityId"></result-landing>
`,
})
export class OpenaireDatasetComponent implements OnInit {
piwikSiteId;
communityId;
constructor() {
@ -18,6 +16,5 @@ export class OpenaireDatasetComponent implements OnInit {
ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
}
}

View File

@ -1,15 +1,13 @@
import {Component} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-htmlProjectReport',
template: `
<htmlProjectReport [piwikSiteId]=piwikSiteId [communityId]="communityId"></htmlProjectReport>`,
<htmlProjectReport [communityId]="communityId"></htmlProjectReport>`,
})
export class OpenaireHtmlProjectReportComponent {
piwikSiteId;
communityId;
constructor() {
@ -17,6 +15,5 @@ export class OpenaireHtmlProjectReportComponent {
ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
}
}

View File

@ -1,15 +1,13 @@
import {Component} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-organization',
template: `
<organization [piwikSiteId]=piwikSiteId [communityId]="communityId"></organization>`,
<organization [communityId]="communityId"></organization>`,
})
export class OpenaireOrganizationComponent {
piwikSiteId;
communityId;
constructor() {
@ -17,6 +15,5 @@ export class OpenaireOrganizationComponent {
ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
}
}

View File

@ -1,23 +1,20 @@
import {Component, OnInit} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-orp',
template: `
<result-landing type="orp" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing>
<result-landing type="orp" [communityId]="communityId"></result-landing>
`,
})
export class OpenaireOrpComponent implements OnInit {
piwikSiteId = null;
communityId = null;
constructor() {}
ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
}
}

View File

@ -1,15 +1,13 @@
import {Component, OnInit} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-project',
template: `
<project [piwikSiteId]=piwikSiteId [communityId]="communityId"></project>`,
<project [communityId]="communityId"></project>`,
})
export class OpenaireProjectComponent implements OnInit {
piwikSiteId;
communityId;
constructor() {
@ -17,6 +15,5 @@ export class OpenaireProjectComponent implements OnInit {
ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
}
}

View File

@ -1,22 +1,19 @@
import {Component} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-publication',
template: `
<result-landing type="publication" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing>
<result-landing type="publication" [communityId]="communityId"></result-landing>
`,
})
export class OpenairePublicationComponent {
piwikSiteId = null;
communityId = null;
constructor() {}
ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
}
}

View File

@ -1,21 +1,18 @@
import {Component, OnInit} from '@angular/core';
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../../utils/piwikHelper";
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-publication',
template: `
<result-landing type="result" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing>`,
<result-landing type="result" [communityId]="communityId"></result-landing>`,
})
export class OpenaireResultComponent implements OnInit{
piwikSiteId;
communityId;
constructor() {}
ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
}
}

View File

@ -1,16 +1,14 @@
import {Component, OnInit} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-software',
template: `
<result-landing type="software" [piwikSiteId]="piwikSiteId" [communityId]="communityId"></result-landing>
<result-landing type="software" [communityId]="communityId"></result-landing>
`,
})
export class OpenaireSoftwareComponent implements OnInit {
piwikSiteId;
communityId;
constructor() {
@ -18,6 +16,5 @@ export class OpenaireSoftwareComponent implements OnInit {
ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
}
}

View File

@ -220,10 +220,7 @@ export class FaqsComponent {
public ngOnInit() {
this.properties = properties;
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
}
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
this.url = this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url);

View File

@ -184,13 +184,18 @@ import {QuickContactService} from '../openaireLibrary/sharedComponents/quick-con
<h6 class="uk-margin-small-bottom">Content</h6>
<div>Manage projects, content providers, subjects and zenodo communities that are related to the research community.</div>
</div>
<div class="left-text uk-margin-medium-bottom uk-padding uk-margin-medium-left uk-padding-remove-right">
<!--<div class="left-text uk-margin-medium-bottom uk-padding uk-margin-medium-left uk-padding-remove-right">
<h6 class="uk-margin-small-bottom">Statistics & Charts</h6>
<div>Manage statistical numbers & charts that will be displayed in the community overview and graph analysis views.</div>
</div>
</div>-->
</div>
<div class="mid">
<img src="assets/connect-assets/about/placeholder-img.png" alt="">
<div class="mid uk-flex uk-flex-middle">
<div class="uk-position-relative">
<img class="uk-position-center uk-position-z-index uk-position-absolute" src="assets/connect-assets/home/tablet.png" alt="ipad"
loading="lazy"
style="width: 100%;">
<img src="assets/connect-assets/home/3.png" alt="">
</div>
</div>
<div class="right">
<div class="right-text uk-margin-medium-bottom uk-padding uk-margin-right-left uk-padding-remove-left">
@ -248,9 +253,7 @@ export class LearnHowComponent implements OnInit {
}
public ngOnInit() {
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe());
}
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
this.url = this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url);
@ -276,12 +279,14 @@ export class LearnHowComponent implements OnInit {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) {
subscription.unsubscribe();
} else if(typeof IntersectionObserver !== 'undefined' && subscription instanceof IntersectionObserver) {
subscription.disconnect();
}
});
}
ngAfterViewInit() {
if (typeof window !== "undefined") {
if (typeof IntersectionObserver !== "undefined") {
this.createObservers();
}
}

View File

@ -7,7 +7,6 @@ import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.servic
import {LearnHowComponent} from "./learn-how.component";
import {LearnHowRoutingModule} from "./learn-how-routing.module";
import {GifSliderModule} from "../openaireLibrary/utils/gif-slider/gif-slider.module";
import {HelperModule} from "../openaireLibrary/utils/helper/helper.module";
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
@ -20,7 +19,7 @@ import {TabsModule} from '../openaireLibrary/utils/tabs/tabs.module';
@NgModule({
imports: [
CommonModule, RouterModule, LearnHowRoutingModule, GifSliderModule, HelperModule,
CommonModule, RouterModule, LearnHowRoutingModule, HelperModule,
Schema2jsonldModule, SEOServiceModule, BreadcrumbsModule, HtmlPagesModule, IconsModule, TabsModule
],
declarations: [

View File

@ -72,9 +72,7 @@ export class MyCommunitiesComponent {
var url = this.properties.domain + this.properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(url, false);
this._meta.updateTag({content: url}, "property='og:url'");
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Connect", this.properties.piwikSiteId).subscribe());
}
this.subscriptions.push(this._piwikService.trackView(this.properties, "OpenAIRE Connect").subscribe());
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
this.user = user;
if (this.user) {
@ -99,7 +97,7 @@ export class MyCommunitiesComponent {
}
hasPermission(communityInfo: CommunityInfo) {
return communityInfo.status === "all" || (communityInfo.status === "manager" && communityInfo.isManager);
return communityInfo.isPublic() || (communityInfo.isRestricted() && communityInfo.isManager);
}
public getCommunities() {
@ -124,10 +122,10 @@ export class MyCommunitiesComponent {
communitiesResults.forEach((community, index) => {
let showCommunity: boolean = true;
community.isManager = Session.isCommunityCurator(this.user) || Session.isPortalAdministrator(this.user) || Session.isManager('community', community.communityId, this.user);
if (community['status'] == "hidden") {
if (community.isPrivate()) {
showCommunity = false;
} else {
if(!community.isManager && community['status'] == "manager") {
if(!community.isManager && community.isRestricted()) {
showCommunity = false;
}
}

@ -1 +1 @@
Subproject commit ac83453f7e3c261864d87f73533d785aae97f0fd
Subproject commit e30672043b03c607fb6c6c1c490d4fa34a772d3d

View File

@ -4,19 +4,16 @@ import {Subscriber, Subscription} from "rxjs";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
import {properties} from "../../../environments/environment";
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
import {PiwikHelper} from "../../utils/piwikHelper";
@Component({
selector: 'openaire-my-orcid-links',
template: `
<my-orcid-links [piwikSiteId]=piwikSiteId
[communityId]="communityId"></my-orcid-links>
<my-orcid-links [communityId]="communityId"></my-orcid-links>
`
})
export class OpenaireMyOrcidLinksComponent {
properties: EnvProperties = properties;
piwikSiteId = null;
public communityId = null;
subs: Subscription[] = [];
@ -27,7 +24,6 @@ export class OpenaireMyOrcidLinksComponent {
this.subs.push(this._communityService.getCommunityAsObservable().subscribe(
community => {
if(community) {
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
this.communityId = community.communityId;
}
}));

View File

@ -0,0 +1,20 @@
import {NgModule} from "@angular/core";
import {RouterModule} from "@angular/router";
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
import {CommunitySdgComponent} from "./sdg.component";
import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard";
@NgModule({
imports: [
RouterModule.forChild([
{
path: '',
component: CommunitySdgComponent,
canActivate: [IsRouteEnabled],
canDeactivate: [PreviousRouteRecorder]
}
])
]
})
export class LibSdgRoutingModule {
}

View File

@ -0,0 +1,23 @@
import {Component} from "@angular/core";
import {properties} from "../../environments/environment";
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class";
@Component({
selector: 'community-sdg',
template: `
<sdg [customFilter]="customFilter"></sdg>
`
})
export class CommunitySdgComponent {
communityId;
customFilter: SearchCustomFilter = null;
constructor() {
}
ngOnInit() {
this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
}
}

27
src/app/sdg/sdg.module.ts Normal file
View File

@ -0,0 +1,27 @@
import {CommonModule} from "@angular/common";
import {NgModule} from "@angular/core";
import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard";
import {LibSdgRoutingModule} from "./sdg-routing.module";
import {SdgRoutingModule} from "../openaireLibrary/sdg/sdg-routing.module";
import {SdgModule} from "../openaireLibrary/sdg/sdg.module";
import {CommunitySdgComponent} from "./sdg.component";
@NgModule({
imports: [
CommonModule,
LibSdgRoutingModule,
SdgRoutingModule,
SdgModule
],
declarations: [
CommunitySdgComponent
],
exports: [
CommunitySdgComponent
],
providers: [
PreviousRouteRecorder
]
})
export class LibSdgModule {
}

View File

@ -1,20 +1,18 @@
import {Component, OnInit} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../../utils/piwikHelper";
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-advanced-search-dataprovider',
template: `
<search-dataproviders [simpleView]="false" [customFilter]=customFilter [piwikSiteId]="piwikSiteId"
<search-dataproviders [simpleView]="false" [customFilter]=customFilter
[hasPrefix]="false" [showBreadcrumb]="true" [showSwitchSearchLink]="false" [searchForm]="{dark: false, class: 'search-form'}">
</search-dataproviders>
`
})
export class OpenaireAdvancedSearchDataProvidersComponent implements OnInit {
communityId: string;
piwikSiteId = null;
customFilter: SearchCustomFilter = null;
constructor() {
@ -23,7 +21,6 @@ export class OpenaireAdvancedSearchDataProvidersComponent implements OnInit {
ngOnInit() {
let communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
if (communityId) {
this.piwikSiteId = PiwikHelper.getSiteId(communityId);
this.communityId = communityId;
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
this.customFilter.isHiddenFilter = false;

View File

@ -1,22 +1,18 @@
import {Component, Input, OnInit, ViewChild} from '@angular/core';
import {Component, OnInit} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ActivatedRoute} from "@angular/router";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../../utils/piwikHelper";
import {Subscriber} from "rxjs";
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-advanced-search-organizations',
template: `
<search-organizations [simpleView]="false" [customFilter]=customFilter [piwikSiteId]="piwikSiteId" [hasPrefix]="false" [showBreadcrumb]="true" [showSwitchSearchLink]="false" [searchForm]="{dark: false, class: 'search-form'}">
<search-organizations [simpleView]="false" [customFilter]=customFilter [hasPrefix]="false" [showBreadcrumb]="true" [showSwitchSearchLink]="false" [searchForm]="{dark: false, class: 'search-form'}">
</search-organizations>
`
})
export class OpenaireAdvancedSearchOrganizationsComponent implements OnInit {
communityId:string;
piwikSiteId;
customFilter: SearchCustomFilter;
constructor () {
@ -24,7 +20,6 @@ export class OpenaireAdvancedSearchOrganizationsComponent implements OnInit {
ngOnInit() {
let communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
this.piwikSiteId = PiwikHelper.getSiteId(communityId);
if(communityId){
this.communityId = communityId;
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");

View File

@ -1,13 +1,12 @@
import {Component, OnInit} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../../utils/piwikHelper";
import {properties} from "../../../environments/environment";
@Component({
selector: 'openaire-advanced-search-projects',
template: `
<search-projects [simpleView]="false" [customFilter]=customFilter [piwikSiteId]="piwikSiteId" [hasPrefix]="false"
<search-projects [simpleView]="false" [customFilter]=customFilter [hasPrefix]="false"
[showBreadcrumb]="true" [showSwitchSearchLink]="false" [searchForm]="{dark: false, class: 'search-form'}">
</search-projects>
@ -16,7 +15,6 @@ import {properties} from "../../../environments/environment";
export class OpenaireAdvancedSearchProjectsComponent implements OnInit {
communityId: string;
piwikSiteId;
customFilter: SearchCustomFilter = null;
constructor() {
@ -26,7 +24,6 @@ export class OpenaireAdvancedSearchProjectsComponent implements OnInit {
let communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
if (communityId) {
this.communityId = communityId;
this.piwikSiteId = PiwikHelper.getSiteId(communityId);
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
this.customFilter.isHiddenFilter = false;
}

View File

@ -1,8 +1,6 @@
import {Component, OnDestroy, OnInit} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {ActivatedRoute} from "@angular/router";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../../utils/piwikHelper";
import {Subscriber} from "rxjs";
import {properties} from "../../../environments/environment";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
@ -12,7 +10,7 @@ import {CommunityService} from "../../openaireLibrary/connect/community/communit
selector: 'openaire-search-results',
template: `
<search-research-results resultType="result" [simpleView]="false" [customFilter]=customFilter
[piwikSiteId]="piwikSiteId" [hasPrefix]="false" [showBreadcrumb]="true"
[hasPrefix]="false" [showBreadcrumb]="true"
[openaireLink]="'https://' + (properties.environment == 'production'?'':'beta.') + 'explore.openaire.eu/search/advanced/research-outcomes'"
[searchForm]="{dark: false, class: 'search-form'}"
></search-research-results>
@ -20,7 +18,6 @@ import {CommunityService} from "../../openaireLibrary/connect/community/communit
})
export class OpenaireSearchResearchResultsComponent implements OnInit, OnDestroy {
connectCommunityId: string;
piwikSiteId = null;
customFilter: SearchCustomFilter = null;
properties: EnvProperties = properties;
sub;
@ -42,7 +39,6 @@ export class OpenaireSearchResearchResultsComponent implements OnInit, OnDestro
this.sub = this._communityService.getCommunityAsObservable().subscribe(community => {
if (community != null) {
this.connectCommunityId = community.communityId;
this.piwikSiteId = PiwikHelper.getSiteId(this.connectCommunityId);
this.customFilter = new SearchCustomFilter("Community", "communityId", this.connectCommunityId, community.shortTitle);
}
});

View File

@ -23,7 +23,7 @@ import {Subscriber} from "rxjs";
selector: 'search-communities',
template: `
<new-search-page pageTitle="Communities"
[hasPrefix]=true prefix="OpenAIRE Connect | " [piwikSiteId]="piwikSiteId"
[hasPrefix]=true prefix="OpenAIRE Connect | "
[formPlaceholderText]="'Search OpenAIRE Communities'"
[type]="(results.length > 1)?'communities':'community'" entityType="community"
[results]="results" [searchUtils]="searchUtils"
@ -39,7 +39,6 @@ import {Subscriber} from "rxjs";
`
})
export class SearchCommunitiesComponent {
public piwikSiteId = null;
private errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent;
public results: CommunityInfo[] = [];
@ -82,7 +81,6 @@ export class SearchCommunitiesComponent {
public ngOnInit() {
this.properties = properties;
this.piwikSiteId = this.properties.piwikSiteId;
this.baseUrl = this.properties.searchLinkToCommunities;
this.subscriptions.push(this.route.queryParams.subscribe(params => {
this.searchPage.resultsPerPage = 10;
@ -99,7 +97,7 @@ export class SearchCommunitiesComponent {
this.searchPage.refineFields = this.refineFields;
this.searchLink = this.properties.searchLinkToCommunities;
this.selectedFields = [];
this.searchPage.prepareSearchPage(this.fieldIds, this.selectedFields, this.refineFields, [], this.fieldIdsMap, null, params, "community", null);
this.searchPage.prepareSearchPage(this.fieldIds, this.selectedFields, this.refineFields, [],[], this.fieldIdsMap, null, params, "community", null);
let queryParams = params;
if (typeof document !== 'undefined') {
@ -177,9 +175,9 @@ export class SearchCommunitiesComponent {
private showCommunities() {
let ret: CommunityInfo[] = [];
for (let result of this.results) {
if (result.status == 'hidden' && result.isManager) {
if (result.isPrivate() && result.isManager) {
ret.push(result);
} else if (result.status == "manager" || result.status == "all") {
} else if (result.isRestricted() || result.isPublic()) {
ret.push(result);
}
}
@ -286,6 +284,7 @@ export class SearchCommunitiesComponent {
if (params[filterId]) {
values = (StringUtils.URIDecode(params[filterId])).split(/,(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, -1);
}
console.log(filterId + ": " +values)
if (filterId == 'type') {
for (let i = 0; i < this.results.length; i++) {
if (values.length == 0) {
@ -304,19 +303,20 @@ export class SearchCommunitiesComponent {
if (values.length == 0) {
results.push(this.results[i]);
} else {
// console.log(this.results[i].status, this.results[i].isPublic(),this.results[i].isRestricted(), this.results[i].isPrivate() )
for (let value of values) {
if (value.replace(/["']/g, "") == 'public') {
if (this.results[i].status === 'all') {
if (this.results[i].isPublic()) {
results.push(this.results[i]);
break;
}
} else if (value.replace(/["']/g, "") == 'restricted') {
if (this.results[i].status === 'manager') {
if (this.results[i].isRestricted()) {
results.push(this.results[i]);
break;
}
} else if (value.replace(/["']/g, "") == 'private') {
if (this.results[i].status === 'hidden') {
if (this.results[i].isPrivate()) {
results.push(this.results[i]);
break;
}
@ -383,9 +383,9 @@ export class SearchCommunitiesComponent {
}
}
} else if (this.filters[i].filterId == 'access') {
if (results[k].status === 'all') {
if (results[k].isPublic()) {
this.filters[i].values[0].number++;
} else if (results[k].status === 'manager') {
} else if (results[k].isRestricted()) {
this.filters[i].values[1].number++;
} else if (this.user) {
this.filters[i].values[2].number++;

View File

@ -1,5 +1,4 @@
import {Component} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {properties} from "../../../environments/environment";
@ -9,13 +8,12 @@ import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properti
selector: 'openaire-search-find',
template: `
<search-all logoURL="/assets/common-assets/logo-small-explore.png" name="OpenAIRE Connect"
[customFilter]=customFilter [piwikSiteId]="piwikSiteId"></search-all>
[customFilter]=customFilter></search-all>
`,
})
export class OpenaireSearchComponent {
communityId: string;
customFilter: SearchCustomFilter = null;
piwikSiteId = null;
properties: EnvProperties = properties;
constructor() {
@ -25,7 +23,6 @@ export class OpenaireSearchComponent {
let communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
if (communityId) {
this.communityId = communityId;
this.piwikSiteId = PiwikHelper.getSiteId(communityId);
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, "");
}
}

View File

@ -1,13 +1,14 @@
import {Component, ViewChild} from '@angular/core';
import { ActivatedRoute} from '@angular/router';
import {ActivatedRoute} from '@angular/router';
import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes';
import {ErrorMessagesComponent} from '../../openaireLibrary/utils/errorMessages.component';
import {ErrorMessagesComponent} from '../../openaireLibrary/utils/errorMessages.component';
import {SearchFields} from '../../openaireLibrary/utils/properties/searchFields';
import {SearchCustomFilter, SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {SearchCommunityDataprovidersService} from '../../openaireLibrary/connect/contentProviders/searchDataproviders.service';
import {PiwikHelper} from '../../utils/piwikHelper';
import {
SearchCommunityDataprovidersService
} from '../../openaireLibrary/connect/contentProviders/searchDataproviders.service';
import {properties} from "../../../environments/environment";
import {CommunitiesService} from "../../openaireLibrary/connect/communities/communities.service";
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
@ -20,24 +21,23 @@ import {SearchResult} from "../../openaireLibrary/utils/entities/searchResult";
selector: 'openaire-search-dataproviders',
template: `
<new-search-page
<new-search-page
pageTitle="Search Content Providers"
entityType="dataprovider"
type=" Content provider"
[results]="results"
[searchUtils]="searchUtils"
[sortedByChanged]="searchUtils.sortBy"
[sortedByChanged]="searchUtils.sortBy"
[fieldIds]="fieldIds" [fieldIdsMap]="fieldIdsMap" [selectedFields]="selectedFields"
[simpleSearchLink]="properties.searchLinkToDataProviders"
[simpleSearchLink]="properties.searchLinkToDataProviders"
[disableForms]="disableForms"
[disableRefineForms]="disableRefineForms"
[loadPaging]="loadPaging"
[oldTotalResults]="oldTotalResults"
[openaireLink]="'https://' + (properties.environment == 'production'?'':'beta.') + 'explore.openaire.eu/search/find/dataproviders'"
[includeOnlyResultsAndFilter]="false"
[piwikSiteId]=piwikSiteId [hasPrefix]="false"
searchFormClass="datasourcesTableSearchForm" [entitiesSelection]="true" [showSwitchSearchLink]="false"
[hasPrefix]="false"
searchFormClass="datasourcesTableSearchForm" [entitiesSelection]="false" [showSwitchSearchLink]="false"
[filters]="filters"
[simpleView]="true" formPlaceholderText="Search by name..."
[showResultCount]="false" [showIndexInfo]="false" [showDownload]="false"
@ -64,7 +64,6 @@ export class OpenaireSearchDataprovidersComponent {
private communityId: string = '';
subscriptions = [];
piwikSiteId = null;
customFilter: SearchCustomFilter = null;
initialLoad = true;
public allResults =[];
@ -89,14 +88,13 @@ export class OpenaireSearchDataprovidersComponent {
if(community != null) {
this.communityId = community.communityId;
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, community.shortTitle);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
this.subscriptions.push(this.route.queryParams.subscribe(params => {
let page = (params['page'] === undefined) ? 1 : +params['page'];
this.searchUtils.page = (page <= 0) ? 1 : page;
this.searchUtils.validateSize(params['size']);
this.keyword = decodeURIComponent(params['fv0']?params['fv0']:(params['keyword']?params['keyword']:''));
this.selectedFields = [];
this.searchPage.prepareSearchPage(this.fieldIds, this.selectedFields, [], [], this.fieldIdsMap, this.customFilter, params, "dataprovider");
this.searchPage.prepareSearchPage(this.fieldIds, this.selectedFields, [], [], [], this.fieldIdsMap, this.customFilter, params, "dataprovider");
if (this.initialLoad) {
this.initialLoad = false;
this._getResults();
@ -165,7 +163,7 @@ export class OpenaireSearchDataprovidersComponent {
this.searchUtils.totalResults = results.length;
this.results = results.slice((this.searchUtils.page - 1) * this.searchUtils.size, this.searchUtils.page *this.searchUtils.size );
this.searchUtils.status = this.results.length == 0 ? this.errorCodes.NONE: this.errorCodes.DONE;
this.searchPage.buildPageURLParameters(this.filters, [], false);
this.searchPage.buildPageURLParameters(this.filters, [], [], false);
this.disableForms = false;
this.enableSearchView = true;
}

View File

@ -1,8 +1,4 @@
import {Component, OnInit} from '@angular/core';
import {PiwikHelper} from '../../utils/piwikHelper';
import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
import {properties} from "../../../environments/environment";
import {Component} from '@angular/core';
@Component({
selector: 'openaire-search-organizations',
@ -10,16 +6,5 @@ import {properties} from "../../../environments/environment";
<search-organizations [searchForm]="{dark: false, class: 'search-form'}"></search-organizations>
`
})
export class OpenaireSearchOrganizationsComponent implements OnInit {
piwikSiteId = null;
constructor() {
}
ngOnInit() {
let communityId = ConnectHelper.getCommunityFromDomain(properties.domain);
if (communityId) {
this.piwikSiteId = PiwikHelper.getSiteId(communityId);
}
}
export class OpenaireSearchOrganizationsComponent{
}

View File

@ -1,48 +1,47 @@
import {Component, ViewChild} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {AdvancedField, Filter, Value} from '../../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class';
import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes';
import {ErrorMessagesComponent} from '../../openaireLibrary/utils/errorMessages.component';
import {SearchFields} from '../../openaireLibrary/utils/properties/searchFields';
import {SearchCustomFilter, SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {SearchCommunityProjectsService} from '../../openaireLibrary/connect/projects/searchProjects.service';
import {PiwikHelper} from '../../utils/piwikHelper';
import {properties} from "../../../environments/environment";
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
import {Subscriber} from "rxjs";
import {NewSearchPageComponent} from "../../openaireLibrary/searchPages/searchUtils/newSearchPage.component";
import {SearchResult} from "../../openaireLibrary/utils/entities/searchResult";
import {StringUtils} from "../../openaireLibrary/utils/string-utils.class";
import {IndexInfoService} from "../../openaireLibrary/utils/indexInfo.service";
@Component({
selector: 'openaire-search-projects',
template: `
<new-search-page
pageTitle="Search Projects"
entityType="project"
type="project"
[results]="results"
[searchUtils]="searchUtils"
[sortedByChanged]="searchUtils.sortBy"
[fieldIds]="fieldIds" [fieldIdsMap]="fieldIdsMap" [selectedFields]="selectedFields"
pageTitle="Search Projects"
entityType="project"
type="project"
[results]="results"
[searchUtils]="searchUtils"
[sortedByChanged]="searchUtils.sortBy"
[fieldIds]="fieldIds" [fieldIdsMap]="fieldIdsMap" [selectedFields]="selectedFields"
[simpleSearchLink]="properties.searchLinkToProjects"
[disableForms]="disableForms"
[disableRefineForms]="disableRefineForms"
[loadPaging]="loadPaging"
[oldTotalResults]="oldTotalResults"
[openaireLink]="'https://' + (properties.environment == 'production'?'':'beta.') + 'explore.openaire.eu/search/find/projects'"
[includeOnlyResultsAndFilter]="false"
[piwikSiteId]=piwikSiteId [hasPrefix]="false"
searchFormClass="datasourcesTableSearchForm" [entitiesSelection]="true" [showSwitchSearchLink]="false"
[filters]="filters"
[simpleView]="true" formPlaceholderText="Search by name..."
[showResultCount]="false" [showIndexInfo]="false" [showDownload]="false"
[sort]="false" [showBreadcrumb]="true"
[customFilter]=customFilter [searchForm]="{dark: false, class: 'search-form'}">
</new-search-page>
[simpleSearchLink]="properties.searchLinkToProjects"
[disableForms]="disableForms"
[disableRefineForms]="disableRefineForms"
[loadPaging]="loadPaging"
[oldTotalResults]="oldTotalResults"
[openaireLink]="'https://' + (properties.environment == 'production'?'':'beta.') + 'explore.openaire.eu/search/find/projects'"
[includeOnlyResultsAndFilter]="false"
[hasPrefix]="false"
searchFormClass="datasourcesTableSearchForm" [entitiesSelection]="false" [showSwitchSearchLink]="false"
[filters]="filters"
[simpleView]="true" formPlaceholderText="Search by name..."
[showResultCount]="false" [showIndexInfo]="false" [showDownload]="false"
[sort]="false" [showBreadcrumb]="true"
[customFilter]=customFilter [searchForm]="{dark: false, class: 'search-form'}">
</new-search-page>
`
})
@ -51,8 +50,9 @@ export class OpenaireSearchProjectsComponent {
private errorMessages: ErrorMessagesComponent;
public columnNames = ['Project', 'GrantId', 'Funder'];
public results =[];
public originalFilters =[];
public originalFunders =[];
public filters =[];
selectedFunder = null;
public searchUtils:SearchUtilsClass = new SearchUtilsClass();
subscriptions = [];
public searchFields:SearchFields = new SearchFields();
@ -63,11 +63,8 @@ export class OpenaireSearchProjectsComponent {
public enableSearchView: boolean = true;
private communityId: string = '';
piwikSiteId = null;
customFilter: SearchCustomFilter = null;
initialLoad = true;
public allResults =[];
@ViewChild(NewSearchPageComponent, { static: true }) searchPage: NewSearchPageComponent;
public fieldIds: string[] = this.searchFields.PROJECT_ADVANCED_FIELDS;
public fieldIdsMap= this.searchFields.PROJECT_FIELDS;
@ -76,30 +73,33 @@ export class OpenaireSearchProjectsComponent {
public loadPaging: boolean = true;
public oldTotalResults: number = 0;
keyword;
constructor (private route: ActivatedRoute, private _searchProjectsService: SearchCommunityProjectsService, private _communityService: CommunityService) {
lastDBLoadDate = null;
constructor (private route: ActivatedRoute, private _searchProjectsService: SearchCommunityProjectsService, private _communityService: CommunityService, private indexInfoService: IndexInfoService) {
this.errorCodes = new ErrorCodes();
this.errorMessages = new ErrorMessagesComponent();
this.searchUtils.status = this.errorCodes.LOADING;
}
public ngOnInit() {
this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(res => {
this.lastDBLoadDate = res;
}));
this.searchUtils.baseUrl = this.properties.searchLinkToProjects;
this.subscriptions.push(this._communityService.getCommunityAsObservable().subscribe(community =>{
if(community != null){
this.communityId = community.communityId;
this.customFilter = new SearchCustomFilter("Community", "communityId", this.communityId, community.shortTitle);
this.piwikSiteId = PiwikHelper.getSiteId(this.communityId);
this.subscriptions.push(this.route.queryParams.subscribe(params => {
let page = (params['page'] === undefined) ? 1 : +params['page'];
this.searchUtils.page = (page <= 0) ? 1 : page;
this.selectedFunder = params["funder"]?StringUtils.unquote(params["funder"]):null;
this.searchUtils.validateSize(params['size']);
this.keyword = decodeURIComponent(params['fv0']?params['fv0']:(params['keyword']?params['keyword']:''));
this.selectedFields = [];
this.searchPage.prepareSearchPage(this.fieldIds, this.selectedFields, this.refineFields, [], this.fieldIdsMap, this.customFilter, params, "project");
this.searchPage.prepareSearchPage(this.fieldIds, this.selectedFields, this.refineFields, [], [], this.fieldIdsMap, this.customFilter, params, "project");
if(this.initialLoad) {
this.initialLoad = false;
this._getResults();
this._getCommunityFunders();
}else{
this._getResults();
}
@ -123,73 +123,60 @@ export class OpenaireSearchProjectsComponent {
this.disableForms = true;
this.disableRefineForms = true;
this.enableSearchView = false;
if(this.allResults) {
this.subscriptions.push(this._searchProjectsService.searchProjects(this.properties, this.communityId).subscribe(
data => {
this.originalFilters = this.createFilters(data).slice(); //copy array
this.allResults = this.parseResults(data);
this.filters = this.searchPage.prepareFiltersToShow(this.originalFilters, this.allResults.length);
this.filterResults();
},
err => {
this.handleError("Error getting projects for community with id: " + this.communityId, err);
this.searchUtils.status = this.errorMessages.getErrorCode(err.status);
this.enableSearchView = true;
}
));
}else{
this.filters = this.searchPage.prepareFiltersToShow(this.originalFilters, this.allResults.length);
this.filterResults();
}
this.subscriptions.push(this._searchProjectsService.searchProjectsWithPaging(this.properties, this.communityId, this.searchUtils.page, this.searchUtils.size, this.searchUtils.keyword, this.selectedFunder, "name" ).subscribe(
data => {
this.searchUtils.totalResults = data['totalElements'];
this.filters = this.selectedFunder?this.createFilters([this.selectedFunder]):this.createFilters(this.originalFunders);
this.results = this.parseResults(data.content);
this.oldTotalResults = data['totalElements'];
this.searchUtils.totalResults = data['totalElements'];
this.searchUtils.status = this.results.length == 0 ? this.errorCodes.NONE: this.errorCodes.DONE;
this.disableForms = false;
this.disableRefineForms = false;
this.enableSearchView = true;
this.searchUtils.refineStatus = this.errorCodes.DONE;
},
err => {
this.handleError("Error getting projects for community with id: " + this.communityId, err);
this.searchUtils.status = this.errorMessages.getErrorCode(err.status);
this.enableSearchView = true;
}
));
}
private createFilters(data):Filter[] {
let length = Array.isArray(data) ? data.length : 1;
var filter_names=["Funder"];
var filter_ids=["funder"];
var filter_original_ids = ["funder"];
var value_names=[];
var value_original_ids=[];
var funders = new Set<String>();
var value_name = [];
var value_original_id = [];
let i;
for(i=0; i<length; i++) {
let resData = Array.isArray(data) ? data[i] : data;
if(resData.funder && !funders.has(resData.funder)) {
funders.add(resData.funder);
value_name.push(resData.funder);
value_original_id.push(resData.funder.trim());
}
for(let funder of data) {
funders.add(funder);
value_name.push(funder);
value_original_id.push(funder);
}
value_names.push(value_name);
value_original_ids.push(value_original_id);
var filters: Filter[] =[];
for(i =0 ; i < filter_names.length;i++){
if(value_names[i].length > 0) {
if(value_name.length > 0) {
var values: Value[] = [];
for (var j = 0; j < value_names[i].length; j++) {
var value: Value = {name: value_names[i][j], id: value_original_ids[i][j], number: j, selected: false}
for (var j = 0; j < value_name.length; j++) {
var value: Value = {name: value_name[j], id:value_name[j], number: 0, selected: this.selectedFunder == value_name[j] }
values.push(value);
}
var filter: Filter = {
title: filter_names[i],
filterId: filter_ids[i],
originalFilterId: filter_original_ids[i],
title: "Funder",
filterId: "funder",
originalFilterId: "funder",
values: values,
countSelectedValues: 0,
countSelectedValues: this.selectedFunder?1:0,
"filterOperator": 'or',
valueIsExact: true,
filterType: "checkbox"
};
filters.push(filter);
}
}
return filters;
}
@ -197,7 +184,11 @@ export class OpenaireSearchProjectsComponent {
let results:SearchResult[]=[];
for(let result of data){
let sResult:SearchResult = new SearchResult();
sResult.id = result.openaireId;
if(!result["availableSince"] || !this.lastDBLoadDate || (result["availableSince"] && this.lastDBLoadDate && result["availableSince"] < this.lastDBLoadDate)){
sResult.id = result.openaireId;
}else{
sResult.id = "-1"; //not yet in the graph
}
sResult.title = {name:"", accessMode: null};
sResult.title.name = result.name?result.name:result.acronym;
sResult.acronym = result['acronym'];
@ -207,33 +198,32 @@ export class OpenaireSearchProjectsComponent {
}
return results;
}
filterResults(){
let results = this.allResults.filter(value => { return value.title.name && value.title.name.toLowerCase().indexOf(this.keyword.toLowerCase()) !=-1 || value.acronym && value.acronym.toLowerCase().indexOf(this.keyword.toLowerCase()) !=-1});
let funderFilterValues = [];
getFunderFilterValue(){
for(let filter of this.filters){
if(filter.countSelectedValues > 0){
for(let value of filter.values){
if(value.selected) {
funderFilterValues.push(value.name);
return value.name;
}
}
}
}
if(funderFilterValues.length > 0) {
results = results.filter(value => {
return funderFilterValues.indexOf(value.funderShortname) != -1
});
}
this.oldTotalResults = results.length;
this.searchUtils.totalResults = results.length;
this.results = results.slice((this.searchUtils.page - 1) * this.searchUtils.size, this.searchUtils.page *this.searchUtils.size );
this.searchUtils.status = this.results.length == 0 ? this.errorCodes.NONE: this.errorCodes.DONE;
this.disableForms = false;
this.disableRefineForms = false;
this.enableSearchView = true;
this.searchUtils.refineStatus = this.errorCodes.DONE;
return null;
}
private handleError(message: string, error) {
console.error("Projects simple Search Page: "+message, error);
}
public _getCommunityFunders() {
this.subscriptions.push(this._searchProjectsService.getProjectFunders(this.properties, this.communityId).subscribe(
data => {
this.originalFunders = data
this._getResults();
},
err => {
}
));
}
}

View File

@ -2,10 +2,7 @@ import {Component, OnDestroy, OnInit} from '@angular/core';
import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class";
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
import {ActivatedRoute} from "@angular/router";
import {ConnectHelper} from "../../openaireLibrary/connect/connectHelper";
import {PiwikHelper} from "../../utils/piwikHelper";
import {Subscriber} from "rxjs";
import {CommunitiesService} from "../../openaireLibrary/connect/communities/communities.service";
import {properties} from "../../../environments/environment";
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
@ -13,15 +10,13 @@ import {CommunityService} from "../../openaireLibrary/connect/community/communit
selector: 'openaire-search-results',
template: `
<search-research-results resultType="result" [openaireLink]="'https://' + (properties.environment == 'production'?'':'beta.') + 'explore.openaire.eu/search/find/research-outcomes'"
[customFilter]=customFilter [piwikSiteId]="piwikSiteId" [hasPrefix]="false"
[customFilter]=customFilter [hasPrefix]="false"
[includeOnlyResultsAndFilter]="false" [showBreadcrumb]="true" [showSwitchSearchLink]="true" [searchForm]="{dark: false, class: 'search-form'}"></search-research-results>
`
})
export class OpenaireSearchResearchResultsComponent implements OnInit, OnDestroy {
connectCommunityId: string;
piwikSiteId = null;
customFilter: SearchCustomFilter = null;
properties:EnvProperties = properties;
sub;
@ -43,7 +38,6 @@ export class OpenaireSearchResearchResultsComponent implements OnInit, OnDestroy
this.sub = this._communityService.getCommunityAsObservable().subscribe(community =>{
if(community != null){
this.connectCommunityId = community.communityId;
this.piwikSiteId = PiwikHelper.getSiteId(this.connectCommunityId);
this.customFilter = new SearchCustomFilter("Community", "communityId", this.connectCommunityId, community.shortTitle);
}
});

View File

@ -13,7 +13,6 @@ import {
StatisticsDisplay,
StatisticsSummary
} from "../openaireLibrary/connect/statistics/statisticsEntities";
import {PiwikHelper} from '../utils/piwikHelper';
import {CommunityCharts} from "../openaireLibrary/connect/statistics/communityCharts";
import {CommunityService} from "../openaireLibrary/connect/community/community.service";
import {Subscriber, Subscription} from "rxjs";
@ -90,8 +89,8 @@ export class StatisticsComponent {
community => {
if(community) {
this.communityId = community.communityId;
if (this.currentMode == "showInMonitor" && this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subs.push(this._piwikService.trackView(this.properties, "Monitor " + this.communityId, PiwikHelper.siteIDs[this.communityId]).subscribe());
if (this.currentMode == "showInMonitor") {
this.subs.push(this._piwikService.trackView(this.properties, "Monitor " + this.communityId).subscribe());
}
this.communityName = community.shortTitle;
this.createChartUrlMap();
@ -157,7 +156,7 @@ export class StatisticsComponent {
getCommunityInfo() {
// console.log(`calling ${this.properties.adminToolsAPIURL}/communityFull/${this.communityId}`);
this.subs.push(this._configService.communityInformationState.subscribe(
this.subs.push(this._configService.portalAsObservable.subscribe(
res => {
this.communityInfo = res;
/*for(let i=0; i<this.communityInfo.entities.length; i++){

View File

@ -6,7 +6,6 @@ import {HelperService} from "../openaireLibrary/utils/helper/helper.service";
import {Meta, Title} from "@angular/platform-browser";
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service";
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service";
import {PiwikHelper} from "../utils/piwikHelper";
import {StringUtils} from "../openaireLibrary/utils/string-utils.class";
import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
import {properties} from "../../environments/environment";
@ -18,112 +17,330 @@ import {Subscriber, Subscription} from "rxjs";
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
<div style="min-height: 650px;">
<div class="uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom">
<div class="uk-padding-small uk-padding-remove-horizontal">
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
</div>
</div>
<div class="uk-container uk-container-large uk-section uk-section-small">
<div *ngIf="showLoading" class="uk-margin-large">
<div class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">
<span class="loading-gif uk-align-center"></span>
</div>
</div>
<div *ngIf="!showLoading">
<h1 class="uk-margin-top">
Subjects
</h1>
<div *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']">
</helper>
</div>
<ng-container *ngIf="groupedSubjects?.length">
<div class="uk-padding uk-margin-top">
<ul class="uk-nav uk-nav-default uk-flex uk-flex-center uk-flex-wrap">
<li *ngFor="let item of groupedSubjects; let i = index;" class="uk-margin-left uk-margin-right"
[class]="index == i ? 'uk-active':''" (click)="changeDisplayedSubjects(i, item)">
<a class="uk-padding-remove">{{item.group}}</a>
</li>
</ul>
</div>
<!-- View for 'All' -->
<div *ngIf="index == 0 && groupedSubjects.length > 1" class="uk-margin-large-top uk-grid uk-child-width-1-4@m" uk-grid>
<!-- <div *ngIf="index == 0" class="uk-margin-large-top uk-grid uk-child-width-1-4@m" uk-grid>-->
<div *ngFor="let item of groupedSubjects.slice(1); let i = index;">
<div>
<h6>{{item.group}}</h6>
<div *ngFor="let subItem of item.data.slice(0, subjectsLimit)" class="uk-margin-small-bottom">
<a [queryParams]="{f0:'resultsubject',fv0:createParams(subItem)}" class="uk-link-text"
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults"
[attr.uk-tooltip]="subItem.length > maxCharacters ? subItem :''">
<span>{{subItem.length > maxCharacters ? subItem.substring(0,maxCharacters)+'...' : subItem}}</span>
</a>
</div>
<div *ngIf="item.data.length > subjectsLimit">
<a (click)="changeDisplayedSubjects(i+1, item)" class="view-more-less-link">
View all
</a>
</div>
</div>
</div>
</div>
<!-- View for a single group -->
<div *ngIf="index != 0 || groupedSubjects.length == 1" class="uk-margin-large-top">
<!-- <div *ngIf="index != 0" class="uk-margin-large-top">-->
<div>
<div>
<h6>{{groupedSubjects[index].group}}</h6>
<ng-container *ngIf="subjectsColumns?.length == 0; else elseBlock">
<div *ngFor="let subItem of groupedSubjects[index].data" class="uk-margin-small-bottom">
<a [queryParams]="{f0:'resultsubject',fv0:createParams(subItem)}" class="uk-link-text"
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults">
<span>{{subItem.length > maxCharacters ? subItem.substring(0,maxCharacters)+'...' : subItem}}</span>
</a>
</div>
</ng-container>
<ng-template #elseBlock>
<div class="uk-grid uk-child-width-1-4@m" uk-grid>
<div *ngFor="let group of subjectsColumns">
<div *ngFor="let subItem of group" class="uk-margin-small-bottom">
<a [queryParams]="{f0:'resultsubject',fv0:createParams(subItem)}" class="uk-link-text"
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults">
<span>{{subItem.length > maxCharacters ? subItem.substring(0,maxCharacters)+'...' : subItem}}</span>
</a>
</div>
</div>
</div>
</ng-template>
</div>
</div>
</div>
</ng-container>
</div>
</div>
</div>
<div class="uk-padding-small uk-padding-remove-horizontal">
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
</div>
</div>
<div class="uk-container uk-container-large uk-section uk-section-small">
<div *ngIf="showLoading" class="uk-margin-large">
<div class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">
<span class="loading-gif uk-align-center"></span>
</div>
</div>
<div *ngIf="!showLoading">
<h1 class="uk-margin-top">
Subjects
</h1>
<div *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']">
</helper>
</div>
<div class="uk-margin-large-top" *ngIf="displayedSubjects?.length == 0 && displayedSdg?.length == 0 && displayedFos?.length == 0"
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
<div>No subjects</div>
</div>
<div class="uk-margin-large-top" *ngIf="displayedSubjects?.length > 0 || displayedSdg?.length > 0 || displayedFos?.length > 0">
<ul uk-tab class="uk-tab uk-margin-bottom uk-flex uk-flex-center uk-flex-left@m">
<li class="uk-active" *ngIf="displayedAllSubjects?.length" (click)="groupSubjects(displayedAllSubjects, 'all')">
<a>All ({{displayedAllSubjects.length}})</a>
</li>
<li *ngIf="displayedSubjects?.length" (click)="groupSubjects(displayedSubjects, 'freeText')">
<a>Free Text ({{displayedSubjects.length}})</a>
</li>
<li *ngIf="displayedSdg?.length" (click)="groupSubjects(displayedSdg, 'sdg')">
<a>SDGs ({{displayedSdg.length}})</a>
</li>
<li *ngIf="displayedFos?.length" (click)="groupSubjects(displayedFos, 'fos')">
<a>Fields of Science ({{displayedFos.length}})</a>
</li>
</ul>
<ul class="uk-switcher">
<li *ngIf="displayedAllSubjects?.length">
<ng-container *ngIf="groupedAllSubjects?.length">
<div>
<ul class="uk-nav uk-nav-default uk-flex uk-flex-wrap">
<li *ngFor="let item of groupedAllSubjects; let i = index;" class="uk-margin-right" [class.uk-margin-left]="i != 0"
[class]="indexAll == i ? 'uk-active':''" (click)="changeDisplayedSubjects(i, item)">
<a class="uk-padding-remove">{{item.group}}</a>
</li>
</ul>
</div>
<!-- View for 'All' -->
<div *ngIf="indexAll == 0 && groupedAllSubjects.length > 1" class="uk-margin-large-top uk-grid uk-child-width-1-4@m" uk-grid>
<div *ngFor="let item of groupedAllSubjects.slice(1); let i = index;">
<div>
<h6>{{item.group}}</h6>
<div *ngFor="let subItem of item.data.slice(0, subjectsLimit)" class="uk-margin-small-bottom">
<a [queryParams]="{f0:subItem.type,fv0:createParams(subItem.value)}" class="uk-link-text"
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults"
[attr.uk-tooltip]="subItem.value.length > maxCharacters ? subItem.value :''">
<span>{{subItem.value.length > maxCharacters ? subItem.value.substring(0,maxCharacters)+'...' : subItem.value}}</span>
</a>
</div>
<div *ngIf="item.data.length > subjectsLimit">
<a (click)="changeDisplayedSubjects(i+1, item)" class="view-more-less-link">
View all
</a>
</div>
</div>
</div>
</div>
<!-- View for a single group -->
<div *ngIf="indexAll != 0 || groupedAllSubjects.length == 1" class="uk-margin-large-top">
<div>
<div>
<h6>{{groupedAllSubjects[indexAll].group}}</h6>
<ng-container *ngIf="subjectsColumns?.length == 0; else elseBlock">
<div *ngFor="let subItem of groupedAllSubjects[indexAll].data" class="uk-margin-small-bottom">
<a [queryParams]="{f0:subItem.type,fv0:createParams(subItem.value)}" class="uk-link-text"
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults"
[attr.uk-tooltip]="subItem.value.length > maxCharacters ? subItem.value :''">
<span>{{subItem.value.length > maxCharacters ? subItem.value.substring(0,maxCharacters)+'...' : subItem.value}}</span>
</a>
</div>
</ng-container>
<ng-template #elseBlock>
<div class="uk-grid uk-child-width-1-4@m" uk-grid>
<div *ngFor="let group of subjectsColumns">
<div *ngFor="let subItem of group" class="uk-margin-small-bottom">
<a [queryParams]="{f0:subItem.type,fv0:createParams(subItem.value)}" class="uk-link-text"
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults"
[attr.uk-tooltip]="subItem.value.length > maxCharacters ? subItem.value :''">
<span>{{subItem.value.length > maxCharacters ? subItem.value.substring(0,maxCharacters)+'...' : subItem.value}}</span>
</a>
</div>
</div>
</div>
</ng-template>
</div>
</div>
</div>
</ng-container>
</li>
<li *ngIf="displayedSubjects?.length">
<ng-container *ngIf="groupedSubjects?.length">
<div>
<ul class="uk-nav uk-nav-default uk-flex uk-flex-wrap">
<li *ngFor="let item of groupedSubjects; let i = index;" class="uk-margin-right" [class.uk-margin-left]="i != 0"
[class]="indexSubjects == i ? 'uk-active':''" (click)="changeDisplayedSubjects(i, item)">
<a class="uk-padding-remove">{{item.group}}</a>
</li>
</ul>
</div>
<!-- View for 'All' -->
<div *ngIf="indexSubjects == 0 && groupedSubjects.length > 1" class="uk-margin-large-top uk-grid uk-child-width-1-4@m" uk-grid>
<div *ngFor="let item of groupedSubjects.slice(1); let i = index;">
<div>
<h6>{{item.group}}</h6>
<div *ngFor="let subItem of item.data.slice(0, subjectsLimit)" class="uk-margin-small-bottom">
<a [queryParams]="{f0:'resultsubject',fv0:createParams(subItem)}" class="uk-link-text"
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults"
[attr.uk-tooltip]="subItem.length > maxCharacters ? subItem :''">
<span>{{subItem.length > maxCharacters ? subItem.substring(0,maxCharacters)+'...' : subItem}}</span>
</a>
</div>
<div *ngIf="item.data.length > subjectsLimit">
<a (click)="changeDisplayedSubjects(i+1, item)" class="view-more-less-link">
View all
</a>
</div>
</div>
</div>
</div>
<!-- View for a single group -->
<div *ngIf="indexSubjects != 0 || groupedSubjects.length == 1" class="uk-margin-large-top">
<div>
<div>
<h6>{{groupedSubjects[indexSubjects]?.group}}</h6>
<ng-container *ngIf="subjectsColumns?.length == 0; else elseBlock">
<div *ngFor="let subItem of groupedSubjects[indexSubjects]?.data" class="uk-margin-small-bottom">
<a [queryParams]="{f0:'resultsubject',fv0:createParams(subItem)}" class="uk-link-text"
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults"
[attr.uk-tooltip]="subItem.length > maxCharacters ? subItem :''">
<span>{{subItem.length > maxCharacters ? subItem.substring(0,maxCharacters)+'...' : subItem}}</span>
</a>
</div>
</ng-container>
<ng-template #elseBlock>
<div class="uk-grid uk-child-width-1-4@m" uk-grid>
<div *ngFor="let group of subjectsColumns">
<div *ngFor="let subItem of group" class="uk-margin-small-bottom">
<a [queryParams]="{f0:'resultsubject',fv0:createParams(subItem)}" class="uk-link-text"
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults"
[attr.uk-tooltip]="subItem.length > maxCharacters ? subItem :''">
<span>{{subItem.length > maxCharacters ? subItem.substring(0,maxCharacters)+'...' : subItem}}</span>
</a>
</div>
</div>
</div>
</ng-template>
</div>
</div>
</div>
</ng-container>
</li>
<li *ngIf="displayedSdg?.length">
<ng-container *ngIf="groupedSdg?.length">
<div>
<ul class="uk-nav uk-nav-default uk-flex uk-flex-wrap">
<li *ngFor="let item of groupedSdg; let i = index;" class="uk-margin-right" [class.uk-margin-left]="i != 0"
[class]="indexSdg == i ? 'uk-active':''" (click)="changeDisplayedSubjects(i, item)">
<a class="uk-padding-remove">{{item.group}}</a>
</li>
</ul>
</div>
<!-- View for 'All' -->
<div *ngIf="indexSdg == 0 && groupedSdg.length > 1" class="uk-margin-large-top uk-grid uk-child-width-1-4@m" uk-grid>
<div *ngFor="let item of groupedSdg.slice(1); let i = index;">
<div>
<h6>{{item.group}}</h6>
<div *ngFor="let subItem of item.data.slice(0, subjectsLimit)" class="uk-margin-small-bottom">
<a [queryParams]="{f0:'sdg',fv0:createParams(subItem)}" class="uk-link-text"
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults"
[attr.uk-tooltip]="subItem.length > maxCharacters ? subItem :''">
<span>{{subItem.length > maxCharacters ? subItem.substring(0,maxCharacters)+'...' : subItem}}</span>
</a>
</div>
<div *ngIf="item.data.length > subjectsLimit">
<a (click)="changeDisplayedSubjects(i+1, item)" class="view-more-less-link">
View all
</a>
</div>
</div>
</div>
</div>
<!-- View for a single group -->
<div *ngIf="indexSdg != 0 || groupedSdg.length == 1" class="uk-margin-large-top">
<div>
<div>
<h6>{{groupedSdg[indexSdg].group}}</h6>
<ng-container *ngIf="subjectsColumns?.length == 0; else elseBlock">
<div *ngFor="let subItem of groupedSdg[indexSdg].data" class="uk-margin-small-bottom">
<a [queryParams]="{f0:'sdg',fv0:createParams(subItem)}" class="uk-link-text"
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults"
[attr.uk-tooltip]="subItem.length > maxCharacters ? subItem :''">
<span>{{subItem.length > maxCharacters ? subItem.substring(0,maxCharacters)+'...' : subItem}}</span>
</a>
</div>
</ng-container>
<ng-template #elseBlock>
<div class="uk-grid uk-child-width-1-4@m" uk-grid>
<div *ngFor="let group of subjectsColumns">
<div *ngFor="let subItem of group" class="uk-margin-small-bottom">
<a [queryParams]="{f0:'sdg',fv0:createParams(subItem)}" class="uk-link-text"
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults"
[attr.uk-tooltip]="subItem.length > maxCharacters ? subItem :''">
<span>{{subItem.length > maxCharacters ? subItem.substring(0,maxCharacters)+'...' : subItem}}</span>
</a>
</div>
</div>
</div>
</ng-template>
</div>
</div>
</div>
</ng-container>
</li>
<li *ngIf="displayedFos?.length">
<ng-container *ngIf="groupedFos?.length">
<div>
<ul class="uk-nav uk-nav-default uk-flex uk-flex-wrap">
<li *ngFor="let item of groupedFos; let i = index;" class="uk-margin-right" [class.uk-margin-left]="i != 0"
[class]="indexFos == i ? 'uk-active':''" (click)="changeDisplayedSubjects(i, item)">
<a class="uk-padding-remove">{{item.group}}</a>
</li>
</ul>
</div>
<!-- View for 'All' -->
<div *ngIf="indexFos == 0 && groupedFos.length > 1" class="uk-margin-large-top uk-grid uk-child-width-1-4@m" uk-grid>
<div *ngFor="let item of groupedFos.slice(1); let i = index;">
<div>
<h6>{{item.group}}</h6>
<div *ngFor="let subItem of item.data.slice(0, subjectsLimit)" class="uk-margin-small-bottom">
<a [queryParams]="{f0:'fos',fv0:createParams(subItem)}" class="uk-link-text"
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults"
[attr.uk-tooltip]="subItem.length > maxCharacters ? subItem :''">
<span>{{subItem.length > maxCharacters ? subItem.substring(0,maxCharacters)+'...' : subItem}}</span>
</a>
</div>
<div *ngIf="item.data.length > subjectsLimit">
<a (click)="changeDisplayedSubjects(i+1, item)" class="view-more-less-link">
View all
</a>
</div>
</div>
</div>
</div>
<!-- View for a single group -->
<div *ngIf="indexFos != 0 || groupedFos.length == 1" class="uk-margin-large-top">
<div>
<div>
<h6>{{groupedFos[indexFos].group}}</h6>
<ng-container *ngIf="subjectsColumns?.length == 0; else elseBlock">
<div *ngFor="let subItem of groupedFos[indexFos].data" class="uk-margin-small-bottom">
<a [queryParams]="{f0:'fos',fv0:createParams(subItem)}" class="uk-link-text"
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults"
[attr.uk-tooltip]="subItem.length > maxCharacters ? subItem :''">
<span>{{subItem.length > maxCharacters ? subItem.substring(0,maxCharacters)+'...' : subItem}}</span>
</a>
</div>
</ng-container>
<ng-template #elseBlock>
<div class="uk-grid uk-child-width-1-4@m" uk-grid>
<div *ngFor="let group of subjectsColumns">
<div *ngFor="let subItem of group" class="uk-margin-small-bottom">
<a [queryParams]="{f0:'fos',fv0:createParams(subItem)}" class="uk-link-text"
routerLinkActive="router-link-active" [routerLink]="properties.searchLinkToAdvancedResults"
[attr.uk-tooltip]="subItem.length > maxCharacters ? subItem :''">
<span>{{subItem.length > maxCharacters ? subItem.substring(0,maxCharacters)+'...' : subItem}}</span>
</a>
</div>
</div>
</div>
</ng-template>
</div>
</div>
</div>
</ng-container>
</li>
</ul>
</div>
</div>
</div>
</div>
`
})
export class SubjectsComponent {
public subjects: string[];
public communityId = null;
public showLoading = true;
public properties: EnvProperties = properties;
public pageContents = null;
public divContents = null;
public groupedSubjects = [];
public index: number = 0;
public subjectsLimit: number = 6;
public viewAll: boolean = false;
public maxCharacters: number = 25;
public subjectsColumns = [];
public url: string = null;
public pageTitle: string = "Subjects";
public breadcrumbs: Breadcrumb[] = [{name: 'Home', route: '/'}, {name: 'About - Subjects'}];
properties: EnvProperties = properties;
breadcrumbs: Breadcrumb[] = [{name: 'Home', route: '/'}, {name: 'About - Subjects'}];
pageContents = null;
divContents = null;
url: string = null;
pageTitle: string = "Subjects";
communityId = null;
showLoading = true;
subs: Subscription[] = [];
displayedAllSubjects = [];
displayedSubjects = [];
displayedSdg = [];
displayedFos = [];
groupedAllSubjects = [];
groupedSubjects = [];
groupedSdg = [];
groupedFos = [];
subjectsColumns = [];
subjectsLimit: number = 6;
maxCharacters: number = 25;
activeTab: 'all' | 'freeText' | 'sdg' | 'fos' = 'all';
indexAll: number = 0;
indexSubjects: number = 0;
indexSdg: number = 0;
indexFos: number = 0;
viewAll: boolean = false;
constructor(private route: ActivatedRoute,
private communityService: CommunityService,
private _router: Router,
@ -144,28 +361,28 @@ export class SubjectsComponent {
this.subs.push(this.communityService.getCommunityAsObservable().subscribe(community => {
if (community) {
this.communityId = community.communityId;
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subs.push(this._piwikService.trackView(this.properties, this.pageTitle, PiwikHelper.getSiteId(this.communityId)).subscribe());
}
//this.getDivContents();
this.subs.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
this.getPageContents();
this.subjects = community.subjects;
this.subjects.sort((a,b) => {
if(!a || a.toLocaleUpperCase() < b.toLocaleUpperCase()) {
return -1;
} else if (!b || a.toLocaleUpperCase() > b.toLocaleUpperCase()) {
return 1;
}
return 0;
});
this.groupSubjects();
this.displayedSubjects = community.subjects;
this.displayedSdg = community.sdg;
this.displayedFos = community.fos;
this.displayedSubjects.forEach(element => {
this.displayedAllSubjects.push({value: element, type: 'resultsubject'});
});
this.displayedSdg.forEach(element => {
this.displayedAllSubjects.push({value: element, type: 'sdg'});
});
this.displayedFos.forEach(element => {
this.displayedAllSubjects.push({value: element, type: 'fos'});
});
this.groupSubjects(this.displayedAllSubjects, 'all');
this.showLoading = false;
}
}));
}
createParams(param) {
return StringUtils.quote(StringUtils.URIEncode(param));
return StringUtils.URIEncode(param);
}
ngOnDestroy() {
@ -182,51 +399,111 @@ export class SubjectsComponent {
}));
}
private getDivContents() {
this.subs.push(this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
this.divContents = contents;
}));
public groupSubjects(subjects: string[], type: string) {
if(subjects.length === 0) {
return [];
}
if(type === 'all') {
subjects.sort((a, b) => a['value'].localeCompare(b['value']));
this.indexAll = 0;
this.activeTab = 'all';
this.groupedAllSubjects = Object.values(
subjects.reduce((acc, subject) => {
let firstLetter = subject['value'][0].toLocaleUpperCase();
if(!acc[firstLetter]) {
acc[firstLetter] = {group: firstLetter, data: [subject]};
} else {
acc[firstLetter].data.push(subject);
}
return acc;
},{})
)
if(subjects.length > 1) {
this.groupedAllSubjects.unshift({group: 'All', data: subjects});
}
}
if(type === 'freeText') {
subjects.sort((a, b) => a.localeCompare(b));
this.indexSubjects = 0;
this.activeTab = 'freeText';
this.groupedSubjects = Object.values(
subjects.reduce((acc, subject) => {
let firstLetter = subject[0].toLocaleUpperCase();
if(!acc[firstLetter]) {
acc[firstLetter] = {group: firstLetter, data: [subject]};
} else {
acc[firstLetter].data.push(subject);
}
return acc;
},{})
)
if(subjects.length > 1) {
this.groupedSubjects.unshift({group: 'All', data: subjects});
}
}
if(type === 'sdg') {
subjects.sort((a, b) => a.localeCompare(b));
this.indexSdg = 0;
this.activeTab = 'sdg';
this.groupedSdg = Object.values(
subjects.reduce((acc, subject) => {
let firstLetter = subject[0].toLocaleUpperCase();
if(!acc[firstLetter]) {
acc[firstLetter] = {group: firstLetter, data: [subject]};
} else {
acc[firstLetter].data.push(subject);
}
return acc;
},{})
)
if(subjects.length > 1) {
this.groupedSdg.unshift({group: 'All', data: subjects});
}
}
if(type === 'fos') {
subjects.sort((a, b) => a.localeCompare(b));
this.indexFos = 0;
this.activeTab = 'fos';
this.groupedFos = Object.values(
subjects.reduce((acc, subject) => {
let key = subject.substring(0,2).toLocaleUpperCase();
if(!acc[key]) {
acc[key] = {group: key, data: [subject]};
} else {
acc[key].data.push(subject);
}
return acc;
},{})
)
if(subjects.length > 1) {
this.groupedFos.unshift({group: 'All', data: subjects});
}
}
}
// private sortSubjects(a, b) {
public changeDisplayedSubjects(i, group) {
this.subjectsColumns = [];
if(this.activeTab === 'all') {
this.indexAll = i;
} else if(this.activeTab === 'freeText') {
this.indexSubjects = i;
} else if(this.activeTab === 'sdg') {
this.indexSdg = i;
} else if(this.activeTab === 'fos') {
this.indexFos = i;
}
if(group.data.length > this.subjectsLimit && group.group != 'All') {
this.divideSubjects(group);
}
}
// }
private groupSubjects() {
if(this.subjects.length === 0) {
return [];
}
this.groupedSubjects = Object.values(
this.subjects.reduce((acc, subject) => {
let firstLetter = subject[0].toLocaleUpperCase();
if(!acc[firstLetter]) {
acc[firstLetter] = {group: firstLetter, data: [subject]};
} else {
acc[firstLetter].data.push(subject);
}
return acc;
},{})
)
if(this.subjects.length > 1) {
this.groupedSubjects.unshift({group: 'All', data: this.subjects});
}
}
public changeDisplayedSubjects(i, group) {
this.subjectsColumns = [];
this.index = i;
if(group.data.length > this.subjectsLimit && group.group != 'All') {
this.divideSubjects(group);
}
}
public divideSubjects(group) {
let columns = [];
for(let i = 0; i < (group.data.length / this.subjectsLimit); i++) {
columns.push(group.data.slice(i * this.subjectsLimit, ((i + 1) * this.subjectsLimit)));
}
this.subjectsColumns = columns;
}
public divideSubjects(group) {
let columns = [];
for(let i = 0; i < (group.data.length / this.subjectsLimit); i++) {
columns.push(group.data.slice(i * this.subjectsLimit, ((i + 1) * this.subjectsLimit)));
}
this.subjectsColumns = columns;
}
private updateDescription(description: string) {
this._meta.updateTag({content: description}, "name='description'");

View File

@ -1,5 +1,8 @@
/**
* @deprecated
* */
export class PiwikHelper{
public static siteIDs={
public static siteIDs = {
"dh-ch":81,
"sdsn-gr":82,
"egi":83,
@ -27,18 +30,24 @@ export class PiwikHelper{
"inspired-ris":530,
"citizen-science":538,
"eut":558,
"aurora":560,
"aurora": 560,
"ebrains": 592,
"neanias-space":604,
"heritage-science":607,
"eutopia":608,
"neanias-space": 604,
"heritage-science": 607,
"eutopia": 608,
"north-america-studies": 609,
"iperionhs":610,
"iperionhs": 610,
"neanias-atmospheric": 613,
"forthem": 625
"forthem": 625,
"argo-france": 634,
"knowmad": 640,
"egrise": 710,
"euconexus": 707,
"dth": 719,
"lifewatch-eric": 744
};
public static getSiteId(communityId:string){
return this.siteIDs[communityId];
}
}

View File

@ -2,13 +2,13 @@ import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {InviteComponent} from './invite.component';
import {LoginGuard} from '../../../openaireLibrary/login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {ConnectAdminLoginGuard} from "../../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: InviteComponent, canActivate: [LoginGuard], canDeactivate: [PreviousRouteRecorder] }
{ path: '', component: InviteComponent, canActivate: [ConnectAdminLoginGuard], canDeactivate: [PreviousRouteRecorder] }
])
]

View File

@ -30,8 +30,12 @@
</div>
</div>
<div *ngIf="!longView" class="uk-margin-top">
<a id="invite" routerLink="/invite" class="uk-button uk-flex uk-flex-middle uk-flex-center">
<a *ngIf="isOpen" id="invite" routerLink="/invite" class="uk-button uk-flex uk-flex-middle uk-flex-center">
<icon name="person_add" [flex]="true"></icon>
<span class="uk-margin-small-left">Invite users</span>
</a>
<a *ngIf="!isOpen" id="invite" [href]="this.adminInviteURL" target="_blank" class="uk-button uk-flex uk-flex-middle uk-flex-center">
<icon name="person_add" [flex]="true"></icon>
<span class="uk-margin-small-left">Invite members</span>
</a>
</div>

View File

@ -21,6 +21,7 @@ declare var UIkit;
export class InviteComponent implements OnInit {
@Input() longView: boolean = true;
@Input() communityId = null;
@Input() isOpen: boolean = true;
public properties: EnvProperties = properties;
public pageTitle: string = "Invite";
public user: User;
@ -31,13 +32,11 @@ export class InviteComponent implements OnInit {
private subs: Subscription[] = [];
constructor(
private route: ActivatedRoute,
private _router: Router,
private _meta: Meta,
private helper: HelperService,
private _title: Title,
private seoService: SEOService,
private _piwikService: PiwikService,
private userManageService: UserManagementService) {
}
@ -46,9 +45,9 @@ export class InviteComponent implements OnInit {
user => {
this.user = user;
}));
this.getPageContents();
this.url = this.properties.domain + this._router.url;
if(this.longView) {
this.url = this.properties.domain + this._router.url;
this.getPageContents();
this.seoService.createLinkForCanonicalURL(this.url);
this.updateUrl(this.url);
this.updateTitle(this.pageTitle);
@ -90,9 +89,12 @@ export class InviteComponent implements OnInit {
private updateUrl(url: string) {
this._meta.updateTag({content: url}, "property='og:url'");
}
get adminInviteURL() {
return this.properties.adminPortalURL + '/' + this.communityId + '/users/member';
}
close(element) {
UIkit.dropdown(element).hide();
this
}
}

View File

@ -1,13 +1,12 @@
import {NgModule} from '@angular/core';
import {NgModule} from '@angular/core';
import {InviteRoutingModule} from './invite-routing.module';
import {LoginGuard} from '../../../openaireLibrary/login/loginGuard.guard';
import {InviteRoutingModule} from './invite-routing.module';
import {InviteBasicModule} from "./inviteBasic.module";
import {ConnectAdminLoginGuard} from "../../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard";
@NgModule({
imports: [InviteBasicModule, InviteRoutingModule],
providers: [LoginGuard]
providers: [ConnectAdminLoginGuard]
})
export class InviteModule { }

View File

@ -19,7 +19,7 @@ import {BreadcrumbsModule} from "../../../openaireLibrary/utils/breadcrumbs/brea
import {SubscriberInviteModule} from "../../../openaireLibrary/sharedComponents/subscriber-invite/subscriber-invite.module";
import {LoadingModule} from "../../../openaireLibrary/utils/loading/loading.module";
import {IconsService} from "../../../openaireLibrary/utils/icons/icons.service";
import {cog, send} from "../../../openaireLibrary/utils/icons/icons";
import {cog} from "../../../openaireLibrary/utils/icons/icons";
import {IconsModule} from "../../../openaireLibrary/utils/icons/icons.module";
@NgModule({
@ -42,6 +42,6 @@ import {IconsModule} from "../../../openaireLibrary/utils/icons/icons.module";
export class InviteBasicModule {
constructor(private iconsService: IconsService) {
this.iconsService.registerIcons([send, cog])
this.iconsService.registerIcons([cog])
}
}

@ -1 +1 @@
Subproject commit 658d017b02df4786e9b221f51eb39ef9a42c6d88
Subproject commit 3b437aafda7a716a0a89785a106456cbe520dce3

View File

@ -8,6 +8,7 @@
@general-search-form-background: fade(@global-primary-background, 15%);
@hero-background-image: none;
@hero-background-position: top center;
@hero-fonts-mode:dark;
#joinAndInviteBtn {
position: fixed;
right: 0;
@ -19,7 +20,7 @@
#joinAndInviteBtn #join,
#joinAndInviteBtn #member,
#joinAndInviteBtn #invite {
width: 140px;
width: 160px;
line-height: 60px;
height: 60px;
padding: 0 20px;
@ -55,3 +56,8 @@
background-image: @hero-background-image;
background-position: @hero-background-position;
}
.heroBackground when (@hero-fonts-mode = light) {
.hook-inverse();
}

View File

@ -30,4 +30,4 @@
@inverse-text-primary-color: @connect-color;
/* General */
@general-search-form-background: fade(@global-secondary-background, 20%);
@general-search-form-background: lighten(@global-secondary-background, 33%);

@ -1 +1 @@
Subproject commit fb1d7149654415dd6b848b86ab5187401f50975e
Subproject commit 99ab54cdd7b973a2ba047f0a6b37667270b58439

View File

@ -1,118 +1,22 @@
import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties";
import {common, commonBeta} from "../app/openaireLibrary/utils/properties/environments/environment";
export let properties: EnvProperties = {
environment: "beta",
let props: EnvProperties = {
dashboard: 'connect',
adminToolsPortalType: "connect",
dashboard: "connect",
enablePiwikTrack: true,
adminToolsCommunity: 'connect',
enablePiwikTrack: false,
piwikSiteId: '80',
useCache: false,
useLongCache: true,
showContent: true,
showAddThis: true,
framesAPIURL: "https://beta.openaire.eu/stats3/",
statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/",
statisticsFrameAPIURL: "https://beta.openaire.eu/stats/",
statisticsFrameNewAPIURL: "https://beta.services.openaire.eu/stats-tool/",
useNewStatistisTool: true,
enermapsURL:"https://lab.idiap.ch/enermaps",
impactFactorsAPIURL: "https://bip-api.imsi.athenarc.gr/paper/scores/batch/",
claimsAPIURL: "https://beta.services.openaire.eu/claims/rest/claimsService/",
searchAPIURLLAst: "https://beta.services.openaire.eu/search/v2/api/",
searchResourcesAPIURL: "https://beta.services.openaire.eu/search/v2/api/resources",
openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=",
csvAPIURL: "https://beta.services.openaire.eu/search/v2/api/reports",
searchCrossrefAPIURL: "https://api.crossref.org/works",
searchDataciteAPIURL: "https://api.datacite.org/works",
searchOrcidURL: "https://pub.orcid.org/v2.1/",
orcidURL: "https://orcid.org/",
orcidAPIURL: "https://services.openaire.eu/uoa-orcid-service/",
orcidTokenURL: "https://orcid.org/oauth/authorize?",
orcidClientId: "APP-IN0O56SBVVTB7NN4",
doiURL: "https://doi.org/",
pmcURL: "http://europepmc.org/articles/",
pmidURL: "https://www.ncbi.nlm.nih.gov/pubmed/",
handleURL: "http://hdl.handle.net/",
cordisURL: "http://cordis.europa.eu/projects/",
openDoarURL: "http://v2.sherpa.ac.uk/id/repository/",
r3DataURL: "http://service.re3data.org/repository/",
fairSharingURL: "https://fairsharing.org/",
eoscMarketplaceURL: "https://marketplace.eosc-portal.eu/services/",
sherpaURL: "http://sherpa.ac.uk/romeo/issn/",
sherpaURLSuffix: "/",
zenodo: "https://zenodo.org/",
zenodoCommunities: "https://zenodo.org/api/communities/",
openAccess: "https://www.openaire.eu/support/faq#article-id-234",
openAccessRepo: "https://www.openaire.eu/support/faq#article-id-310",
fp7Guidlines: "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme",
h2020Guidlines: "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020",
ercGuidlines: "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf",
helpdesk: "https://www.openaire.eu/support/helpdesk",
helpdeskEmail: "helpdesk@openaire.eu",
utilsService: "https://demo.openaire.eu/utils-service",
vocabulariesAPI: "https://beta.services.openaire.eu/provision/mvc/vocabularies/",
piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=",
piwikSiteId: "80",
loginUrl: "https://beta.services.openaire.eu/login-service/openid_connect_login",
userInfoUrl: "https://beta.services.openaire.eu/login-service/userInfo",
registryUrl: 'https://beta.services.openaire.eu/uoa-user-management/api/registry/',
logoutUrl: "https://beta.services.openaire.eu/login-service/openid_logout",
cookieDomain: ".openaire.eu",
feedbackmail: "feedback@openaire.eu",
cacheUrl: "https://demo.openaire.eu/cache/get?url=",
adminToolsAPIURL: "https://beta.services.openaire.eu/uoa-admin-tools/",
adminToolsCommunity: "connect",
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/search/",
contextsAPI: "https://beta.services.openaire.eu/openaire/context",
communityAPI: "https://beta.services.openaire.eu/openaire/community/",
communitiesAPI: "https://beta.services.openaire.eu/openaire/community/communities",
csvLimit: 2000,
pagingLimit: 20,
resultsPerPage: 10,
baseLink:"",
domain:"https://beta.connect.openaire.eu",
afterLoginRedirectLink: "/myCommunities",
searchLinkToResult: "/search/result?id=",
searchLinkToPublication: "/search/publication?articleId=",
searchLinkToProject: "/search/project?projectId=",
searchLinkToDataProvider: "/search/dataprovider?datasourceId=",
searchLinkToDataset: "/search/dataset?datasetId=",
searchLinkToSoftwareLanding: "/search/software?softwareId=",
searchLinkToOrganization: "/search/organization?organizationId=",
searchLinkToOrp: "/search/other?orpId=",
searchLinkToCommunities: "/search/find/communities",
searchLinkToPublications: "/search/find/publications",
searchLinkToDataProviders: "/search/find/dataproviders",
searchLinkToProjects: "/search/find/projects",
searchLinkToDatasets: "/search/find/datasets",
searchLinkToSoftware: "/search/find/software",
searchLinkToOrps: "/search/find/other",
searchLinkToOrganizations: "/search/find/organizations",
searchLinkToCompatibleDataProviders: "/search/content-providers",
searchLinkToEntityRegistriesDataProviders: "/search/entity-registries",
searchLinkToJournals: "/search/journals",
searchLinkToResults: "/search/find/research-outcomes",
searchLinkToAdvancedPublications: "/search/advanced/publications",
searchLinkToAdvancedProjects: "/search/advanced/projects",
searchLinkToAdvancedDatasets: "/search/advanced/datasets",
searchLinkToAdvancedSoftware: "/search/advanced/software",
searchLinkToAdvancedOrps: "/search/advanced/other",
searchLinkToAdvancedDataProviders: "/search/advanced/dataproviders",
searchLinkToAdvancedOrganizations: "/search/advanced/organizations",
searchLinkToAdvancedResults: "/search/advanced/research-outcomes",
errorLink: '/error',
lastIndexInformationLink: "https://beta.openaire.eu/aggregation-and-content-provision-workflows",
showLastIndexInformationLink: true,
widgetLink: "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",
claimsInformationLink: "https://beta.openaire.eu/linking",
depositLearnHowPage: "/participate/deposit/learn-how",
depositSearchPage: "/participate/deposit/search",
shareInZenodoPage: "/participate/deposit/zenodo",
reCaptchaSiteKey: "6LezhVIUAAAAAOb4nHDd87sckLhMXFDcHuKyS76P",
admins: ["feedback@openaire.eu"],
lastIndexUpdate: "2020-05-06",
indexInfoAPI: "https://beta.services.openaire.eu/openaire/info/",
altMetricsAPIURL: "https://api.altmetric.com/v1/doi/",
b2noteAPIURL: 'https://b2note.eudat.eu/',
adminPortalURL: "https://beta.admin.connect.openaire.eu",
myOrcidLinksPage: "/my-orcid-links"
showAddThis: false,
domain: 'https://beta.connect.openaire.eu',
baseLink : "",
};
export let properties: EnvProperties = {
...common, ...commonBeta, ...props
}

View File

@ -1,118 +1,22 @@
import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties";
import {common, commonProd} from "../app/openaireLibrary/utils/properties/environments/environment";
export let properties: EnvProperties = {
environment: "production",
let props: EnvProperties = {
dashboard: 'connect',
adminToolsPortalType: "connect",
dashboard: "connect",
enablePiwikTrack: true,
adminToolsCommunity: 'connect',
enablePiwikTrack: false,
piwikSiteId: '80',
useCache: false,
useLongCache: true,
showContent: true,
showAddThis: true,
framesAPIURL: "https://www.openaire.eu/stats3/",
statisticsAPIURL: "https://services.openaire.eu/stats-api/",
statisticsFrameAPIURL: "https://www.openaire.eu/stats/",
statisticsFrameNewAPIURL: "https://services.openaire.eu/stats-tool/",
useNewStatistisTool: true,
enermapsURL:"https://lab.idiap.ch/enermaps",
impactFactorsAPIURL: "https://bip-api.imsi.athenarc.gr/paper/scores/batch/",
claimsAPIURL: "https://services.openaire.eu/claims/rest/claimsService/",
searchAPIURLLAst: "https://services.openaire.eu/search/v2/api/",
searchResourcesAPIURL: "https://services.openaire.eu/search/v2/api/resources",
openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=",
csvAPIURL: "https://services.openaire.eu/search/v2/api/reports",
searchCrossrefAPIURL: "https://api.crossref.org/works",
searchDataciteAPIURL: "https://api.datacite.org/works",
searchOrcidURL: "https://pub.orcid.org/v2.1/",
orcidURL: "https://orcid.org/",
orcidAPIURL: "https://services.openaire.eu/uoa-orcid-service/",
orcidTokenURL: "https://orcid.org/oauth/authorize?",
orcidClientId: "APP-IN0O56SBVVTB7NN4",
doiURL: "https://doi.org/",
pmcURL: "http://europepmc.org/articles/",
pmidURL: "https://www.ncbi.nlm.nih.gov/pubmed/",
handleURL: "http://hdl.handle.net/",
cordisURL: "http://cordis.europa.eu/projects/",
openDoarURL: "http://v2.sherpa.ac.uk/id/repository/",
r3DataURL: "http://service.re3data.org/repository/",
fairSharingURL: "https://fairsharing.org/",
eoscMarketplaceURL: "https://marketplace.eosc-portal.eu/services/",
sherpaURL: "http://sherpa.ac.uk/romeo/issn/",
sherpaURLSuffix: "/",
zenodo: "https://zenodo.org/",
zenodoCommunities: "https://zenodo.org/api/communities/",
openAccess: "https://www.openaire.eu/support/faq#article-id-234",
openAccessRepo: "https://www.openaire.eu/support/faq#article-id-310",
fp7Guidlines: "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme",
h2020Guidlines: "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020",
ercGuidlines: "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf",
helpdesk: "https://www.openaire.eu/support/helpdesk",
helpdeskEmail: "helpdesk@openaire.eu",
utilsService: "https://explore.openaire.eu/utils-service",
vocabulariesAPI: "https://services.openaire.eu/provision/mvc/vocabularies/",
piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=",
piwikSiteId: "112",
loginUrl: "https://services.openaire.eu/login-service/openid_connect_login",
registryUrl: 'https://services.openaire.eu/uoa-user-management/api/registry/',
userInfoUrl: "https://services.openaire.eu/login-service/userInfo",
logoutUrl: "https://services.openaire.eu/login-service/openid_logout",
cookieDomain: ".openaire.eu",
feedbackmail: "feedback@openaire.eu",
cacheUrl: "https://explore.openaire.eu/cache/get?url=",
datasourcesAPI: "https://services.openaire.eu/openaire/ds/search/",
adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/",
adminToolsCommunity: "connect",
contextsAPI: "https://services.openaire.eu/openaire/context",
communityAPI: "https://services.openaire.eu/openaire/community/",
communitiesAPI: "https://services.openaire.eu/openaire/community/communities",
csvLimit: 2000,
pagingLimit: 20,
resultsPerPage: 10,
baseLink:"",
domain: "https://connect.openaire.eu",
afterLoginRedirectLink: "/myCommunities",
searchLinkToResult: "/search/result?id=",
searchLinkToPublication: "/search/publication?articleId=",
searchLinkToProject: "/search/project?projectId=",
searchLinkToDataProvider: "/search/dataprovider?datasourceId=",
searchLinkToDataset: "/search/dataset?datasetId=",
searchLinkToSoftwareLanding: "/search/software?softwareId=",
searchLinkToOrganization: "/search/organization?organizationId=",
searchLinkToOrp: "/search/other?orpId=",
searchLinkToCommunities: "/search/find/communities",
searchLinkToPublications: "/search/find/publications",
searchLinkToDataProviders: "/search/find/dataproviders",
searchLinkToProjects: "/search/find/projects",
searchLinkToDatasets: "/search/find/datasets",
searchLinkToSoftware: "/search/find/software",
searchLinkToOrps: "/search/find/other",
searchLinkToOrganizations: "/search/find/organizations",
searchLinkToCompatibleDataProviders: "/search/content-providers",
searchLinkToEntityRegistriesDataProviders: "/search/entity-registries",
searchLinkToJournals: "/search/journals",
searchLinkToResults: "/search/find/research-outcomes",
searchLinkToAdvancedPublications: "/search/advanced/publications",
searchLinkToAdvancedProjects: "/search/advanced/projects",
searchLinkToAdvancedDatasets: "/search/advanced/datasets",
searchLinkToAdvancedSoftware: "/search/advanced/software",
searchLinkToAdvancedOrps: "/search/advanced/other",
searchLinkToAdvancedDataProviders: "/search/advanced/dataproviders",
searchLinkToAdvancedOrganizations: "/search/advanced/organizations",
searchLinkToAdvancedResults: "/search/advanced/research-outcomes",
errorLink: '/error',
lastIndexInformationLink: "https://www.openaire.eu/aggregation-and-content-provision-workflows",
showLastIndexInformationLink: true,
widgetLink: "https://www.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",
claimsInformationLink: "https://www.openaire.eu/linking",
depositLearnHowPage: "/participate/deposit/learn-how",
depositSearchPage: "/participate/deposit/search",
shareInZenodoPage: "/participate/deposit/zenodo",
reCaptchaSiteKey: "6LezhVIUAAAAAOb4nHDd87sckLhMXFDcHuKyS76P",
admins: ["feedback@openaire.eu"],
lastIndexUpdate: "2019-07-24",
indexInfoAPI: "https://services.openaire.eu/openaire/info/",
altMetricsAPIURL: "https://api.altmetric.com/v1/doi/",
b2noteAPIURL: 'https://b2note.eudat.eu/',
adminPortalURL: "https://admin.connect.openaire.eu",
myOrcidLinksPage: "/my-orcid-links"
showAddThis: false,
domain: 'https://connect.openaire.eu',
baseLink : "",
hasMachineCache: true
};
export let properties: EnvProperties = {
...common, ...commonProd, ...props
}

View File

@ -4,120 +4,24 @@
// The list of which env maps to which file can be found in `.angular.json`.
import {EnvProperties} from '../app/openaireLibrary/utils/properties/env-properties';
import {common, commonDev} from "../app/openaireLibrary/utils/properties/environments/environment";
export let properties: EnvProperties = {
environment: 'development',
adminToolsPortalType: "connect",
let props: EnvProperties = {
dashboard: 'connect',
adminToolsPortalType: "connect",
adminToolsCommunity: 'connect',
enablePiwikTrack: false,
piwikSiteId: '80',
useCache: false,
useLongCache: false,
showContent: true,
showAddThis: false,
framesAPIURL: 'https://beta.openaire.eu/stats3/',
statisticsAPIURL: 'https://beta.services.openaire.eu/stats-api/',
statisticsFrameAPIURL: 'https://beta.openaire.eu/stats/',
statisticsFrameNewAPIURL: "https://beta.services.openaire.eu/stats-tool/",
useNewStatistisTool: true,
enermapsURL:"https://lab.idiap.ch/enermaps",
impactFactorsAPIURL: 'https://bip-api.imsi.athenarc.gr/paper/scores/batch/',
claimsAPIURL: 'http://scoobydoo.di.uoa.gr:8080/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/',
searchAPIURLLAst: 'https://beta.services.openaire.eu/search/v2/api/',
searchResourcesAPIURL: 'https://beta.services.openaire.eu/search/v2/api/resources',
openCitationsAPIURL: 'https://services.openaire.eu/opencitations/getCitations?id=',
csvAPIURL: 'https://beta.services.openaire.eu/search/v2/api/reports',
searchCrossrefAPIURL: 'https://api.crossref.org/works',
searchDataciteAPIURL: 'https://api.datacite.org/works',
searchOrcidURL: "https://pub.orcid.org/v2.1/",
orcidURL: "https://orcid.org/",
orcidAPIURL: "http://duffy.di.uoa.gr:19480/uoa-orcid-service/",
orcidTokenURL: "https://sandbox.orcid.org/oauth/authorize?",
orcidClientId: "APP-A5M3KTX6NCN67L91",
doiURL: 'https://doi.org/',
pmcURL: 'http://europepmc.org/articles/',
pmidURL: 'https://www.ncbi.nlm.nih.gov/pubmed/',
handleURL: 'http://hdl.handle.net/',
cordisURL: 'http://cordis.europa.eu/projects/',
openDoarURL: 'http://v2.sherpa.ac.uk/id/repository/',
r3DataURL: 'http://service.re3data.org/repository/',
fairSharingURL: "https://fairsharing.org/",
eoscMarketplaceURL: "https://marketplace.eosc-portal.eu/services/",
sherpaURL: 'http://sherpa.ac.uk/romeo/issn/',
sherpaURLSuffix: '/',
zenodo: 'https://zenodo.org/',
zenodoCommunities: 'https://zenodo.org/api/communities/',
openAccess: 'https://www.openaire.eu/support/faq#article-id-234',
openAccessRepo: 'https://www.openaire.eu/support/faq#article-id-310',
fp7Guidlines: 'https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme',
h2020Guidlines: 'https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020',
ercGuidlines: 'http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf',
helpdesk: 'https://www.openaire.eu/support/helpdesk',
helpdeskEmail: 'helpdesk@openaire.eu',
utilsService: 'http://mpagasas.di.uoa.gr:8000',
vocabulariesAPI: 'https://dev-openaire.d4science.org/provision/mvc/vocabularies/',
piwikBaseUrl: 'https://analytics.openaire.eu/piwik.php?idsite=',
piwikSiteId: '80',
registryUrl: 'http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/registry/',
loginUrl: "http://mpagasas.di.uoa.gr:19080/login-service//openid_connect_login",
userInfoUrl: "http://mpagasas.di.uoa.gr:19080/login-service/userInfo",
logoutUrl: "http://mpagasas.di.uoa.gr:19080/login-service/openid_logout",
cookieDomain: '.di.uoa.gr',
feedbackmail: 'openaire.test@gmail.com',
cacheUrl: 'http://dl170.madgik.di.uoa.gr:3000/get?url=',
adminToolsAPIURL: 'http://duffy.di.uoa.gr:19280/uoa-admin-tools/',
adminToolsCommunity: 'connect',
datasourcesAPI: 'https://beta.services.openaire.eu/openaire/ds/search/',
contextsAPI: 'https://dev-openaire.d4science.org/openaire/context',
communityAPI: 'https://dev-openaire.d4science.org/openaire/community/',
communitiesAPI: 'https://dev-openaire.d4science.org/openaire/community/communities',
csvLimit: 2000,
pagingLimit: 20,
resultsPerPage: 10,
baseLink: "",
domain: 'https://beta.connect.openaire.eu',
afterLoginRedirectLink: '/myCommunities',
searchLinkToResult: "/search/result?id=",
searchLinkToPublication: '/search/publication?articleId=',
searchLinkToProject: '/search/project?projectId=',
searchLinkToDataProvider: '/search/dataprovider?datasourceId=',
searchLinkToDataset: '/search/dataset?datasetId=',
searchLinkToSoftwareLanding: '/search/software?softwareId=',
searchLinkToOrganization: '/search/organization?organizationId=',
searchLinkToOrp: '/search/other?orpId=',
searchLinkToCommunities: '/search/find/communities',
searchLinkToPublications: '/search/find/publications',
searchLinkToDataProviders: '/search/find/dataproviders',
searchLinkToProjects: '/search/find/projects',
searchLinkToDatasets: '/search/find/datasets',
searchLinkToSoftware: '/search/find/software',
searchLinkToOrps: '/search/find/other',
searchLinkToOrganizations: '/search/find/organizations',
searchLinkToCompatibleDataProviders: '/search/content-providers',
searchLinkToEntityRegistriesDataProviders: '/search/entity-registries',
searchLinkToJournals: '/search/journals',
searchLinkToResults: '/search/find/research-outcomes',
searchLinkToAdvancedPublications: '/search/advanced/publications',
searchLinkToAdvancedProjects: '/search/advanced/projects',
searchLinkToAdvancedDatasets: '/search/advanced/datasets',
searchLinkToAdvancedSoftware: '/search/advanced/software',
searchLinkToAdvancedOrps: '/search/advanced/other',
searchLinkToAdvancedDataProviders: '/search/advanced/dataproviders',
searchLinkToAdvancedOrganizations: '/search/advanced/organizations',
searchLinkToAdvancedResults: '/search/advanced/research-outcomes',
errorLink: '/error',
lastIndexInformationLink: 'https://beta.openaire.eu/aggregation-and-content-provision-workflows',
showLastIndexInformationLink: true,
widgetLink: 'https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=',
claimsInformationLink: 'https://beta.openaire.eu/linking',
depositLearnHowPage: '/participate/deposit/learn-how',
depositSearchPage: '/participate/deposit/search',
shareInZenodoPage: '/participate/deposit/zenodo',
reCaptchaSiteKey: '6LcVtFIUAAAAAB2ac6xYivHxYXKoUvYRPi-6_rLu',
admins: ['kostis30fylloy@gmail.com'],
lastIndexUpdate: '2019-11-01',
indexInfoAPI: 'https://dev-openaire.d4science.org/openaire/info/',
altMetricsAPIURL: 'https://api.altmetric.com/v1/doi/',
b2noteAPIURL: 'https://b2note.eudat.eu/',
adminPortalURL: 'https://beta.admin.connect.openaire.eu',
myOrcidLinksPage: "/my-orcid-links"
baseLink : "",
};
export let properties: EnvProperties = {
...common, ...commonDev, ...props
}

View File

@ -12,4 +12,4 @@ if (properties.environment !== "development") {
}
export { AppServerModule } from './app/app.server.module';
export { renderModule } from '@angular/platform-server';

View File

@ -7,8 +7,6 @@ import {
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
@ -16,7 +14,3 @@ getTestBed().initTestEnvironment(
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

View File

@ -2,7 +2,6 @@
"extends": "./tsconfig.app.json",
"compilerOptions": {
"outDir": "../out-tsc/app-server",
"target": "es2016",
"types": [
"node"
]

View File

@ -10,13 +10,14 @@
"moduleResolution": "node",
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2020",
"target": "ES2022",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
],
"useDefineForClassFields": false
}
}