Compare commits

...

1569 Commits

Author SHA1 Message Date
Konstantina Galouni d1392adc2d Merge pull request 'Production release May 2024 [EXPLORE]' (#40) from develop into master
Reviewed-on: #40
2024-05-23 18:26:50 +02:00
Konstantina Galouni 43990dc582 [develop | DONE | FIXED]: [BUG FIX] showAuthors.component.ts: Remove non existing field from the condition. 2024-05-23 18:16:07 +03:00
Konstantina Galouni 632d11c82c [develop | DONE | FIXED]: showAuthors.component.ts: On destroy of component, delete all elements with "orcid-dropdown" class from "modal-container". 2024-05-22 16:50:58 +03:00
argirok 7a517e49ed [develop | DONE | CHANGED ] Claims: add 2 steps in Projects form,step 1 to select funder, step 2 search by keyword 2024-05-22 14:48:13 +03:00
argirok 79b723e75c [develop | DONE | ADDED ] add coins icon 2024-05-22 14:40:42 +03:00
Konstantinos Triantafyllou 5a912f02b7 [Develop]: Advanced search input add on changes reinitialize input style 2024-05-22 12:42:21 +03:00
Konstantinos Triantafyllou dede290a52 [develop | DONE | MOVED]: Add browse-stakeholder-base component implemented in Irish. 2024-05-21 13:36:12 +03:00
Konstantina Galouni d6a2ba004a Merge pull request 'Merge on-push-strategy branch into develop (on push strategy in result-preview component, i.e. search result cards)' (#39) from on-push-strategy into develop
Reviewed-on: #39
2024-05-21 12:14:59 +02:00
Konstantina Galouni 633f3250ac Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-05-21 13:10:36 +03:00
Konstantina Galouni 2a28cd8ad5 [develop | DONE | CHANGED]: #9764 - searchOrganizations.service.ts: Parse and display organization legalname and legalshortname. 2024-05-20 15:59:32 +03:00
Konstantina Galouni 8bcafd3026 [develop | DONE | FIXED]: smooth-scroll.ts: Accidental error by mistyping. 2024-05-20 15:24:04 +03:00
Konstantina Galouni d3746b28d0 [develop | DONE | CHANGED]: organization.service.ts & searchOrganizations.service.ts: Removed environment check for parsing organization pid. 2024-05-20 15:18:54 +03:00
Konstantina Galouni 019530c222 [develop | DONE | FIXED]: parsingFunctions.class.ts: In "parseEoscSubjects()" method, initialize subjects if needed. 2024-05-20 15:17:26 +03:00
Konstantina Galouni 1f4c0566c7 [develop | DONE | FIXED]: availableOn.component.ts: Removed environment check in <hr> shown in mobile under fulltext. 2024-05-20 15:16:00 +03:00
Konstantina Galouni f595ec5035 [develop | WIP | ADDED]: [DEVELOPMENT ONLY] Added level4 in browse Fields of Science (FoS)
1. smooth-scroll.ts: Get behavior from current navigation > extras > state.
2. fos.component: Display level 4 FoS and handle url fragments and page scrolling accordingly.
2024-05-20 15:04:56 +03:00
argirok c1a8151184 [develop | DONE | FIXED] linking disable link to unidentified for manage claims page 2024-05-10 11:34:17 +03:00
argirok c00403a24c [develop | DONE | FIXED] linking initialize properly claims properties when there are not pass as input 2024-05-10 11:33:42 +03:00
argirok 8a8b58eeaa [develop | DONE ADDED] add direct linking for organizations 2024-05-09 16:44:54 +03:00
Konstantinos Triantafyllou 6e96974364 Revert transition disable function 2024-05-01 15:59:48 +03:00
Alex Martzios c4b57e91ab [develop | DONE | CHANGED] move CustomRouteReuseStrategy to openaireLibrary 2024-05-01 11:25:12 +03:00
Konstantinos Triantafyllou b054a823da [develop]: Move OAIndicator in indicatorUtils file. 2024-04-30 17:15:15 +03:00
Konstantinos Triantafyllou b41357c4b8 [develop]: Add compose mail for develop personal-info 2024-04-30 17:09:23 +03:00
Konstantinos Triantafyllou fb34dd415e Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-04-30 15:38:39 +03:00
Konstantinos Triantafyllou bc2dd7d285 [develop]: Add open Access map in order to add configure open access indicator. 2024-04-30 15:38:31 +03:00
Konstantina Galouni cdfced0dd8 Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-04-30 14:46:22 +03:00
Konstantina Galouni 2127bfdf16 [develop | DONE | CHANGED]: Updated color of selected search filter labels (not purple, but portal color).
1. newSearchPage.component.html: Replaced class "uk-label-search-filter" with "uk-label-secondary" on selected search filter labels.
2. color.less: Removed color variable @search-filter-color: #B41FD0;
3. label.less: Removed custom color variables and class "uk-label-search-filter" | Updated class "uk-label-secondary".
4. explore-custom.less: Override @uk-label-secondary: @explore-color;
2024-04-30 13:08:54 +03:00
Konstantinos Triantafyllou 4231b65880 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-04-25 15:11:13 +03:00
Konstantinos Triantafyllou 9b79d0c1e0 [develop]: Fix role users, role-verification type mapping. 2024-04-25 15:11:04 +03:00
Konstantina Galouni 01f54d788d Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-04-24 16:35:47 +03:00
Konstantina Galouni ac46ecb997 [develop | WIP | FIXED]: parsingFunctions.class.ts: Added check if there are no classifiedSubjects. 2024-04-24 16:35:13 +03:00
Konstantina Galouni 786f4c9864 Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-04-24 16:07:14 +03:00
Konstantina Galouni c5bd710621 [develop | WIP | CHANGED]: [BETA] parsingFunctions.class.ts: Show all subjects as keywords - updated method "parseAllSubjects()" to add classified subjects (by vocabulary) to the end of the keyword subjects list. 2024-04-24 16:06:45 +03:00
Konstantinos Triantafyllou 267944103f [develop]: update link to develop in bottom. 2024-04-24 09:39:27 +03:00
Konstantina Galouni aedc2e1f6f Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-04-23 16:59:13 +03:00
Konstantina Galouni 2cd8059794 [develop | WIP | FIXED]: showAuthors.component.ts: In uk-dropdown set [attr.container]="'#modal-container'" to always be on top of every other part of the page. 2024-04-23 16:58:48 +03:00
Konstantina Galouni 353ff67ea5 Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-04-23 16:03:00 +03:00
Konstantina Galouni e74dc1b58f [develop | DONE | FIXED]: showAuthors.component.ts: In uk-dropdown set "pos: bottom-right" and [attr.container]="modal ? '#modal-container' : false" - copy to clipboard is not fully functional. 2024-04-23 16:01:47 +03:00
Konstantina Galouni 22d0498f8a Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-04-22 17:19:46 +03:00
Konstantina Galouni ce87f0690d [develop | DONE | FIXED]: BUG fixes in orcid author modal | BUG fixes in search filters column.
1. mobile-dropdown.component.ts: Added makrForCheck() method call in "open()".
2. deletedByInference.component.ts: Added @Input() isMobile: boolean = false; & In <result-preview> set parameter [isMobile]="isMobile".
3. resultLanding.component.html: In mobile view, in <deletedByInference> set parameters [isMobile]="isMobile" and [modal]="alertModalDeletedByInferenceFS".
4. showAuthors.component.ts:
5. searchOrganizations.component.ts: [BUG FIX] In <new-search-page> set parameter [showRefine]="refineFields?.length > 0" to display filters or not.
6. newSearchPage.component.html: [BUG FIX] Updated checks for displaying refine filters column or not.
2024-04-22 17:14:46 +03:00
argirok 68125b3577 [develop | DONE | CHANGED] Claims: keep both shortname and funderName, in cards show fundername. For unidentified, hide code and link 2024-04-19 12:09:00 +03:00
argirok 474a73e2f7 [develop | DONE | CHANGED] indicator utils: user date range overrides the default range a chart may have 2024-04-18 15:08:17 +03:00
argirok afdf6bf964 [develop | DONE | CHANGED] in filters use "publication", "software", "dataset", "other" table instead of the result one 2024-04-18 11:08:41 +03:00
Konstantina Galouni 5f8988eac1 Merge remote-tracking branch 'origin/develop' into on-push-strategy 2024-04-16 16:19:21 +03:00
Konstantinos Triantafyllou 9e9332f1a3 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-04-16 16:08:13 +03:00
Konstantinos Triantafyllou a2b1bb8f70 [develop | FIXED | DONE]: Multi indicators paths fix dropdowns 2024-04-16 16:08:05 +03:00
Konstantina Galouni 559220c77c [develop | DONE | CHANGED]: landing.module.ts: Removed TabPagingComponent from declarations and exports | deletedByInference.module.ts: Removed LandingModule from imports | resultLanding.module.ts: Import SearchTabModule | Deleted tabPaging.component.ts. 2024-04-16 13:25:54 +03:00
Konstantina Galouni 4d80f6f39c Merge remote-tracking branch 'origin/develop' into develop 2024-04-16 12:28:23 +03:00
Konstantina Galouni cc43504306 [develop | DONE | ADDED]: Added method get calcCurrentMonth() to calculate and display current month of the project life, if status is on going (project has started and not yet ended). 2024-04-16 12:28:14 +03:00
Konstantinos Triantafyllou b729341199 [develop]: Fix visibility condition in Indicaotrs page 2024-04-16 12:21:02 +03:00
Konstantina Galouni eeb63a2de9 [develop | DONE | CHANGED]: In search projects results, show funder name by default, and if not available, show funder short name.
1. searchResult.ts: Added field funderName: string; in class SearchResult.
2. result-preview.ts: Added field funderName: string; in class ResultPreview & in method "searchResultConvert()" set resultPreview.funderName = result.funderName;
3. searchProjects.service.ts: Added parsing of funderName.
4. result-preview.component.html: Show funderName and if not available, show funderShortname.
5. entity-metadata.component.ts: Added check for funders display.
2024-04-16 11:47:12 +03:00
Konstantina Galouni 4b3e805d31 [develop | DONE | REVERTED]: searchProjects.service.ts: Revert parsing funder name if funder shortname is not available. 2024-04-16 11:36:45 +03:00
Konstantina Galouni 1613916dfd [on-push-strategy | DONE | CHANGED]: result-preview.component.ts: Set changeDetection: ChangeDetectionStrategy.OnPush | searchResult.component.ts & result-preview.component.html: Redraw html when needed with onPush strategy. 2024-04-16 10:23:07 +03:00
Konstantina Galouni c219c8370b [develop | DONE | REVERTED]: searchResult.component.ts & result-preview.component.html & result-preview.component.ts: Reverted changes regarding changeDetection: ChangeDetectionStrategy.OnPush - should be first introduced in another branch. 2024-04-16 10:07:31 +03:00
Konstantina Galouni 6886df2caa [develop | DONE | CHANGED]: Alt attribute on images | Set changeDetection: ChangeDetectionStrategy.OnPush on result-preview.component.ts.
1. deletedByInference.service.ts: [Bug fix] Fixed author check.
2. sdg.component.html & quick-contact.component.html & fos.component.html: Added alt attribute on images.
3. result-preview.component.ts: Set changeDetection: ChangeDetectionStrategy.OnPush | Added get countDots().
4. result-preview.component.html: Changed how number of access routes dots is passed into a class (countDots) - needed for ChangeDetectionStrategy.OnPush.
5. orcid-work.component.ts: Added alt attribute on images | Added ChangeDetectorRef and call this.cdr.markForCheck(); on "getPutCode()", "saveWork()" and "deleteWorks()" - needed for ChangeDetectionStrategy.OnPush.
6. searchResult.component.ts: Rebuild previewResults object after getting orcidPutCodes to draw html again - needed for ChangeDetectionStrategy.OnPush.
7. newSearchPage.component.html: Removed uk-flex-wrap for number of results and uk-margin-medium-left from desktop sorting.
2024-04-15 17:11:38 +03:00
Alex Martzios 9b04260a60 [develop | DONE | FIXED] showAuthors: fix z-index bug for ocrid dropdown inside modal 2024-04-15 12:09:35 +03:00
Alex Martzios 6d9d118d57 [develop | DONE | ADDED] topics/indicators: add condition to hide all "edit" actions when stakeholder is NOT a copy 2024-04-12 13:57:56 +03:00
Konstantina Galouni c7817731f0 Merge remote-tracking branch 'origin/develop' into develop 2024-04-12 11:19:33 +03:00
Konstantina Galouni 438075f8df [develop | DONE | FIXED]: Fixes on search projects for claims.
1. searchProjects.service.ts: Parse funder name if funder shortname is not available.
2. claimProjectSearchForm.component.ts:
   a. [BUG FIX] Set filter.countAllValues = filter.values.length; to show filter values without extra "view all" call
   b. [BUG FIX] Call projectService.advancedSearchProjects instead of projectService.searchProjects to get projects (/resources2 instead of /projects) to get 100 first values by default in facets.
2024-04-12 11:19:17 +03:00
Konstantinos Triantafyllou 8f4e653d50 [develop | WIP]: Introduce copy field in stakeholder 2024-04-12 11:14:26 +03:00
Alex Martzios c4180c7aa2 [develop | DONE | CHANGED] search page: change the color or customFilter pills as well 2024-04-11 16:46:58 +03:00
Alex Martzios 31e61d55a0 [develop | DONE | CHANGED] search page: change the coloring of the selected filter pills, based on the new design mocks 2024-04-11 16:34:13 +03:00
argirok 609f09cc9f [develop | DONE | CHANGED] Claims pass idSuffix for generating openAIRE id 2024-04-10 13:07:35 +03:00
argirok 275b94dec3 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-04-10 12:27:12 +03:00
Konstantinos Triantafyllou 4f9f2f2505 [develop]: Add stats profile in form of an indicator even if it is null 2024-04-08 18:57:49 +03:00
Konstantinos Triantafyllou 0111ea6681 [develop]: Role verification reload page instead of removing params. 2024-04-08 17:14:00 +03:00
Konstantinos Triantafyllou c69d1cd94d [develop]: Role verification improve redirect. 2024-04-08 16:44:47 +03:00
Konstantinos Triantafyllou 901f9f769d [develop]: Fix an error while inviting a person that it is already a member or manager. Remove message while accepting the member role. 2024-04-08 15:17:53 +03:00
Konstantinos Triantafyllou e6d03d324f Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-04-08 14:14:18 +03:00
Konstantinos Triantafyllou 69cdb2cec2 [develop]: Add roles in stakeholder configuration to handle naming of roles in different services. 2024-04-08 14:14:09 +03:00
Konstantinos Triantafyllou 4f10c5c5f4 [develop]: Align import/export indicators with multi indicator paths. 2024-04-06 03:10:51 +03:00
Konstantinos Triantafyllou e91830f2f8 [develop]: Monitor base component delete chartsActiveType 2024-04-05 20:31:29 +03:00
Konstantinos Triantafyllou 0fb20de588 Merge remote-tracking branch 'origin/new-reorder' into develop 2024-04-05 20:13:24 +03:00
Konstantinos Triantafyllou b71bdfa559 [new-reorder]: Add multi charts in admin indicators (works now only for charts in UI). Deprecated transition-group disable/enable method. 2024-04-05 20:13:05 +03:00
Konstantina Galouni dc1679c565 [develop | DONE | CHANGED]: newSearchPage.component.html: Restored number of results and keyword display & added uk-text-capitalize on selected filter labels. 2024-04-05 11:09:16 +03:00
Konstantinos Triantafyllou d63092cd9e [new-order | DONE]: Add new move indicator method when an indicator moved to another section 2024-04-05 10:57:39 +03:00
Konstantina Galouni c351349f8e [develop | DONE | FIXED] newSearchPage.component.html: Added checks, not to show "Filters" column in the search pages, when there are no filters. 2024-04-04 17:13:56 +03:00
Konstantina Galouni dcfc6b0b6a [develop | DONE | CHANGED]: searchFields.base.ts: Replace in ORGANIZATION_REFINE_FIELDS and ORGANIZATION_ADVANCED_FIELDS field "country" with "countrynojurisdiction". 2024-04-04 16:10:08 +03:00
Konstantina Galouni 07569f24e1 [develop | DONE | FIXED]: resultLanding.component.html & searchResult.component.ts: Added checks for ORCID also for properties.dashboard == "irish". 2024-04-03 16:16:09 +03:00
Konstantina Galouni 18791ec9d2 [develop | DONE | ADDED]: searchFields.base.ts: Added "pid" field in ORGANIZATION_ADVANCED_FIELDS. 2024-04-02 13:33:23 +03:00
Konstantina Galouni 78d262dd3b [develop | DONE | ADDED]: Added search organizations by PID (ror, isni, wikidata, fundRef).
1. string-utils.class.ts: Added methods "isValidRor()", "isValidIsni()", "isValidWikidata()", "isValidFundRef()" and cases for these new identifiers.
2. newSearchPage.component.ts: In method "createKeywordQuery()", check for PIDs also for organizations entity.
3. environment.ts: Updated property "fundRefURL" to "https://data.crossref.org/fundingdata/funder/" (old: https://api.crossref.org/funders/).
2024-04-02 10:59:33 +03:00
Konstantinos Triantafyllou 44e821b1f1 Merge pull request 'Production release March 2024 [Monitor Dashboard]' (#38) from develop into master
Reviewed-on: #38
2024-04-01 18:02:04 +02:00
Konstantinos Triantafyllou 828dfc0671 [develop]: Remove topics from exported file in export indicators. 2024-04-01 18:56:26 +03:00
Konstantinos Triantafyllou b34f42326c [develop | ADDED]: Add loading in import indicators in order to avoid any actions during this process 2024-04-01 18:16:21 +03:00
Konstantinos Triantafyllou e8ec49a69b Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-04-01 01:16:39 +03:00
Konstantinos Triantafyllou 0c75394621 [develop | FIXED | CHANGED]: Add stakeholder in export indicators file and import base on this stakeholder. 2024-04-01 01:16:31 +03:00
Alex Martzios 894667955c [develop | DONE | ADDED] slider-tabs component: add condition to disable slider-arrows if isServer is true 2024-03-28 13:22:21 +02:00
Alex Martzios cafe0e4926 [develop | DONE | ADDED] displayClaims: add bulk delete functionality for claims, change the claims cards to a more compact claims list 2024-03-28 13:07:11 +02:00
Konstantina Galouni b6cda48e2f [develop | DONE | ADDED]: searchFields.base.ts: Added static "triplet" refine (facet) field "haslicense". 2024-03-27 16:30:38 +02:00
argirok d6b924bcaa [develop | DONE | FIXED] linking update check to decide if claim is pending and show the link to landing 2024-03-21 09:47:02 +02:00
argirok 95097beaae [develop | DONE | FIXED] linking update parsing of the datacite API 2024-03-21 09:46:11 +02:00
Alex Martzios 6c4a4d9721 [develop | DONE | ADDED] add new custom classes fo slider-tabs container 2024-03-19 12:55:39 +02:00
Konstantina Galouni ca8b732a64 [develop | DONE | ADDED]: menu.ts: In MenuItem class added field "badge?: string", which is used only in FAIRCORE4EOSC | navigationBar.component.html: Added <span> in menu item (only in no-link parent), to show a badge in FAIRCORE4EOSC. 2024-03-15 15:43:58 +02:00
argirok c64df20405 [develop | DONE | ADDED] add orcid-core module, without the routing - use it in other components instead of orcid module 2024-03-14 09:28:33 +02:00
argirok 6b907fe97d [develop | DONE | ADDED] add method for grouped count queries that goes through the cache 2024-03-13 12:04:23 +02:00
Konstantinos Triantafyllou 622459c26c [develop]: Helper class: Remove group from mapType. 2024-03-12 19:24:50 +02:00
Alex Martzios b0c69be6ef [develop | DONE | ADDED] irish-monitor: add new BehaviorSubject for enabling/disabling help-pop-up component on admin and non-admin pages 2024-03-08 12:50:55 +02:00
Konstantinos Triantafyllou c33af181bb [develop]: Role-verification: Add relatve to route parameter. 2024-03-07 10:27:30 +02:00
Konstantina Galouni 6ab50b04cc Merge pull request 'Production release March 2024 [EXPLORE]' (#35) from develop into master
Reviewed-on: #35
2024-03-04 17:44:23 +01:00
Konstantina Galouni e0de892998 Merge remote-tracking branch 'origin/develop' into develop 2024-03-04 17:03:08 +02:00
Konstantina Galouni da3c2fccf2 [develop | DONE | FIXED]: Moved RoutingModule as first imported module with possible routing (advanced search projects & organizations were loading orcid routing instead of their own). 2024-03-04 17:02:33 +02:00
Konstantinos Triantafyllou c630b29247 [develop]: Remove index variables from parameters of indicator path. 2024-03-04 15:47:57 +02:00
Konstantina Galouni 6a41954109 [develop | DONE | CHANGED & ADDED]: env-properties.ts & environment.ts: Added properties "rorURL", "isniURL", "wikiDataURL", "fundRefURL" | organizationInfo.ts: Added identifiers | searchOrganizations.service.ts & organization.service.ts: Parse identifiers (pid) [BETA ONLY] | organization.module.ts: Import ResultLandingUtilsModule (to call <showIdentifiers> | organization.component: Removed old unused code & Added <showIdentifiers> & In mobile added country and website url | parsingFunctions.class.ts: Added parsing for organization pids | showIdentifiers.component.ts: Added cases for organization pids & check if pid value is a url, do not add prefix. 2024-03-04 13:14:09 +02:00
Konstantina Galouni 00a5150042 [develop | DONE | FIXED]: [BUG FIX] resultLanding.component.ts: Get type of entity from route.snapshot.data.type. 2024-03-04 11:17:50 +02:00
Konstantina Galouni da4a5f3321 [develop | DONE | FIXED]: [BUG FIX] fundedBy.component.ts: Provenance should always get the label from the respective vocabulary - calculate everything in ngOnInit. 2024-03-04 11:15:40 +02:00
Alex Martzios ec57ba0dcc [develop | DONE | FIXED] search page: add a limit of 35 characters and atooltip for displayed selected filters 2024-03-04 10:39:01 +02:00
Alex Martzios 3e8ed4f504 [develop | DONE | CHANGED] remove tooltips from search page, add labels for entity metadata 2024-02-29 11:33:17 +02:00
Alex Martzios 69d6feb665 [develop | DONE | CHANGED] search page: remove top paging, remove results per page, remove total number of results, put selected filter, sorting and download on the same row, change to smaller labels for selected filters 2024-02-29 09:25:26 +02:00
Konstantina Galouni edf49c4019 [develop | DONE | CHANGED]: sdg-fos-suggest.component.ts: Added field "isOpen: boolean = false;" and check if isOpen to show modal content | resultLanding.component: Removed old unused code and old comments, updated and added more checks e.g. not load content of modals if they are not open. 2024-02-28 17:42:58 +02:00
Konstantina Galouni efa0f72cc3 [develop | DONE | CHANGED]: isRouteEnabled.guard.ts, freeGuard.guard.ts: Added @Injectable({providedIn: 'root'}) | Removed from providers PreviousRouteRecorderm, isRouteEnabled, LoginGuard AdminLoginGuard, PiwikService & removed from imports PiwikServiceModule. 2024-02-28 16:45:23 +02:00
Konstantinos Triantafyllou 9ef3f71ea6 [develop]: Delete console log from stats profile of an indicator 2024-02-28 15:10:27 +02:00
Konstantina Galouni 17e237c179 [develop | DONE | CHANGED]: Added routing modules (in library files) in Landing pages and in ORCID pages - imported the routing.module.ts in module.ts. 2024-02-28 14:33:44 +02:00
Konstantina Galouni 49cd8a6232 [develop | DONE | FIXED]: [BUG FIX] searchAll.component.ts: Tabs did not change if changed entity via menu & queryparams changes emit before params change - used combineLatest and debounceTime(0) as a workaround. 2024-02-27 19:15:39 +02:00
Konstantinos Triantafyllou f43025b21c [develop | ADDED | FIXED]: Add missing searchLinkToStakeholders property in library common properties 2024-02-27 11:21:33 +02:00
Konstantina Galouni f6654f7b93 [develop | DONE | CHANGED]: result-preview.component.html: Open Access Routes, Impact-based indicators (bip) and Usage counts drops on click, not hover. 2024-02-27 10:41:15 +02:00
Konstantina Galouni 43b1882956 [develop | DONE | FIXED]: [BUG FIX] searchDataProviders.component.ts & searchOrganizations.component.ts & searchProjects.component.ts: In method "filterRequestedAll()" (when clicking on view all of a search filter) get filters from the 3rd position of response, not the 2nd. 2024-02-27 01:42:15 +02:00
Konstantinos Triantafyllou 110c2ab4b3 [develop | FIXED | DONE]: 1. Fixed prefix of roles. 2. Disable filtering in manage stakeholders while loading. 2024-02-26 15:54:50 +02:00
Konstantinos Triantafyllou 79d39db833 [develop]: Remove currentYear from monitor base component 2024-02-26 09:46:52 +02:00
argirok abbe118035 [ develop | DONE | REMOVED] TimeoutInterceptor: remove properties.searchAPIURLLAst from timeout whitelist 2024-02-23 14:20:19 +02:00
argirok 7c3c082fc0 [develop | DONE | CHANGED] add min/max year variables with default values max: current and min: current -20 2024-02-23 10:12:32 +02:00
argirok f5ca757771 [develop | DONE | CHANGED] Range filters set placeholder/ validator based on min/max year from input 2024-02-23 10:11:00 +02:00
Konstantinos Triantafyllou e71aa35b98 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-02-22 15:12:40 +02:00
Konstantinos Triantafyllou ba87ad69d3 [develop]: Manage stakeholders: Add select type in all monitor dashboards 2024-02-22 15:12:33 +02:00
Konstantina Galouni 590bdaf2e3 [develop | DONE | FIXED]: [BUG FIX] bulkClaim.component.ts: In method "fetchResult()", if call to Crossref returns 404, query Datacite | environment.ts: Update url of "searchDataciteAPIURL" property to call endpoint "/dois" instead of "/works" (/works is the version 1 - old - while the current is version 2). 2024-02-22 13:57:27 +02:00
Konstantinos Triantafyllou a45122565a [develop | ADDED]: Add statsProfile in indicatorPath parameters and in form in order to override stakeholder's one. 2024-02-22 09:41:57 +02:00
Konstantinos Triantafyllou fbf7e9f527 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-02-21 14:32:21 +02:00
Konstantinos Triantafyllou 45a9737d84 [develop]: Add statsProfile in indicatorPath. 2024-02-21 14:32:14 +02:00
Konstantina Galouni 51dba6da3a [develop | DONE | CHANGED]: quick-contact.component: Added field "quickContactClicked" initially set to false and when help button is clicked, it is set to true and card is displayed (--> recaptcha is loaded only if the users clicks on the button). 2024-02-21 14:22:44 +02:00
Konstantina Galouni 50244801d6 [develop | DONE | CHANGED]: availableOn.component.ts: Removed environment check from fulltext links (display them also in production). 2024-02-21 13:54:53 +02:00
Alex Martzios af6174c5de [develop | DONE | CHANGED] change footer text 2024-02-20 13:38:31 +02:00
Konstantinos Triantafyllou 35323bd744 [develop | FIXED | CHANGED]: Move formalize methods of stakehodlers in stakeholder.ts. Fix empty chart and number section in monitorbase component. 2024-02-20 10:58:47 +02:00
Konstantina Galouni e30672043b Merge pull request 'Production release February 2024 [CONNECT]' (#34) from develop into master
Reviewed-on: #34
2024-02-15 11:04:19 +01:00
Konstantinos Triantafyllou 368ef1aba4 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-02-14 15:43:34 +02:00
Konstantinos Triantafyllou 3204ba18ff [develop]: Fix showAuthors in modal. 2024-02-14 15:43:27 +02:00
argirok 9b9f817e62 [develop | DONE | FIXED] ContextsService: revert last change for coomunity hidden status 2024-02-14 12:14:32 +02:00
argirok c50c3e2ad6 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-02-14 10:46:29 +02:00
argirok cf0ebe0fb0 [develop | DONE | FIXED ] community status checks 2024-02-14 10:46:15 +02:00
argirok 9c8a67e612 [develop | DONE | FIXED] Search pages: extra fixes for custom filter 2024-02-14 10:28:54 +02:00
Konstantina Galouni 56faf6f6a4 [develop | DONE | FIXED]: orcid-work.component.ts: [Bug fix] Show tooltip when button is disabled & When in beta environment, do not call query to get put codes, always disable buttons and show tooltip about not available feature on beta. 2024-02-13 17:33:26 +02:00
argirok 6c9c477c24 [develop | DONE | FIXED] PortalSearchResultComponent: Communities proper check, after updating the status values 2024-02-13 16:15:59 +02:00
argirok cdddec6925 [develop | DONE | FIXED] Search page: extra fixes for custom filter 2024-02-13 16:07:43 +02:00
Konstantinos Triantafyllou c803674ceb Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-02-13 14:38:10 +02:00
Konstantinos Triantafyllou 7562210daa [develop]: Fix getURlwithFilters that double encoding the variables. 2024-02-13 14:38:04 +02:00
Konstantinos Triantafyllou 5195306ee6 [develop]: Add userInfoUrl variable in user management service. 2024-02-13 11:57:46 +02:00
Konstantinos Triantafyllou 14cd46bdb4 Merge pull request 'Merge Angular 16 Irish Monitor to develop' (#33) from angular-16-irish-monitor into develop
Reviewed-on: #33
2024-02-13 09:32:39 +01:00
Konstantinos Triantafyllou 6e2cf28aee [angular-16-irish-monitor]: Merge from develop 2024-02-12 14:53:07 +02:00
Konstantinos Triantafyllou 1cfe22f406 [develop]: Remove deposit class from deposit first page. 2024-02-12 14:46:06 +02:00
Konstantinos Triantafyllou 3d08ffeb52 [angular-16-irish-monitor]: Fix cancel invitation method of a user. Set rootClass only if it is changed.
(cherry picked from commit ba1a3b9e62)
2024-02-12 12:15:36 +02:00
Konstantinos Triantafyllou 0fe358c781 [angular-16-irish-monitor]: Add rootClass subject in layout service.
(cherry picked from commit 246cafa43f)
2024-02-12 12:15:27 +02:00
Konstantinos Triantafyllou 87fb820421 [angular-16-irish-monitor | WIP]: Add role group before type of an entity.
(cherry picked from commit 65f8676a08)
2024-02-12 12:15:04 +02:00
Konstantina Galouni c3cb2d56ca Merge pull request 'Production release February 2024' (#31) from develop into master
Reviewed-on: #31
2024-02-08 18:03:26 +01:00
Konstantina Galouni a7294685fb [develop | DONE | CHANGED]: refineFieldResults.service.ts & searchDataproviders.service.ts & searchOrganizations.service.ts & searchProjects.service.ts & searchResearchResults.service.ts: Set cache for default refine queries (without keywords or filters) - not in deposit and datasource specific pages. 2024-02-08 18:05:27 +02:00
Konstantina Galouni f55107b8d5 [develop | DONE | FIXED]: numbers.component.ts: [BUG FIX] Call "groupedRequestsService.home()" when no refineParams, otherwise (e.g. in aggregator), zip multiple queries. 2024-02-08 18:00:40 +02:00
Konstantinos Triantafyllou d2aa28225a Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2024-02-08 17:48:08 +02:00
Konstantinos Triantafyllou c43e7caeea [angular-16-irish-monitor | ADDED]: Add url in base component 2024-02-08 17:48:01 +02:00
Konstantina Galouni b89278af70 [develop | DONE | CHANGED]: Do not request page help contents (helptexts) in EXPLORE. (FILES: displayClaims.component.ts & linkingGeneric.component.ts & dataProvider.component.ts & organization.component.ts & project.component.ts & resultLanding.component.ts & newSearchPage.component.ts) 2024-02-08 14:19:26 +02:00
Konstantina Galouni fbe514b740 [grouped-queries | DONE | CHANGED] Added groupedRequests.service.ts & groupedRequestsService.module.ts to call endpoints for grouped queries of each page | numbers.component.ts: Replaced queries of numbers (in Home page) with grouped query for home page of EXPLORE | searchAll.component.ts: Replaced count queries of each entity (in Search page) with grouped query for Search page of EXPLORE 2024-02-07 22:50:13 +02:00
Konstantina Galouni 0757b7a98f Merge pull request 'Production release February 2024' (#30) from develop into master
Reviewed-on: #30
2024-02-07 21:37:50 +01:00
Konstantina Galouni 83de7adc09 Merging branch develop into angular-16-irish-monitor 2024-02-07 22:32:42 +02:00
Konstantina Galouni 137278522e [develop | DONE | CHANGED]: indexInfo.service.ts: Added "lastIndexDateSubject" BehaviorSubject | newSearchPage.component.ts: In ngOninit, call "indexInfoService.lastIndexDate" get method instead of "indexInfoService.getLastIndexDate()", to get last index date from subject value. 2024-02-07 21:36:47 +02:00
Konstantina Galouni b357ff2ae2 [develop | DONE | CHANGED]: Remove preselected "Open Access" filter from search.
1. home.component.ts: Set field "resultsQuickFilter" to null.
2. searchAll.component.ts: Set field "quickFilter" to null | In method "entityChanged()" do not set parameter "resultbestaccessright" | [BUG FIX] Clear subscriptions from fetchOrps.
3. searchResearchResults.component.ts: Set field "quickFilter" to null.
4. navigationBar.component.ts: Set field "resultsQuickFilter" to null.
5. app.component.ts: Remove "resultbestaccessright" parameter from menu items of Search research products.
2024-02-07 21:28:45 +02:00
Konstantina Galouni 09960fda9e [develop | DONE | FIXED]: availableOn.component.ts: Added field "@Input() inModal: boolean = false;" and display download sources when in modal - e.g. versions. | result-preview.component.html: Display download sources (<availableOn>) in versions (isDeletedByInferenceModal). 2024-02-07 21:12:43 +02:00
Konstantina Galouni 92f43c280e [develop | DONE | FIXED]: [BUG FIΧ] open-aire-jsonld-converter.service.ts: Fixed how description is set in methods "convertProject()", "convertDatasource()", "getDescription()" (called for research products). 2024-02-07 17:47:42 +02:00
Konstantina Galouni aba199e10d [develop | DONE | FIXED]: [BUG FIX] resultLanding.component.html & project.component.html & organization.component.html & dataProvider.component.html: Moved <schema2jsonld> outside any parent html tag - was missing from mobile screens. 2024-02-07 16:56:16 +02:00
Konstantina Galouni f45598b190 [develop | DONE | FIXED]: [BUG FIX] Moved checks for filtering out filter values in parsing phase.
1. refineResults.class.ts:
   a. Updated method "includeValue()" and include "null" (as a string) check | Call method "includeValue()" when creating filters.
   b. Set filter.countUnfilteredValues to the length of values returned by the service before filtering them out.
   c. Check if filters returned by service before trying to parse anything.
2. searchHelperClasses.class.ts: Added in Filter structure the field "public countUnfilteredValues?: number = 0;", to check if there are more values to be queried (show "view all" link or not).
3. searchFilter.component.ts: Updated check of hasMoreValues to show or not the "view all" link - check filter.countUnfilteredValues | Comment filtering out of filter values - moved to refineResults.class.ts.
2024-02-07 15:55:56 +02:00
Konstantina Galouni 514e92b177 [develop | DONE | FIXED]: [BUG FIX] searchResearchResults.component.ts: In method "filterRequestedAll()", call "this.searchPage.filterFilterValues(this.filters);", to filter out from funding filters, values not related to the selected funder. 2024-02-07 15:45:58 +02:00
Konstantina Galouni ffedfc0618 [develop | DONE | FIXED]: [BUG FIX] fetchProjects.class.ts: In method "getResultsForOrganizations()" set "this.filters[i].countAllValues = this.filters[i].values.length;", because filters were loading forever. 2024-02-07 11:57:55 +02:00
Konstantina Galouni 76a72c175d [develop | DONE | FIXED]: [BUG FIX] claimResultSearchForm.component.ts: In method "checkSelectedFilters()" set "filter.countAllValues = filter.values.length;", because filters were loading forever. 2024-02-07 10:31:42 +02:00
Konstantina Galouni 75ecd0da5e Merge develop into angular-16-irish-monitor branch 2024-02-06 14:19:27 +02:00
Konstantina Galouni b12877df2a [develop | DONE | CHANGED]: searchAll.component.html: Changed pipe from "| number" to " | numberRound" to round number of results in slider tabs | searchAll.module.ts: Imported NumberRoundModule. 2024-02-05 11:52:57 +02:00
Konstantina Galouni d9465d5d05 Merge remote-tracking branch 'origin/develop' 2024-02-01 21:50:22 +02:00
Konstantina Galouni f63e7d72cc [develop | DONE | CHANGED]: availableOn.component.ts: Restored checks, not to display full-text link in production environment - reverted commit fa216cbc07. 2024-02-01 21:35:36 +02:00
Konstantina Galouni 7b8ca9ca66 Merge pull request 'Production release January 2024' (#29) from develop into master
Reviewed-on: #29
2024-02-01 20:07:59 +01:00
Konstantina Galouni 243e736362 [develop | DONE | CHANGED]: Moved predefined query checks to "fq" field instead of "query" | Updated cachingRequests | Temporary bug fix in refine fields dependent to static refine fields.
1. searchOrganizations.service.ts: In method "numOfSearchOrganizations2()" and in method "advancedSearchOrganizations()" moved predefined query checks to "fq" field instead of "query".
2. entitySearch.service.ts: Mark method "searchByDepositType()" as @deprecated since it is not used anymore.
3. searchDataProviders.component.ts: In methods "_getFilters()" and "getResults()" updated parameters to set predefined query checks to "fq" field instead of "query" for repositories, journals, entity registries, but keep in "query" field for deposit search.
4. cache-interceptor.service.ts: Updated urls in cachingRequests table and checks in "checkForCachedRequests()" method.
5. searchFields.base.ts: [Bug fix] Temporarily removed from HIDDEN_FIELDS and "DEPENDENT_FIELDS" the "instancetypename" field - there is a bug with static refine fields, until the "angular-16-irish-monitor" branch is merged.
2024-02-01 19:46:34 +02:00
argirok bedb7f013b [master | DONE | CHANGED] Monitor - Indicators: minor update subtitle when there are filters applied, add title and clear all in selected filters above indicators 2024-01-31 10:38:20 +02:00
argirok a6ea10fd90 [master | DONE | ADDED] Monitor - Indicators: update subtitle when there are filters applied 2024-01-30 12:27:40 +02:00
argirok 4662a3a185 [master | DONE | CHANGED] Monitor - Indicators: update fields mapping for filtering to work better for FOS filters - replace previously wrong field 2024-01-30 11:42:21 +02:00
argirok 3e96a5f889 [master | DONE | CHANGED] Monitor - Indicators: update fields mapping for filtering to work better for FOS filters 2024-01-30 11:29:31 +02:00
Konstantina Galouni 6b5b7df8be [develop | DONE | DELETED]: Deleted legacy unused files mailPrefs.component.html, mailPrefs.component.ts, mailPrefs.module.ts, htmlProjectReport.component.ts, htmlProjectReport.module.ts. 2024-01-29 19:55:26 +02:00
Konstantina Galouni 5a23f6437d [develop | DONE | FIXED]: project.component.ts: In method "closeLoading()" added setTimeout of 300ms - too fast open and close of the loading modal and it couldn't close eventually. 2024-01-29 19:53:11 +02:00
argirok 0c85072ac3 [angular-16-irish-monitor | DONE | CHANGED] My orcid links: add option for custom link in discover more links, add property 2024-01-29 17:57:44 +02:00
argirok 70b7e30b70 [angular-16-irish-monitor | DONE | CHANGED] Custom filters: add checks, add custom query 2024-01-29 17:56:10 +02:00
Konstantinos Triantafyllou 4c55fb252c [angular-16-irish-monitor | CHANGED | DONE]: Change OA Color filter to Publisher Access. 2024-01-29 15:55:34 +02:00
Konstantina Galouni fa216cbc07 [develop | DONE | CHANGED]: availableOn.component.ts: Removed environment check from fulltext links (display them also in production). 2024-01-25 12:33:50 +02:00
Konstantina Galouni 1e41013e06 [develop | DONE | CHANGED]: showSubjects.components.ts: Removed subjects by Vocabulary for BETA & DEV environments & Updated how EOSC subjects are displayed | resultLanding.component: Added get method "hasSubjects" and updated checks to show subjects depending on environment. 2024-01-25 12:31:14 +02:00
Konstantinos Triantafyllou 340dd96dc2 Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2024-01-24 20:13:13 +02:00
Konstantinos Triantafyllou a40f1431ed [angular-16-irish-monitor]: Fix overlay in indicators. Fix admin calls for managers/ivnitations. 2024-01-24 20:13:05 +02:00
Konstantina Galouni e3fe71a623 [angular-16-irish-monitor | DONE | CHANGED]: resultLanding.component.html & result-preview.component.html: Renamed OA Routes to Access Routes. 2024-01-24 17:10:45 +02:00
Konstantina Galouni 134ab8240e Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2024-01-24 17:05:14 +02:00
Konstantina Galouni 0a47193bf3 [develop | DONE | FIXED]: searchResearchResults.service.ts & resultLanding.service.ts & deletedByInference.service.ts: #9425 - When an author (same name & rank) has 2 instances on the same record, keep orcid information if exists in at least one instance. 2024-01-24 17:03:15 +02:00
Konstantinos Triantafyllou bbcfa595da [angular-16-irish-monitor | MERGE]: Merge from develop 2024-01-24 16:25:17 +02:00
Konstantinos Triantafyllou 2b9953503a Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2024-01-24 14:36:20 +02:00
Konstantinos Triantafyllou e176169afd [develop]: Fix some properties values 2024-01-24 14:36:12 +02:00
argirok 43ceb9f266 [develop | DONE | CHANGED] claims: disable result link when status is pending 2024-01-24 12:14:40 +02:00
Konstantinos Triantafyllou b83101fd74 [angular-16-irish-monitor | FIXED]: Manage stakeholders less fix border if color is none. 2024-01-24 10:36:40 +02:00
Konstantinos Triantafyllou 017b54f57c [angular-16-irish-monitor | CHANGED]: Add .hostedby in datasource indicators generator. 2024-01-19 13:44:02 +02:00
Konstantinos Triantafyllou e1f6549e89 [anuglar-16-irish-monitor]: AdminDashboardGuard make services protected 2024-01-18 09:58:28 +02:00
argirok 6034bcfe77 [angular-16-irish-monitor | DONE | CHANGED] Indicators Filters changed the way filters applied, add publiclyFunded Filter 2024-01-17 15:43:43 +02:00
argirok 93ae0db4dd [angular-16-irish-monitor | DONE | CHANGED] Stakeholder service : change charts limit to 7 results 2024-01-17 15:42:32 +02:00
Alex Martzios 5699aed599 [develop | DONE | FIXED] linking: stack elements on mobile to avoid page breaking 2024-01-17 11:16:06 +02:00
Konstantina Galouni c06d020cdc [develop | DONE | CHANGED]: ISVocabularies.service.ts: Updated method "parseFOS()" to parse all Fields of Science by visiting hierarchy from fos.json using an iterative DFS (Depth First Search), instead of looping each level - this does not depend on the number of levels specified in the vocabulary file. 2024-01-12 13:59:58 +02:00
Konstantinos Triantafyllou f629a9c715 [angular-16-irish-monitor]: Fix ireland composer subject. 2024-01-12 13:44:12 +02:00
Konstantinos Triantafyllou d0aa12ab4d [angular-16-irish-monitor]: Fix wrong visibility on import. 2024-01-12 11:39:26 +02:00
argirok adb4c86d2f [angular-16-irish-monitor | DONE | CHANGED] user management service: better clean up reload urls 2024-01-12 11:26:16 +02:00
Konstantinos Triantafyllou f07d1778c5 Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2024-01-12 10:16:31 +02:00
Konstantinos Triantafyllou ba1a3b9e62 [angular-16-irish-monitor]: Fix cancel invitation method of a user. Set rootClass only if it is changed. 2024-01-12 09:15:04 +02:00
argirok ced24dc2af [angular-16-irish-monitor | DONE | ADDED] add getResearcherStakeholder method in stakeholder service, to get researcher profile and set the proper values based on current author 2024-01-11 18:28:02 +02:00
Alex Martzios c2312e297e [develop | DONE | FIXED] remove b2note (annotation component) and all its references 2024-01-11 12:49:57 +02:00
Konstantinos Triantafyllou 037c32c545 Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2024-01-10 14:21:19 +02:00
Konstantinos Triantafyllou c5759235e4 [angular-16-irish-monitor]: Fix name of export file of indicators. Fix manageStakeholders if an error is occurred. 2024-01-10 14:21:12 +02:00
argirok 9a96851e70 [angular-16-irish-monitor | DONE | ADDED] indicator utils, add researcher as stakeholder type and extract researcher parameters 2024-01-10 12:34:03 +02:00
argirok 0a01288a46 direct linking for orps: fix checks, use type 'other' instead of 'orp' 2024-01-10 00:03:47 +02:00
Konstantinos Triantafyllou ae4b3b7b95 [angular-16-irish-monitor]: Fix badge in production 2024-01-09 17:57:42 +02:00
Konstantina Galouni 9bcc1bb4d5 [angular-16-irish-monitor | DONE | CHANGED]: searchFields.base.ts: Changed label of facet field "isindiamondjournal" to "In a Diamond OA journal". 2024-01-09 17:03:47 +02:00
Konstantina Galouni 88b5e06aa8 [master | DONE | CHANGED]: admin.component.ts & sidebar-base.component.ts: Added admin menu sidebar in super admin pages for help texts | admin.module.ts: In manage profiles page set hasAdminMenu: true, hasSidebar: false & removed path: 'irish/admin-tools' - :stakeholder will be called instead. 2024-01-09 14:16:35 +02:00
Konstantinos Triantafyllou 8c5990133f [angular-16-irish-monitor]: Update irish dashboard email composer 2024-01-09 13:19:42 +02:00
Konstantina Galouni bef191edba [angular-16-irish-monitor | DONE | ADDED]: stakeholder-base.component.ts: Added method "setProperties()" to set adminToolsPortalType and init portal. 2024-01-09 11:50:05 +02:00
Konstantina Galouni c202b7671b [angular-16-irish-monitor | WIP | CHANGED]: Changed checks for irish portal (use properties.dashboard - properties.adminToolsPortalType will be "country")
1. env-properties.ts: Added in Dashboard "irish" type and changed "irish" to "country" in PortalType.
2. connectHelper.ts & resultLanding.service.ts & manageStakeholders.component.html & indicators.component.ts & orcid-work.component.ts & entitiesSelection.component.ts & result-preview.component.ts: Updated check to properties.dashboard != "irish".
3. portalHelper.ts: Added "country" option in portalTypes.
2024-01-09 11:33:46 +02:00
Konstantinos Triantafyllou 070ae45480 [angular-16-irish-monitor]: Add composer for irish dashboard. 2024-01-09 11:12:07 +02:00
Konstantinos Triantafyllou d6d3c7bab9 [angular-16-irish-monitor]: Add condition for notification. Fix infinite loop with user-info. 2024-01-09 10:51:03 +02:00
argirok bc259c7c3c [angular-16-irish-monitor | DONE | CHANGED] make session redirect urls an array, allow double redirect to fix page and then to current page (when redirected to login) 2024-01-09 10:07:04 +02:00
Konstantinos Triantafyllou 54a7ad165e [angular-16-irish-montitor | CHANGED]: admin dashboard chech data first before params for stakeholder. 2024-01-08 17:40:05 +02:00
Konstantinos Triantafyllou d61a70cc5a Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2024-01-08 16:59:39 +02:00
Konstantinos Triantafyllou b52ef07306 [angular-16-irish-monitor | ADDED]: Add environment badge in header of navbar 2024-01-08 16:59:32 +02:00
Konstantina Galouni ab0ae376b9 Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2024-01-08 15:37:20 +02:00
Konstantina Galouni 6f13ab475a [develop | DONE | CHANGED]: Show code in Fields of Science (FoS) when fos field is queried in filters, or not, when foslabel field is queried.
1. searchFields.base.ts: Added method "getFosParameter()" to check if "fos" or "foslabel" is in RESULT_REFINE_FIELDS | Removed environment check for fos in RESULT_REFINE_FIELDS and RESULT_FIELDS_ORDERED.
2. resultLanding.service.ts & landing-utils/fos.component.ts & fos/fos.component: Include code in fos labels when fos field is queried, otherwise (foslabel) not.
2024-01-08 15:36:27 +02:00
argirok 0f52dcbdca [angular-16-irish-monitor | DONE | CHANGED] hide shema enhancements message for irish case 2024-01-08 14:29:54 +02:00
argirok 010709202b [angular-16-irish-monitor | DONE | CHANGED] replace value of a field only if it matches with one of the profile index values, if not ignore it 2024-01-08 14:29:16 +02:00
Konstantina Galouni 4f0c8ae5e9 Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2024-01-08 14:07:42 +02:00
Konstantina Galouni 18325323d0 [develop | DONE | CHANGED]: fos/fos.component.html & landing-utils/fos.component.ts & searchFields.base.ts: Removed "BETA" indication from Fields of Science. 2024-01-08 14:04:18 +02:00
argirok 69a9512d14 Merge remote-tracking branch 'origin/angular-16-irish-monitor' into angular-16-irish-monitor 2024-01-08 13:51:40 +02:00
argirok 9013db4b6b [angular-16-irish-monitor | DONE | ADDED] add property for matomo logs 2024-01-08 13:50:05 +02:00
Alex Martzios 1157c0f4a7 [angular-16-irish-monitor | FIXED | DONE] admin: filter stakeholders after creating/deleting new profile 2024-01-08 10:50:44 +02:00
Konstantinos Triantafyllou f81f5d7bfb [angular-16-irish-monitor | ADDED]: Add originalId to datasources results in order to use it for provide. 2024-01-07 13:20:17 +02:00
Konstantinos Triantafyllou bc4e30c3f2 [angular-16-irish-monitor | CHANGED | DONE]: Remove loginURL, logoutURL and userInfoURL properties and add loginServiceURL. 2024-01-07 01:41:59 +02:00
Konstantinos Triantafyllou 367bdc3092 Merge pull request 'Merge Changes from Develop' (#28) from develop into angular-16-irish-monitor
Reviewed-on: #28
2024-01-05 10:32:32 +01:00
Konstantinos Triantafyllou 9709062383 [angular-16-irish-monitor | ADDED]: Add recaptcha key to commonDev 2024-01-04 13:51:49 +02:00
Alex Martzios abaa7764b9 [angular-16-irish-monitor | FIXED | DONE]: remove email subject from body 2024-01-04 13:36:30 +02:00
Alex Martzios 5d7e72eb3d [angular-16-irish-monitor] add new composer for irish monitor 2024-01-04 13:19:24 +02:00
Konstantinos Triantafyllou 21f49bbc6c [angular-16-irish-monitor | FIXED | DONE]: Manage stakeholders retrieve types from configuration. 2024-01-03 11:00:11 +02:00
Konstantina Galouni 84c2451521 [develop | DONE | CHANGED]: dataProvider.component.html & project.component.html & resultLanding.component.html: Changed uk-flex-middle to uk-flex-top for .landing-metrics-card, after min-height was introduced. 2023-12-28 16:34:43 +02:00
Konstantina Galouni 7ccd9c625b [develop | DONE | FIXED]: searchAll.component.ts: Updated entitytype parameter to method "NewSearchPageComponent.createKeywordQuery()" for querying number of datasurces and services also by pid. 2023-12-28 15:41:17 +02:00
Alex Martzios cba56ca4c0 [angular-16-irish-monitor] admin - manage stakeholders: add paging and filter by 'type' for stakeholders and defaultStakeholders 2023-12-28 13:28:39 +02:00
Konstantina Galouni 03b61d1fc6 [angular-16-irish-monitor | DONE | CHANGED]: resultLanding.component.html: Added OA Routes in mobile (small screens) | base.component.ts: Added method "quote()" and init routerHelper. 2023-12-22 16:20:15 +02:00
Konstantinos Triantafyllou 9fc6d0c0a0 Merge pull request 'Production release December 2023' (#27) from develop into master
Reviewed-on: #27
2023-12-21 13:46:37 +01:00
Konstantinos Triantafyllou 617489a565 [angular-16-irish-monitor | CHANGED | DONE]: Add class in access-route-badge of result preview base on the required dots. 2023-12-21 13:21:11 +02:00
Konstantina Galouni 60d4bb914f [angular-16-irish-monitor | DONE | ADDED]: searchFields.base.ts: New fields "peerreviewed", "isgreen", "openaccesscolor", "isindiamondjournal", "publiclyfunded"
1. Added in RESULT_FIELDS "peerreviewed", "isgreen", "openaccesscolor", "isindiamondjournal", "publiclyfunded"
2. Added in RESULT_STATIC_FIELD_VALUES "peerreviewed", "isgreen", "isindiamondjournal", "publiclyfunded"
3. Added in HIDDEN FIELDS "isgreen", "openaccesscolor", "isindiamondjournal", "peerreviewed"
4. Added structure DEPENDENT_FIELDS_AND_VALUES.
2023-12-21 11:02:16 +02:00
Konstantina Galouni 59bd3918e8 [angular-16-irish-monitor | DONE | ADDED]: New type of filter (triplet) added - use of <mat-button-toggle-group> | Grouping of filters added | Fixed checks for dependent filters and added new checks for dependent to filter values.
1. newSearchPage.component.html: Added display of grouped filters | Added checks for triplet typed filters.
2. newSearchPage.component.ts: Fixed checks for dependent filters and added new checks for dependent to filter values.
3. searchFilter.component.html: New "triplet" type of filter | Grouping of filters - smaller titles.
4. searchFilter.component.ts: Added field "@Input() grouped: boolean = false" | Added check for triplet filter | Added method "tripletFilterChange()".
5. searchFilter.module.ts: Import MatButtonToggleModule.
6. searchResearchResults.component.ts: Fixed how groupedFilters are initialized - TODO: Add this fix in other search pages too.
2023-12-21 10:57:14 +02:00
Konstantina Galouni 0870766720 [angular-16-irish-monitor | DONE | ADDED]: resultLanding.component.html & result-preview.component.html: Added display of OA Routes (green, oa color, diamond journal). 2023-12-21 10:36:05 +02:00
argirok 0707914088 [angular-16-irish-monitor | DONE | ADDED] Indicator utils: add method extractDatasource 2023-12-21 10:30:07 +02:00
Konstantina Galouni 1853b1cf57 [angular-16-irish-monitor | DONE | CHANGED]: searchHelperClasses.class.ts: In Filter class renamed field "isOpen" to "isViewAllOpen" | searchResearchResults.component.ts * searchProjects.component.ts & searchOrganizations.component.ts & searchDataProviders.component.ts & searchFilter.component: Use renamed filter field (isViewAllOpen) | searchFilter.component.html: Capitalize value names of filters. 2023-12-21 00:06:32 +02:00
Konstantina Galouni 51dbad03d7 [angular-16-irish-monitor | DONE | ADDED]: Added parsing of peer-reviewed (refereed on instances), publicly funded and OA Routes (green, oa color, diamond journal) | Display peer-reviewed on instances and publicly funded (and projects) in metadata line (entity-metadata).
1. feedback.component.html & resultLanding.component.html: In <landing-header> added parameters publiclyFunded and projects.
2. landing-header.component.ts & result-preview.component.html: In <entity-metadata> added parameters publiclyFunded and projects | Added field @Input() publiclyFunded.
3. availableOn.component.ts: Display peer-reviewed.
4. entity-metadata.component.ts: Display publicly funded | Added field @Input() publiclyFunded: boolean.
5. parsingFunctions.class.ts: Added parsing of peer-reviewed (instance.refereed).
6. resultLanding.service.ts & searchResearchResults.service.ts: Added parsing of publicly funded and OA Routes (green, oa color, diamond journal).
7. resultLandingInfo.ts & searchResult.ts: In ResultLandingInfo and in SearchResult added fields oaRoutes: OARoutes; and publiclyFunded: boolean;
8. result-preview.ts: In HostedByCollectedFrom added field peerReviewed?: boolean; | Set interface OARoutes | In ResultPreview added fields oaRoutes: OARoutes; and publiclyFunded: boolean; | In methods "searchResultConvert()" and "resultLandingInfoConvert()" set oaRoutes and publiclyFunded.
2023-12-20 23:55:00 +02:00
Konstantina Galouni bbe1ced87a [angular-16-irish-monitor | DONE | FIXED]: [missing from previous commit] landing-header.module.ts: Fixed imports - Removed import ShowPublisherModule and added import EntityMetadataModule. 2023-12-20 23:32:38 +02:00
Konstantina Galouni 9a7a14ea87 [angular-16-irish-monitor | DONE | FIXED]: Fixed imports - entity-metadata.module.ts: Imported ShowPublisherModule | resultLandingUtils.module.ts: Removed export ShowPublisherComponent and import EntityMetadataModule. 2023-12-20 23:29:07 +02:00
Konstantina Galouni c225d81c16 [angular-16-irish-monitor | DONE | CHANGED]: resultLanding.service.ts: Added check, not to parse SDGs in irish portal. 2023-12-20 23:19:34 +02:00
argirok fe0860d41a [angular-16-irish-monitor | DONE | CHANGED] Indicator utils: update the way we extract indicator index fields and add the parameters 2023-12-20 13:27:52 +02:00
argirok c6dd26dcee [angular-16-irish-monitor | DONE | CHANGED] UserProfile service: update initialize method - not initialize in constructor 2023-12-19 17:20:01 +02:00
argirok 8f009f3fee [angular-16-irish-monitor | DONE | ADDED] Orcid work: add check for consent in case of irish 2023-12-19 11:54:31 +02:00
argirok 677372a332 [angular-16-irish-monitor | DONE | ADDED] User profile service 2023-12-19 11:53:34 +02:00
argirok 2a64a0c951 [angular-16-irish-monitor | DONE | CHANGED] Entity Actions: show Orcid for the case of irish 2023-12-19 11:52:53 +02:00
argirok 4922906bcd [angular-16-irish-monitor | DONE | CHANGED] Entity Actions: show Action in case the enabled route path (e.g /participate) uses loadChildren to load the rest of the path (e.g /direct-claim) 2023-12-19 11:52:27 +02:00
argirok e900c28318 [angular-16-irish-monitor | DONE | CHANGED] Orcid-work: change deprecated Session isLoggedIn method 2023-12-19 11:07:55 +02:00
Konstantinos Triantafyllou 48ce09e400 [angular-16-irish-monitor]: LoginURL property now suppors mutible URLs. 2023-12-18 17:35:36 +02:00
Alex Martzios 52d63ece25 [angular-16-irish-monitor] move customFilter.service.ts file to openaireLibrary/shared folder 2023-12-18 13:27:00 +02:00
Alex Martzios 31220578cf [angular-16-irish-monitor] embed charts on indicators 2023-12-18 12:37:35 +02:00
Konstantinos Triantafyllou 3c7b330167 [angular-16-irish-monitor | CHANGED | DONE]: Remove role prefix from role name functions and added only in creation of a role. 2023-12-15 16:59:38 +02:00
argirok d804da4dd8 Merge branch 'develop' into angular-16-irish-monitor 2023-12-15 16:46:43 +02:00
argirok cfc6a07f7c [angular-16-irish-monitor | DONE | ADDED] add openorgs url in properties 2023-12-15 16:04:41 +02:00
argirok c977bb0898 [angular-16-irish-monitor | DONE | FIXED] cookie: set properly cookie when cookie name is not default 2023-12-15 11:26:28 +02:00
Konstantina Galouni 41adaa308d Merge pull request 'Merge develop-filters into develop branch' (#25) from develop-filters into develop
Reviewed-on: #25
2023-12-15 09:08:00 +01:00
Konstantina Galouni afcbb07a24 [develop-filters | DONE | ADDED]: Added structures for grouping and ordering search filters.
1. searchFields.base.ts: Added RESULT_FIELDS_ORDERED and PROJECT_FIELDS_ORDERED.
2. searchResearchResults.component.ts: Set and initialize orderedFields and orderedFilters and pass them to <new-search-page>.
3. newSearchPage.component.html: If there are orderedFilters, show filters from this structure.
2023-12-14 18:23:28 +02:00
Konstantina Galouni d9c7d35e57 [develop-filters | DONE | CHANGED]: Get 7 top values for each filter (minRef) and on view all click, query for top 100 for a specific filter.
1. searchResearchResults.service.ts & searchProjects.service.ts & searchOrganizations.service.ts & searchDataproviders.service.ts: In advanced search method added parameter minRef: boolean = false and if true, add in request url "&minRef=true" to query for top 7 values.
2. searchResearchResults.component.ts & searchProjects.component.ts & searchOrganizations.component.ts & searchDataProviders.component.ts: By default query filters with minRef=true | Added method "filterRequestedAll()" to be called on view all click of a filter.
3. searchHelperClasses.class.ts: Added in Filter public countAllValues?: number = -1; (-1: all filters not yet requested, 0: request failed) and public isOpen?: boolean = false; (checks if view all filter is clicked).
4. searchFilter.module.ts: Imported LoadingModule.
5. searchFilter.component.ts & searchFilter.component.html: Updated process on view all click.
6. newSearchPage.component.ts: Added method "filterToggled()".
7. newSearchPage.component.html: Bind filterToggled method to <search-filter> output.
2023-12-14 18:14:57 +02:00
Konstantina Galouni 0768248bde [develop | DONE | CHANGED]: refineResults.class.ts: Missing change from pre-previous commit for static filters. 2023-12-14 17:35:53 +02:00
Konstantina Galouni d15ce5522e [develop-filters | DONE | CHANGED]: refineFieldResults.service.ts: In method "getAllRefineFieldResultsByFieldName()", added size=0 in request url. 2023-12-14 17:32:42 +02:00
Konstantina Galouni b0a67be290 [develop-filters | WIP | CHANGED]: Added static refine fields.
1. searchFields.base.ts: Added RESULT_STATIC_FIELDS/ DATASOURCE_STATIC_FIELDS and RESULT_STATIC_FIELD_VALUES/ DATASOURCE_STATIC_FIELD_VALUE and updated in RESULT_FIELDS type to static for resultbestaccessright, and added type and in DATASOURCE_FIELDS added eosctype.
2. staticAutoComplete.component.ts: Added @Input() public fieldValues; and added check not to query for values when static (fieldValues exists).
3. searchResearchResults.component.ts & searchProjects.component.ts & searchOrganizations.component.ts & searchDataProviders.component.ts: Added parameters for static fields in <new-search-page> and initialized them properly.
4. advancedSearchForm.component.html: Added parameter fieldValues to <static-autocomplete>.
5. advancedSearchForm.component.ts: Added method "public getFieldValuesForId(id: string)".
6. newSearchPage.component.html: Added parameter fieldValues to <advanced-search-form> and show static filters view case.
7. newSearchPage.component.ts: Added static filters - initialize them properly and make code for static filters more dynamic.
2023-12-14 17:30:29 +02:00
Konstantina Galouni d587aaefe2 [develop-filters | DONE | CHANGED]: refineResults.class.ts: Removed check includeValue (for unidentified and Undetermined values) from "parse()" method | searchFilter.component.ts: In "ngOnChanges()" method updated check for filtering out filter values - check for unidentified, Undetermined, unknown (lowercase), not available (lowercase) 2023-12-14 14:24:03 +02:00
Konstantina Galouni 01eabb74f3 [develop-filters | DONE | CHANGED]: searchFilter.component.ts: In method "_formatTitle()", remove number of filter values from filter name. 2023-12-14 14:16:46 +02:00
argirok 5060151e09 [angular-16-irish-monitor | DONE | CHANGED] update log Service, add log actions in claims and orcid links 2023-12-14 14:01:06 +02:00
argirok e4ae0ca35c [angular-16-irish-monitor | DONE | ADDED] add property for myclaims route 2023-12-14 14:00:24 +02:00
argirok f4fc3eddf6 [angular-16-irish-monitor | DONE | CHANGED] Edit stakeholder: shortname not required 2023-12-14 13:58:47 +02:00
argirok 6b062dc2fb [angular-16-irish-monitor | DONE | CHANGED] Import indicators: allow for stakeholder type country to not having parameters for the current stakeholder 2023-12-14 13:57:39 +02:00
argirok 837e121684 [angular-16-irish-monitor | DONE | ADDED] log service add get logs method 2023-12-13 17:38:25 +02:00
argirok 941db7102a [angular-16-irish-monitor | DONE | CHANGED] monitor dashboard: make require login for filters optional 2023-12-13 15:58:22 +02:00
argirok 704f52c969 [angular-16-irish-monitor | DONE | ADDED] Add fos lvl1 &lvl2 filters 2023-12-12 16:39:59 +02:00
Konstantina Galouni c12cadf0f1 Merge pull request 'Production release (for EOSC EXPLORE) December 2023' (#24) from develop into master
Reviewed-on: #24
2023-12-12 11:43:47 +01:00
Konstantina Galouni 84bf8cdebe [develop | DONE | FIXED] parsingFunctions.class.ts: Updated urls for eoscSubjects (eoscif guidelines). 2023-12-12 11:59:25 +02:00
Konstantinos Triantafyllou a4bb94daa7 Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-12-12 10:11:41 +02:00
Konstantinos Triantafyllou 7b2b3c6cc4 [develop | FIXED | DONE]: Fix copy indicator to clipboard. 2023-12-12 10:10:22 +02:00
Konstantinos Triantafyllou 684c9ac4c0 Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-12-08 15:34:00 +02:00
Konstantinos Triantafyllou 7d97f05e6e Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2023-12-08 15:33:50 +02:00
Konstantinos Triantafyllou 3e02680f5e [angular-16-irish-monitor]: Add orcid in user class. Fix orcid button text. Remove capitalize from buttons in download and data dump. 2023-12-08 15:33:44 +02:00
Alex Martzios 7e007c9511 entity-metadata.component: move the "margin-right" class inside the icons 2023-12-08 14:37:25 +02:00
argirok 49c0569ff8 [develop | DONE | FIXED] : Claims: fix check about status when there is a direct index insertion job 2023-12-08 14:36:42 +02:00
argirok faf0598e10 [develop | DONE | FIXED] : remove final / from zenodoCommunities url 2023-12-08 14:35:27 +02:00
Alex Martzios 2e336b93a8 create entity-metadata.module so that we can use the component independently 2023-12-08 13:18:24 +02:00
argirok 38b8865be0 [angular-16-irish-monitor | DONE | ADDED] Add title prefix for research outcomes 2023-12-07 12:09:52 +02:00
argirok f3c7ddec93 [angular-16-irish-monitor | DONE | ADDED] add zenodo dump url 2023-12-07 11:38:27 +02:00
argirok 76003bf6d9 [angular-16-irish-monitor | DONE | CHANGED] Search ORCID: change request to get the list of institutions 2023-12-06 16:05:15 +02:00
argirok 8c5c4923d3 [angular-16-irish-monitor | DONE | CHANGED] cookie banner: parameterize cookie name 2023-12-06 15:13:59 +02:00
Konstantinos Triantafyllou 736546c0eb Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-12-06 13:54:08 +02:00
Konstantina Galouni 9913da1f43 [develop | DONE | FIXED]: refineResults.class.ts: Removed unused import FieldDetails. 2023-12-06 13:53:06 +02:00
Konstantina Galouni 3bda71b818 [develop | DONE | CHANGED]: Added file searchFields.base.ts to be extended by existing SearchFields class (searchFields.ts file) - searchFields.ts will be replaced by custom file if needed in angular.json. 2023-12-06 13:50:11 +02:00
argirok 0b90448e01 [angular-16-irish-monitor | DONE | CHANGED] entities selection add check for irish monitor dashboards 2023-12-04 13:26:34 +02:00
Konstantinos Triantafyllou a2706af35d Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-12-01 19:31:04 +02:00
Konstantinos Triantafyllou 1a2a5f81d6 [develop]: Merge changes from develop 2023-12-01 19:30:48 +02:00
argirok 6daf729374 [develop | DONE | CHANGED] : String utils - urlPrefix add check in case url is null 2023-12-01 17:13:16 +02:00
argirok f537920702 [ DONE | ADDED] String utils - Identifiers: consider valid ORCID the full url, add getRawORCID method 2023-12-01 16:16:25 +02:00
Konstantinos Triantafyllou 7b79146f12 Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-11-30 23:04:07 +02:00
Konstantinos Triantafyllou 5eed3ce431 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-11-30 23:03:46 +02:00
Konstantinos Triantafyllou ab4d715454 [develop]: Result preview add modifier class and hover behaviour. 2023-11-30 23:03:39 +02:00
Konstantinos Triantafyllou 65f8676a08 [angular-16-irish-monitor | WIP]: Add role group before type of an entity. 2023-11-30 14:20:00 +02:00
argirok f853d96ed4 [angular-16-irish-monitor | WIP] logService: rename property 2023-11-28 18:49:42 +02:00
argirok f27b8e11f7 [angular-16-irish-monitor | WIP] logService and properties 2023-11-28 18:42:21 +02:00
argirok 550c27a464 [angular-16-irish-monitor | DONE | CHANGED ] fetchByDOIs: add filter query to the request 2023-11-28 11:04:04 +02:00
Konstantinos Triantafyllou 1a7624eed1 Merge pull request 'Production release November 2023 v3' (#23) from develop into master
Reviewed-on: #23
2023-11-28 09:45:06 +01:00
Konstantina Galouni c7c1aec26e [develop | DONE | CHANGED]: Updated parsing and display for usage counts per data source to show datasource names.
1. resultLandingInfo.ts: Added field datasourceName: string in interface MetricPerDatasource.
2. parsingFunctions.class.ts: In method "parseMeasures()", updated parsing for usage counts per data source (countsPerDatasource) to parse datasourceId and datasourceName from datasource field of response (split by ||).
3. resultLanding.component.html: On display of countsPerDatasource in table, show datasource names.
2023-11-27 18:10:37 +02:00
Alex Martzios 6f214cb08a [angular-16-irish-monitor | WIP]: browse repository monitors - query for datasource stakeholders, display them in page 2023-11-27 14:01:14 +02:00
Konstantina Galouni fa61b8bef4 [develop | DONE | CHANGED]: numbers.component.ts: Added in Numbers field "mergedFundersSize", and on init method call refine query for research products (results), to merge refine queries of research products and projects and set the mergedFundersSize (all funders that have research products, or have >1 project). 2023-11-24 16:59:55 +02:00
Konstantina Galouni 7cd9516493 [develop | DONE | CHANGED]: refineFieldResults.service.ts: In method "getRefineFieldResultsByFieldName()" added in keys "funder", to get (refine query) all funders for research products and projects in autocomplete (advanced) search. 2023-11-24 16:57:35 +02:00
Konstantina Galouni 54e0181560 [develop | DONE | FIXED] numbers.component.ts: Updated method called in refine query to get funders of projects from "getRefineFieldsResultsByEntityName()" to "getAllRefineFieldResultsByFieldName()" to be able to get more than 100 funders each time. 2023-11-24 13:18:22 +02:00
Konstantina Galouni ff34511a9c [develop | DONE | CHANGED]: refineFieldResults.service.ts: Added method "getAllRefineFieldResultsByFieldName()" to get all values of a specific refine field (not just first 100) | In method "getRefineFieldResultsByFieldName()" changed key:string to keys:string[] to be able to define multiple fields to query for all their values - creted helper method "fieldIncludesAnyOfTheKeywords()". 2023-11-24 11:44:23 +02:00
Konstantinos Triantafyllou 205b97487c Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-11-24 10:52:50 +02:00
Konstantinos Triantafyllou 246cafa43f [angular-16-irish-monitor]: Add rootClass subject in layout service. 2023-11-24 10:51:22 +02:00
Konstantina Galouni 1f872d2beb [develop | DONE | ADDED]: searchSorting.component.ts: Added sorting options by impact-based indicatos in PRODUCTION as well. 2023-11-23 09:42:38 +02:00
Konstantina Galouni 4155027e87 [develop | DONE | FIXED]: alert.ts: Fixed margins and paddings in buttons of uk-modal-footer. 2023-11-21 12:59:17 +02:00
Konstantinos Triantafyllou 3c1b72e7e4 [angular-16-irish-monitor | ADDED]: Add configuration for caching indicators. 2023-11-16 16:44:27 +02:00
Konstantinos Triantafyllou 79d49c80e3 [angular-irish-16 | DONE]: Add datasource in Entities. Add logo in sidebar. 2023-11-16 14:36:44 +02:00
Konstantinos Triantafyllou 752baad8de [angular-16-irish-monitor]: Merge from develop(2) 2023-11-16 11:52:46 +02:00
Konstantinos Triantafyllou 552f1ed43a [angular-16-irish-monitor]: Merge from develop 2023-11-16 11:47:50 +02:00
Konstantinos Triantafyllou fc58721e2a [angular-16-irish-monitor]: Add method to get the label of an option in stakeholder-base component 2023-11-16 11:45:07 +02:00
Konstantinos Triantafyllou 054d7ff51e Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-11-16 11:36:51 +02:00
Konstantinos Triantafyllou 58274c537b [develop | DONE]: Move indicators.less into common assets 2023-11-16 11:36:41 +02:00
argirok 5b0c207150 [develop | DONE | FIXED] : re-add properties for services 2023-11-15 17:39:03 +02:00
argirok f0c37512c3 [develop | DONE | FIXED] : show again enermaps tab in result landing 2023-11-15 17:34:15 +02:00
Konstantinos Triantafyllou 16b6a34d25 [angular-16-irish-monitor]: Fix input reset value on changes 2023-11-15 16:13:45 +02:00
Konstantinos Triantafyllou b8162fa1e3 Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2023-11-15 10:35:52 +02:00
Konstantinos Triantafyllou 920f3a454a [angular-16-irish-monitor | WIP]: Add optional extend-theme variables import in all component less files. Add relativeTo in slider tabs 2023-11-15 10:35:44 +02:00
argirok a5265ab98d [angular-16-irish-dashboard | DONE | CHANGED] Entities selection: add portal config for irish 2023-11-15 10:32:23 +02:00
Konstantinos Triantafyllou a8c91dc04c [angular-16-irish-monitor | DONE]: Change dev upload to mpagasas. 2023-11-14 16:10:55 +02:00
argirok 5480de5812 [angular-16-irish-monitor | WIP | CHANGED] Orcid search author: parse institutions 2023-11-14 15:08:50 +02:00
Konstantinos Triantafyllou edda550b63 [angular-16-irish-monitor]: Add monitor-indicator-stakeholder-base-component 2023-11-14 10:17:18 +02:00
Konstantina Galouni 51bd7efcbe [develop | DONE | FIXED] entitiesSelection.component.ts: Added faircore4eosc in adminToolsPortalType check to include entities according to the configuration. 2023-11-13 20:22:01 +02:00
Konstantinos Triantafyllou e80f73f9a9 [angular-16-irish-monitor | WIP]: Add base components for stakeholder, indicators and sidebar. Deprecated StakeholderEntities. 2023-11-13 15:00:05 +02:00
argirok 1ff833ed8a [angular-16-irish-monitor | DONE | CHANGED ] Search pages (projects, organizations, datasources ) Custom Filter accept single or an array of Custom filters 2023-11-13 13:46:42 +02:00
argirok 293be5e1d2 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-11-13 13:34:48 +02:00
argirok 62d4ab1a36 [angular-16-irish-monitor | DONE | UPDATED] Custom Filter accept single or an array of Custom filters 2023-11-13 11:18:00 +02:00
argirok ffec391448 [angular-16-irish-monitor | DONE | UPDATED] SearchResearch results - fetchByDOIs: use the search service API from properties 2023-11-13 11:16:47 +02:00
Konstantina Galouni 7f9117eccb [develop | DONE | CHANGED]: data sources landing: Get and parse number of collected fulltexts from a new stats api.
1. env-properties.ts: Added property pdfStatisticsAPIURL?: string;
2. environment.ts: Added pdfStatisticsAPIURL property in all environments.
3. dataProvider.service.ts: Uncomment method "getCollectedFulltexts()".
4. dataProvider.component.ts: Call method "getCollectedFulltexts()" instead of "getDataProviderAggregationStatus()".
2023-11-10 19:44:15 +02:00
Konstantina Galouni e8ed5da8ba Merge pull request 'Production release November 2023 v2' (#21) from develop into master
Reviewed-on: #21
2023-11-10 18:27:47 +01:00
argirok ce8b104c20 [angular-16-irish-monitor | DONE | REMOVED] SearchCustomFilter: remove promptToAddFilter field, and code to add and remove filter 2023-11-09 16:11:12 +02:00
Konstantinos Triantafyllou a773cd8d1d Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-11-09 14:35:10 +02:00
Konstantina Galouni 68c352d3d2 [develop | DONE | CHANGED]: In deposit page, move "Go to repository" button to top, aligned with the title when possible.
1. searchResultsForOrcid.component.html & searchMyOrcidResults.component.html: Removed [promoteWebsiteURL]="true", since this should be true only in deposit cards.
2. searchResultsInDeposit.component.ts: Added @Input() isMobile: boolean = false;
3. searchResultsInDeposit.component.html: Set parameter [isMobile]="isMobile" to <result-preview>.
4. newSearchPage.component.html: Set parameter [isMobile]="mobile" to <deposit-result>.
5. result-preview.component.html: In deposit cards align on the right of the title the "Go to repository" button and in mobile screens show it on the top right of the card.
2023-11-08 22:40:04 +02:00
Konstantina Galouni 32a34d5a12 [develop | DONE | ADDED]: Added parsing and display for usage counts per data source.
1. resultLandingInfo.ts:
   a. Commented out deprecated fields from interface Measure.
   b. Added interface MetricPerDatasource.
   c. Added in interface Measure, countsPerDatasource?: MetricPerDatasource[];
2. parsingFunctions.class.ts: In method "parseMeasures()", added parsing for usage counts per data source (countsPerDatasource).
3. resultLanding.component.html: Display countsPerDatasource in table (metrics tab > usage tab) if there is any.
2023-11-08 16:57:56 +02:00
Konstantinos Triantafyllou 50a8d53221 Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-11-08 15:17:52 +02:00
Konstantina Galouni 0d75307c76 [develop | DONE | CHANGED]: parsingFunctions.class.ts: Remove old schema parsing for impact based indicators (old was A, B, C - new is C1-C5). 2023-11-08 14:12:50 +02:00
Konstantina Galouni e63d61b469 Merge remote-tracking branch 'origin/develop' 2023-11-07 13:34:30 +02:00
Konstantina Galouni 3aff9ee76e [develop | DONE | ADDED] openaireLibrary - environment.ts: Added common properties searchLinkToService, searchLinkToServices, searchLinkToAdvancedServices. 2023-11-07 13:32:05 +02:00
Argiro Kokogiannaki f42d160308 Merge pull request 'Production release November 2023' (#20) from develop into master
Reviewed-on: #20
2023-11-07 09:48:31 +01:00
Konstantinos Triantafyllou 06a2ae16ee [develop | DONE]: Set header-height to 0px instead of 0 in layout service 2023-11-03 16:52:52 +02:00
Konstantinos Triantafyllou 5cd1e29871 Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2023-11-02 16:39:23 +02:00
Konstantinos Triantafyllou ba6dcf3b1c [angular-16-irish-monitor | WIP]: Add route params resolver in base component. Change metadata in manage stakeholders. 2023-11-02 16:39:14 +02:00
argirok c1e58e76a0 [angular-16-irish-monitor | WIP] piwik Service: make public trackEvent method 2023-11-02 14:53:42 +02:00
argirok c168416e3e Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2023-11-02 12:10:33 +02:00
Konstantinos Triantafyllou 6492211dc3 Merge pull request 'Move manage stakeholders into admin' (#19) from develop into angular-16-irish-monitor
Reviewed-on: #19
2023-11-02 10:37:01 +01:00
Konstantinos Triantafyllou 87e3c903a8 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-11-02 11:31:09 +02:00
Konstantinos Triantafyllou e38a772bf3 [develop | DONE]: Move manage stakeholders to library 2023-11-02 11:30:59 +02:00
Konstantinos Triantafyllou 106cb5dcf8 Merge pull request 'develop' (#18) from develop into angular-16-irish-monitor
Reviewed-on: #18
2023-11-02 09:42:04 +01:00
argirok 3e656de39c [develop | WIP] : Properties: add again clientManagementUrl property 2023-11-02 09:19:24 +02:00
argirok 0c0ef48b49 [develop | WIP] : Properties: remove wrong import, add more properties related to admin portal 2023-11-01 17:49:01 +02:00
argirok 79aa405507 Merge branch 'angular-16-irish-monitor' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16-irish-monitor 2023-11-01 17:20:37 +02:00
argirok 59d64b74e7 [develop | WIP] :update common properties - add connect related ones + claims api url 2023-11-01 16:35:46 +02:00
argirok 7399cd9ea6 [develop | WIP] add common properties in library file, delete unused properties 2023-11-01 14:27:54 +02:00
argirok 6ce2b75ee6 [develop | WIP | UPDATED] add common properties in library file, delete unused properties 2023-11-01 14:26:09 +02:00
Konstantinos Triantafyllou be84e2d986 Merge remote-tracking branch 'origin/develop' into angular-16-irish-monitor 2023-10-31 15:15:01 +02:00
Konstantinos Triantafyllou 5af67f7385 [develop | FIXED]: Fixed width of indicators page in admin. 2023-10-30 17:58:54 +02:00
argirok 9eee47f0d2 [angular-16-irish-monitor | WIP] Search researcher: update fetch by dois method 2023-10-30 17:12:43 +02:00
argirok cdb5f1ecd0 [WIP] Search researcher: work on the page layout - add banner, basic component functionalities 2023-10-30 17:09:59 +02:00
Konstantinos Triantafyllou aaf970fae4 Merge pull request 'Update to Angular 16' (#16) from angular-16 into develop
Reviewed-on: #16
2023-10-30 10:57:25 +01:00
Konstantina Galouni 5184ffad19 [angular-16 | DONE | ADDED] env-properties.ts: Added "faircore4eosc" in type Dashboard and type PortalType. 2023-10-30 11:22:20 +02:00
Konstantina Galouni 35b893e05e [angular-16 | DONE | FIXED]: In queries of results by pid, do not include pidtype restriction (some handle pids are resolved by doi regex, but no results returned for pidtype exact "doi"). 2023-10-30 10:53:19 +02:00
Konstantinos Triantafyllou 67547421b6 Merge remote-tracking branch 'origin/angular-16' into angular-16-irish-monitor 2023-10-27 17:50:06 +03:00
Konstantinos Triantafyllou 9af2fac9a0 [angular-16 | DONE | FIXED]: Create group was hidden for curators because of new dynamic types. 2023-10-27 17:49:31 +03:00
Konstantinos Triantafyllou 9213755662 Add new types of stakeholder for Irish 2023-10-27 15:52:55 +03:00
Konstantinos Triantafyllou c4ecc8fcae Merge remote-tracking branch 'origin/angular-16' into angular-16-irish-monitor 2023-10-27 09:25:12 +03:00
Konstantinos Triantafyllou 115ba0c49e [angular-16-irish-monitor | WIP]: Create base component with metadata initilization 2023-10-27 09:25:01 +03:00
Konstantinos Triantafyllou 64e8919925 Merge pull request 'angular-16-community-projects-availableSince' (#15) from angular-16-community-projects-availableSince into angular-16
Reviewed-on: #15
2023-10-26 15:47:34 +02:00
argirok fcc130b530 [angular-16-community-projects-availableSince | DONE | UPDATE] : don't show router link and result actions (for the community projects case where the id is set to '-1') 2023-10-26 16:29:05 +03:00
Konstantinos Triantafyllou 0478fe5670 Merge pull request '[angular-16-update-zenodo-api | DONE] : update zenodo community API and parsing' (#14) from angular-16-update-zenodo-api into angular-16
Reviewed-on: #14
2023-10-26 14:24:28 +02:00
argirok 065d73bb3e [angular-16-community-projects-availableSince | DONE | UPDATE] : add method to get last date that db is loaded 2023-10-26 09:48:11 +03:00
argirok 60a3e552b4 [angular-16-irish-monitor | WIP] Search results service: add new method to get results by dois 2023-10-25 17:41:13 +03:00
Konstantinos Triantafyllou 2348b6adcf Merge remote-tracking branch 'origin/angular-16' into angular-16-irish-monitor 2023-10-25 15:31:43 +03:00
Konstantinos Triantafyllou 660387b8da Merge branch 'angular-16' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16 2023-10-25 15:16:22 +03:00
Konstantinos Triantafyllou a953195dc8 [angular-16 | DONE | CHANGED]: Make dashboard-sidebar sticky instead of fixed. 2023-10-25 15:16:13 +03:00
Konstantina Galouni 4e20a39578 [angular-16 | DONE | CHANGED]: parsingFunctions.class.ts: In bip indicators parsing, parse citations from measure with id 'influence_alt' (old) or 'citation_count' (renamed). 2023-10-25 11:51:44 +03:00
Konstantinos Triantafyllou 89ba510256 Merge remote-tracking branch 'origin/angular-16' into angular-16-irish-monitor 2023-10-25 10:42:32 +03:00
Konstantinos Triantafyllou aebcb81c7b Merge branch 'angular-16' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16 2023-10-25 10:37:50 +03:00
Konstantinos Triantafyllou 54bff7cd4a [angular-16 | DONE | CHANGED]: Change email composer for Develop project (Add name, surname, email in mail body). 2023-10-25 10:37:39 +03:00
argirok 33b763ca38 [angular-16-irish-monitor | WIP]: Piwik service: add new methods to test events 2023-10-24 12:47:28 +03:00
argirok 606df73c74 [angular-16-irish-monitor | WIP]: Search orcid service: add new methods, add module 2023-10-24 12:46:38 +03:00
Konstantinos Triantafyllou 8647136803 Merge remote-tracking branch 'origin/monitor-admin-library' into angular-16 2023-10-24 11:57:24 +03:00
Konstantinos Triantafyllou b67c242fe7 [monitor-admin-library | DONE | CHANGED]: Make stakeholder types dynamic for Session methods. 2023-10-24 11:51:55 +03:00
argirok 6355a73146 [angular-16-update-zenodo-api | DONE] : update zenodo community API and parsing 2023-10-23 14:32:46 +03:00
Alex Martzios b69e19fa17 [Ang16 | WIP] add new email composer for Develop project 2023-10-23 12:40:55 +03:00
Konstantinos Triantafyllou 1710819fb9 [monitor-admin-library | DONE | CHANGED]: Move general in library 2023-10-20 19:07:33 +03:00
Konstantinos Triantafyllou d54ecec5e6 Merge branch 'monitor-admin-library' of code-repo.d4science.org:MaDgIK/openaire-library into monitor-admin-library 2023-10-20 19:05:42 +03:00
Konstantinos Triantafyllou cf30ab6581 [monitor-admin-library | DONE | CHANGED]: Move topics and cache indicators in library. 2023-10-20 19:02:19 +03:00
Konstantinos Triantafyllou de3fbe8d69 Move topics and cache indicators in library. 2023-10-19 16:33:04 +03:00
Konstantina Galouni f6e927f4c2 [angular-16 | WIP | REMOVED] Removed files environment.all.ts, environment.beta.ts, environment.prod.ts, environment.test.ts and define and export all properties from environment.ts. 2023-10-19 14:49:14 +03:00
Konstantina Galouni 717de55f6e [Library | angular-16]: [Bug fix] Name of bip metrics accidentally removed in branches merge. 2023-10-18 14:18:04 +03:00
Konstantinos Triantafyllou 8d6522270c Slider container: Fix error about observer 2023-10-16 14:34:48 +03:00
Konstantina Galouni b06e41c9a3 Merge pull request 'Merging develop branch into master for PROD Explore October 2023 release' (#10) from develop into master
Reviewed-on: #10
2023-10-16 12:38:55 +02:00
Konstantina Galouni 5948d61a47 Library | angular-16: Merge develop branch into angular-16 and resolve conflicts 2023-10-16 13:06:14 +03:00
Konstantina Galouni fce848008a [Library | develop]: resultLanding.component.html: [Bug fix] Fix check isNumber for bip measures & remove check if value (show citation score also when it is 0). 2023-10-16 12:53:40 +03:00
argirok 953c11a3b2 Merge remote-tracking branch 'origin/develop' into develop 2023-10-16 12:21:35 +03:00
argirok aa0ec0b06f search tab: show all results / don't slice the array
Fetch research results: keep all results in allResults field (for community results case)
2023-10-16 12:11:47 +03:00
Konstantina Galouni f0a48cd2e1 [Library | develop]: search-input.component.ts: [Bug fix] Added cdr.detectChanges() call on ngAfterViewInit, to solve expressionChangedAfterItHasBeenChecked error. 2023-10-16 11:44:18 +03:00
Konstantinos Triantafyllou dbbd7ec541 Input: Make error text-small 2023-10-12 13:10:02 +03:00
argirok 1bfff3b05c update footer links to webinars and blogs 2023-10-12 12:17:09 +03:00
Konstantinos Triantafyllou 0c21afdd7f Import Session in claimContextSearchForm deleted in Develop branch. 2023-10-11 16:40:24 +03:00
Konstantinos Triantafyllou 8581af9404 Merge remote-tracking branch 'origin/new-claims-api' into angular-16 2023-10-11 16:33:50 +03:00
Konstantinos Triantafyllou cfb321f93f Merge from develop 2023-10-11 16:33:33 +03:00
argirok 3f64332a8f Merge branch 'develop' into new-claims-api 2023-10-11 15:46:21 +03:00
Konstantina Galouni 9226a5975d [Library | develop]: Added Full-Text in research products actions when available.
1. availableOn.component.ts: Added Full-Text before Data sources, as a separate action and as information for each instance.
2. parsingFunctions.class.ts: Added parsing for fulltext and updated method "compareHostedByCollectedFrom()" to sort by both access and existence of fulltext.
3. resultLanding.component.html: Removed classes for <availableOn> in mobile actions.
4. entity-actions.component.ts: Updated uk-text-bolder class for all actions.
5. result-preview.ts: Added "fulltext?: string;" in HostedByCollectedFrom.
2023-10-11 12:46:10 +03:00
Konstantinos Triantafyllou 69bbccd009 Merge remote-tracking branch 'origin/develop' into angular-16 2023-10-10 22:47:06 +03:00
Konstantinos Triantafyllou ff4411d695 Fix role verification for community members. Modify isPrivate in communityHelper to include membership. 2023-10-10 22:40:01 +03:00
Konstantina Galouni c29488545e [Library & Explore | develop]: Added in openaireLibrary environment files for common properties (environment.all.ts: Common properties among all portals, regardless environment, environment.-/test/beta/prod.ts: Common properties per environment among all portals) | environments/: Build and export properties by merging local properties and common properties. 2023-10-10 17:42:40 +03:00
Konstantinos Triantafyllou 2a51657e58 Merge remote-tracking branch 'origin/develop' into angular-16 2023-10-10 17:20:24 +03:00
Konstantinos Triantafyllou a30ec46a89 Delete wrong imports 2023-10-10 17:20:03 +03:00
Konstantinos Triantafyllou 22366f5813 Merge remote-tracking branch 'origin/develop' into angular-16 2023-10-10 17:12:58 +03:00
Konstantinos Triantafyllou 196c186731 Merge branch 'angular-16' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16 2023-10-10 17:12:46 +03:00
Konstantinos Triantafyllou dce6e17ea1 Remove animtation from slider and fix active for nav items on resize. 2023-10-10 17:12:37 +03:00
Konstantinos Triantafyllou 3134ef32b3 Merge branch 'angular-16' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16 2023-10-10 14:55:44 +03:00
Konstantinos Triantafyllou c129165832 CommunityInfo: Add isOpen method. Email Composer: Add role in community dashboard invitation. 2023-10-10 12:25:03 +03:00
Konstantinos Triantafyllou 4686ebe5f4 Merge remote-tracking branch 'origin/develop' into angular-16 2023-10-09 17:05:02 +03:00
Konstantinos Triantafyllou 9f22bec5cf Merge remote-tracking branch 'origin/develop' into angular-16 2023-10-06 19:49:24 +03:00
Konstantinos Triantafyllou f4d7582764 Merge remote-tracking branch 'origin/develop' into angular-16 2023-10-06 19:48:06 +03:00
argirok 1a030e2a0d Merge branch 'develop' 2023-10-06 17:55:08 +03:00
argirok 5e4aaab04f Merge branch 'develop' into new-api 2023-10-06 16:38:01 +03:00
Konstantinos Triantafyllou 5a9237399e Fix slider in tablet 2023-10-06 14:49:04 +03:00
Konstantina Galouni 445441572d [Library & Explore | develop]: Added software heritage as pid for research products.
1. environments/: Added in all environments, property: swhURL: "https://archive.softwareheritage.org/".
2. env-properties.ts: Added property swhURL?: string;
3. string-utils.class.ts: Added method "isValidSwhId()" and swhid in checks and definitions.
4. resultLandingInfo.ts: Added swhid in accepted types of interface Id.
5. resultLanding.component.ts: Added check for swhid in "getReferenceIdName()" and "getReferenceUrl()".
6. parsingFunctions.class.ts: Added pid[i].classid == "swhid" check in "parseIdentifiers()".
7. showIdentifiers.component.ts: Added "swhid" in display of pids.
2023-10-06 12:22:00 +03:00
Konstantinos Triantafyllou cfdd7b2e55 Add slider-components in slider-utils 2023-10-05 16:59:41 +03:00
argirok 1c5a0b22a8 restrict links to user roles management to portal Admins 2023-10-05 14:31:37 +03:00
argirok 3a9a5df12e Merge branch 'new-api' of code-repo.d4science.org:MaDgIK/openaire-library into new-api 2023-10-04 16:05:55 +03:00
argirok 5e7d10b96b Community projects: add filtering and sorting 2023-10-04 16:04:42 +03:00
argirok d2248f4b84 fix return in SearchCommunityProjectsService 2023-10-02 15:11:35 +03:00
argirok 3cf65ef134 Merge branch 'develop' into new-api 2023-10-02 14:05:22 +03:00
Konstantina Galouni edf8ae835c [Library | develop] fos/fos.component.ts & landing-utilts/fos.component.ts & searchFields.ts: Restored checks for environment to use fos or foslabel field - foslabel not yet introduced in current prod index. 2023-10-02 13:13:22 +03:00
Alex Martzios af95b395bd search page: add view more option for partners, projects, match styling for authors as well 2023-10-02 12:18:29 +03:00
Konstantinos Triantafyllou 6d7f6eca72 Merge from origin/develop 2023-09-26 11:50:07 +03:00
Konstantinos Triantafyllou d10df32853 Result Preview: Fix space betwwen ngIf and class. 2023-09-26 11:38:09 +03:00
Konstantina Galouni 0d22ba8a3b [Library | develop]: searchSorting.component.ts: Do not add new sorting options in production yet. 2023-09-20 14:13:34 +03:00
Konstantina Galouni 966dedde45 [Library | develop]: searchSorting.component.ts: Added sorting options (generalOptions), "citation_count,descending", "popularity,descending", "influence,descending", "impulse,descending" | searchResearchResults.component.ts: Added the new sorting options in the checks. 2023-09-20 10:48:20 +03:00
Konstantina Galouni bc514b62d1 [Library | develop]: result-preview.component.ts: Added method "isNumber()" | resultLanding.component.html: [Bug fix] Updated view of bip indicators - format the numbers correctly. 2023-09-19 16:48:08 +03:00
Konstantina Galouni 46a8928a20 [Library | develop]: project.component.ts: [Bug fix] In method "getProjectInfo()", added this.projectInfo.id = this.projectId; - direct link action button was not working, id was missing. 2023-09-19 16:45:17 +03:00
Konstantina Galouni be187c3fed [Library | develop]: citation.class.ts: Updated bibtex to include case for type="software" - add @software instead of @misc. 2023-09-19 16:40:56 +03:00
Konstantina Galouni adae1f0749 [Library | develop]: searchProjects.service.ts: Added more checks if startdate and enddate properties exist in the response | entity-metadata.component.ts: Added "From" or "Until" before startYear and endYear respectively when only one of them exists in data. 2023-09-19 16:38:16 +03:00
argirok 82348a8a3b update manage projects page to use paging and search through new communities API 2023-09-19 15:59:37 +03:00
argirok 6958a8ef9b fix parameter for grant openaire access to Orcid 2023-09-18 12:23:33 +03:00
Konstantinos Triantafyllou a2f52cf40e Merge remote-tracking branch 'origin/develop' into angular-16 2023-09-15 15:18:49 +03:00
argirok fa2b14e9b4 fix status checks to avoid show list of errors when the job is still processing 2023-09-13 10:00:13 +03:00
Konstantinos Triantafyllou 11d0be4ffd Theme preview: Add inputs as fragment. Delete material icons from icons services 2023-09-12 18:41:22 +03:00
Konstantina Galouni 9b2524c1c7 Merge remote-tracking branch 'origin/develop' 2023-09-11 18:18:09 +03:00
Konstantina Galouni f679385725 [Library | develop]: transferData.component.ts: Keep data transfer modal open after transfer action, to show status of the transfer. 2023-09-11 18:08:34 +03:00
Konstantinos Triantafyllou 821c4242be Icon component: Add icon input in order to support Icon configuration. Extend Icon with type and preserveColor (optional). Add material-icons.ts with material icons metadata (icons per category). 2023-09-07 19:13:59 +03:00
argirok 741a70fa1c register the icons book, cog, database, earth in ResultLandingUtilsModule 2023-09-07 14:57:07 +03:00
argirok 6cd2e583c5 Merge branch 'develop' into new-claims-api 2023-09-07 11:37:50 +03:00
Konstantina Galouni 1a960061b6 [Library | develop]: landing-utils/fos.component.ts & fos/fos.component.ts: Removed environment check and always use foslabel parameter for search. 2023-09-06 14:55:29 +03:00
Konstantina Galouni 7709352f68 [Library | develop]: [Bug fix] searchDataproviders.service.ts: Added check if "datasourcetype" field exists in record. 2023-09-06 14:38:28 +03:00
Konstantinos Triantafyllou 31f42cfc71 Merge remote-tracking branch 'origin/develop' 2023-09-05 13:24:11 +03:00
Konstantina Galouni 35d287511b Merge remote-tracking branch 'origin/develop' into develop 2023-09-04 15:45:29 +03:00
Konstantina Galouni e6bdbb2c81 [Library | develop]: searchFields.ts: In RESULT_REFINE_FIELDS, query "foslabel" (instead of fos) field in all environments. 2023-09-04 15:45:06 +03:00
Konstantinos Triantafyllou 7650857186 Convert div - uk-toggle to a - uk-toggle for new Uikit. 2023-09-04 15:15:26 +03:00
Konstantina Galouni bad855089c [Library | develop]: resultLanding.component.html: Added check for message of non eosc results - do not show it in production environment until we get approval. 2023-09-04 14:46:25 +03:00
Konstantina Galouni fc2c58e3b9 [Library | develop]: fos.component.ts: [Bug fix] when on eosc explore, link of fos subjects to search page is external. 2023-09-04 14:38:51 +03:00
Konstantina Galouni 37208d82b6 [Library | develop]: transferData.component.ts: Set "overwrite": false & in method "validatePath()", removed regex and check only if path starts with / | transferData.component.html: Updated checks for path validation | resultLanding.component.ts: Added field public belongsInEOSC: boolean = false; and initialize it | resultLanding.component.html: Added message above title "This {{getTypeName() | lowercase}} is not part of the European Open Science Cloud" when in EOSC portal, but result has no EOSC context. 2023-09-04 12:48:17 +03:00
Konstantinos Triantafyllou 2102dfb0d7 Merge branch 'angular-16' of code-repo.d4science.org:MaDgIK/openaire-library into angular-16 2023-08-30 16:45:05 +03:00
Konstantinos Triantafyllou 6470331207 Merge remote-tracking branch 'origin/develop' into angular-16 2023-08-30 16:44:39 +03:00
Konstantinos Triantafyllou c292215ada Merge pull request 'Connect Admin release 30th August 2023' (#8) from develop into master
Reviewed-on: #8
2023-08-30 12:47:45 +02:00
Konstantinos Triantafyllou f2a2c52d43 Add default parameter in close canvas 2023-08-30 12:28:02 +03:00
Konstantinos Triantafyllou 1be082c2f3 Add hasStickyHeaderOnMobile in layoutService 2023-08-30 11:11:23 +03:00
Konstantinos Triantafyllou 55a995a348 Input: Date add calendar in mobile dropdown 2023-08-29 10:53:51 +03:00
Konstantina Galouni 1b989441db [Library | develop]: resultLanding.component.html & project.component.html & organization.component.html & dataProvider.component.html: In main action bar for mobile (landing-action-bar-mobile), replaced uk-background-default with uk-tile-default uk-blur-background. 2023-08-25 15:56:53 +03:00
Konstantina Galouni 2e33c470e9 [Library | develop]: [Bug fix] landing-utils/fos.component.ts & fos/fos.component.ts & fos/fos.component.html: Added methods "buildFosQueryParam()" and "buildFosHrefParam()" to build and set in fos links, search param "fos" for production and "foslabel" for beta or dev environments. 2023-08-24 18:31:04 +03:00
Konstantina Galouni 13d0430109 [Library | develop]: alert.ts & full-screen-modal.component.ts: Updated (h6 from h4 or h5) header font size and ratio of icons (make them smaller) - in angular 16 branch, paddings have also changed. 2023-08-24 18:20:49 +03:00
Konstantinos Triantafyllou 40ef950715 Merge remote-tracking branch 'origin/develop' into angular-16 2023-08-23 16:52:36 +03:00
Konstantinos Triantafyllou c658f6b63f Fix dropdown-filter where the mobile dropdown opens in Desktop too. 2023-08-23 16:52:21 +03:00
Konstantinos Triantafyllou 7906b056c9 Fix drops and dropdowns in avalableOn, result-preview and showAuthors 2023-08-23 16:42:52 +03:00
Konstantinos Triantafyllou befbfd071b Add xsmall padding in graph_elements instread of margins because of uikit upgrade 2023-08-23 11:43:07 +03:00
Konstantinos Triantafyllou c0d4fd8ae7 Fix uk-sticky parameters in terminology and search 2023-08-23 10:40:05 +03:00
Konstantinos Triantafyllou d9a8283630 Update to Uikit 3.16.24 2023-08-22 17:08:46 +03:00
Konstantina Galouni 587297a1c8 [Library & common-assets | develop]: Minor updates in mobile screens in icons/ paddings in landing pages.
1. resultLanding.component.html & project.component.html & dataProvider.component.html & organization.component.html: In mobile (small) screens, change ratio of icons in bottom action bar from 2 to 1.4.
2. showIdentifiers.component.ts: In mobile (small) screens, added in fs-modal classTitle="uk-tile-default uk-border-bottom".
3. landing.less: Added variable @landing-action-bar-mobile-border: @global-border; to use it in border-top of landing-action-bar-mobile > div | Changed padding of landing-action-bar-mobile > div to 8px in top and bottom.
2023-08-21 13:59:20 +03:00
Konstantinos Triantafyllou f34a501046 Merge remote-tracking branch 'origin/develop' into angular-16 2023-08-21 11:13:57 +03:00
argirok 36a2f54193 comment out test orcid works 2023-08-09 11:53:31 +03:00
argirok 038adf352a change the way my orcid links are shown. Group together multiple results from the index, add update button to each one of them 2023-08-09 11:52:30 +03:00
Konstantinos Triantafyllou 758f2f10ff Import transferState from angular/core 2023-08-04 14:45:41 +03:00
argirok f160aaa000 replace session.isLoggedIn() method 2023-08-03 13:02:59 +03:00
argirok 5c345d8ff7 show status also for direct index records job
on reload keep job ids and continue show progres until they finish
change get auth options method
2023-08-03 12:45:39 +03:00
Konstantinos Triantafyllou e7429881ca Delete a > in advanced form 2023-08-02 14:08:04 +03:00
Konstantinos Triantafyllou 51e3980179 Update angular to version 16 2023-08-01 14:29:27 +03:00
argirok 116ead698b Linking: check the claim field for its community before add it in the list of the communities that can be claimed. Allow all for connect and claim curators 2023-08-01 12:25:46 +03:00
Konstantinos Triantafyllou 3b6822c71f Update material to version 15 2023-08-01 11:40:55 +03:00
Konstantina Galouni a53c4e90d0 [Library | develop]: resultLanding.component.ts: Added ContextsService and call to get public communities, and then filter out contexts (related to communities) of resultLandingInfo if they are hidden. 2023-07-28 16:04:14 +03:00
argirok 8310eddd92 update check in portal search results 2023-07-28 13:15:46 +03:00
argirok 21c70d6d62 updated claims api: submit job and get status 2023-07-28 12:15:54 +03:00
argirok 4e3df67f7e Loading modal component: click on background not close the modal, fix mobile version conflicting with ng-content 2023-07-28 11:16:30 +03:00
Konstantina Galouni 682444a25b [Library | develop]: #8909 Added FAIRsharing in DEPOSIT about OpenAIRE compliant repositories. 2023-07-27 15:33:28 +03:00
Konstantina Galouni 6b2864ad02 [Library | develop]: entity-actions.component.ts & transferData.component.html & orcid-work.component.ts & resultLanding.component.html & project.component.html & organization.component.html & dataProvider.component.html: Added "tooltips/messages" under the landing actions in mobile-small screens. 2023-07-27 15:28:40 +03:00
Konstantinos Triantafyllou 0a56d1fae6 Remove mobile-dropdown when navigation start from container. 2023-07-27 10:38:41 +03:00
Konstantinos Triantafyllou 056faac88f Add mobile-dropown in dropdown-filter. Fix input autocomplete in mobile. Fix icon alignment in fundedBy. Add scroll to top in fs-modal and on change tab in landing mobile bar. 2023-07-26 11:49:50 +03:00
Konstantinos Triantafyllou 0a79d2a17e MetricsService provided in root 2023-07-25 19:14:57 +03:00
Konstantinos Triantafyllou 86ba54c7d0 Fix mobile-dropdown open-close. Fix input in mobile. Add mobile-dropdown in availableOn, fundedBy, showAuthors. 2023-07-25 19:09:09 +03:00
Konstantina Galouni 6ecde003af [Library | develop]: [Bug fix from previous commit] string-utils.class.ts: Closing brackets correctly in getPIDFromIdentifiers method. 2023-07-25 13:31:26 +03:00
Konstantina Galouni 52fc9ce22a [Library | develop]: helper.class.ts: Added return false in method "isCurator()" as fallback | stakeholder.ts: Added return "" in methods "getFilter()", "getResultFilter()", "getProjectFilter()", "getOrganizationFilter()", "getCountryFilter()" as fallback | string-utils.class.ts: Added return null in method "getPIDFromIdentifiers()" as fallback. 2023-07-25 13:24:24 +03:00
Konstantina Galouni 27f644aad1 [Aggregator | develop]: In search bars, set in placeholder the portal name according to the configuration name.
1. home.component: Get portalName by config.portalAsObservable>name and set placeholder to "Search "+portalName.
2. portal.ts: Added parameter "name: string" in method "getMockCommunityInfo()" and set communityInfo.name = name;
3. aggregators.ts: In method "getCommunityInfoByMenuId()", added "name" parameter in Portal.getMockCommunityInfo() | Updated titles in PortalAggregators>AggregatorInfo.
2023-07-24 19:56:51 +03:00
Konstantina Galouni 901855daa9 [Library | develop]: In search bars, set in placeholder the portal name according to the configuration name.
1. home.component & navigationBar.component: Get portalName by config.portalAsObservable>name and set placeholder to "Search "+portalName.
2. searchAll.component.ts: Set default value of "formPlaceholderText" to "Search".
3. advancedSearchForm.component.html: Set placeholder of input (when there is also the <entities-selection>) to [placeholder]="formPlaceholderText".
2023-07-24 16:25:20 +03:00
Konstantinos Triantafyllou 914e2a22bb Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-07-21 16:33:37 +03:00
Konstantinos Triantafyllou 8c2cb847e9 Advanced Search: Don't clear value on field changed if the field type is keyword 2023-07-21 16:33:29 +03:00
Konstantina Galouni b18cfcf533 [Library | develop]: resultLanding.component.html & resultLanding.component.ts & transferData.component.html & transferData.component.ts: In desktop view, reverted data transfer modal to normal instead of full screen & small fixes for action icon and modal view | aligned "Go to search" back button with the rest of the page contents. 2023-07-20 17:06:46 +03:00
Alex Martzios 73d6a9f32f landing mobile: view all modal for FoS & SDGs. update how they appear 2023-07-20 11:50:10 +03:00
Konstantinos Triantafyllou d6cc4d4e42 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-07-19 19:52:05 +03:00
Konstantinos Triantafyllou f7d8490e43 Stakeholder: Add projectUpdateDate. Input: Add date type. 2023-07-19 19:51:54 +03:00
Konstantina Galouni a7e32a2a65 [Library | develop]: searchDataproviders.service.ts: In method "getDataproviderType()", add check for datasourcetype field. 2023-07-19 17:38:19 +03:00
argirok ff49c02a52 add fields claim and membership 2023-07-19 14:25:23 +03:00
Konstantinos Triantafyllou f9dcdd81cc Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-07-19 14:09:43 +03:00
Konstantinos Triantafyllou 584f1d22f8 Slider tabs: Fix initialization. 2023-07-19 14:09:10 +03:00
argirok c8c5e2d925 use methods isPublic, isRestricted, isPrivate instead of using the previous checks and add validateStatus method 2023-07-19 12:57:28 +03:00
Alex Martzios 39876e4ce6 landing & search: match top row info between the 2 as much as possible 2023-07-19 12:20:49 +03:00
Konstantinos Triantafyllou 2b7c5da3d7 Input: Add * for required fields with type array. Scroll to top in open of a modal. 2023-07-18 15:27:02 +03:00
argirok 7354d0ad55 update status field values with PUBLIC, RESTRICTED, PRIVATE
add methods isPublic, isRestricted, isPrivate instead of using the previous checks
2023-07-18 14:26:12 +03:00
Konstantinos Triantafyllou 9855f5c179 Slider-tabs: Add template in slider-tab instead of title. Change tabs in search-all with slider-tabs. 2023-07-18 13:20:04 +03:00
Konstantinos Triantafyllou 4700cc82c8 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-07-17 12:40:40 +03:00
Konstantinos Triantafyllou 3e12962add Fix intersaction Observer in fos-selections. 2023-07-17 12:40:30 +03:00
Konstantinos Triantafyllou 55a0454330 Input: Fix errors when searchInput doesn't exists. 2023-07-14 18:27:16 +03:00
argirok 1355f2cdb5 remove get communities services - available in community profile
update search in projects size and fix count query
2023-07-14 13:57:31 +03:00
argirok 3ee4129c7e apply initial changes to library bases on new community API 2023-07-14 11:40:38 +03:00
Konstantinos Triantafyllou 5645deec97 Change portal client-management to developers 2023-07-13 18:39:26 +03:00
Konstantinos Triantafyllou 2f98910712 Mock portal: Enable services. 2023-07-13 14:18:17 +03:00
Konstantinos Triantafyllou 8b57fae585 Add static configuration in configuration service 2023-07-13 13:44:19 +03:00
Konstantinos Triantafyllou 46b3e937bf Configuration service: init null if doesn't exist. 2023-07-13 12:21:35 +03:00
Konstantinos Triantafyllou 2312c5356b Remove a --> from search form. 2023-07-13 11:47:55 +03:00
Konstantinos Triantafyllou 78f87e61bb Merge remote-tracking branch 'origin/develop' into dynamic-piwik 2023-07-13 10:41:00 +03:00
Konstantina Galouni 870ce71897 [Library & common-assets | develop]: [WIP] dataProvider.component.html & project.component.html & resultLanding.component.html: Removed "uk-card uk-card-secondary" classes from metrics box and commented badge icon | metrics-badge.svg: Changed badge color to white (used to be orange - Explore specific) | landing.less: Updated class ".landing-metrics-card" to use background-blend-mode: color-dodge for svgs in landing metrics box. 2023-07-12 17:22:45 +03:00
Konstantinos Triantafyllou 5d6fa99a73 Piwik service: Change map to switchMap in order to return the observable. 2023-07-12 16:24:23 +03:00
Konstantinos Triantafyllou 37b7423e7f Simplify piwik logic: All work is done in piwik.service. 2023-07-12 15:05:25 +03:00
Konstantinos Triantafyllou 50422c0ab3 Merge remote-tracking branch 'origin/develop' into dynamic-piwik 2023-07-12 13:56:18 +03:00
Konstantinos Triantafyllou 1785da3c45 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-07-11 16:03:14 +03:00
Konstantinos Triantafyllou 9760ebab2e Create mobile-dropdown component and use it in Inputs. Change height to min-height in full-screen-modal and in cite-this. 2023-07-11 16:03:08 +03:00
Konstantina Galouni 5f980c01bb [Aggregator | develop]: search.component.ts: Added in <search-all> input [openAccess]="false" | searchAll.component.ts: Added @Input() openAccess: boolean = true; and add "resultbestaccessright" parameter in queries if this is true | home.module.ts: Imported SearchInputModule | home.component: In search bar, remove 2 steps, go to search all page and add advanced search link. 2023-07-11 15:11:37 +03:00
Alex Martzios ae68622fb6 landing & search: add label for authors row 2023-07-11 12:59:43 +03:00
Konstantina Galouni 110c854523 [Monitor Dashboard & Library | develop]: search.module.ts: Set in landing routes data: {hasMenuSearchBar: true} to show search bar in menu. | navigationBar.component.ts: If properties.searchLinkToAll is undefined, navigate to properties.searchLinkToAll from menu search bar. 2023-07-07 10:53:10 +03:00
Konstantinos Triantafyllou 3aee0bcca2 Contact us: Change class of inputs to flat 2023-07-06 20:01:27 +03:00
Konstantinos Triantafyllou 87e75bca00 Navigation Bar: Remove link and routes from parent items in mobile-menu. Add search-input in mobile menu. 2023-07-06 16:57:40 +03:00
Konstantinos Triantafyllou 2c7e3794c5 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-07-06 16:29:25 +03:00
Konstantinos Triantafyllou 201792b0e3 Landing tabs: Add border-left and radius-left, reduce gutter between sections and align section content with Tab name. 2023-07-06 16:29:17 +03:00
Konstantina Galouni 8b14aaf325 [Monitor & Library | develop]: [Bug fix] Refactor code for showing help button or not.
1. quick-contact.service.ts: Initialize display to true (assume it is not intersecting, otherwise in pages without this section, it can't be initialized correctly).
2. home.component.ts: Removed field "showQuickContact" | In constructor set quickContactService.setDisplay(false) | Refactor intersectionObserver.
3. app-routing.module.ts: In "contact-us" route, set data: {hasQuickContact: false}.
4. app.component.ts: Updated checks for <quick-contact> | Added public showQuickContact: boolean; to be initialized by layoutService.hasQuickContact.
2023-07-06 15:28:53 +03:00
Konstantinos Triantafyllou 76cb586ebd Add foslabel in searchFiles only for beta, dev. Change eoscifguidelines to refine. Input fix double icon in select with many values. 2023-07-06 12:53:37 +03:00
Konstantina Galouni ea1b054b63 Merge pull request 'Merging explore-redesign branch into develop for Explore July release' (#7) from explore-redesign into develop
Reviewed-on: #7
2023-07-05 11:11:52 +02:00
Konstantina Galouni 13b7f90707 Forgot to add in previous commit composer.ts file - bug fix in imports 2023-07-05 11:41:42 +03:00
Konstantina Galouni a6dee41979 Merging 'develop' branch into explore-redesign. 2023-07-05 11:40:43 +03:00
Konstantina Galouni 8029aafb36 [Library & common-assets | explore-redesign]: addThis.component.ts: Replaced addthis external library with addtoany - addthis is no longer supported | general.less: css for addtoany social icons (classes .fully_rounded .a2a_svg). 2023-07-04 19:12:34 +03:00
Konstantina Galouni 2fa4c9e810 [Library | explore-redesign]: dataProvider.service.ts & dataProvider.component.ts: Added method "getCollectedFulltexts()" in service and component to get and parse number of collected fulltexts from a new stats api - commented/ API is still in dev. 2023-07-04 19:10:15 +03:00
Konstantinos Triantafyllou 4bec610237 Resource Service: Add target for links in resources. 2023-07-04 14:20:50 +03:00
Konstantinos Triantafyllou e9a62e1f61 Add ResizeObserver disconnect in terminology page. 2023-07-04 12:02:54 +03:00
Konstantinos Triantafyllou aa10b35f7a Fix ResizeObserver condition in landings and fs-modal 2023-07-04 11:53:08 +03:00
Konstantinos Triantafyllou 0b79af31e0 Merge branch 'explore-redesign' of code-repo.d4science.org:MaDgIK/openaire-library into explore-redesign 2023-07-04 11:08:47 +03:00
Konstantinos Triantafyllou 18b5ce2201 Fix bodyHeight in full screen modal. 2023-07-04 11:08:39 +03:00
Alex Martzios 7e5317e920 redesign linking results (cards) to match the new style, fix a css selector for SDG page 2023-07-04 10:16:08 +03:00
Konstantinos Triantafyllou e82bbf7968 Merge from develop 2023-06-30 14:58:10 +03:00
Konstantinos Triantafyllou aabd28d1f1 Fix disabled color for labels 2023-06-30 14:54:25 +03:00
Konstantinos Triantafyllou 94957fff61 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-06-30 14:40:06 +03:00
Konstantinos Triantafyllou 715069eabc Remove logs from reload. Add url variable in order to handle error from guards with the connect path. 2023-06-30 14:39:48 +03:00
Konstantinos Triantafyllou c1b1d2e4ec Merge remote-tracking branch 'origin/develop' into stats-profile 2023-06-29 13:27:59 +03:00
Konstantinos Triantafyllou e3d26f138d Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-06-29 10:20:39 +03:00
Konstantinos Triantafyllou 4b845dd0bd Customization: Fix checkForObsoleteVersion to return null for connect. 2023-06-29 10:20:29 +03:00
Konstantinos Triantafyllou 5dfdbdc164 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-06-28 15:27:15 +03:00
Konstantinos Triantafyllou 1ec8477053 FOS: Change OpenAIRE Research Graph to OpenAIRE Graph. 2023-06-28 14:39:31 +03:00
Konstantinos Triantafyllou 21fde9cbac Merge remote-tracking branch 'origin/develop' into stats-profile 2023-06-28 11:18:23 +03:00
Konstantinos Triantafyllou 2ef5d069dd Merge remote-tracking branch 'origin/master' into develop 2023-06-27 13:04:23 +03:00
Konstantinos Triantafyllou d80820fb52 Update wrong URL for helpdesk in footer 2023-06-27 13:04:08 +03:00
Konstantinos Triantafyllou 8d8eda416b Update New Manager message base on #8687 2023-06-27 12:08:58 +03:00
Konstantinos Triantafyllou 23a47cc5da Merge develop into stats-profile 2023-06-26 15:25:47 +03:00
Konstantinos Triantafyllou 0face4b57f Fix an undefined error in searchInput of Input component. Add multi emails in invitation of manager and members and optimize subscriber invite. 2023-06-26 15:09:37 +03:00
Konstantinos Triantafyllou 7d2eb68914 Add refreshToken and accessToken in userInfo. Add property for clientManagementAPI. Create jsonValidator 2023-06-26 11:31:22 +03:00
Konstantinos Triantafyllou 690226b031 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-06-23 15:57:10 +03:00
Konstantinos Triantafyllou 56428d0dae Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-06-23 15:25:24 +03:00
Konstantinos Triantafyllou 633716b832 Add progress circle as example in theme component 2023-06-23 15:25:17 +03:00
Konstantina Galouni 558357b03e [Library | develop]: full-screen-modal.component.ts: [Bug fix] Removed uk-invisible class from ok and cancel buttons section (wrong check and buttons never appeared) & Added uk-disabled class in back link. 2023-06-22 16:48:10 +03:00
argirok db55273b68 Merge remote-tracking branch 'origin/develop' into develop 2023-06-19 11:24:39 +03:00
argirok 38bc33251f update checks for fontsDarkMode 2023-06-19 11:04:26 +03:00
Konstantina Galouni 58b45d9595 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-06-19 11:03:15 +03:00
Konstantina Galouni 1307b4d290 [Library | develop]: transferData.component: Removed "demo" label from data transfer. 2023-06-19 11:02:23 +03:00
Konstantinos Triantafyllou 074fd93ea0 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-06-16 10:03:07 +03:00
Konstantinos Triantafyllou 8a22f2a8ad Add sources of number indicators in timeout_whitelist in order to avoid timeout error in these requests. 2023-06-14 15:10:49 +03:00
Konstantina Galouni c2db5e77ee Merge pull request 'data-transfer-v2' (#6) from data-transfer-v2 into develop
Reviewed-on: #6
2023-06-13 16:20:04 +02:00
Konstantina Galouni a0b4ccff23 Merge remote-tracking branch 'origin/develop' into data-transfer-v2 2023-06-13 16:12:56 +03:00
Konstantina Galouni 806cec4043 Library | data-transfer-v2: transferData.component: Added checkbox in the form of accepting the data protection policy 2023-06-13 16:10:06 +03:00
Konstantinos Triantafyllou b6ead8d7e2 Merge remote-tracking branch 'origin/develop' into dynamic-piwik 2023-06-09 21:02:12 +03:00
Konstantinos Triantafyllou f81f6d051e Merge remote-tracking branch 'origin/develop' into stats-profile 2023-06-09 20:52:40 +03:00
Konstantinos Triantafyllou aa54090c5a Add locale in number pipes and stakeholder. 2023-06-09 20:52:10 +03:00
argirok b234b8616b Customization Options: add a variable for hero-fonts-mode 2023-06-09 13:55:31 +03:00
argirok 300002ac56 Merge remote-tracking branch 'origin/develop' into develop 2023-06-09 12:48:20 +03:00
argirok 2679d51581 Customization add fontsDarkMode attribute for hero section 2023-06-09 12:47:39 +03:00
Konstantinos Triantafyllou a37662cd7e Merge remote-tracking branch 'origin/develop' into dynamic-piwik 2023-06-08 11:31:27 +03:00
argirok c09db5ae42 portal-search-result: use HTML to string pipe to show the description 2023-06-08 11:23:40 +03:00
argirok e7f087c09d remove color for connect portal results 2023-06-08 11:05:48 +03:00
Alex Martzios 1d31c7b234 landing pages: add check if landingInfo is initialized 2023-06-08 10:55:12 +03:00
Konstantinos Triantafyllou e6d4be5454 Add client-management-portal in Dasbboard values of properties. 2023-06-07 17:34:53 +03:00
Konstantina Galouni 9852bdeebf Merge remote-tracking branch 'origin/develop' into data-transfer-v2 2023-06-07 14:52:05 +03:00
Konstantinos Triantafyllou 0f265f435b Add emal composer for cache indicators report. Move parse userinfo from user-management service to helper. 2023-06-07 14:22:14 +03:00
Alex Martzios 8f492223d0 search page - results: add mobile actions, display authors and pids (but not in "other versions" section 2023-06-07 11:09:43 +03:00
Konstantina Galouni 17c2b03c9e [Library | develop]: resultLanding.component.html: Added tooltip on links of Compatible EOSC Services. 2023-06-06 12:23:42 +03:00
Konstantina Galouni d11a409f09 [Library | develop & Eosc Explore | develop]: metrics.component.ts & metrics.module.ts & metrics.service.ts: [Bug fix] Keep id, not url in parsing and build url of data source in component to use route instead of href | CHANGELOG.md: Updated format of contents & Added changes before production release v.2.0.2. | package.json: Updated version from 2.0.1 to 2.0.2. 2023-06-01 17:13:49 +03:00
Konstantina Galouni 46b9543ae7 Added LICENSE.txt file 2023-06-01 15:28:24 +02:00
Konstantinos Triantafyllou 4e91d169e0 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-05-29 15:25:23 +03:00
Konstantinos Triantafyllou bb8f196abb Disable local get calls in server because of network error and return empty element as a response. Fix bug in sdg with async calls. 2023-05-27 22:48:13 +03:00
Konstantinos Triantafyllou 63cf1b09da Change base-background to global-backround. Add method to convert rgba to rgb in order to avoid different colors when elements stacks. 2023-05-27 22:46:07 +03:00
Konstantina Galouni ddcdd79204 Merge remote-tracking branch 'origin/develop' 2023-05-26 15:39:13 +03:00
Konstantina Galouni 3ee89e2bca [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
Konstantina Galouni d24576a5c7 [Library | develop & Eosc Explore | develop]: Added in eoscSubjects, "EOSC::Data Cube" | Updated eosc url params in landing for back "Go to Search" link - "return_path" and "search_params" (instead of pv).
1. parsingFunctions.class.ts: Added in eoscSubjects, subject "EOSC::Data Cube" (linked with Adam plarform).
2. result-preview.component.ts & fundedBy.component.ts & availableOn.component.ts & relatedDatasourcesTab.component.ts: Updated method "addEoscPrevInParams()" to add 2 parameters: "return_path" and "search_params" (instead of pv).
3. resultLanding.component.ts:
   a. Updated how this.prevPath is initialized (parse url params "return_path" and "search_params" instead of "pv").
   b. Added method "getEoscParams()" to return eosc params as a string (to be used in href).
   c. Updated method "addEoscPrevInParams()" to add 2 parameters: "return_path" and "search_params" (instead of pv).
4. project.component.ts & dataProvider.component.ts:
   a. Updated how this.prevPath is initialized (parse url params "return_path" and "search_params" instead of "pv").
   b. Updated method "addEoscPrevInParams()" to add 2 parameters: "return_path" and "search_params" (instead of pv).
5. organization.component.ts: Updated how this.prevPath is initialized (parse url params "return_path" and "search_params" instead of "pv").
6. metrics.component.ts: Added method "getEoscParams()" to return eosc params as a string (to be used in href).
2023-05-25 18:10:58 +03:00
Konstantinos Triantafyllou d4103354aa Merge pull request 'Connect release 25th May 2023' (#5) from develop into master
Reviewed-on: #5
2023-05-25 16:10:42 +02:00
Konstantinos Triantafyllou 39a7ed58be Properties: add hasMachineCache in order to use cookie or not. 2023-05-25 16:37:12 +03:00
Konstantinos Triantafyllou 95a3cc3ff6 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-05-25 10:02:13 +03:00
Konstantinos Triantafyllou 956d1f2c3f Navbar: Logo add small class if logoInfo exists. 2023-05-25 10:02:05 +03:00
Konstantinos Triantafyllou e6974dfd0f Disable cookie in server for connect production. 2023-05-24 14:31:08 +03:00
Konstantinos Triantafyllou 2b83920bc4 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-05-24 12:36:30 +03:00
Konstantinos Triantafyllou b14f76c2b0 Entities selection: Initialize entities array to empty before add entities. 2023-05-24 12:36:22 +03:00
Konstantina Galouni 412ed213fe [Library | explore-redesign]: Bug fixes in what is executed when tabs of search all are clicked - formPlaceholderText and simpleKeywordChanged().
1. searchAll.component.ts: [Bug fix] From previous commit - Set formPlaceholderText outside if condition.
2. advancedSearchForm.component.ts: [Bug fix] In method "simpleKeywordChanged()", do not check for selectedEntity when !this.entitiesSelection (selectedEntity is changed only when exists <entities-selection>.
2023-05-19 19:09:37 +03:00
Konstantina Galouni a296f091bb [Library | explore-redesign]: Bug fix in sticky tabs of search all | Updated formPlaceholderText of search form in search all - different for each entity | Search form not sticky in advanced search page.
1. searchAll.component.ts:
   a. [Bug fix] Subscribe to layoutService.isMobile and calculate there the "offset" (for sticky tabs).
   b. Updated "formPlaceholderText" - different for each entity.
2. newSearchPage.component.html: Added check, so that search form is not sticky in advanced search pages.
2023-05-19 17:49:38 +03:00
Konstantina Galouni 9856805621 [Library | explore-redesign]: Fixes in usage counts iframes, bip iframe, orcid buttons in search results, filters button in small screens and fos/sdgs vocabulary calls.
1. dataProvider.component.html & project.component.html & resultLanding.component.html: [Bug fix] Updated checks for usage counts iframes and changed the order they appear (first views, then downloads).
2. dataProvider.component.ts & project.component.ts:
   a. [Bug fix] Added fields public hasViews: boolean = false; and public hasDownloads: boolean = false; - used in checks for displaying usage counts iframes.
   b. [Bug fix] Updated parsing of dataProviderInfo.measure.counts when querying external usage counts api.
3. resultLanding.component.ts:
   a. [Bug fix] Added fields public hasViews: boolean = false; and public hasDownloads: boolean = false; - used in checks for displaying usage counts iframes.
   b. [Bug fix] In bipFrameUrl, when environment == "beta", add "&src=beta" parameter.
4. orcid-work.component.ts:
   a. [Bug fix] Updated disabled class checks, to enable orcid buttons in search too when there are identifiers.
   b. When loading - action is in progress, show loading icon next to the label.
   c. In my orcid links page: renamed "Add to ORCID" to "Claim" and "Delete from ORCID" to "Remove".
5. newSearchPage.component.html: [Bug fix] Updated checks for "filters" floating button in mobile/ small screens.
6. Added method "detectChanges()" to be called by html.
7. navigationBar.component.html: Updated placeholder of search-input to align with the generic search form (Home page).
8. ISVocabularies.service.ts: [Bug fix] In methods getFos() and getSDGs(), removed check and call to cache - these files are always local.
2023-05-19 14:37:23 +03:00
Alex Martzios 6a009aa76e organization landing: fix for when there are no other versions, the grid divider appeared 2023-05-19 11:32:02 +03:00
Konstantinos Triantafyllou ab47a86892 Merge pull request 'Monitor release 16th May 2023' (#4) from develop into master
Reviewed-on: #4
2023-05-16 16:24:10 +02:00
Konstantina Galouni ab43152a6a [Library | data-transfer-v2]: For data transfer, open full screen modal instead of alert modal | Support transfer of hierarchical files | Show description in storage types.
1. full-screen-modal.component.ts: Added cancelButton: boolean = true; and show cancel button, only if cancelButton is true and okButton is false.
2. transferData.module.ts: Imported FullScreenModalModule.
3. transferData.component.html: Replaced <modal-alert> with <fs-modal> and updated the interface accordingly | In inputs, set [inputClass]="'flat'".
4. transferData.component.ts:
   a. Configure FullScreenModal, instread of AlertModal.
   b. In destinationOptions, set label to dest.description (used to be dest.destination).
   c. In transfer, in destinations, use also element.path, to keep the initial structure/ hierarchy when transfering files.
2023-05-16 16:36:43 +03:00
Konstantina Galouni 2d0f29d040 [Library | explore-redesign]: Hide numbers of entity tabs on mobile screens | Bug fix in search filters.
1. searchFilter.component.ts: [Bug fix] In method "filterKeywords()", set hasMatch and call detectChanges(), only if !hasMatch.
2. searchAll.component.html: Hide numbers of entity tabs on mobile screens.
2023-05-16 14:29:31 +03:00
Konstantinos Triantafyllou 2ca9f0bdd4 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-05-16 13:17:56 +03:00
Konstantina Galouni bda90f2c38 [Library | explore-redesign]: Bug fixes in range filter, advanced search link of search all page, search results "cards" in mobile screens.
1. rangeFilter.component: [Bug fix] Removed from method get disabled() check of isDisabled and added this check for class "disabled" in action/button (error on enter, because isDisabled was already true before triggering the action of yearChanged).
2. search-input.component.ts: [Bug fix] Added check for client side in ngAfterViewInit(), before calling "getComputedStyle".
3. searchAll.component:
   a. Set "advancedSearchLink" properly and pass it to each search entity page in "simpleSearchLink" parameter.
   b. In <advanced-search-form>, pass parameters [entityType]="activeEntity" and [advancedSearchLink]="advancedSearchLink" [advancedSearchLinkParameters]="parameters".
4. advancedSearchForm.component.html: Removed check this.entityType == this.selectedEntity from advanced search link.
5. searchFilter.component.ts: In filterKeywords() method, added cdr.detectChanges().
6. searchResult.component.html: [Bug fix] Reverted [isMobile] parameter to <result-preview" (removed by mistake in a previous merge).
2023-05-16 12:28:35 +03:00
Konstantinos Triantafyllou 53d3afefd1 Merge remote-tracking branch 'origin/develop' into explore-redesign 2023-05-16 11:12:28 +03:00
Konstantinos Triantafyllou 99492a2f08 Input: Fix arrow left-right on inputs with type != chips. Fix dirty status of from and to controls for year-range type. 2023-05-16 11:12:14 +03:00
Konstantina Galouni 98cae9dcb8 [Library & Explore | explore-redesign]: Renamed "OpenAIRE Research Graph" to "OpenAIRE Graph" | Fixed duplicate queries in search all | Updated paper in FoS page | Improvements in sticky tabs (search all & landing).
1. Deleted assers/explore-assets/home/graph.svg - Replaced by assets/common-assets/common/graph-nodes.svg.
2. home.component.html:
   a. Updated graph image.
   b. Added in <div search-input>: [searchInputClass]="'inner background'".
   c. Renamed "OpenAIRE Research Graph" to "OpenAIRE Graph".
3. claimResultSearchForm.component.html & searchDataprovidersToDeposit.component.ts: Added in <div search-input>: [searchInputClass]="'inner background'".
4. searchAll.component.html:
   a. Updated margins/paddings for sticky tabs.
   b. Renamed "OpenAIRE Research Graph" to "OpenAIRE Graph".
5. searchAll.component.ts:
   a. [Bug fix] In method ngOnInit(), moved loadAll() call inside check - avoid duplicate calls to search for each tab with count query.
   b. Renamed "OpenAIRE Research Graph" to "OpenAIRE Graph".
6. fos.component.html:
   a. Updated paper of SciNoBo - replaced the old one with the newest.
   b. Renamed "OpenAIRE Research Graph" to "OpenAIRE Graph".
7. fos.component.ts: Renamed "OpenAIRE Research Graph" to "OpenAIRE Graph".
8. resultLanding.component.html & project.component.html & organization.component.html & dataProvider.component.html: [Improvement] Updated check and class for <landing-header> when sticky - make it invisible, when not sticky - solved flickering and change of content position.
9. showTitle.component.ts: Added @Input() isSticky: boolean = false; and when sticky, show only 1 line of the title (class lines-1).
10. landing-header.component.ts: Show only title when sticky and pass isSticky to <showTitle>.
2023-05-15 17:28:33 +03:00
Konstantinos Triantafyllou 7cf23698d7 Rename OpenAIRE Research Graph into OpenAIRE Graph and add the new logo in powered by sections. 2023-05-15 16:47:25 +03:00
Alex Martzios 402e61324a roject & datasource landing: if the API call does not include usagecount measures, use old metrics service call 2023-05-15 13:09:45 +03:00
Konstantina Galouni e07891e4fa [Library | explore-redesign]: Moved <quick-selections> to the left as filter and re-arranged the order of the filters.
1. searchFields.ts:
   a. Added in HIDDEN_FIELDS, "instancetypename" (refine filter for research products).
   b. In DEPENDENT_FIELDS, set ["instancetypename"]: "type"
2. quick-selections.component.ts: Added again (as in the past), @Input() vertical: boolean=false and show types using <search-filter> if vertical is true.
3. searchAll.component.html: Changed medium top and bottom margins to uk-margin-top uk-margin-bottom.
4. newSearchPage.component.ts:
   a. In method "getFields()", check for HIDDEN_FIELDS, also dependencies to resultTypes.
   b. Added method "getFilterById()".
5. newSearchPage.component.html:
   a. Moved <quick-selections> to the left as filter (removed "include" line).
   b. Added <ng-template #search_filter> and re-arranged the order of the filters
2023-05-12 18:52:13 +03:00
Konstantinos Triantafyllou 5e4477c946 Range-filter: Add background modifier in input 2023-05-12 18:06:10 +03:00
Konstantinos Triantafyllou bfd1bc3f0b Merge branch 'explore-redesign' of code-repo.d4science.org:MaDgIK/openaire-library into explore-redesign 2023-05-12 17:25:20 +03:00
Konstantinos Triantafyllou 416a15e3d0 Add background modifier in search-input in order to add background in search-icon. 2023-05-12 17:25:14 +03:00
Konstantinos Triantafyllou 123f355344 Input: Extend enter - before unfocus. Range-Filder: Add on enter method, in order to change year range on search. 2023-05-12 17:24:27 +03:00
Alex Martzios 29723188bc resultLanding: in versions modal, expand authors instead of opening them in a new modal 2023-05-12 15:55:22 +03:00
Alex Martzios 53d8440171 fix bug in landing: when navigating from result to result, if they all have "Related Research" tab and selection input, options of the selection are not re-initialized 2023-05-12 14:00:34 +03:00
Konstantina Galouni 10178c5adb [Library | explore-redesign]: linkingGeneric.component: For direct linking, updated back button - trigger browser's back, not landing, since we can reach this page via search results too. 2023-05-11 22:46:28 +03:00
Konstantina Galouni aef1a25a82 [Library & openaire-theme & Explore | explore-redesign]: Added search form in menu (navbar) in landing pages.
1. search.less: Added css for modifier .small-vertical for .input-wrapper of <search-input>.
2. layout.service.ts: Added hasMenuSearchBarSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false), parsing and getter/setter methods.
3. navigationBar.module.ts: Imported SearchInputModule.
4. navigationBar.component.ts:
   a. Added searchMode: boolean = false; and hasSearchBar: boolean = false; (and other helpful fields)
   b. Subscribe to queryParams to hide search bar and reset keyword | Subscribe to layoutService.hasMenuSearchBar to check if search should be included in navbar or not.
   c. Added methods "openSearch()" to show the search form and "goTo()" to trigger the search action and navigate to the search page.
5. navigationBar.component.html: Added <div search-input> and search-icon button to show search bar | Added checks if searchMode is enabled (search form visible) or not.
6. app-routing.module.ts: In routes for landing pages added in data: hasMenuSearchBar: true.
2023-05-11 17:17:16 +03:00
Konstantinos Triantafyllou 73f2215c07 Modal: Fix UIkit undefined in server 2023-05-11 13:04:09 +03:00
Alex Martzios cf42f3a122 search page: make tabs (entities) sticky on scroll 2023-05-11 12:42:28 +03:00
Alex Martzios aca0de0fc1 search page: delete 'active' param 2023-05-11 10:56:45 +03:00
Alex Martzios a9e8a5c25a change regex for redirecting old paths to the new ones 2023-05-10 16:35:20 +03:00
Alex Martzios 619dd3c9fa search page: remove all various search pages and keep only 'search all' - TODO: redirect old ?active=<entity> to the new path 2023-05-10 15:10:00 +03:00
Konstantinos Triantafyllou 389179540d Merge remote-tracking branch 'origin/develop' into explore-redesign 2023-05-10 11:54:09 +03:00
Konstantinos Triantafyllou 6be478cacc Add max-length=4 and text-center in inputs of year-range 2023-05-10 11:53:49 +03:00
Konstantinos Triantafyllou 1af14e068d Change range-filter with new year-range input and add messages in the validators. 2023-05-10 11:51:59 +03:00
Konstantina Galouni 128c03c671 Merged develop branch into explore-redesign 2023-05-09 19:04:06 +03:00
Konstantinos Triantafyllou 7e699ae8e7 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-05-09 15:38:46 +03:00
Konstantinos Triantafyllou 49f9bec70d Add year range in types of input component 2023-05-09 15:38:37 +03:00
Konstantinos Triantafyllou ba89dc1ce2 Merge remote-tracking branch 'origin/develop' 2023-05-09 13:07:40 +03:00
Konstantina Galouni d6ec928237 [Monitor & Library | develop]: [Bug fix] Show quick contact button when not in contacts us and not intersecting either with contact us section (home page), nor with bottom.
1. layout.service.ts: Initialize hasQuickContactSubject to false (Don't ever show it unless it should be there).
2. quick-contact.service.ts: Initialize display to false (Assume it is intersecting, until it is proved it is not).
3. app.component.ts: Updated checks for <quick-contact> and added public bottomNotIntersecting: boolean; and public displayQuickContact: boolean;
2023-05-08 17:50:39 +03:00
Konstantina Galouni ef742be1b2 [Library | explore-redesign]: Added/ updated how filters appear in mobile screens | Updated search forms.
1. general.less: Added fixed position for .filters-toggle-button.
2. newSearchPage.component.html: Added floating button for filters in mobile screens.
3. advancedSearchForm.component.html: Re-introduced commented out <entities-selection> inside <advanced-search-input> | Removed iconPosition and commented button for filters inside search form.
4. home.module.ts: Imported SearchInputModule.
5. home.component.html: Replaced <advanced-search-input> with <div search-input>
6. searchDataProviders.component.ts: Set entitiesSelection to false for <new-search-page>
7. newSearchPage.component.ts & searchAll.component.html: Set entitiesSelection to false for <advanced-search-form>
2023-05-08 17:10:51 +03:00
Konstantina Galouni 2963589359 [Library | explore-redesign]: availableOn.component.ts & resultLanding.component & result-preview.component: [Bug fix] Added method "getAccessLabel()" to create label from accessRight. 2023-05-08 16:41:42 +03:00
Konstantina Galouni e8d57386f3 [Library | explore-redesign]: Updated icon for "not available" access of sources on research products.
1. icons.ts: Added custom icon "unknown_access", when access is not available (locker with questionmark inside).
2. parsingFunctions.class.ts: Set "accessRightIcon" of each source to "unknown_access" icon, when access is not available.
3. resultLandingUtils.module.ts: Added "unknown_access" icon in iconsService.registerIcons.
4. resultLanding.component.html: Mobile view: Updated tooltip of access - added "access" word in the end.
5. availableOn.component.ts: Updated tooltip of access - added "access" word in the end.
6. result-preview.component.html: In mobile view, show access on the top right, next to the title.
7. searchResearchResults.service.ts: [Bug fix] Call parsingFunctions.addPublisherToHostedBy_collectedFrom after parsing journal, publisher and identifiers.
2023-05-08 10:53:38 +03:00
Konstantina Galouni e4ca050d80 [Library | explore-redesign]: showAuthors.component.ts: Added class "uk-text-italic" when displaying authors (not in modal) to make them more obvious among other info of the result. 2023-05-08 10:32:45 +03:00
Konstantinos Triantafyllou 2d01e7f945 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-05-05 17:07:11 +03:00
Konstantinos Triantafyllou d96ee9acc8 Fix width of tabs in terminology page. 2023-05-05 17:05:41 +03:00
Alex Martzios 87c91e23fb project & dataProvider landing: use ngFor loop on the measure.counts arrays to display the correct measures 2023-05-04 15:15:47 +03:00
Alex Martzios b500fcb957 resultLanding: use common structure for metrics (measure) 2023-05-04 11:58:11 +03:00
Konstantinos Triantafyllou c321390ccb Fix bug in sidebar toggle item | Page content: Add timeout on initialization of header. 2023-05-03 16:29:59 +03:00
Konstantinos Triantafyllou 3b45f2ccb5 Merge branch 'develop' into stats-profile 2023-05-02 18:08:58 +03:00
Konstantinos Triantafyllou bd87a47795 Fix bug with UIKit sticky on page-content if header is changing width. 2023-05-02 18:08:48 +03:00
Konstantinos Triantafyllou 52efae94e7 Delete console log 2023-05-02 14:24:08 +03:00
Alex Martzios 8a8a7e4152 fix an error for results without FoS 2023-05-02 12:47:49 +03:00
Alex Martzios 84bd4b24b8 search page: advanced-search > remove number of rules applied in search bar and moved them above the results 2023-05-02 12:11:25 +03:00
Alex Martzios beb43ed1b7 project & data landing/search page: get usage counts from index (measure field) 2023-05-02 12:00:40 +03:00
Konstantinos Triantafyllou e168143375 Merge remote-tracking branch 'origin/develop' into stats-profile 2023-04-27 16:28:48 +03:00
Konstantinos Triantafyllou 2ec6d4cdba Merge branch 'master' of code-repo.d4science.org:MaDgIK/openaire-library 2023-04-27 15:40:14 +03:00
Konstantinos Triantafyllou 5e68f1fc5c Merge branch 'develop' 2023-04-27 15:25:19 +03:00
Konstantinos Triantafyllou b83d299eb8 Merge branch 'develop' 2023-04-27 11:45:48 +03:00
Konstantina Galouni 3be6013644 [Library | develop & Eosc Explore | develop]: index.html: Updated favicon for beta | transferData.component.ts: Added check for client side before opening Data Transfer modal. 2023-04-26 15:54:43 +03:00
Konstantinos Triantafyllou 49e2edfe84 Change piwik service methods in order to get the piwik from portal configuration 2023-04-26 14:10:45 +03:00
Alex Martzios 2d8be41146 search page: group time filters (e.g projects -> startdate, enddate, activewithin) 2023-04-26 12:28:37 +03:00
Konstantina Galouni 058d30f4c1 [Connect Admin | develop]: community.service.ts: Renamed "advancedConstraint" to "advancedConstraints" (coming from community API). 2023-04-26 11:45:54 +03:00
Konstantinos Triantafyllou d9d69031c8 Delete Stats Profile. Fix input autocoplete reset value on search. 2023-04-25 15:20:33 +03:00
Alex Martzios d69b0d0bb5 resultLanding: remove numbers from FoS
FoS page: remove numbers from 3rd level only
2023-04-25 13:02:33 +03:00
Konstantinos Triantafyllou f00607f8d3 Merge branch 'develop' into stats-profile 2023-04-24 12:45:31 +03:00
Konstantina Galouni c547dfa945 [Library | develop]: resultLanding.component.ts & project.component.ts & organization.component.ts & dataProvider.component.ts: [Bug fix] Removed atob method call from get method "eoscBackLink()" - pv param is not expected to be base64 encoded but url encoded. 2023-04-21 19:56:19 +03:00
Konstantina Galouni 09df423c6a [Library | develop]: resultLanding.component.ts: [Bug fix] & missing on url update with pid. 2023-04-21 19:34:41 +03:00
Konstantina Galouni 8f3d865c91 [Library | develop & Eosc Explore | develop]: availableOn.component.ts: Renamed "Providers" to "Data sources" | package.json: Updated version to 2.0.1 (previous 2.0.0) & updated uikit version to 3.12.2 (previous 3.12.0) | CHANGELOG.md: Updated changes for 2.0.1 version. 2023-04-21 18:54:26 +03:00
Alex Martzios 7ef9869629 search page: cite this > parse missing information (to match landing page) 2023-04-21 13:37:19 +03:00
Konstantinos Triantafyllou aa86ee0fe3 Add entity-actions in all landing pages 2023-04-21 12:49:14 +03:00
Alex Martzios dd6f18db52 search page: simplify search bar - remove 2 steps 2023-04-21 11:04:43 +03:00
Konstantina Galouni 055434ab36 [Library | develop & Eosc Explore | develop]: resultLanding.component.ts & project.component.ts & organization.component.ts & dataProvider.component.ts: [Bug fix] In method "eoscBackLink()" added a dot (.) after beta | environment.beta.ts: Added "eoscDataTransferAPI" and "eoscDataTransferDestinations" properties. 2023-04-20 20:48:12 +03:00
Konstantina Galouni f22a0bc806 [Library | develop & Eosc Explore | develop]: Added font-family "Inter" to align with Marketplace | Updated how back button "Go to search" is build - combine referrer and the new url parameter "pv", which is expected to have the previous url path and params.
1. /assets: Added /media/fonts/inter folder with the "Inter" font-family.
2. eosc-custom.less: Override the default font family to use 'Inter', sans-serif.
3. routerHelper.class.ts: Added method "addQueryParam()" to add a query parameter in already existing or not object with parameters.
4. search-tab.component.ts & searchResult.component & projects-in-modal.component.ts & result/deletedByInference/deletedByInference.component.ts & organization/deletedByInference/deletedByInference.component.ts: Added @Input() prevPath: string = ""; and pass it to the appropriate children components.
5. result-preview.component & fundedBy.component.ts & availableOn.component.ts & relatedDatasourcesTab.component.ts: Added @Input() prevPath: string = ""; and method "addEoscPrevInParams()" and call it when building queryParams of internal links.
6. metrics.component.ts: Added @Input() prevPath: string = ""; and use it when building internal urls.
7. resultLanding.component.ts & project.component.ts & organization.component.ts & dataProvider.component.ts:
   a. Added fields public referrer: string; and public prevPath: string;
   b. Read "pv" url property and get referrer.
   c. Added methods "addEoscPrevInParams()" and "eoscBackLink()".
8. resultLanding.component.html & project.component.html & organization.component.html & dataProvider.component.html:
   a. Update "Go to Search" back link.
   b. Call "addEoscPrevInParams()" method when building queryParams of internal links.
   c. Pass "prevPath" to the appropriate children components.
2023-04-20 20:06:53 +03:00
Konstantinos Triantafyllou 65415d0146 Remove text transform from chips in input 2023-04-20 14:53:40 +03:00
Konstantinos Triantafyllou 1d5bfc498c Merge pull request 'Merge from Develop for Monitor production release' (#3) from develop into master
Reviewed-on: #3
2023-04-19 15:04:35 +02:00
Konstantinos Triantafyllou a49970aca6 Add number percentage pipe. Add format field in indicatorPath 2023-04-18 15:26:41 +03:00
Konstantinos Triantafyllou e88bb206dc Add statsProfile field in stakeholder 2023-04-12 17:59:04 +03:00
Konstantinos Triantafyllou 6a2ac8cc4e Add stats profile entity class. Add stats profiles in admin tabs 2023-04-11 01:28:53 +03:00
Alex Martzios 51d50cf331 landing page: fix the check when there is nothing to show in the right column 2023-04-10 14:06:37 +03:00
Alex Martzios f641624b32 search page: show the search term in the title, above results 2023-04-10 11:51:18 +03:00
Alex Martzios d6edc17fee add subjects as a new tab in resultLanding 2023-04-06 12:46:50 +03:00
Konstantina Galouni e1b5f4a46d Library | explore-redesign: Merging develop branch into explore-redesign 2023-04-06 12:06:12 +03:00
Konstantinos Triantafyllou f49149c99e Add descriptionOverlay in indicator class 2023-04-06 11:31:22 +03:00
Konstantinos Triantafyllou 6dafcb391a Fix bug in slider-tabs with max-width in vertical tabs 2023-04-05 12:16:40 +03:00
Konstantinos Triantafyllou 9025836af4 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-04-04 16:49:13 +03:00
Konstantinos Triantafyllou 4c328efa3a Merge branch 'monitor-production' into develop 2023-04-04 16:48:46 +03:00
Konstantinos Triantafyllou 133fdfbff2 Fix number pipe round in order to avoid round in numbers < 1000. Extend pipe to accept number in string format instead of number. 2023-04-04 16:48:05 +03:00
Konstantinos Triantafyllou 7ecb56ec98 Add getFos and getSDGs in vocabulary service and use it in the related components. 2023-04-03 12:53:40 +03:00
Konstantinos Triantafyllou 9446b64efd Sidebar: Toggle active item if sidebar items have been changed. 2023-04-03 12:15:49 +03:00
Konstantinos Triantafyllou 3fd2616445 Merge remote-tracking branch 'origin/develop' into develop 2023-04-03 11:52:33 +03:00
Alex Martzios 5bfc4d8f22 fix z-index problem with tooltip in metrics box, add message for no match in filter-search, removed access mode 'not available' question-mark icon from search page and landing 2023-03-31 13:28:35 +03:00
Konstantinos Triantafyllou e72be29308 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-03-29 15:44:10 +03:00
Konstantinos Triantafyllou 7e21eb5ee9 Help contents: Fix buttons padding from grid and update form data from ckeditor on source change. 2023-03-29 15:43:56 +03:00
Konstantina Galouni 8789a0e5ee [Library | develop]: resultLanding.component.html & project.component.html & organization.component.html & dataProvider.component.html: Use new Graph badge to acknowledge OpenAIRE Graph & update message for feedback | newSearchPage.component.html: Use new Graph badge to acknowledge OpenAIRE Graph. 2023-03-28 19:27:02 +03:00
Alex Martzios 6679e6bac0 restrict result title in 3 rows for search page and 5 rows for landing page (included tooltip for landing) 2023-03-28 11:37:44 +03:00
Konstantinos Triantafyllou f1f824674d Fix Server Error: Check if ResizeOserver exists 2023-03-28 08:57:18 +03:00
Alex Martzios a356a08d67 create new tooltips for metrics in metrics cards and tabs - landing pages 2023-03-27 16:32:41 +03:00
Konstantinos Triantafyllou c275d96e19 Merge branch 'connect-admin-production' into develop 2023-03-27 15:56:58 +03:00
Konstantinos Triantafyllou 18f95b7e13 Update URL validator regex in order to allow www2. 2023-03-27 15:56:42 +03:00
Konstantinos Triantafyllou 461e4ac4ed Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-03-27 14:59:33 +03:00
Konstantinos Triantafyllou acc9338ec0 Remove header from pages, entities, menus etc. Add custom class in items of user-mini. Slider-tabs: Emit active in dynamic type. 2023-03-27 14:59:17 +03:00
Konstantina Galouni 55d1eb8a59 [Library | develop]: resultLanding.component.html: Updated Graph and Feedback (Powered by...) row in landing pages - used Graph badge (common-assets/openaire-badge-1.png). 2023-03-27 14:29:45 +03:00
Alex Martzios 932aaff111 changes for tooltips between landing and search pages, set a maximum height for 'download-from' dropdown, fix in fos-selection component 2023-03-27 13:03:07 +03:00
Konstantinos Triantafyllou dde8e27f65 User-mini: Fix expression error 2023-03-27 10:42:34 +03:00
Konstantinos Triantafyllou fcff7ce540 Notification Sidebar: Change height of notification list in order to match in diff screens 2023-03-25 17:00:00 +02:00
Konstantinos Triantafyllou a9f31d8307 1. Add notifications in user-mini in mobile 2023-03-24 17:13:33 +02:00
Konstantinos Triantafyllou 31d52de0e8 Merge branch 'monitor-production' into develop 2023-03-23 09:18:34 +02:00
Konstantinos Triantafyllou 4fa36bdd43 Fix server error in alert.ts where UIkit event handler is defined. 2023-03-23 09:18:19 +02:00
Konstantinos Triantafyllou 3af2efb0d9 Merge branch 'monitor-production' into develop 2023-03-22 19:32:46 +02:00
Konstantinos Triantafyllou 2b4835bd0d User component: Update user-info in init. 2023-03-22 19:27:50 +02:00
Konstantinos Triantafyllou d2543181e7 1. Input: Change default class to flat. 2. Monify icon in sidebar-mobile-toggle. 3. Align mobile sidebar items base on main menu. 2023-03-22 17:54:54 +02:00
Konstantinos Triantafyllou 259182b7c4 1. Slider: Hide arrows in mobile. 2. Change offcanvar in navbar mobile menu to have close on the left. 2023-03-22 17:14:11 +02:00
Konstantinos Triantafyllou 5bcc25fe84 Merge changes from monitor-production 2023-03-21 14:05:21 +02:00
Konstantinos Triantafyllou ed19051fc0 1. Fix a bug with get stakeholder promise. 2. Fix a bug with infinity loop in user-info page. 3. Fix a bug with verify member error modal open on success. 2023-03-21 14:02:59 +02:00
Konstantinos Triantafyllou 8d3a83821b Modal: Add uikit close event, in order to catch click outside close events. 2023-03-21 14:00:47 +02:00
Konstantinos Triantafyllou 1e35eb5d6f 1. Add cache in get managers and members methods. 2. Add delete Authorization level with values curator and manager in role users for managers. Authorization level for mebers are always manager. 3. Clear cache when managers and members list has been updated. 2023-03-21 08:29:12 +02:00
Konstantinos Triantafyllou a4dbbffe20 Portals: Add piwik as a column. Add pid in search 2023-03-21 08:19:16 +02:00
Konstantina Galouni 217a3969db Merge remote-tracking branch 'origin/develop' into data-transfer-v2 2023-03-16 20:56:54 +02:00
Konstantina Galouni aa5425d091 [Library | data-transfer-v2]: transferData.component.html: Updated labels - removed verbs & updated some checks based on new 'requests' field | transferData.component.ts: Get protocol from API for each storage & [Bug fix] in path validation & enhanced status values & updated how status request works - request max 10 times, expose always the status and after succeeding, failing or exceeding 10 requests, stop. 2023-03-16 20:55:12 +02:00
Konstantina Galouni 4c19e65edb [Library | develop & EOSC Explore | master]: resultLanding.component & project.component & organization.component & dataProvider.component: Added top bar to go "back" to eosc search | Added asset top-bar.svg | eosc-custom.less: Updated colors and added ".eosc-explore-back-search-bar". 2023-03-16 17:53:28 +02:00
Konstantina Galouni 2ccde6fba4 [Library | explore-redesign]: result-preview.component.html: [Bug fix] Added [relationName]="relationName" [provenanceAction]="provenanceAction" in <entity-metadata> to expose these info in Related Research in Result landing pages. 2023-03-16 13:57:33 +02:00
Konstantina Galouni 71b5964f2c [Library | data-transfer-v]: transferData.component: Updated input labels, added uk-grid-small for the two columns, destination url changed to destination system and protocol (https:// or s3://) is applied programmatically. 2023-03-15 10:53:19 +02:00
Alex Martzios e0a8127353 change fos+sdg selection arrays into FormArrays (to detect changes on connect admin - subjects) 2023-03-13 21:23:00 +02:00
Konstantinos Triantafyllou cdd59b68ab Claims: Fix color of icon in cards. Input: Add noWrap for chips in order to show them in a row. Add extendEnter Input in order to extend enter event. 2023-03-10 17:13:33 +02:00
Konstantina Galouni 3e8dce7947 Merge branch 'develop' into data-transfer-v2 2023-03-10 16:45:13 +02:00
Konstantina Galouni bb6707cc0d [Library | data-transfer-v2]: transferData.component.ts: Added class field "s3UrlRegex" and updated s3 regex to accept any url starting from s3://, https://, http://, www. 2023-03-10 14:54:15 +02:00
Alex Martzios efc2d6c47b add changes for sdg-selection component 2023-03-09 16:29:25 +02:00
Konstantinos Triantafyllou f6084fbcd4 Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop 2023-03-09 16:07:46 +02:00
Konstantinos Triantafyllou 978d9f0269 Add updateSubjects and advanced criteria in community service. Add margin-top in actions of users and subscribers. 2023-03-09 16:07:39 +02:00
Konstantina Galouni e02ac38b7c Merge remote-tracking branch 'origin/develop' into data-transfer-v2 2023-03-09 11:13:42 +02:00
Konstantina Galouni b25c6dd2f7 [Library | develop & EOSC Explore | master]: Redirect to eosc search for any page except landing | If property adminToolsPortalType is eosc, open search links to OpenAIRE Explore in a new tab.
1. home.component.html: Commented everything.
2. home.component.ts: Commented everything and added redirect to EOSC search.
3. app.component.ts: Commented <navbar>.
4. app-routing.module.ts: Removed unused routes | For any route other than landing, redirect to home page.
5. index.html: Removed BETA badge | Updated title from "Search OpenAIRE" to "Search EOSC".
6. errorPage.component.ts & relatedDatasourcesTab.component.ts & showAuthors.component.ts & search-tab.component.ts: If property adminToolsPortalType is eosc, open search page in OpenAIRE Explore in a new tab.
7. fos.component.ts & sdg.component.ts: If property adminToolsPortalType is eosc, open search page in OpenAIRE Explore in a new tab | If property adminToolsPortalType is eosc, do not show "feedback/suggest" link.
8. open-aire-jsonld-converter.service.ts: If property adminToolsPortalType is eosc, do not add fos and sdgs as doc.isPartOf.
2023-03-09 10:54:03 +02:00
Konstantina Galouni 029db9f52e [Library | data-transfer-v2]: transferData.component.ts: Scroll to message not only if transfer status was successful. 2023-03-07 15:43:49 +02:00
Konstantina Galouni cde97c09b9 [Library | data-transfer-v2]: transferData.component: Updated destination url check - for s3, protocol starts with s3://, not https://. 2023-03-07 13:17:36 +02:00
Konstantina Galouni c4e7e6adca Merge pull request 'Input: Update the form validators when the input is changed' (#2) from develop into data-transfer-v2
Reviewed-on: #2
2023-03-07 12:00:42 +01:00
Konstantinos Triantafyllou 1d2a0effa8 Input: Show static placeholder in case of autocomplete. Update validators of form control when input validators is changed 2023-03-07 12:26:26 +02:00
Konstantinos Triantafyllou 4a03065dbd Input component: Delete depracated inputs, add visibleChips limit, add separators for chips and style note with italic 2023-03-06 13:18:16 +02:00
Konstantina Galouni 10e843c177 Merge branch 'data-transfer-v2' of code-repo.d4science.org:MaDgIK/openaire-library into data-transfer-v2 2023-03-03 15:12:43 +02:00
Konstantina Galouni ed856076d4 [Library | data-transfer-v2]: transferData.component.ts: Check we are on client side to open the modal | [Bug fix] In error message. 2023-03-03 15:12:26 +02:00
Konstantina Galouni 5bd595401d Merge pull request 'develop' (#1) from develop into data-transfer-v2
Reviewed-on: #1
2023-03-03 13:17:39 +01:00
Konstantinos Triantafyllou 31bf756092 Delete fos and sdgs deprecated folders 2023-03-02 16:22:18 +02:00
Konstantinos Triantafyllou 88157b943e Merge branch 'master' into explore-redesign 2023-03-02 16:21:14 +02:00
Konstantinos Triantafyllou 799a62afc5 Add Fos and sdgs selections in master 2023-03-02 16:20:56 +02:00
Konstantinos Triantafyllou 00081e2d1b Merge branch 'explore-redesign' of code-repo.d4science.org:MaDgIK/openaire-library into explore-redesign 2023-03-02 16:18:39 +02:00
Konstantinos Triantafyllou 187c22eb9d Rename fos and sds selections to deprecated 2023-03-02 16:17:00 +02:00
Alex Martzios 8096c20e2d fix for displaying countries in results landings, fix for journal init in dataProviders landing, redesign mobile view for dataProviders landing 2023-03-01 16:49:42 +02:00
Konstantinos Triantafyllou 886b50a52c Change special menu item to back Item and move it in the top of sidebar 2023-03-01 15:20:00 +02:00
Konstantina Galouni 2edeb788e3 [Library | explore-redesign]: Fixes in direct linking - back button link | Added back button link to the landing page for projects.
1. linkingGeneric.component.html: [Bug fix] Updated checks for back to result landing page button link | Added back to project landing page button link.
2. directLinking.component.ts: In "createClaimEntity()" method, set value of entity.project.url.
3. ClaimEntityTitle.component.ts: Added "uk-flex" class to middle align icon to the name.
4. claimHelper.class.ts: Commented a console.log.
2023-03-01 11:59:48 +02:00
Alex Martzios 67714f6ac4 redesign project landing for mobile view, add embed tooltip for entity-actions component and project landing, minor fix for resultLanding metrics tab 2023-02-23 13:09:42 +02:00
Konstantina Galouni 44825c5985 [Library | explore-redesign]: In small screens (mobile) open full screen modal when viewing all authors or all identifiers.
1. showAuthors.module.ts: Imported FullScreenModalModule.
2. showAuthors.component.ts & showIdentifiers.component.ts: Added @Input() isMobile: boolean = false; | Added <fs-modal> for view all authors, to trigger it when isMobile.
3. landing-header.component.ts: Added @Input() isMobile: boolean = false; | Pass input param isMobile to <showAuthors>.
4. resultLanding.component.html: Pass input param isMobile to <showSubjects>, <showIdentifiers>, <landing-header>.
2023-02-22 23:13:46 +02:00
Konstantinos Triantafyllou 3b9d585da1 Fix pageing and downloads alignemnt in mobile 2023-02-22 16:43:51 +02:00
Konstantinos Triantafyllou fb55c9483d Remove width class from link to tooltip, added by mistake in entity-actions 2023-02-22 14:55:19 +02:00
Konstantinos Triantafyllou 63b466fdaf 1. Fix uk-drop in available on. 2. Entity metadata: Add bullet with css in order to avoid empty content. 3. Add Deposit and embed in actions of entity-actions. 2023-02-22 14:43:31 +02:00
Konstantina Galouni f0f1874039 [Library | explore-redesign]: resultLanding.component.html: Small fixes on how impact and usage metrics (inside tab) appear in mobile | dataProvider.component.ts: Updated checks in hasMetrics() - do not show metrics until we get the response for views and downloads. 2023-02-22 02:23:10 +02:00
Konstantina Galouni 4aa350ff2b [Library | explore-redesign]: Mobile redesign for organization landing complete and functional.
1. loadingModal.module.ts: Imported LoadingModule.
2. loading.component.ts:
   a. [Bug fix] loading icon (spinner) was not visible.
   b. Added inputs title: string, @Input() isMobile: boolean = false, @Input() classTitle: string = "uk-background-primary uk-light".
   c. Added html for small screens (mobile) when isMobile.
3. search-tab.component.ts: Added @Input() public isMobile: boolean = false and [class.uk-flex-column]="isMobile" to not show title and view all link in the same row when isMobile.
4. organization.module.ts: Imported FullScreenModalModule.
5. organization.component.ts & organization.component.html: Mobile redesign complete and functional.
2023-02-22 00:09:12 +02:00
Alex Martzios be1a0ac7fa update tooltips for metrics and action-bar items 2023-02-21 19:13:15 +02:00
Konstantina Galouni 44e521cc8e [Library | explore-redesign]: Mobile redesign minor fixes for actions icons.
1. availableOn.component.ts: Make "arrow_right" and access right icons bigger in for mobile.
2. resultLanding.component.html: Set same ratio in all actions icons.
3. orcid-work.component.ts: Add margin small (not xsmall) when isMobile and landing.
2023-02-21 17:07:23 +02:00
Konstantina Galouni f9ff62f188 [Library | explore-redesign]: Mobile redesign for the 3 buttons at the bottom (main info, metrics, actions) and their contents.
1. availableOn.component.ts: Mobile redesign - open in full screen modal instead of drop | icons updated.
2. fos.component.ts: In mobile show {{title}} instead of hardcoded title.
3. resultLandingUtils.module.ts: Imported FullScreenModalModule.
4. deletedByInference.component.ts: Removed class "uk-list-divider" for <result-preview> - after redesign each result has its own bottom border.
5. orcid.module.ts: Imported FullScreenModalModule.
6. orcid-work.component.ts: Mobile redesign - Added full screen modals propagationFsModal and grantFsModal.
7. resultLanding.component.ts: Added citeFsModal, addThisFsModal, alertModalDeletedByInferenceFS and property public mobileContent: "info" | "metrics" | "actions" = "info".
8. resultLanding.component.html: Mobile redesign for the 3 buttons at the bottom (main info, metrics, actions).
2023-02-21 16:10:21 +02:00
Konstantinos Triantafyllou 256f8162e6 Full screen modal: Change title and icons size on mobile 2023-02-21 15:14:25 +02:00
Alex Martzios 3b962dc0e5 create mobile view structure for organization landing, add @media rules for project and dataProvider landing, change size of result title 2023-02-21 15:06:28 +02:00
Konstantina Galouni 2806515d31 Merge remote-tracking branch 'origin/explore-redesign' into explore-redesign 2023-02-21 03:01:47 +02:00
Konstantina Galouni 3a18403a0e [Library | explore-redesign]: fundedBy.component.ts & relatedTo.component.ts: In view more/less links added class "uk-link-text". 2023-02-21 03:01:21 +02:00
Konstantina Galouni d970153d41 Merge branch 'explore-redesign' of code-repo.d4science.org:MaDgIK/openaire-library into explore-redesign 2023-02-21 02:49:19 +02:00
Konstantina Galouni 6a34caf096 Merge branch 'explore-redesign' of code-repo.d4science.org:MaDgIK/openaire-library into explore-redesign 2023-02-21 02:48:19 +02:00
Konstantinos Triantafyllou fc9e77b887 [Library | explore-redesign]: Fixes on FoS and SDGs suggest modal (checked existing subjects, added loading) - In FoS fixed scrolling, search and final response of selected fields.
1. composer.ts & resultLanding.component.ts: Removed "and Technology" from "Fields of Science" typename.
2. resultLanding.component.html: Bind (suggestClicked) to <fos> instead of (feedbackClicked).
3. input.component.ts: [Bug fix] Added check in "filter()" method if option.label.
4. sdg-selection.component.ts: [Bug fix] Set this.loading = false; inside subscribe.
5. fos.component.ts: In title, updated FOS to FoS.
6. sdg-fos-suggest.module.ts: Imported LoadingModule.
7. sdg-fos-suggest.component.ts: Show loading when sending email | Do not initialize <sdg-selection> and <fos-selection> before subjects have value (this way inputs of existing fos/sdgs are checked).
8. fos-selection.component.ts:
   a. Added @Input() inModal: boolean = false; to set activeSection, when inModal, instead of navigating with fragment.
   b. [Bug fix] Set this.loading = false; inside subscribe.
   c. Call this.setObserver(); both in ngOnInit and when keyword changes.
   d. Updated threshold of observer from 0.25 to 0.1 (large FoS categories were never triggered on scrolling, because less than 25% of their content was visible).
   e. Updated fosOptions to Map<string, boolean> to track easily checked inputs and updated getSelectedSubjects() accordingly.
9. fos-selection.component.html: In search-input of keyword no options are needed | Updated ngModel of checkbox inputs.
10. cache-interceptor.service.ts: Added check if (!properties.useLongCache) to skip cache.
2023-02-21 02:47:23 +02:00
Konstantinos Triantafyllou 9a258d8197 Reduce number of projects, organizations and subjects shown in entity-metadata to 3. 2023-02-20 20:54:26 +02:00
Alex Martzios f17b25d66f create tooltips for all landing page metrics card (BIP and UsageCounts) 2023-02-20 19:29:21 +02:00
Konstantinos Triantafyllou 3d296f3234 Add organizations in entity-metadata 2023-02-20 18:17:30 +02:00
Konstantina Galouni 6947890c20 [Library | explore-redesign]: Result landing redesign for small screens (mobile) - main info & tabs of main info.
1. fos.component.ts & sdg.component.ts: Added Beta badge and "View all" link.
2. fundedBy.component.ts: Added @Input isMobile and relative checks in html | Updated how projects appear in mobile | Added ng-template for #funder and #dropInfo.
3. relatedTo.component.ts: Added @Input isMobile and relative checks in html | Added uk-margin-small-bottom between communities in mobile.
4. showSubjects.component.ts:
   a. Added @Input isMobile and relative checks in html.
   b. Added @Input() viewAllSubjects: boolean = false, @Input() viewAllClassifiedSubjects: boolean = false, @Output() viewAllClicked  = new EventEmitter(); and methods "viewAllSubjectsClicked()", "viewAllSubjectsByVocabularyClicked()" to show subjects properly in mobile.
5. full-screen-modal.component.ts: Added method "backClicked()" and field public stayOpenInBack: boolean = false.
6. resultLanding.module.ts: Imported FullScreenModalModule.
7. resultLanding.component.ts & resultLanding.component.html: Redesign for small screens (mobile) for main info and its tabs (Summary, References, etc..).
2023-02-20 17:56:02 +02:00
Konstantinos Triantafyllou 9715de74d2 Create entity-actions and add all result actions in it. Add filters-toggle in advanced search for mobile. Add funders and subjects in entity-metadata. Change authors view less 2023-02-20 16:59:07 +02:00
Alex Martzios 23bfc3af3d changes for sdg/fos selection and suggest components 2023-02-20 16:34:12 +02:00
Konstantina Galouni 10ea930d8a [Library | explore-redesign]: availableOn.component.ts: [Bug fix] Added check if availableOn.length > 0. 2023-02-18 10:53:40 +02:00
Konstantina Galouni 1ca647f56e [Explore & Library | explore-redesign]: Updated component for suggest SDGs or FoS.
1. alert.ts: Added previous button option.
2. composer.ts: Set feedback values in body | Make method "composeEmailForSdgsSuggestion()" generic to send feedback for either SDGs or FoS. - TODO: Rename method.
3. sdg-selection.component: Added some checks | Added method "getSelectedSubjects()".
4. sdg-fos-suggest.component: Updated component for suggestion | Send suggested subjects to composer | Add modal here | Make file generic for FoS or SDGs suggestion.
5. resultLanding.component: Updated how <sdg-fos-suggest> is called | Moved SDGs / FoS suggest modal inside <sdg-fos-suggest>.
2023-02-18 10:52:24 +02:00
Konstantina Galouni 79bcf402d6 [Explore & Library | explore-redesign]: searchResult.component.ts & searchResearchResults.service.ts: Remove logs from search | resultLanding.component.html: [Bug fix] Add check if resultLandingInfo.measure | Remove from <result-preview> modal input that does not exist anymore. 2023-02-18 10:41:34 +02:00
Konstantina Galouni a4c9c63311 [Explore & Library | explore-redesign]: searchResearchResults.service.ts: [Bug fix] Fix parsing of hostedBy_collectedFrom (download from/source) - initialize, add journal and sort outside the loop. 2023-02-18 03:44:30 +02:00
Konstantinos Triantafyllou 332a32a4e4 Add entityMetadataComponent in export of the module 2023-02-17 19:47:47 +02:00
Konstantinos Triantafyllou 238aafd552 Change results preview. Add hosted by, metrics in search results. Create entity-metadata for entity medata. 2023-02-17 19:40:05 +02:00
Alex Martzios 75ad00db3f create new component for handling SDG suggestions 2023-02-17 19:08:44 +02:00
Konstantinos Triantafyllou 4858e9f22d Add condition for measures existance in parseMeasures 2023-02-16 16:37:40 +02:00
Konstantinos Triantafyllou 0a1e0fbd8a Add measures and hosteby collected from in search result objects 2023-02-16 16:33:40 +02:00
Alex Martzios 1093027ca1 general fixes for all landing page types, create new fos/sdg selection components for user feedback 2023-02-16 12:59:18 +02:00
Konstantina Galouni 38a8802d7e [Explore & Library | explore-redesign]: First update for direct linking according to redesign.
1. claimContextSearchForm.component.ts & claimProjectSearchForm.component.ts & claimResultSearchForm.component.ts: Added "@Input() public centerAlign: boolean = false".
2. claimContextSearchForm.component.html & claimProjectSearchForm.component.html & claimResultSearchForm.component.html: align search form to the center if centerAlign is true (in direct linking).
3. linkingGeneric.component.ts:
   a. Scroll to top smoothly when changing step.
   b. Added method "getEntityName()" to resolve entity name from entity type.
4. linkingGeneric.component.html: Redesign in direct linking:
   a. Hidden stepper.
   b. Title before search form
   c. Back button instead of breadcrumb.
   d. Search form aligned to the center.
   e. In basket, no tabs, but source on top of link source to.
   f. Button to Step 3 renamed to "Summarise".
5. HelperFunctions.class.ts: In methods "scroll()" and "scrollTo()" added parameter "smooth: boolean = false" for smooth scroll.
6. tsconfig.json: Commented "angularCompilerOptions": { "strictTemplates": true}.
2023-02-15 23:56:16 +02:00
Konstantinos Triantafyllou 679cae51f2 Quick fix in page content stickyBugWorkaround. 2023-02-15 12:04:09 +02:00
Konstantinos Triantafyllou 4cf5f44000 Merge branch 'angular-14' into explore-redesign 2023-02-15 11:53:55 +02:00
Konstantinos Triantafyllou 5a782ebd48 Merge branch 'angular-14' of code-repo.d4science.org:MaDgIK/openaire-library into angular-14 2023-02-15 11:53:32 +02:00
Konstantinos Triantafyllou f53370213a Add sidebar mobile toggle. Add activeSidebarItem in layout service and handle it in sidebar. Add isActive in menuItem. Make some improvents in slider-tabs 2023-02-15 11:53:25 +02:00
Konstantinos Triantafyllou 88a35d4814 Merge remote-tracking branch 'origin/angular-14' into explore-redesign 2023-02-14 12:15:42 +02:00
Konstantina Galouni b34f1cdfbf Merge remote-tracking branch 'origin/angular-14' into data-transfer-v2 2023-02-14 01:15:01 +02:00
Konstantina Galouni 95a87dcefd [Library | data-transfer-v2]: Use new transfer API to get destinations, do the transfer, request status of transfer | Updated messages and checks for buttons. 2023-02-13 19:39:08 +02:00
Alex Martzios 5c9470a959 fix for 'collected from' link that was not working, coloring of new access icons and bip/usage icons, metrics tabs and charts - all landing pages 2023-02-13 15:51:15 +02:00
Konstantinos Triantafyllou c53806f5b3 1. Add cache in get managers and members methods. 2. Add delete Authorization level with values curator and manager in role users for managers. Authorization level for mebers are always manager. 3. Clear cache when managers and members list has been updated. 2023-02-09 16:30:24 +02:00
Konstantinos Triantafyllou ee71b895bf Merge branch 'angular-14' of code-repo.d4science.org:MaDgIK/openaire-library into angular-14 2023-02-09 12:10:06 +02:00
Konstantinos Triantafyllou 1e56ef66ec 1. Simplify logout process. 2. Deprecate isSmallScreen in Layout service. 3. Make some inmprovements in slider-tabs and add slider-arrow for previous and next. 4. Navigation Bar: Remove badge and header logo info from mobiles. 5. Page Content: Fix paddings for mobiles and add events for sticky status changes. 2023-02-09 12:09:49 +02:00
Alex Martzios 6551fc73d3 Merge branch 'angular-14' into explore-redesign 2023-02-08 11:42:22 +02:00
Alex Martzios 39a2549681 change path of vocabulary fos/sdgs 2023-02-08 11:31:47 +02:00
Alex Martzios beebd6c6d7 progress for landing pages redesign 2023-02-08 11:21:16 +02:00
Konstantinos Triantafyllou 5454509b55 Fix sidebar flex items 2023-01-27 15:57:39 +02:00
Konstantinos Triantafyllou 57eac1b08b Change my-tabs with new class landing-tab 2023-01-27 14:42:09 +02:00
Konstantinos Triantafyllou ccab3d0847 Slider-tabs: Add align left and right and merge query params on navigate to other fragment 2023-01-27 13:54:40 +02:00
Konstantinos Triantafyllou 97426aabfe Merge remote-tracking branch 'origin/angular-14' into explore-redesign 2023-01-27 10:21:10 +02:00
Konstantinos Triantafyllou 3acd9a6c29 Portals: Add piwik as a column. Add pid in search 2023-01-26 12:35:05 +02:00
Konstantinos Triantafyllou 70e0d02227 Add a workaround for sticky update bug on sidebar toggle 2023-01-25 14:41:53 +02:00
Konstantinos Triantafyllou 03b28d57d5 Merge from angular-14 2023-01-25 11:53:32 +02:00
Konstantinos Triantafyllou 9f4be4b29b Bottom: Fix shortView. Sidebar: Add toggle and hover behaviour. 2023-01-25 08:00:35 +02:00
Alex Martzios 0a519c667a start on result landing mobile redesign 2023-01-24 15:32:58 +02:00
Alex Martzios c58bc15a74 progress on all landing page types 2023-01-23 16:19:00 +02:00
Konstantinos Triantafyllou 53400f7745 Add shouldUpdate in getStakeholder method. Role-verification: Add userInfoLink if user-info is on other portal 2023-01-20 17:31:36 +02:00
Alex Martzios 95de86e767 progress in result landing page 2023-01-13 15:57:26 +02:00
Konstantinos Triantafyllou da144c1c77 Round pipe: Make it HTML in order to add class in number's size 2023-01-13 11:33:53 +02:00
Alex Martzios c1fa0889ee progress in landing page (new metrics, tweaks for new action-bar) 2023-01-13 08:32:16 +02:00
Konstantinos Triantafyllou 4cd5bcd12b Number round: Add decimal argument in order to be dynamic 2023-01-11 15:51:55 +02:00
Konstantinos Triantafyllou eddd7e00b9 Number round: Add level of round and round to 1 decimal 2023-01-11 15:35:13 +02:00
Konstantina Galouni 062f1a23c4 [Explore | master & Library | angular-14]: composer.ts: [Bug fix] Add parenthesis around ternary operator in method composeEmailForExplore() - empty or wrong body | contact-us.component.html: Added #captchaElem in <re-captcha> | contact-us.component.ts: Added ViewChild for captchaElem and added method "resetRecaptcha()" | contact.component.html: Added #contactUs in <contact-us> | contact.component.ts: Added ViewChild for contactUs and call contactUsComponent.resetRecaptcha() on reset method. 2023-01-10 02:25:03 +02:00
Alex Martzios 871c45c480 progress on result-landing page and used components within it 2023-01-09 18:35:28 +02:00
Konstantina Galouni 96d2e66c1c Merge remote-tracking branch 'origin/angular-14' into data-transfer-v2 2023-01-05 19:17:42 +02:00
Konstantina Galouni 3c20944aec [Library | data-transfer-v2]: transferData.component: Get destinationOptions from API (/storage/types). 2023-01-05 19:14:26 +02:00
Konstantinos Triantafyllou a2af95098b Add password boolean in Input component 2023-01-05 10:53:08 +02:00
Konstantina Galouni 161052d97c Merge remote-tracking branch 'origin/angular-14' into data-transfer-v2 2023-01-04 13:36:54 +02:00
Konstantina Galouni 50543311f2 [Eosc Explore & Library | data-transfer-v2]: environment.ts: Updated eoscDataTransferDestinations to be like api response. | transferData.component: Updated destinationOptions and selectedDestination according to the updated eoscDataTransferDestinations. 2023-01-04 13:27:49 +02:00
Konstantinos Triantafyllou e0c45b1065 Add condiction if withCredentials in order to add cookie in the request. 2022-12-23 17:56:47 +02:00
Konstantinos Triantafyllou 789a0225fa Add cookie in server side requests. Remove sticky footer from page-content in server. Hide subitems in sidebar on server 2022-12-23 17:36:35 +02:00
Konstantinos Triantafyllou 88b0987ba3 import less variables in how.component.less 2022-12-23 13:07:12 +02:00
Konstantinos Triantafyllou 328198b6a5 Merge branch 'angular-14' of code-repo.d4science.org:MaDgIK/openaire-library into angular-14 2022-12-21 13:37:25 +02:00
Konstantinos Triantafyllou 92488d015b Add number-rounf pipe 2022-12-21 13:37:16 +02:00
Konstantina Galouni ff330802ab Merge branch 'angular-14' of code-repo.d4science.org:MaDgIK/openaire-library into angular-14 2022-12-21 13:34:16 +02:00
Konstantina Galouni 471c177251 [Library | angular-14]: landing-header.component.ts: [Bug fix] Typo in uk-margin-bottom class. 2022-12-21 13:33:58 +02:00
Konstantinos Triantafyllou 10130d368a Merge branch 'angular-14' of code-repo.d4science.org:MaDgIK/openaire-library into angular-14 2022-12-20 17:39:56 +02:00
Konstantinos Triantafyllou 5bd828d03c Fix an error in sidebar 2022-12-20 17:39:51 +02:00
Alex Martzios 9ead7fee7d progress on explore landing page 2022-12-20 15:27:18 +02:00
Konstantina Galouni f91c3ba0fb [Library | angular-14]: loading.component.ts: [Bug fix] In ngOnDestory changed to document.getElementById("modal-container"). 2022-12-16 17:21:37 +02:00
Konstantinos Triantafyllou 92b823a1ed Fix input tooltip when value is undefined and a placeholder or hint should be shown 2022-12-16 17:19:53 +02:00
Konstantina Galouni ce4b9273e0 [Library | angular-14 & Explore | master]: Updated request to Crossref for bulk uploaded DOIs in linking | Added link for more information to joomla article (Canada's request).
1. sdg.component.html: Added link for more information to joomla article (Canada's request).
2. timeout-interceptor.service.ts: Excluded from timeout interceptor  properties.searchCrossrefAPIURL and properties.searchDataciteAPIURL.
3. searchDatacite.service.ts: In method "getDataciteResultByDOI()", for requests coming from file uploaded in linking added timeout to 20 sec, and for other requests timeout similar to the interceptor (6 sec for production, 12 otherwise).
4. searchCrossref.service.ts: In method "searchCrossrefByDOIs()", added timeout similar to the interceptor (6 sec for production, 12 otherwise) | Added method "searchCrossrefByDOI()", called for requests coming from file uploaded in linking.
5. bulkClaim.component.ts: Call new API method for Crossref requests for DOIs | Fixed tooltip to appear.
2022-12-16 09:59:48 +02:00
Konstantinos Triantafyllou 06f2f586a8 Change message in role verification 2022-12-12 19:01:05 +02:00
Alex Martzios 6ca864d376 remove "Admin Dashboard -" title and logo from monitor admin pages 2022-12-12 16:59:47 +02:00
Konstantinos Triantafyllou 37545606a0 Fix a bug with replace header in navbar. Page content add header and actions class in order to handle border bottom in tabs 2022-12-12 16:16:47 +02:00
Alex Martzios 203c3b71c7 hide breadcrumbs in indicators' component for mobile view 2022-12-12 11:27:16 +02:00
Konstantinos Triantafyllou 5bc5e3f3ad Merge branch 'angular-14' of code-repo.d4science.org:MaDgIK/openaire-library into angular-14 2022-12-10 01:57:04 +02:00
Konstantinos Triantafyllou 4afcb8f27f Change ol to ul in error message of role verifcation and fix a bug with toggle item with no subitems in sidebar 2022-12-10 01:56:56 +02:00
Konstantinos Triantafyllou 437a5fa50d Smooth scroll: Fix headerOffset in mobile 2022-12-09 18:17:06 +02:00
Konstantinos Triantafyllou 2492f737b8 1. Change message in role verification if an error is occurred. 2. Add isCurator in create a category. 3. Hide delete section if it not permitted and make manage roles visible to curators and superAdmins 2022-12-09 18:01:18 +02:00
Konstantina Galouni 53a39d0a34 [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 acdba43c8b [Connect Admin | Trunk & Library | angular-14]: Allow curators with profile to be invisible in the Gateway | Dynamically align custom menu.
1. CuratorInfo.ts: In Curator class added visible: boolean = true;
2. personal-info.module.ts: Imported MatSlideToggleModule.
3. personal-info.component.ts: Added slider to set curator profile to visible or invisible (default to visible).
4. menu.ts: In Menu class added field "featuredAlignment: MenuAlignment;" | Added enum MenuAlignment.
5. menu.component: Updated title "Menu settings" | Added "Menu Alignment" setting, to set if custom menu will be left, center or right alligned | Added notification when menu visibility changes.
6. help-content.service.ts: Added "alignMenu()" method to align custom menu dynamically.
2022-12-09 16:43:36 +02:00
Konstantinos Triantafyllou c0de2860ef Merge remote-tracking branch 'origin/angular-14' into mobile 2022-12-09 11:28:30 +02:00
Alex Martzios b50deff46b fix for terminology component's graph element on mobile view 2022-12-08 11:51:28 +02:00
Konstantinos Triantafyllou de42da8b6c Change search in order to apply mobile style 2022-12-07 16:56:16 +02:00
Konstantina Galouni 9418fab774 [Library | angular-14]: menu.component: Added commented code for creating new gateway specific pages when editing custom menu. 2022-12-07 12:09:01 +02:00
Konstantinos Triantafyllou b256147682 Merge remote-tracking branch 'origin/angular-14' into mobile 2022-12-07 11:33:42 +02:00
Konstantinos Triantafyllou 469804ab69 Merge branch 'mobile' of code-repo.d4science.org:MaDgIK/openaire-library into mobile 2022-12-07 11:33:23 +02:00
Konstantinos Triantafyllou 7cadb1ee98 Add isMobile in layoutService 2022-12-07 11:33:16 +02:00
Alex Martzios 125820fa68 minor tweaks for terminology page graph_element 2022-12-06 15:18:11 +02:00
Alex Martzios 9b62812195 add text-break for terminology component help texts 2022-12-06 09:37:52 +02:00
Konstantina Galouni f3f395d15a [Library & EOSC Explore | angular-14]: environment.ts: Updated properties | searchFields.ts: Updated type of "eoscifguidelines" field to "keyword" from "refine" (to be discussed) | home.component: [Bug fix] Fixed after it has been checked error (disableSelectChange() method added). 2022-12-05 14:43:53 +02:00
Konstantina Galouni fbbfa579ca [Library | angular-14]: resultLanding.component.ts: [SEO] Added more keywords in "title_authors_words" (method checkIfAllowed()), to not index records containing them in the title or authors. 2022-12-05 12:36:53 +02:00
Konstantinos Triantafyllou 25e332a512 Add footer icons in icons-library. Make some UI fixes in footer and adjust mobile view 2022-12-02 13:01:26 +02:00
Konstantinos Triantafyllou de39d90199 Navigation bar: Remove wrong div from previous merge 2022-12-01 11:48:29 +02:00
Konstantinos Triantafyllou 1ed9b7db9b Merge from angular-14 2022-12-01 11:22:46 +02:00
Konstantinos Triantafyllou 095e3340c0 Finish mobile menu and user menu in mobile 2022-11-30 17:49:38 +02:00
Konstantina Galouni ac83453f7e [Library & Connect Admin | angular-14]: environments/: Set property dashboard: 'connect' | page-help-content-form.component.html & class-help-content-form.component.html: [Bug fix] Set link to theme page depending on current dashboard and portal. 2022-11-29 18:11:29 +02:00
Konstantinos Triantafyllou 3b8cf248da Change getDomain to return test.openaire.eu in dev. 2022-11-29 14:46:32 +02:00
Konstantina Galouni 16d4df483f [Library]: advancedSearchForm.component: Remove trackBy: trackByFn - workaround for bug in angular 11 - angular 14 has fixed its error. 2022-11-29 14:35:38 +02:00
Konstantina Galouni 508dac6c4d Merge origin/master into angular-14 branch 2022-11-29 14:13:29 +02:00
Konstantina Galouni 05c950c60d [Library]: searchFields.ts: Changed "type" of "eoscifguidelines" field from "keyword" to "refine", to get dynamically the available values for the eosc subjects. 2022-11-29 14:05:53 +02:00
Konstantina Galouni e9e2ee9f3a [Library]: [Bug fix] Strip html tags for titles and descriptions and show them as innerHTML.
1. dataProvider.component.ts & organization.component.ts & project.component.ts & resultLanding.component.ts & orcid-work.component.ts: Commented unused @ViewChild fields.
2. dataProvider.service.ts & project.service.ts & resultLanding.service.ts: Strip html tags from title.
3. resultLanding.component.ts: [Bug fix] resultLanding.description is string, not array.
4. orcidWork.ts: [Bug fix] resultLanding.description is string, not array & strip html tags from description.
5. refineFieldResults.service.ts: In method "getSearchAPIURLForEntity()", for entityType "result" set suffix to "results/".
6. searchDataproviders.service.ts & searchOrganizations.service.ts & searchProjects.service.ts & searchResearchResults.service.ts: Strip html tags from title | Do not cut description (multi line ellipsis is used in html).
7. jsonld-document-serializer.service.ts: [Bug fix] resultLanding.description is string, not array.
8. result-preview.component.html: Show description as innerHTML to properly display special characters.
2022-11-28 19:22:01 +02:00
Konstantinos Triantafyllou 49efb05026 Merge from angular-14 for navigation menu 2022-11-28 16:37:12 +02:00
Konstantinos Triantafyllou a4c95bb16b Introdule new mobile menu 2022-11-28 16:25:05 +02:00
Konstantina Galouni f935e81959 [Library | EOSC Explore]: Updated styles | Updated link to Marketplace for EOSC::RO-crate | Bug fix in description of results versions | Removed timeout from reports.service.ts.
1. home.component.html: Added blue banner, white logo, aligned search form to the center and updated fonts according the new EOSC Marketplace.
2. parsingFunctions.class.ts: Updated link to Marketplace for eosc subject EOSC::RO-crate.
3. resultLanding.component.html: Updated how links to Compatible EOSC Services are displayed.
4. searchAll.component.html: Updated paddings and margins in search form of Search all page.
5. navigationBar.component.html: Set burger menu icon to light color if dark background.
6. advancedSearchDataProviders.component.ts & advancedSearchOrganizations.component.ts & advancedSearchProjects.component.ts & advancedSearchServices.component.ts & searchResearchResults.component.ts & searchDataproviders.component.ts & searchOrganizations.component.ts & searchProjects.component.ts & searchResearchResults.component.ts & searchServices.component.ts & search.component.ts: Set in searchForm, dark=true.
7. aggregators.ts: In eoscInfo, updated logoUrl and removed customCss of AggregatorInfo.
8. app.component.ts: Set header.darkBg: true.
9. Added eosc-custom.less file.
10. styles.less: import eosc-custom less file, instead of portal-custom.css.
11. deletedByInference.service.ts & result-preview.ts: [Bug fix] Parse description of versions properly.
12. reports.service.ts: Copy fix from angular-14 branch - do not timeout to 10000.
2022-11-28 14:37:37 +02:00
Alex Martzios 2ad798c38a add communities' custom menu items for mobile 2022-11-28 14:24:21 +02:00
Alex Martzios 64b22f3eb5 start on mobile monitor pages 2022-11-28 10:58:20 +02:00
Konstantina Galouni 4734c7b821 [EOSC Explore]: package.json & CHANGELOG.md: Updated v1.0.2 | newSearchPage.component.html: Updated margins and paddings in search form | advancedSearchForm.component: Bug fix in advanced search form (fixed in angular 14) & smooth scroll to the last rule when adding new. 2022-11-18 15:03:08 +02:00
argirok 7666b55b6c Data transfer: add input for destination URL, inputs for destination authorization
add destination  authorization header in parser
2022-11-11 13:56:58 +02:00
argirok ce4b358ce9 add access token in parser method 2022-11-11 12:28:07 +02:00
argirok 8e22fe60b0 Data transfer: remove checks for only zenodo dois 2022-11-11 11:55:15 +02:00
argirok 764b92ae66 Eosc data transfer:
- add and use separate property for login url
- use new API url
2022-11-11 11:20:02 +02:00
argirok 95152eef04 don't close modal when transfer button is pushed. let it open and hide transfer button 2022-11-11 11:04:52 +02:00
argirok 10b386179c Enable Orcid S&L for aggregator - missing part 2022-11-09 15:10:52 +02:00
argirok 806f0185b8 Enable Orcid S&L for aggregator 2022-11-09 13:41:33 +02:00
Konstantinos Triantafyllou dc3660e562 Merge branch 'angular-14' of code-repo.d4science.org:MaDgIK/openaire-library into angular-14 2022-11-09 11:27:49 +02:00
Konstantinos Triantafyllou ae1c91855d Fix csv donwload timeout after 10 secs, caused by the call 2022-11-09 11:27:41 +02:00
Alex Martzios a2fea9e323 refactor numbersComponent file 2022-11-08 14:09:03 +02:00
Konstantina Galouni 97c350dfec [Library]: #7883 - searchResearchResults.service.ts: Added parsing for C1-C5 classes | result-preview.component.less: Added css rules for C1-C5 classes in <measure> (influence/popularity) 2022-11-07 17:14:01 +02:00
Konstantinos Triantafyllou ed20502959 Helper Functions: Add routerMatcher function in order to add more than one path in route configuration. 2022-11-07 16:55:27 +02:00
Konstantina Galouni 17212458eb Merge remote-tracking branch 'origin/master' into angular-14 2022-11-07 13:02:57 +02:00
Konstantina Galouni cb57b78351 [Library]: searchResult.ts & result-preview.ts: Added field objId: string; | searchResearchResults.service.ts: Set in parsing objId | result-preview.component.html: Updated link to Bip Finder - use objId (openaire id) instead of id (pid related). 2022-11-07 12:55:55 +02:00
Konstantinos Triantafyllou 7bae3b1ebb Add hasInternalSidebar variable in layout service. Sidebar: Fix keep enable subItem on parent close. 2022-11-04 16:35:10 +02:00
Alex Martzios 1f30f9d88a remove console.log from sdg component 2022-11-03 16:04:51 +02:00
Alex Martzios 510d48d9bf add piwikId and customFilter parameters for fos/sdg components 2022-11-03 15:55:10 +02:00
Konstantinos Triantafyllou 4f3daa8a3b Change Sidebar in order to extend with nav-sub functionality 2022-11-03 15:50:51 +02:00
Alex Martzios 3bd6a28c1b move fos/sdg component to openaireLibrary submodule 2022-11-03 12:15:13 +02:00
Konstantinos Triantafyllou cdde9bb94c Termonilogy: Change position of graph element in order to fix a bug with its sticky position and fix route in div contents 2022-11-03 09:37:13 +02:00
Alex Martzios 4216be29cd Merge remote-tracking branch 'origin/master' into angular-14 2022-11-01 12:13:32 +02:00
Alex Martzios c862be7561 remove help button when reaching footer by scroll 2022-11-01 11:29:21 +02:00
Alex Martzios bcaf7166a5 Merge remote-tracking branch 'origin/master' into angular-14 2022-10-31 14:30:42 +02:00
Alex Martzios f53ca8fde8 help button: release at the bottom 2022-10-31 14:00:54 +02:00
Konstantinos Triantafyllou 7b89e369a3 Merge branch 'angular-14' of code-repo.d4science.org:MaDgIK/openaire-library into angular-14 2022-10-31 13:30:29 +02:00
Konstantinos Triantafyllou e2302d0d8f Terminology: Add some margin between sections 2022-10-31 13:30:23 +02:00
Konstantina Galouni 81a29287d4 [Library]: timeout-interceptor.service.ts: #8186 - Added properties.claimsAPIURL in TIMEOUT_WHITELIST to exclude claims requests from timeout interceptor. 2022-10-26 13:49:01 +03:00
Konstantinos Triantafyllou 5570c5a819 Merge branch 'master' into angular-14 2022-10-25 18:43:25 +03:00
Alex Martzios 68e0aa98a8 update advanced search form 2022-10-25 17:21:53 +03:00
Konstantinos Triantafyllou 56a8a035cc Fix bug with redirect to login caused by fixed of role verification 2022-10-25 15:31:59 +03:00
Konstantinos Triantafyllou ac58161c93 Fix condition for icon in sidebar menu items and change title to tooltip 2022-10-24 17:32:07 +03:00
Konstantinos Triantafyllou 6295bd8c44 Role verification: Fix a bug after success verification, error modal is appeared. 2022-10-24 17:21:32 +03:00
Konstantinos Triantafyllou cdffb018b6 Merge remote-tracking branch 'origin/master' into angular-14 2022-10-24 16:37:14 +03:00
Konstantinos Triantafyllou b0e77b17a9 Slider Tabs: Make some fixes for static type. Changes resources methodology items for new routes. Delete see how it works 2022-10-24 16:37:05 +03:00
Alex Martzios 84911550be add 3rd section of terminology page as a helptext 2022-10-24 14:03:51 +03:00
Alex Martzios 256c94946f Merge remote-tracking branch 'origin/master' into angular-14 2022-10-24 13:12:40 +03:00
Alex Martzios efec0bddcb change path of graph-nodes image 2022-10-24 13:04:07 +03:00
Alex Martzios a2a71c7334 create methodological-approach page, changes for slider-tabs component 2022-10-24 12:57:52 +03:00
Konstantinos Triantafyllou f1618b92e8 Merge remote-tracking branch 'origin/master' into angular-14 2022-10-23 01:48:46 +03:00
Konstantinos Triantafyllou 0069e499bf Merge branch 'master' of code-repo.d4science.org:MaDgIK/openaire-library into HEAD 2022-10-21 17:07:17 +03:00
Konstantinos Triantafyllou 1e8ec15451 Add new slider-tabs component. Add slider tabs in terminology page and make content with class help texts 2022-10-21 17:06:44 +03:00
Konstantina Galouni cea34c6bba Merge remote-tracking branch 'origin/master' into angular-14 2022-10-20 17:27:35 +03:00
Konstantina Galouni 65cc8504ea [Library]: searchAll.component.ts: [Bug fix] Added check for client side when accessing "active" parameter via location. 2022-10-19 11:13:08 +03:00
Konstantina Galouni ec8fb39eea [Library]: claimResultSearchForm.component.html & claimProjectSearchForm.component.html & claimContextSearchForm.component.html: Set tooltip=true in search input form. 2022-10-18 15:55:16 +03:00
Konstantina Galouni 0901228f32 [Eosc Explore & Library]: home.component.html & advancedSearchForm.component.html: Updated width of stepper form & set tooltip=true. 2022-10-18 15:51:40 +03:00
Konstantina Galouni 8a8f3df278 [Library]: input.component.ts: Added in tooltip, placeholder when no value. 2022-10-18 15:43:18 +03:00
Konstantina Galouni 087cd208d5 [Explore & Library]: home.component.html & advancedSearchForm.component.html & claimContextSearchForm.component.html & claimProjectSearchForm.component.html & claimResultSearchForm.component.html: Increased width of search forms and fixed width of each step of stepper input. 2022-10-18 15:28:04 +03:00
Alex Martzios ada4017fe5 terminology page - redesign before helptexts 2022-10-17 16:32:57 +03:00
argirok 1542d476ae make the rule to apply year filter more generic, but exclude "indi_pub_downloads_year.year" according to #8135 2022-10-17 14:22:06 +03:00
argirok d399f40ad6 Data transfer: move transfer button in the modal footer 2022-10-17 12:42:01 +03:00
argirok ea935df5b7 Data transfer: revert changes to show login in the 1st step 2022-10-14 13:32:11 +03:00
argirok cf1d3984ec Data transfer: minor layout changes in the browse 2022-10-14 13:18:13 +03:00
Konstantinos Triantafyllou 8677e9dcd5 Merge branch 'master' into angular-14 2022-10-12 16:41:16 +03:00
Konstantina Galouni d720178db3 [Explore]: orcid-work.component.ts: [Bug fix] Added [size]="'small'" input to <loading> | environment.ts: Updated port of orcidAPIURL (standalone service). 2022-10-12 16:36:33 +03:00
Alex Martzios 427e910514 create hasQuickContact behaviour subject for disabling in specific routes 2022-10-12 15:30:39 +03:00
Konstantinos Triantafyllou 09706515ba Search Input: Add icon position and focus state 2022-10-12 12:23:24 +03:00
Konstantinos Triantafyllou 3b46fc74c1 Merge remote-tracking branch 'origin/master' into angular-14 2022-10-11 09:42:55 +03:00
Alex Martzios d6c54949df create isDevelopmentGuard 2022-10-10 16:56:13 +03:00
Konstantina Galouni 911614fb94 Merge remote-tracking branch 'origin/angular-13' into angular-14 2022-10-05 17:57:04 +03:00
Konstantina Galouni 918e78d83c Merge remote-tracking branch 'origin/angular-12' into angular-13 2022-10-05 17:55:09 +03:00
Konstantina Galouni 73466653d2 Merge remote-tracking branch 'origin/master' into angular-12 2022-10-05 17:36:36 +03:00
argirok ef97747596 update datatransfer browse functionality
add new properties, add datatransferAPI in the error interceptor
2022-10-05 16:52:04 +03:00
Konstantina Galouni ce842a39c6 Merge remote-tracking branch 'origin/angular-13' into angular-14 2022-10-04 13:56:24 +03:00
Konstantina Galouni adb0564b06 Merge remote-tracking branch 'origin/angular-12' into angular-13 2022-10-04 13:54:15 +03:00
Konstantina Galouni 6b28663496 Merge remote-tracking branch 'origin/master' into angular-12 2022-10-04 13:50:10 +03:00
Konstantina Galouni 9ac7ed93d4 [Eosc Explore]: ISVocabularies.service.ts: [Bug fix] Added check if type is "service" (used to return null when selecting vocabulary fields in advanced search). 2022-10-04 11:39:44 +03:00
Konstantina Galouni 3c1623d12c [Aggregator]: Updates in css | Bug fix in isRouteEnabled check.
1. portal.ts & aggregators.ts: [Bug fix] In method "getMockCommunityInfo()" set also pid for community (isRouteEnabled.guard needs it) | Updates in less files (overrides of colors)
2. styles.less: Updated imports (added linking, landing and canada-custom and removed aggregator-custom).
3. numbers.component.ts: Updated default value of @Input() colorClass to "uk-text-primary".
4. connectHelper.ts: In method "getCommunityFromDomain()" added also "aggregator" and "eosc" portal types to set domain on development.
2022-10-03 20:25:37 +03:00
Alex Martzios bae33e0a51 update hero title for deposit page 2022-10-03 15:45:00 +03:00
Alex Martzios f0a6ce40a9 deposit page: rename button "Get tarted" to "Find Repository" 2022-10-03 13:58:03 +03:00
Alex Martzios 7da81d02b5 create new function for composing email for explore (contact-us page) 2022-10-03 13:39:35 +03:00
Alex Martzios ac25e160fe Monitor - Add color coding in browse dashboards 2022-10-03 11:52:29 +03:00
Konstantina Galouni 04229ad0ed Merge remote-tracking branch 'origin/angular-13' into angular-14 2022-09-30 16:03:00 +03:00
Konstantina Galouni 6feb0bf8b7 Merge remote-tracking branch 'origin/angular-12' into angular-13 2022-09-30 15:57:25 +03:00
Konstantina Galouni e0a7362f87 Merge remote-tracking branch 'origin/master' into angular-12 2022-09-30 15:25:03 +03:00
Konstantina Galouni a246608368 [Eosc Explore]: Updated some styles | Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" | Do not add hardcoded compatibility label "Not yet registered" | Bug fix in Access filter
1. styles.less: Renamed from styles.css and added imports of less files and portal-custom.css (to be updated).
2. angular.json: In styles configuration added styles.less.
3. index.html & beta/index.html: In beta badge, used background instead of background-color to css rules.
4. portal-custom.css: Added rule for .search-form to inherit color in background.
5. searchFields.ts:
   a. Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" for datasources refine filter "Type".
   b. In method "getResultAdvancedFields()" return always RESULT_ADVANCED_FIELDS without excluding "eoscifguidelines".
6. datasourcesHelper.class.ts: Replaced "datasourcetypeuiname" field with "eoscdatasourcetype" for datasources queries and used updated type names "Research Entity Registry" (old "Registry") and "Journal Archive" (old "Journal archive").
7. cache-interceptor.service.ts: Updated cachingRequests array, using new "eoscdatasourcetype" and its values.
8. dataProvider.component.html && result-preview.component.html: Do not add hardcoded compatibility label "Not yet registered" and updated checks.
9. resultLanding.service.ts & parsingFunctions.class.ts: Parse resultLandingInfo.eoscSubjects only by "eoscifguidelines" field not "subjects".
10. searchFilter.component.ts: [Bug fix] In Access filter, fixed bug in view all, when clearing the preselected value.

* Do not forget to add in package.json in devDependencies, "@types/express-serve-static-core": "4.17.28"
2022-09-30 14:51:00 +03:00
Alex Martzios 7850adbbef Monitor - Add color coding in browse dashboards 2022-09-29 12:09:37 +03:00
Konstantinos Triantafyllou 3c7d652c83 Merge remote-tracking branch 'origin/angular-13' into angular-14 2022-09-29 10:48:47 +03:00
Konstantinos Triantafyllou 5c1811d0d1 Merge remote-tracking branch 'origin/angular-12' into angular-13 2022-09-29 10:47:31 +03:00
Konstantinos Triantafyllou 29d55b50cc Merge remote-tracking branch 'origin/master' into angular-12 2022-09-29 10:44:01 +03:00
Konstantinos Triantafyllou a72f962b3d Fix development bug with selected community from getCommunityDomain 2022-09-29 10:42:49 +03:00
Konstantinos Triantafyllou 31248e7a18 Merge remote-tracking branch 'origin/angular-13' into angular-14 2022-09-28 11:14:43 +03:00
Konstantinos Triantafyllou 2d2c9748bf Merge remote-tracking branch 'origin/angular-12' into angular-13 2022-09-28 11:14:27 +03:00
Konstantinos Triantafyllou 67e2f1f49b Merge remote-tracking branch 'origin/master' into angular-12 2022-09-28 11:14:05 +03:00
Konstantinos Triantafyllou 5a515908cd Fix guard causing redirect loop if a user is not authorized. Fix claims actions bar background 2022-09-28 11:13:46 +03:00
Konstantina Galouni cae2bcec86 Merge remote-tracking branch 'origin/angular-13' into angular-14 2022-09-27 11:23:03 +03:00
Konstantina Galouni 82a78f3f22 Merge remote-tracking branch 'origin/angular-12' into angular-13 2022-09-27 11:22:02 +03:00
Konstantina Galouni 37a68b44ad Merge remote-tracking branch 'origin/master' into angular-12 2022-09-27 11:21:13 +03:00
Konstantina Galouni ad5cc2ae19 [Connect Admin | Trunk]: subscribers.component.ts & subscriber-invite.component.ts & manage-user-notifications.component.html & users-managers.component.ts & users-subscribers.component.ts: Replace "subscriber" wording with "join/member". 2022-09-27 11:11:25 +03:00
Konstantinos Triantafyllou ac35a83cef Merge remote-tracking branch 'origin/angular-13' into angular-14 2022-09-26 17:25:44 +03:00
Konstantinos Triantafyllou ad52c1aa66 Merge remote-tracking branch 'origin/angular-12' into angular-13 2022-09-26 17:25:28 +03:00
Konstantinos Triantafyllou 5de8206a32 Merge remote-tracking branch 'origin/master' into angular-12 2022-09-26 17:25:06 +03:00
Konstantinos Triantafyllou 167e154de8 Change word subscriber to member in composer email for new member 2022-09-26 17:24:39 +03:00
Konstantinos Triantafyllou ccbda1f8a6 Merge remote-tracking branch 'origin/master' into angular-12 2022-09-26 17:23:00 +03:00
Konstantinos Triantafyllou e0d5b579d9 Fix link to subscribers in email composer 2022-09-26 17:22:32 +03:00
argirok 1db2073e96 add heroBackground, put only in hero the background image 2022-09-26 14:00:37 +03:00
Konstantinos Triantafyllou bf779e922d Merge remote-tracking branch 'origin/angular-13' into angular-14 2022-09-23 17:05:09 +03:00
Konstantinos Triantafyllou bcfe23616c Merge remote-tracking branch 'origin/angular-12' into angular-13 2022-09-23 17:04:56 +03:00
Konstantinos Triantafyllou da6f36bdf3 Fix two more promises by adding void type. 2022-09-23 17:04:45 +03:00
Konstantina Galouni 360562178b [Aggregator | Trunk]: Renaming and using less files for assets | Updating home page to look ok | TODO: Fix less files to be real less & organize rules among files. 2022-09-23 16:33:26 +03:00
Alex Martzios 105e5066f2 Merge remote-tracking branch 'origin/angular-13' into angular-14 2022-09-23 14:53:32 +03:00
Alex Martzios db7f34a21d fix 'k' variable as a Number in splice method 2022-09-23 14:49:59 +03:00
Konstantinos Triantafyllou 0854b9ddd0 Fix redirect to for methodology route for resources items 2022-09-23 14:10:47 +03:00
Konstantinos Triantafyllou a31605e9d5 Update angular core and cli to version 14 2022-09-23 13:25:08 +03:00
Konstantinos Triantafyllou 717ead02b2 Make some fixes after update to angular 12 2022-09-23 12:24:15 +03:00
argirok 032b91ae7a very primitive tests for updating datatransfer with status and browse 2022-09-21 17:29:46 +03:00
Konstantina Galouni 82cec11525 [Library | new-theme]: dataProvider.component.ts & project.component.ts & resultLanding.component.ts: Small update on previous commit - Call detectChanges() method, after content is returned and processed, right after showLoading = false command. 2022-09-21 15:39:57 +03:00
Alex Martzios f888e1090d landing: cut description & show more in modal after 10 lines of content 2022-09-21 13:32:21 +03:00
Konstantinos Triantafyllou 05cfd20bb9 Resources service: Delete deprecated setResources 2022-09-21 12:02:29 +03:00
Alex Martzios d9afcfcb06 change terminology page text based on the doc provided 2022-09-21 11:38:15 +03:00
Konstantina Galouni 95c9301aa3 [Connect Admin | Library | new-theme]: Removed RootMenuItem | Fixes in wording.
1. app.component.ts: Removed deprecated RootMenuItem and used MenuItem instead.
2. criteria.component.ts: Import OpenaireEntities and set variable openaireEntities.
3. criteria.component.html: [Bug fix] Use openaireEntities in no filters message.
4. searchAll.component.ts: [Bug fix] In method "getDefaultEntityToShow()", return "datasources" instead of "content providers".
5. add-content-providers.component.ts: [Bug fix] In error messages use "data sources" wording instead of "content providers".
6. manage-zenodo-communities.component.html: [Bug fix] In <no-load-paging>, set type to "Zenodo communities".
2022-09-21 10:29:11 +03:00
Konstantina Galouni 8059059660 [Library | new-theme]: [Bug fix] navigationBar.component.html: Toggle button was hidden@l, but menu was hidden@m. - removed uk-hidden@m from #canvas id="tm-mobile", to be visible in small and medium screens. 2022-09-21 01:47:21 +03:00
Konstantina Galouni 4cec2907da [Explore | Library | new-theme]: resources.service.ts & menu.ts & navigationBar.component.ts & navigationBar.component.html & app.component.ts: Removed deprecated RootMenuItem and used MenuItem instead. 2022-09-20 18:00:19 +03:00
Konstantinos Triantafyllou b1842543e7 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-09-20 11:01:57 +03:00
Konstantinos Triantafyllou 9d856f4f7d Disable page-content sticky header release when approaching footer. 2022-09-20 11:01:51 +03:00
argirok 5ba1d27aaa Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-09-20 10:51:33 +03:00
Alex Martzios 9939c2707c change text, css grid and container for indicator-themes page 2022-09-19 17:08:13 +03:00
Alex Martzios b355d7b7c1 change breadcrumbs in resources pages 2022-09-19 16:47:52 +03:00
Konstantina Galouni 876b51d420 [Connect Admin | new-theme]: profile.component.ts: [Bug fix] Class is "uk-hidden" instead of "hidden". 2022-09-19 12:45:45 +03:00
argirok 59c09d0295 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-09-16 17:30:43 +03:00
Konstantina Galouni b373a53e34 [Library | new-theme]: parsingFunctions.class.ts: [Bug fix] Stringify each downloadName and collectedFromName. 2022-09-16 16:12:58 +03:00
Konstantina Galouni 89e769f030 [Library | new-theme]: parsingFunctions.class.ts: [Bug fix - #8074] In method "parseResults()", updated how title of each related research is parsed (prioritize classid = "main title"). 2022-09-15 16:28:25 +03:00
Alex Martzios bdce56aff9 text changes/typos for indicator-themes and terminology pages 2022-09-15 11:56:05 +03:00
Alex Martzios b8ac412137 remove alert-modal footer entirely if alertFooter boolean is false 2022-09-14 16:31:55 +03:00
Konstantinos Triantafyllou b7a5cf34ab Fix flickering for linking basket 2022-09-14 09:26:57 +03:00
Alex Martzios 945cee4519 terminology component - make graph text sticky at the bottom of the page 2022-09-13 09:25:10 +03:00
Konstantinos Triantafyllou 896f95366c Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-09-09 12:13:08 +03:00
Konstantinos Triantafyllou 16fd671a5c Fix parenthesis bug in search queries 2022-09-09 12:13:01 +03:00
Konstantina Galouni 7ef47ab0ef [Library | new-theme]: Fixes in parsing of "eoscifguidelines" | Added EOSC Subject ("eoscifguidelines") in RESULT ADVANCED FIELDS (not in production for now).
1. resultLanding.service.ts: [Bug fix] Spelling error in parsing of "eoscifguidelines" field.
2. showSubjects.component.ts: [Bug fix] Do not show "EOSC" label in classified subjects, when no "eoscSubjects" parsed.
3. searchFields.ts: In RESULT_ADVANCED_FIELDS added "eoscifguidelines" | Added method "getResultAdvancedFields()", which does not include "eoscifguidelines" in "RESULT_ADVANCED_FIELDS" when environment == "production".
4. searchAll.component.ts & searchResearchResults.component.ts: Get searchFields.RESULT_ADVANCED_FIELDS from "getResultAdvancedFields()".
2022-09-09 00:46:44 +03:00
Konstantina Galouni 656a3634e2 [Library | new-theme]: Do not show provenance value if no provenance vocabulary or if no label for this provenance value.
1. fundedBy.component.ts: Added local field "provenancesCalculated" to check for each provenance label only once and do not show provenance if no vocabulary or if not label for this value.
2. result-preview.component.ts: Do not show provenance if no vocabulary or if no label for this value.
3. HelperFunctions.class.ts: In method "getVocabularyLabel()" added parameter "returnIfNotFound: boolean = true" to return null if no vocabulary or if no label for this value, when it is false.
2022-09-09 00:35:11 +03:00
Konstantinos Triantafyllou fa919431d3 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-09-08 16:44:08 +03:00
Konstantinos Triantafyllou 1c4551c408 Remove promise from user management service. Change user component in order to update user-info in case of session expired 2022-09-08 16:43:59 +03:00
argirok 97c11eb0ec Merge remote-tracking branch 'origin/new-theme' into new-theme 2022-09-08 16:30:58 +03:00
argirok 40154d6ad9 revert previous tests for backet sticky menu 2022-09-08 16:30:40 +03:00
argirok 7ea6bfad7a add destination parameter in get userinfo 2022-09-07 14:39:54 +03:00
Konstantina Galouni 2261f4ae6f [Library | new-theme]: orcidWork.ts: [Bug fix] When no resultLandingInfo.types, set work['type'] according to resultLandingInfo.resultType | icons.ts: [Bug fix] Remove unnecessary classes in orcid_add and orcid_bin icons - class had always the value of the first loaded icon (less problem). 2022-09-07 14:08:01 +03:00
Alex Martzios 6d84a2eb58 strip HTML of description in cards - browse communities section 2022-09-07 10:25:56 +03:00
Konstantinos Triantafyllou 523305d79b Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-09-06 17:07:19 +03:00
Konstantinos Triantafyllou 3c6fe34f29 Resources Pages: Change root breadcrumb to Dashboard if a dashboard is selected 2022-09-06 17:07:10 +03:00
Alex Martzios 66fecd2f41 make asynchronous calls for vocabularies when getting the result landing info 2022-09-06 16:28:51 +03:00
Konstantinos Triantafyllou 7bb2346ec2 Page Content: Fix replace header behaviour 2022-08-31 13:15:49 +03:00
Konstantinos Triantafyllou 00868405c8 Refix parenthesis in search 2022-08-31 12:55:09 +03:00
Konstantinos Triantafyllou d45c573a56 Search all: Add margin bottom from tabs. Search: Fix queries for projects, etc with miss parenthesis and fix queries with not includes in all content while DOI is available). 2022-08-31 12:27:20 +03:00
Konstantinos Triantafyllou 29100c8d6f Page content: Remove observer component vars and add them in subscriptions array. 2022-08-30 13:11:32 +03:00
Konstantina Galouni 2c27854213 [Library | new-theme]: #7963 - Parse field "eoscifguidelines" in result landing page to get eosc subjects.
1. resultLanding.service.ts: Added in parsing field "eoscifgiudelines" (resultLandingInfo.eoscSubjects).
2. parsingFunctions.class.ts: Added method "parseEoscSubjects()" | Method "checkAndAddEoscSubject()" updated - do not add eosc subjects in classifiedSubjects.
3. resultLanding.component.html: In <showSubjects> added [eoscSubjects]="resultLandingInfo.eoscSubjects".
4. showSubjects.component.ts: Added @Input() eoscSubjects: any[]; and show them as classifiedSubjects too.
2022-08-30 11:35:42 +03:00
Konstantinos Triantafyllou 27b47975aa Resources pages: Change breadcrumbs home route 2022-08-29 16:57:04 +03:00
Konstantinos Triantafyllou 81b3a5f8b4 Add breadcrumbs in resources pages. Change hide delay in navbar dropdown 2022-08-29 16:30:12 +03:00
Alex Martzios 89f9bb87bf remove code for "citations" tag (renamed to "references") - resultLanding service 2022-08-29 16:18:04 +03:00
Alex Martzios c27227923e split methodology into 2 pages (terminology & see-how-it-works) 2022-08-29 15:23:33 +03:00
Konstantina Galouni de78e628bf [Monitor Dashboard | new-theme]: Updated develop page and added example | Made graph and feedback line sticky in indicators' page.
1. develop.component.ts: Added example bullet for research products & Updated view of bullets (removed quotes - type bold).
2. page-content.component.ts:
   a. Added <div id="page_content_sticky_footer" #sticky_footer> and <div id="page_content_footer" #footer>.
   b. Added methods "ngAfterContentChecked()", "observeStickyFooter()", "calcStickyFooterOffset()" to calculate offset of sticky footer.
3. monitor.component.html: Added graph & feedback line as sticky_footer in >= medium screens and as footer in small screens.
2022-08-29 14:57:05 +03:00
Alex Martzios f77cfb48f9 remove SharedModule and use library's instead 2022-08-29 14:04:20 +03:00
argirok 8ba0ce7730 Linking: don't show modal when there are no additional paths
hide filter when there are no values available
2022-08-12 16:21:54 +03:00
Konstantina Galouni 561c15b8cd [Connect Admin | Library | new-theme]: Updated call for purging browser cache - through admin tools api.
1. environment.ts & environment.beta.ts: Updated property "deleteBrowserCacheUrl" to call admin tools api.
2. clear-cache.service.ts: Used updated property "deleteBrowserCacheUrl" and in GET request added CustomOptions.registryOptions().
3. connect-admin-customization.component.ts: Deleted unnecessary code for deleting layout.
2022-08-11 15:46:55 +03:00
Konstantina Galouni 27d7c7c118 [Connect Admin | Library | new-theme]: Added call to purge browser cache when updating content of community.
1. env-properties.ts & environments/: Added property "deleteBrowserCacheUrl".
2. clear-cache.service.ts: Added method "purgeBrowserCache()" to purge browser cache for a specific community.
3. entities.component.ts & menu.component.ts & pages.component.ts & affiliations.component.ts & edit-community.component.ts add-content-providers.component.ts & remove-content-providers.component.ts & add-projects.component.ts & remove-projects.component.ts & subjects-edit-form.component.ts & personal-info.component.ts & customization.component.ts: Call "_clearCacheService.purgeBrowserCache()" when adding/updating/deleting content of a specific community.
4. connect-admin-customization.module.ts: Added CommunitiesService in providers.
5. connect-admin-customization.component.ts: Added button to purge browser cache for all communities and connect.
2022-08-11 12:58:20 +03:00
Konstantina Galouni ac70b8c260 [Library | new-theme]: resultLanding.component.ts: [Bug fix] Added check if "resultLandingInfo.hostedBy_collectedFrom" is initialized | dropdown-filter.component.ts: [Bug fix] In method "isOpen()" added check if in client side. 2022-08-09 12:31:57 +03:00
Konstantina Galouni 9c194a3a56 [Library | new-theme]: searchPages/: Set default value null to @Input() openaireLink | env-properties.ts: In Dashboard type added "eosc". 2022-08-08 17:45:31 +03:00
Konstantina Galouni e2792d3be6 [Library | new-theme]: clear-cache.service.ts: Clear cache only if there is the "deleteCacheUrl" property. 2022-08-08 14:14:43 +03:00
argirok 123766d46e update Customization Options
remove unused property portalBuildTime
2022-08-08 13:16:13 +03:00
argirok 7069fe6151 rename layout to customization service, add delete method 2022-08-08 13:01:53 +03:00
argirok 1e3c9d7cba Eosc explore: latest changes/ corrections before review 2022-08-08 12:47:14 +03:00
Konstantinos Triantafyllou 1bbb064a01 Add Indicator Themes in menu item. Fix link in themes page 2022-08-05 15:50:53 +03:00
Konstantinos Triantafyllou f8f606ada7 Fix a bug in user.id parsing 2022-08-05 15:23:21 +03:00
Konstantinos Triantafyllou 460cbdfc9a Revert special item with previous style. Add type managers and members in notification form 2022-08-05 14:59:08 +03:00
Alex Martzios 3756f8df83 create indicator themes page (TODO: menu entry, breadcrumbs and dynamic text links) 2022-08-05 11:34:37 +03:00
Konstantinos Triantafyllou 6fbf67c221 Change size special item icon in sidebar 2022-08-05 10:33:04 +03:00
Konstantinos Triantafyllou 1a89313a13 Change menus page title 2022-08-04 18:43:27 +03:00
Konstantinos Triantafyllou 3f7078db16 Change special menu item style and move it to top 2022-08-04 17:58:45 +03:00
Konstantinos Triantafyllou a33226250b Add scale up animation for logo 2022-08-04 16:46:42 +03:00
Konstantinos Triantafyllou 6a7559a3ad Add replaceHeader in Navbar Header and a handler in layout service. Change header info in dashboard pages. 2022-08-04 15:29:08 +03:00
Konstantina Galouni fd9794ec3a [Library | new-theme]: timeout-interceptor.service.ts: Increased server and client timeout time when environment != production. 2022-08-03 18:30:25 +03:00
Konstantina Galouni d43f576d40 [Explore | Library | new-theme]: Added more refine filters in Repositories, Journals, Registries pages | Search & Datasource landing: Show not compatible datasources | Result Landing: get relations names by relationsVocabulary (dnet:relation_relClass.json).
1. env-properties.ts & environments/: Removed old properties searchLinkToEntityRegistriesDataProvidersTable and searchLinkToJournalsTable.
2. fetchDataproviders.class.ts & searchDataproviders.service.ts: Removed old unused methods related to subjects/ tables/ csv.
3. searchFields.ts: Added more refine filters in Repositories, Journals, Registries pages (COMPATIBLE_DATAPROVIDER_FIELDS, ENTITY_REGISTRIES_FIELDS, JOURNAL_FIELDS).
4. result-preview.component.ts: Added field @Input() deposit: boolean = false;
5. result-preview.component.html:
   a. Added link to landing page even for not compatible datasources.
   b. Added class "uk-label-danger" when compatibility = "not available" only when deposit=true.
6. searchResultsInDeposit.component.html: In <result-preview> added parameter deposit="true".
7. dataProvider.component.html:
   a. Added class "uk-label-danger" when compatibility = "not available".
   b. Show custom "Not yet registered" compatibility label when compatibility = "not available".
8. ISVocabularies.service.ts: Added methods for getting relationsVocabulary (dnet:relation_relClass.json).
9. resultLanding.service.ts & parsingFunctions.class.ts: When parsing relations, get relationName from relationsVocabulary.
10. resultLanding.component.ts: Get relationsVocabulary and pass it to "getResultLandingInfo()".
11. orcid-work.component.ts: When calling "getResultLandingInfo()", added null parameter for relationsVocabulary.
12. configuration.service.ts: [Bug fix] Added more checks in method "isPageEnabledByStateAsync()".
2022-08-03 18:21:14 +03:00
Konstantinos Triantafyllou f5def43fbd Merge commits 2022-08-03 00:18:38 +03:00
Konstantinos Triantafyllou d55b1819de Fix help text save button while form is invalid 2022-08-02 23:23:19 +03:00
Konstantinos Triantafyllou 35c3728d7b Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-08-02 23:13:19 +03:00
Konstantinos Triantafyllou c1e1a3508c Fix layout service change header-height variable only in browser. Fix formControlName in helptext forms. Change resources menu item structure. 2022-08-02 23:13:12 +03:00
Alex Martzios 7ca1d52f26 lowercase research product entites in search 2022-08-02 16:53:05 +03:00
Alex Martzios c8d27f6b57 update tooltip for research products in search 2022-08-02 16:49:09 +03:00
Alex Martzios 3f7a9dda90 fix widths for advanced search for - when selecting publication date and specific date range 2022-08-02 15:42:32 +03:00
Alex Martzios 23c0ea997c resultLanding - hide marketplace links in explore (visible only for eosc explore) 2022-08-02 14:55:33 +03:00
Alex Martzios 05ca7c7eea change the way we get the impact factors for search results 2022-08-02 12:43:39 +03:00
Konstantinos Triantafyllou 39ddba0eba Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-08-02 11:24:03 +03:00
Konstantinos Triantafyllou a0aa836797 Revert "Remove section default from linking."
This reverts commit 0092f060c1.
2022-08-02 11:21:19 +03:00
argirok d46b03c31a Merge remote-tracking branch 'origin/new-theme' into new-theme 2022-08-02 11:18:02 +03:00
Konstantinos Triantafyllou 0092f060c1 Remove section default from linking. 2022-08-02 11:02:45 +03:00
Konstantinos Triantafyllou a42140bb1c Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-08-01 22:26:09 +03:00
Konstantinos Triantafyllou 46d9fe9abb Fix range filter initialization 2022-08-01 22:26:01 +03:00
argirok dbbb832bff Connect Admin Customization: create button that updates layout timestamp and create new css files 2022-08-01 17:32:25 +03:00
argirok 3041f80bf7 Customization: add default background in linking, add customize buttons variables 2022-08-01 12:23:57 +03:00
argirok 26d849693b Merge remote-tracking branch 'origin/new-theme' into new-theme 2022-08-01 12:19:11 +03:00
argirok 17200edf21 Customization: updates for buttons customization
add property connectportalUrl - use it for preview and build css methods
2022-08-01 12:18:47 +03:00
Alex Martzios aaf8c50c68 Search - add tooltip for research products 2022-07-29 12:24:15 +03:00
Konstantinos Triantafyllou 5cb7bc7cca Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-07-29 12:16:24 +03:00
Konstantinos Triantafyllou d7b394520f Fix a style bug in notification-user. Add manager authorization in admin login guard(optional). Add resources service for Resource menu item build. Move methodology in library. Fix sub-submenu items with _self target in navigation bar. 2022-07-29 12:15:54 +03:00
argirok a41ef51cda Customization: set default light color to f9f9f9 2022-07-28 16:51:13 +03:00
argirok 84762753b9 connect user compoonent: update method to check if user is subscribed, avoiid double messages, make sure it redirects properly after login and subscribe 2022-07-27 16:57:46 +03:00
argirok 6799cb3f3f Merge remote-tracking branch 'origin/new-theme' into new-theme 2022-07-27 14:46:09 +03:00
argirok 29bb895502 customization add position for form background 2022-07-27 14:45:42 +03:00
argirok 814a061ab8 Add background for dashboard home and deposit pages 2022-07-27 13:50:32 +03:00
Konstantinos Triantafyllou e04d825c03 Add indicators page for monitor. Add tooltip in page/class content form and change container size. Add parentClass parame in theme page in order to view a specific style. Change admin login guard in order to allow curators to have access in some pages. Enable isPageEnabled method in configuration page in order to check if a specific page in specific portal isEnabled. 2022-07-27 12:34:10 +03:00
Konstantinos Triantafyllou 3eba038893 Allow create group for curators too. 2022-07-26 14:32:52 +03:00
argirok 8c6f74c5fe Customization changes: add suffix for connect and default css files, add css only in server, add property for build date 2022-07-25 17:03:42 +03:00
Alex Martzios 82833bcf11 admin - edit form - 'notify managers' is now false by default 2022-07-25 15:39:29 +03:00
Konstantinos Triantafyllou 71437f2085 Customization Options: Delete variables primary and secondary from getVariables 2022-07-25 11:47:33 +03:00
Konstantinos Triantafyllou dd9f893e2f Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-07-25 11:16:10 +03:00
Konstantinos Triantafyllou 4f030e2274 Page content: Add uk-blur-background class 2022-07-25 11:16:01 +03:00
argirok 6be94301fa Customization: remove Date 2022-07-22 18:41:15 +03:00
argirok e7724b4ad9 Merge remote-tracking branch 'origin/new-theme' into new-theme 2022-07-22 18:36:12 +03:00
argirok b1279e0de5 Customization: save and build css
on preview create preview css
2022-07-22 18:35:51 +03:00
argirok 5a3afe1d8f updates on customization/ using built css and preview css 2022-07-22 18:33:54 +03:00
argirok 7641c46d34 Customization Options: add date, update getVariables method 2022-07-22 10:35:30 +03:00
argirok 5abb8b6384 ConnectHelper: add check for test community 2022-07-21 16:07:51 +03:00
Konstantinos Triantafyllou 8e09a2c68d Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-07-21 15:00:32 +03:00
Konstantinos Triantafyllou f9f8363d5c Add method add variables in customization options 2022-07-21 15:00:26 +03:00
Alex Martzios 97250479ed fix error for reordering featured menu items 2022-07-20 12:14:38 +03:00
Alex Martzios a79e9f6cc9 display normal & featured menu on connect front-end based on show/hide boolean value 2022-07-20 12:13:55 +03:00
Konstantinos Triantafyllou 2c289af1e6 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-07-19 15:19:04 +03:00
Konstantinos Triantafyllou a98af53385 Stakeholder-service: Add propagate option in changeVisibility. Modal: Remove cancel event from ok button 2022-07-19 15:18:56 +03:00
Konstantinos Triantafyllou ad68dcb0a8 follow up commit 2022-07-19 14:25:11 +03:00
Konstantinos Triantafyllou 9f64477585 Menu: Fix parent options update after create, edit or delete of a parent MenuItem. 2022-07-19 14:23:01 +03:00
Konstantinos Triantafyllou f664c4a232 Orcid works: Change methods from private to puplic and remove uk-text-muted from disable orcid-button 2022-07-19 11:16:24 +03:00
Konstantinos Triantafyllou 63fe4d2e5a Fix query when any field not includes is not at first field. Align basket in liking. Fix a bug while try to remove a result after page reload. 2022-07-19 00:46:45 +03:00
Konstantinos Triantafyllou f4a723d3ac Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-07-18 18:57:06 +03:00
Konstantinos Triantafyllou ff01c9a9c9 Change lingkin next steps buttons. Fix a bug in query of results in claims. Add dropdown-filter in claims and fix bug hiding behind basket. 2022-07-18 18:56:59 +03:00
Alex Martzios 8254edb477 progress on adding/removing parent option 2022-07-18 16:25:19 +03:00
Alex Martzios 019429e021 toggle menu & featured menu (TODO: edit child menu item) 2022-07-18 14:51:08 +03:00
Alex Martzios 0f80797035 finish menu & featured menu items 2022-07-18 13:07:03 +03:00
Konstantinos Triantafyllou f38c56fa7d Fix a bug with sticky condition in page-content 2022-07-18 00:46:58 +03:00
Konstantinos Triantafyllou 9a03dd9a3d Import variables in quick-contact.less. Remove uk-section from breadcrumbs in search-page 2022-07-18 00:45:26 +03:00
Konstantinos Triantafyllou 01fd4ac49f Filters title alignment. Rename some component css files to less. 2022-07-17 16:01:39 +03:00
Alex Martzios c5da95fb48 change type var for menu component 2022-07-15 16:56:50 +03:00
Alex Martzios facb821605 reordering of children menu items (for admin users) 2022-07-15 15:24:23 +03:00
Alex Martzios 13a3590559 use new API response for getting the menu items 2022-07-15 13:43:11 +03:00
Alex Martzios 5ec26ce0cf create Menu class for mapping AP response 2022-07-15 13:36:55 +03:00
Alex Martzios e81b3bdc72 finish menu items for non-admins 2022-07-15 13:28:55 +03:00
Alex Martzios 5bbbc4e708 progress on menu for non-admin users - need to save the re-ordering of the items in the backend 2022-07-15 10:16:42 +03:00
Konstantinos Triantafyllou e3f082b802 Transition Group: Add enable disable functionallity. User component: Add condition to avoid double message for login. 2022-07-14 17:38:54 +03:00
Konstantinos Triantafyllou 013ce7d5f4 Add swap function for arrays. Add reorderElements in stakeholder service 2022-07-14 14:37:07 +03:00
Konstantinos Triantafyllou 333973aefd Fix condition for menu tab in pages and entities. Page content: Add isStickyActive accessor. Users: Check if sticky is Active in order to apply margins. 2022-07-14 11:29:29 +03:00
Konstantinos Triantafyllou 3b6498cb2e Dropdown Filter: Add overflow-auto. Fix all forms with disabled fields. Change all dashboard pages in order to apply sticky in actions instead of header. 2022-07-13 20:25:19 +03:00
Konstantinos Triantafyllou 770c3fb3ef Deposit modal: Fix grid. Search form: fix paddings 2022-07-13 10:37:12 +03:00
Konstantinos Triantafyllou 4fa4a33a68 Increase close icon in fs-modal and remove deprecated icon from library 2022-07-13 10:13:29 +03:00
Konstantinos Triantafyllou ec57fc9b5c Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-07-13 10:12:55 +03:00
Konstantinos Triantafyllou 37becd5949 Remove double quotes in case of forced double quotes. Fix parenthesis in quotes queries 2022-07-12 17:44:25 +03:00
Konstantina Galouni 85a7030929 [Library & Connect Admin | new-theme]: edit-community.component.ts & portals.component.ts & pages.component.ts & page-help-content-form.component.ts & page-help-contents.component.ts & entities.component.ts & divIds.component.ts & class-help-content-form.component.ts & class-help-contents.component.ts: On save/update/delete/toggle community/page/entity/divId/helptext/divHelptext , call clearCache() to immediately get changes in the dashboards. 2022-07-12 16:50:56 +03:00
Konstantinos Triantafyllou ea95219728 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-07-12 16:24:29 +03:00
Konstantinos Triantafyllou 87e48b57ae Create transtion group module in order to handle animation during reordering of vertical items 2022-07-12 16:24:23 +03:00
Konstantina Galouni 14bd18c9d8 [Library | new-theme]: Organizations: Use openorgs identifier when available | In social sharing button and modal (landing) use OpenaireEntities.
1. organization.service.ts & searchOrganizations.service.ts: When "objIdentifier" starts with "openorgs____", set canonicalId and id to openorgs id.
2. dataProvider.component & organization.component & project.component: In button and modal for social media sharing, use name of entity by OpenaireEntities.
2022-07-12 13:20:28 +03:00
Konstantinos Triantafyllou ccd220b68a Page and class help content form: Move buttons in inner section 2022-07-12 11:42:56 +03:00
Konstantinos Triantafyllou 98eb169a54 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-07-11 17:32:59 +03:00
Konstantinos Triantafyllou b758cf0f5e Navbar: Fix removal of margin in bottom of dropdown-nav 2022-07-11 17:32:51 +03:00
Konstantina Galouni cfd44ec96b [Library | new-theme]: full-screen-modal.component.ts & alert.ts: [Bug fix] Added private static counter field to increase on each modal creation and set id according to the counter, to delete from DOM in "modal-container" the destroyed modal. 2022-07-11 17:27:44 +03:00
Alex-Coded4 74bcc96847 start on new featured menu items 2022-07-11 10:25:00 +03:00
Konstantinos Triantafyllou 02bf9abee4 Delete isLoggedIn from portals and class-contents 2022-07-08 21:57:12 +03:00
Alex-Coded4 2d0893ff45 add paging for featured datasets tab (enermaps) 2022-07-07 12:49:10 +03:00
Konstantina Galouni fc5fcfaede [Connect & Library | new-theme]:
1. projects-in-modal.module.ts: Imported DropdownFilterModule.
2. projects-in-modal.component.ts: Use common <dropdown-filter> instead of custom uk-button and uk-dropdown.
3. full-screen-modal.component.ts: [Bug fix] In ngOnDestroy added check for observer - error in ssr.
2022-07-07 10:54:12 +03:00
Alex-Coded4 b53d453785 Deposit - add external icon to external "Zenodo Repository" link 2022-07-07 09:57:11 +03:00
Konstantinos Triantafyllou ad15aaae31 Subsciber-invite: Remove longView. Fix conditions 2022-07-06 12:31:55 +03:00
Konstantinos Triantafyllou db5c95fe24 Fix my claims and admin claims pages with new UI. 2022-07-05 17:48:28 +03:00
Konstantinos Triantafyllou 8c349cc817 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-07-05 16:41:17 +03:00
Konstantinos Triantafyllou b3e926164b Change card of a Claim base on new UI 2022-07-05 16:41:11 +03:00
Alex Martzios 2bc5ba9e97 fix for tooltip in 'Add to ORCID' button - result preview card 2022-07-05 12:32:58 +03:00
Konstantinos Triantafyllou 3b2e9ebbee Revert mailPrefs files used by explore. 2022-07-05 11:49:34 +03:00
Konstantina Galouni 72905d8599 [Connect Admin | Library | new-theme]: Redesign of remove/add projects and zenodo communities pages according to the new mocks.
1. searchProjects.service.ts: Added "params" parameter in "getFunders()" method.
2. resultsAndPagesNum.component.ts: Do not show number of results and pages when no results.
3. manage-communities.module.ts: Remove "group" and "lock" icons from registerIcons call.
4. add-projects.component & communityProjects.module.ts & manage-projects.component.ts & remove-projects.component: Redesign of remove/add projects pages according to the new mocks.
5. add-zenodo-communities.component & manage-zenodo-communities.component & preview-z-community.component.ts & zenodo-communities.component.ts & zenodo-communities.module.ts: Redesign of remove/add zenodo communities pages according to the new mocks.
2022-07-05 01:31:56 +03:00
Konstantinos Triantafyllou d925b62133 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-07-04 22:34:35 +03:00
Konstantinos Triantafyllou 376d56d395 Navbar add uk-light if dark background is applied in main menu 2022-07-04 22:34:28 +03:00
Konstantinos Triantafyllou de829d2bcc Deposit: Make section from large to normal and fix full screen modal 2022-07-04 22:10:38 +03:00
Konstantinos Triantafyllou f08c63d384 Input: Add placeholder class in static placeholder in select 2022-07-04 21:43:50 +03:00
Konstantinos Triantafyllou 721a8c6a09 Add mining icon. Add method to get Affiliations in affiliations service. Remove cancel emit from ok button in full modal 2022-07-04 21:38:27 +03:00
Konstantinos Triantafyllou be48608545 Fix bug with overflow in full screen modall 2022-07-04 18:00:10 +03:00
argirok e61d4495ae Merge remote-tracking branch 'origin/new-theme' into new-theme 2022-07-04 14:13:18 +03:00
argirok bdcf1d6bdf Customization: more changes for the new mocks 2022-07-04 14:12:55 +03:00
Konstantina Galouni 58be998563 [Library | new-theme]: community.service.ts: Comment "clearSubscriptions()" in getCommunityAsync() which probably causes bug by canceling call for community information. 2022-07-04 13:12:42 +03:00
Konstantinos Triantafyllou de493c8492 Fix full screen modal base on new UI 2022-07-04 11:32:24 +03:00
Konstantinos Triantafyllou d7f343f317 Change header_height css variable in layout service 2022-07-02 21:32:10 +03:00
Konstantinos Triantafyllou a738d3bb49 Sidebar: Remove active element. Pages, entities, portals, classes: Fix grid padding. Display-claims: disable search and dropdown-filter. 2022-07-02 14:43:18 +03:00
Konstantinos Triantafyllou 5a58cc01f9 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-07-01 15:44:18 +03:00
Konstantinos Triantafyllou 995e73a1b5 Fix dropdown-filter bug with hide() 2022-07-01 15:44:05 +03:00
Konstantina Galouni 0839b6df60 [Connect Admin | Library | new-theme]: Match menu for communities in admin & dashboard | Added missing property "adminPortalURL".
1. environments/: [Bug fix] Added missing property "adminPortalURL".
2. community-routing.module.ts: Added "user-info" path for each community.
3. app.routing.ts: Set "hasSidebar" to true for "user-info" path.
4. app.component.ts:
   a. Set "user-info" path in userMenuItems under community if any selected.
   b. In menuHeader for community set logoUrl and logoSmallUrl to headerLogoUrl (community logo).
   c. When community is selected, added in menu all items of dashboard too (menu same in admin and dashboard).
5. app.component.html: In <navbar> added input parameter "communityId".
6. navigationBar.component.ts: On "initialize()" method, clear "showEntity" and "showPage" fields before filling them again and subscribe to communityInformationState if there is a community and adminToolsAPIURL OR if adminToolsPortalType is community (admin & dashboard).
7. community.service.ts: On getCommunityAsync() method, after await call clearSubscriptions().
2022-07-01 11:27:47 +03:00
Alex Martzios ffd997dfcb changes for deposit component and deposit > connect 2022-06-30 18:24:08 +03:00
Konstantinos Triantafyllou 936c870abc Make some page alignments in all dashboard pages 2022-06-30 18:22:35 +03:00
Konstantinos Triantafyllou 7ebf4f7f90 Add dropdown-filter component. Fix Paging format base on new mocks. Make some alignments in subscribers, pages, search-page and result-prview. UI of Manage Links page except result preview. 2022-06-30 13:40:37 +03:00
Konstantinos Triantafyllou 13ef173406 Add target condition in urls of user menu. Fix height of notification list 2022-06-29 14:33:21 +03:00
Konstantina Galouni bbbb711865 [Library | new-theme]: Bug fix in download from of result landing links | In menu items added "target" field to define if urls open in new tab and have external icon.
1. availableOn.component.ts: [Bug fix] Added class "uk-link-text" in links of license and providers.
2. menu.ts: In MenuItem added field target: string = "_blank"; and in constructor added parameters and initialization of target, type, isFeatured.
3. navigationBar.component.html: Updated checks for "custom-external" class and target according to target field of MenuItem.
4. app.component.ts: In "Manage" menu item set target to "_self".
5. menu.component.ts: (Admin form) In method "menuItemSaveConfirmed()" added: this.menuItemForm.value.target = this.menuItemForm.value['type'] == "internal" ? "_self" : "_blank";
2022-06-29 13:56:19 +03:00
Konstantinos Triantafyllou 9b5607fbd0 Notify form: Open dropdown on empty. Delele unsused mailPrefsComponent. Finish UI of subscribers and invite subscriber. Fix an input bug in case of adding chip with enter key 2022-06-28 21:13:40 +03:00
argirok a85ec2bfbd Linking projects: when there are no results filters can't be removed 2022-06-28 13:19:08 +03:00
Alex Martzios 78fcf59349 fix for footer's develop link 2022-06-28 09:55:49 +03:00
Konstantinos Triantafyllou 4625ebf967 Finish UI of class help texts list, edit page/class help content 2022-06-27 15:50:21 +03:00
Alex Martzios beb21be4a0 tweaks for navbar (featured menu items) 2022-06-27 13:46:39 +03:00
Alex Martzios cffe3053ce tweaks for fullscreen modal 2022-06-27 13:22:24 +03:00
Konstantinos Triantafyllou 67211e78c6 Fix dark background in advanced search form 2022-06-27 12:37:21 +03:00
Konstantina Galouni 4d520d71fe [Library | new-theme]: Added scrolling in links and my links | set 403 on errorPage when private data | Show pid re3data lowercase.
1. displayClaims.component.ts & searchMyOrcidResults.component.ts: Added scrolling in my/all claims page and in my orcid links page.
2. errorPage.component.ts: Set statusMessage and statusCode to 403 when page is private.
3. showIdentifiers.component.ts: Do not add uk-text-uppercase for "re3data" pid.
4. myOrcidLinks.component.ts: In "No ORCID links found" added classes "uk-text-meta uk-text-large uk-text-center" instead of alert.
5. searchMyOrcidResults.component.html: Added condition if totalResults > 0 and previewResults > 0 for <no-load-paging>.
2022-06-27 12:00:30 +03:00
Konstantinos Triantafyllou 5e1fde7841 Add blend multiply to all logos in page content header. Add placeholder logo to getLogoURL function. Fix a bug with active menu item. Finish UI of pages, entities, portals, classes and class page content. 2022-06-26 23:30:54 +03:00
Konstantinos Triantafyllou 950f50030f Remove bulk options from portal page and entities 2022-06-24 18:20:40 +03:00
Konstantinos Triantafyllou 4966a1d342 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-06-23 19:47:00 +03:00
Konstantinos Triantafyllou 38f3e7656f Authors remove uk-box-no-shadow from button. Fix typos in guards. Sidebar: Fix second menu items subnav 2022-06-23 19:46:53 +03:00
Konstantina Galouni 428a48223a [Library | new-theme]: Sorted Advanced filters alphabetically | Added "pid" in advanced filters for Datasource | Organization lannding: projects tab: Added number of selected values in funder filter.
1. projects-in-modal.component.ts: Added the missing number of selected values next to the filter name - on updateFilters() method, update filter.countSelectedValues.
2. searchFields.ts:
   a. Added pid in  DATASOURCE_ADVANCED_FIELDS.
   b. Added method "sortFieldsByName()" to sort fields by name and leave "q" filter (Any field) first.
3. searchAll.component.ts & searchDataProviders.component.ts & searchResearchResults.component.ts & searchProjects.component.ts & searchOrganizations.component.ts: Added "this.searchFields.sortFieldsByName(this.fieldIds, this.fieldIdsMap);" to sort advanced fields alphabetically.
2022-06-23 17:30:45 +03:00
argirok d12138bc2a resultLanding: update jsonld to include isPartOf url with FOS/SDG search pages 2022-06-22 16:13:28 +03:00
Alex Martzios 18b403bec0 changes for deposit component (add input for the assets path) 2022-06-22 15:36:15 +03:00
Konstantina Galouni d9b8ea0476 [Library | new-theme]: newSearchPage.component.html: Updated classes for margins/paddings in search form, so that breadcrumb position is the same in all pages. 2022-06-22 12:57:00 +03:00
Konstantina Galouni c6a7b6a400 [Library | new-theme]: navigationBar.component.html: Added "uk-active" class in custom menu items and subitems. 2022-06-21 19:52:45 +03:00
Konstantina Galouni bbce674da9 [Connect & Library | new-theme]: Breadcrumbs position updated in html pages | Bug fix in custom menu items | In search menu, use OpenaireEntities.
1. app.component.ts: In search menu, use OpenaireEntities.
2. navigationBar.component.ts: [Bug fix] In method "isTheActiveMenu()", update condition to "if(menu instanceof MenuItem || !menu.rootItem)" - custom menu items via admin tools are MenuItems but not instanceof MenuItem.
3. projectsPage.component.ts & nationalBulletinsPage.component.ts & contentPage.component.ts: Margins & paddings updated, so that breadcrumb is at the same position on all pages.
2022-06-21 19:37:21 +03:00
Konstantinos Triantafyllou 0c4df8a34d Change modal title background in dashboard modals 2022-06-21 13:41:44 +03:00
Alex Martzios 0a27651a65 pages and entities page actions structure 2022-06-21 13:17:43 +03:00
Alex Martzios 3559b7a7ca tweaks for admin: pages, entities, classes and portals html files 2022-06-21 12:22:28 +03:00
Konstantinos Triantafyllou b7f5f17b6a Theme: Add subnav alt pills 2022-06-20 19:57:43 +03:00
argirok 55257b2718 fix issue with linking: do nothing when confirm linking is clicked 2022-06-20 17:09:25 +03:00
Konstantina Galouni fff6dffd88 [Library | new-theme]:
1. orcid.service.ts: [Bug fix] In method "getOrcidWorks()", updated response type from <any[]> to <any> --> "bulk" object with an array inside is returned.
2. orcid-work.component.ts: [Bug fix] In method "getOrcidWorks()", parsing of bulk works fixed to not have problem when null response or error object inside bulk is returned.
2022-06-20 16:55:05 +03:00
Konstantinos Triantafyllou 65eb622653 Remove box-no-shadow from modal buttons 2022-06-20 16:20:03 +03:00
Konstantinos Triantafyllou 240a0c1b0e Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-06-20 16:17:40 +03:00
Konstantinos Triantafyllou cc417adb6b Fix all dashboard modals heights. Role verification remove custom buttons. 2022-06-20 16:17:26 +03:00
Konstantina Galouni dea00ca988 [Library | new-theme]: Bug fixes in orcid (when work was deleted from ORCID ui, problem in "View orcid work" button & on grant (when not granting, but click on logout, success notification was appearing) | Deleted unused code.
1. resultLanding.component.ts & resultLanding.service.ts: Deleted code related to Open Citations (unused and deprecated).
2. myOrcidLinks.component.ts & orcid-work.component.ts: [Bug fix] On method "openGrantWindow()", condition changed to show success notification if (ev.isTrusted && ev.origin == location.origin && ev.data == 'success') - notification was appearing on logout.
3. orcid-work.component.ts:
   a. In #workModal set large="true".
   b. [Bug fix] In method "getPutCode()", called in "View orcid work" button, added check and warning notification if response is null - used to open empty modal.
   c. [Bug fix] In handleError() method, messages fixed -- used to show ...with pids: {{title}}...
4. datasourcesHelper.class.ts: In method "getQueryPrefix()" deleted commented conditional code for the environment.
2022-06-20 15:56:29 +03:00
Alex Martzios 657ff61207 show 'more authors' for result preview 2022-06-20 14:12:48 +03:00
Konstantinos Triantafyllou d01ba65537 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-06-20 13:11:29 +03:00
Konstantinos Triantafyllou 2ba6777d97 Input: Change options breakpoint to 6 2022-06-20 13:11:21 +03:00
Konstantina Galouni 65bf435e12 [Library | Explore | new-theme]: Added a container for modals | Fixes in orcid modal | for journals and registries use common query for beta & prod.
1. app.component.ts: Added <div id="modal-container"></div>.
2. alert.ts: [Bug fix] Updated target container in modal to id #modal-container (get portal specific css and have a generic z-index).
3. datasourcesHelper.class.ts: In method getQueryPrefix(), have a common setting for beta & prod environments.
4. orcid-work.component.ts: In grant modal, removed uk-text-center class and added [overflowBody]=false.
2022-06-20 13:02:23 +03:00
Konstantinos Triantafyllou d42edec539 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-06-17 19:47:52 +03:00
Konstantinos Triantafyllou bf80e2e0b4 Create a new interface for backgrounds and added to quick contact. Modal: Align title to the left 2022-06-17 19:47:47 +03:00
Konstantina Galouni fba0531dbf [Library & common-assets | new-theme]: Fixes in landing for offcanvas right sidebar.
1. resultLanding.component.html: Moved offcanvas right sidebar outside grid (problem with upcoming new openaire theme - .less version).
2. landing-utils.css: [Bug fix]: In  .landing .uk-offcanvas .uk-dropdown, set left and right to auto (dropdown shouldn't go out of offcanvas).
2022-06-17 16:20:17 +03:00
Konstantinos Triantafyllou 8a64b576d0 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-06-17 02:58:03 +03:00
Konstantinos Triantafyllou 398b80d228 Change all offcanvas with uikit class. FIx search filter checkbox and radio label. Modal: Add container to avoid insert class at DOM 2022-06-17 02:57:56 +03:00
Konstantina Galouni fb4df63f19 [Library & common-assets | new-theme]: z-index problems in landing pages & scrolling on page change in tabs and versions modals | Bug fix in projects tab of organizatio landing.
1. landing-utils.css: [Bug fix] z-indexes of uk-dropdown set to 981 (landing only), z-index of #main-tabs-div set to 978, z-index of graph_and_feedback set to 979.
2. showAuthors.component.ts: [Bug fix] Added @Input() isSticky: boolean = false; and when isSticky is true, do not show orcid info & dropdown for authors (z-index problem).
3. resultLanding.component.ts: Added scrolling in "References" and "External Databases" (bioentiites) tabs on page change.
4. resultLanding.component.html: [Bug fix] For the right sidebar, added inner <div class="uk-overflow-auto uk-height-1-1"> inside sticky - z-index problem.
5. result/deletedByInference.component.ts & organization/deletedByInference.component.ts: Added scrolling on page change.
6. projects-in-modal.component.ts:
   a. Added scrolling in "Projects" tab on page change.
   b. Show number of projects and pages always.
   b. [Bug fix] On filterChange(), set page=1.
7. landing-header.component.ts: Added parameter isSticky in <showAuthors>.
8. Added scrolling in "Related Data Sources" tab on page change.
2022-06-16 19:37:31 +03:00
Konstantinos Triantafyllou 4ed89bac13 Sidebar: Add uk-nav-default class in uk-nav. Pagination: Change ratio of icons. Theme preview: Add some missing components 2022-06-16 17:54:50 +03:00
Alex Martzios fc73b55832 tweaks for inputs, buttons and tables to match new theme 2022-06-16 17:24:36 +03:00
Konstantinos Triantafyllou 0bd6b3cfb1 Support not includes in advanced form for any field 2022-06-16 12:47:21 +03:00
argirok 9e7a6852cc Landing: scroll to tab top when change page inside a tab 2022-06-16 10:56:09 +03:00
argirok 13ae37cb61 Tabs: fix scrolling when header is sticky 2022-06-16 10:22:40 +03:00
Konstantinos Triantafyllou d6fa3a87fa Change navbar-height to header-height in langing pages 2022-06-16 01:44:03 +03:00
Konstantina Galouni 25b98c9af0 [Library | new-theme]: cache-interceptor.service.ts: [Bug fix] Updated urls in cachingRequests to include new refine fields and new ordering. 2022-06-15 14:59:38 +03:00
Konstantina Galouni 7dc4c5e664 [Library | new-theme]: Removed parsing and display of special clause 39 (esc39) | In parsing for open access mandate for datasets, added check if field is "projectoamandatedata" (ecarticle29_3 to be renamed to projectoamandatedata).
1. project.component.html & result-preview.component.html: Do not display label for "Special Clause 39".
2. project.service.ts:
   a. Removed parsing of ecsc39.
   b. For parsing of openAccessMandateDatasets, use projectoamandatedata or ecarticle29_3.
3. searchDataproviders.service.ts & searchOrganizations.service.ts & searchResearchResults.service.ts: Removed sc39 from "title" of SearchResult.
4. searchProjects.service.ts:
   a. Removed sc39 from "title" of SearchResult.
   b. Removed parsing of ecsc39.
   c. For parsing of openAccessMandateDatasets, use oamandatedata or ecarticle29_3.
5. organizationInfo.ts: Removed "sc39: string;" from OrganizationProject.
6. projectInfo.ts: Removed "specialClause39: string;" from ProjectInfo.
7. searchFields.ts: Removed "projectecsc39" and added "projectoamandatepublications" in PROJECT_REFINE_FIELDS.
8. result-preview.ts: Removed "sc39: string;" from ResultTitle and ResultPreview | Do not set sc39 in searchResultConvert().
2022-06-15 13:54:49 +03:00
Konstantina Galouni e9bbceebe0 [Library | new-theme]: newSearchPage.component.html: Added in <loading> [ngClass]="'uk-height-medium uk-display-block uk-margin-xlarge-top'", to increase height when only loading is visible. 2022-06-15 13:35:57 +03:00
Konstantina Galouni 8f450e1be6 [Library | new-theme]: showSubjects.component.ts: Bug fixes in subjects.
a. Updated "view all" functionality and how subjects by vocabulary are displayed.
b. Added setTimeout in ngAfterViewInit().
c. Added check in getKeys() if map is defined.
d. Added checks in <modal-alert> for subjects and subjects by vocabulary.
e. Set large="true" in <modal-alert> for subjects by vocabulary.
2022-06-15 13:32:22 +03:00
Konstantinos Triantafyllou 6984e4a4c6 Fix a bug with arrow in slider of selected filters. 2022-06-15 11:08:09 +03:00
Konstantina Galouni ed7e66852a [common-assets & openaire-theme & Library | new-theme]: Updated class for graph color and moved to openaire.css | z-index fixes in dropdown and in landing pages.
1. dropdown.css: [Bug fix] Added z-index: 1 in uk-dropdown to prevent dropdown from being on top of menu.
2. text.css: Removed classes "text-orcid" and "text-argos" (moved to openaire-theme/css/openaire.css.
3. openaire.css: Removed class "graph" and added "text-graph", "text-orcid", "text-argos".
4. dataProvider.component.html & organization.component.html & project.component.html & resultLanding.component.html & newSearchPage.component.html: Use class "text-graph" instead of "graph" for graph color.
5. landing-utils.css: [Bug fix] Updated z-index of #graph_and_feedback to 980 (previous 979) to be on top of tabs in landing pages | background of #main-tabs-div was set twice.
2022-06-14 17:00:13 +03:00
Alex Martzios ba70aaa12e comment out featured menu item - nav bar for now 2022-06-14 13:28:16 +03:00
Alex Martzios a89710765e fix for loading animation in landing pages 2022-06-10 14:56:32 +03:00
argirok 9caf036b12 improvements for autocomplete 2022-06-10 12:43:21 +03:00
argirok cd839447a4 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-06-10 11:21:26 +03:00
argirok c1213b9836 SEO - jsonld: parse all subjects put keep at most 10 2022-06-10 11:19:40 +03:00
Alex Martzios c5050c521f fix for showAuthors component - modal 2022-06-10 11:17:46 +03:00
argirok ec4d727aaa Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-06-09 17:58:39 +03:00
argirok de3ae0dcf1 Entities autocomplete: show selected value if the service doesn't return 2022-06-09 17:58:12 +03:00
argirok f8fb76563e Autocomplete show the id if the service doesn't return any results 2022-06-09 17:54:05 +03:00
Konstantina Galouni c9143ebbf0 [Library & common-assets | new-theme]: min-width in landing right sidebar | fix in classified subjects display | tooltip for license in download from.
1. landing-utils.css: Added class .landing-right-sidebar-min-width { min-width: 360px; }.
2. resultLanding.component.html: In right sidebar added class "landing-right-sidebar-min-width".
3. showSubjects.component.ts: [Bug fix] Removed class "uk-flex-inline" from keys for loop div - so that each tag goes to a new line.
4. availableOn.component.ts: Added uk-tooltip for accessRight tooltip | On hovering licence, show in tooltip the whole value.
2022-06-09 17:51:58 +03:00
argirok 512d1401df minor changes in autocomplete 2022-06-09 17:30:51 +03:00
argirok b451a2ea3a fix multiple promises - one canceling the other - call service once 2022-06-09 16:52:57 +03:00
Konstantina Galouni f974e91c25 [Explore & Library & openaire-theme | new-theme]: Updated parsing of classified subjects by using a vocabulary | Added parsing of instance.license in Download from | Added feedback functionality for fos and sdgs in landing | #7509 Parsing both citations and references fields | In "view all/less" links added chervon-right icon with class "view-more-less-link".
1. fos.component.ts & sdg.component.ts: Added method "urlEncodeAndQuote()" to encode and then quote a string.
2. fos.component.html & sdg.component.html:
   a. "Beta" badge was updated to yellow uk-text-large.
   b. Link to the simple search page instead of the advanced and urlEncodeAndQuote the parameter used in url.
3. link.css: Added class "view-more-less-link" to set on ::after "chevron_right" icon (not underlined on hover) - used in "view all/more/less" links.
4. dataProvider.component.html & project.component.html & fundedBy.component.ts & relatedTo.component.ts & showIdentifiers.component.ts & showAuthors.component.ts: In "view all/less" links added class "view-more-less-link" | Renamed "view more" to "view all".
5. feedback.component.html: Rename wording to be more positive: issues -> feedback, issue -> comment, report -> feedback.
6. feedback.component.ts: Added @Input() preSelectedField: string = ""; and set with it "field" on "addIssue()" (fos/sdg preselected for feedback).
7. availableOn.component.ts:
   a. In "view all/less" links added class "view-more-less-link".
   b. #7833 - Show instance.license information (as link when recognized as url, string otherwise).
8. landing-utils/fos.component.ts & landing-utils/sdg.component.ts:
   a. "Beta" word was updated to yellow uk-text-xsmall.
   b. In "view all/less" links added class "view-more-less-link".
   c. Added feedback functionality: link to feedback form.
9. showSubjects.component.ts:
   a. In "view all/less" links added class "view-more-less-link".
   b. Added "view all" functionality for classified subjects too.
10. resultLanding.component.html:
    a. In "view all/less" links added class "view-more-less-link" | Renamed "view more" to "view all"
    b. Added feedback functionality: link to feedback form - preselect in feedback form fos/sdg.
11. resultLanding.component.ts:
    a. Added public feedbackPreSelectedField: string = ""; field.
    b. Added method "feedbackClicked()".
    c. [Bug fix] In hasPrimaryInfo() added check for classifiedSubjects.
    d. Renamed getProvenanceVocabularyAndResultLandingInfo() to getVocabulariesAndResultLandingInfo() and call also this._vocabulariesService.getSubjectsVocabulary().
12. parsingFunctions.class.ts:
    a. #7196 - Updated parsing of subjects in method "parseAllSubjects()".
    b. #7833 - In method "parseHostedBy_collectedFrom()", added parsing for "license" field.
13. orcid-work.component.ts: On calling method "this.resultLandingService.getResultLandingInfo()", added null parameter for subject vocabulary.
14. searchFilter.module.ts: Import IconsModule.
15. searchFilter.component.html: Removed +/- form "view all/less" links and added class "view-more-less-link".
16. result-preview.ts: Added "licence?: string" in HostedByCollectedFrom.
17. ISVocabularies.service.ts:
    a. Added "private subjectsVocabulary: BehaviorSubject<any> = new BehaviorSubject<any>(null);" field and methods "getSubjectsVocabulary()", "getSubjectsVocabularyFromService()".
    b. Commented this.clearSubscriptions() from "getProvenanceActionVocabularyFromServiceAsync()".
18. resultLanding.service.ts:
    a. On subjects parsing, use subjectsVocabulary.
    b. #7509- Added if/then/else case for parsing citations (new name: references).
2022-06-09 16:45:39 +03:00
Konstantinos Triantafyllou 5e11488c8f Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-06-09 16:21:50 +03:00
Konstantinos Triantafyllou 05172dad18 Input component: Add searchanle input and add it in advanced search form and linking 2022-06-09 16:21:43 +03:00
Alex Martzios e7720c283f fix for underlined space between orcid icon and name (showAuthors component) 2022-06-09 16:10:04 +03:00
Konstantinos Triantafyllou 56d42bcd71 Search input: on reset focus input and on enter select option then search. Input: If autocomplete_soft is selected then do notselect item from the list by default and close dropdown on enter. 2022-06-09 15:25:24 +03:00
Alex Martzios 07c990824e changes for adding stakeholder entities as enum 2022-06-09 11:21:25 +03:00
Alex Martzios 73dae143f3 update text of invitation emails (monitor) and add stakeholder entities as enum 2022-06-09 10:38:06 +03:00
Konstantinos Triantafyllou 5a107677fb Cookie-law: Change class for wrapper and change text base on www 2022-06-08 18:22:05 +03:00
argirok d79a959576 remove metricsAPIURL property 2022-06-08 14:56:47 +03:00
argirok 82dbd33f43 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-06-08 14:42:13 +03:00
argirok 6ea368eba5 Merge remote-tracking branch 'origin/new-theme' into new-theme 2022-06-08 14:40:00 +03:00
argirok fbb86407c4 remove unused methods from metrics Service, remove metricsAPIURL property 2022-06-08 14:39:05 +03:00
Konstantinos Triantafyllou 86b78e12fd Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-06-08 14:19:46 +03:00
Konstantinos Triantafyllou ea324bfbef Add no value selected in input. 2022-06-08 14:19:40 +03:00
Alex Martzios 6ba20cd2bb enum StakeholderEntities declaration 2022-06-08 14:01:45 +03:00
argirok 10635c09ec update layout for claims: icons, spaces, make stepper sticky in final step 2022-06-06 17:35:26 +03:00
Konstantinos Triantafyllou f3af762dab Input: Fix tooltip in chips and autocomplete. Fix a bug in notify-form with 0 padding 2022-06-06 17:16:51 +03:00
Konstantinos Triantafyllou eac367a872 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-06-06 16:34:55 +03:00
Konstantinos Triantafyllou d211dbbb7d Change tooltip position for options 2022-06-06 16:34:46 +03:00
argirok 02d1963bf2 add link icon in the first step 2022-06-06 15:49:01 +03:00
argirok d170d81db1 Merge remote-tracking branch 'origin/new-theme' into new-theme 2022-06-06 12:24:53 +03:00
argirok 97d99a4ed0 Footer: update documents link 2022-06-06 12:24:30 +03:00
Konstantinos Triantafyllou f9f9a6d5ea Input: enable tooltip in select type. Search Sorting: Change options for stakeholders 2022-06-06 12:22:01 +03:00
Konstantinos Triantafyllou 187161fef5 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-06-06 11:57:29 +03:00
Konstantinos Triantafyllou 99e3aad2a0 Fix an issue with results per page causing page to crash 2022-06-06 11:55:11 +03:00
Konstantina Galouni 658c96bb02 [Connect & Library | new-theme]: Replaced "Subscribed" badge with "Member" text | Renamed "subscriber" filter to "member" in search communities page | Fixed "view all" buttons in my communities page.
1. browse-community.component.html: Replaced "Subscribed" badge with "Member" text | Updated how restricted/private icons are displayed.
2. browse-community.component.ts: Updated visibilityIcon map (PRIVATE -> incognito icon, RESTRICTED -> restricted icon).
3. browse-community.module.ts: iconsService.registerIcons([incognito, restricted]).
4. communities.component.html & my-communities.component.html: Added uk-button class in "View all" button for communities.
5. portal-search-result.component.html: Replaced "Subscribed" badge with "Member" text.
6. searchCommunities.component.ts: Renamed "subscriber" filter to "member".
2022-06-03 18:34:23 +03:00
Konstantina Galouni b88c65a343 [Library | new-theme]: Create common methods to get entity name and entity file name from OpenaireEntities.
1. string-utils.class.ts:
   a. Added method "public static getEntityName(entityType: string, plural: boolean = false): string" to return OpenaireEntities name by entityType.
   b. Added method "public static getEntityFileName(entityType: string): string" to return OpenaireEntities file name by entityType.
2. directLinking.component.ts & dataProvider.component.ts & project.component.ts & resultLanding.component.ts & myOrcidLinks.component.ts & searchResearchResults.component.ts & result-preview.component.ts & search-tab.component.ts: Call StringUtils.getEntityName and StringUtils.getEntityFileName methods instead of checking if/then/else locally.
2022-06-03 13:01:55 +03:00
Konstantinos Triantafyllou 9542bd1e32 Quick contact change dropdown to drop with card and default shadow 2022-06-03 12:44:21 +03:00
Konstantinos Triantafyllou 6663dee508 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-06-02 18:36:01 +03:00
Konstantinos Triantafyllou 156ec495a2 Quick contact: Make header sticky 2022-06-02 18:35:53 +03:00
Konstantinos Triantafyllou 23a3c8a508 Modal: Make choice be expanded next to buttons 2022-06-02 18:12:27 +03:00
Konstantinos Triantafyllou c69ff39d03 Search Page: Fix an error with expression change. Change in all fields with vocubulary or entity plus pid the equality operator to exact. 2022-06-02 17:44:56 +03:00
Konstantinos Triantafyllou bc5f5860f9 Quick contact: Fix a bug with dropdown and add some inputs to make it dynamic. GeneraL: Fix some breadcrumb alignments and fix modal overflowBody parameter 2022-06-02 17:27:45 +03:00
Alex Martzios f05af7b89a fix to center main content on mobile viewport 2022-06-02 16:11:24 +03:00
argirok de1218b343 Cite this: increase timeout - reduce possibility of require error 2022-06-02 15:49:22 +03:00
Alex Martzios 50a921ba43 landing pages small screens: remove sidebar and add actions at the top 2022-06-02 15:17:30 +03:00
Konstantina Galouni 957a46ad84 [Library | new-theme]: [Bug fix] searchAll.component.html: Add class "uk-flex uk-flex-center" in ul uk-slider-items instead of div with uk-position-relative - on eosc the arrows were visible when they shouldn't. 2022-06-01 18:29:12 +03:00
Konstantinos Triantafyllou 7ef6ae1481 Remove arrow from select inputs in advanced search input. Add focus next in advanced search input. 2022-06-01 17:39:31 +03:00
Konstantinos Triantafyllou b6b9aeb661 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-06-01 16:28:51 +03:00
Konstantinos Triantafyllou dd6ece97c0 Fix available options in page per results in search page. 2022-06-01 16:28:44 +03:00
Konstantina Galouni 5ae738f155 [Library | new-theme]: [Bug fix] dataProvider.component.ts: Set typeQueryPathParam="services" when ?pid in url and type=="service". 2022-06-01 15:48:57 +03:00
Konstantina Galouni 0946bd73b5 [Library | new-theme]: Fix display of errorMessages | Use <landing-header> instead of <showTitle> in all landing pages | Stop sticky header before graph & feedback line | Fix bug in eoscSubjectsFound intialization - set it as local variable.
1. resultLanding.component.html & project.component.html & organization.component.html & dataProvider.component.html:
   a. Move errorMessages and loading inside center box.
   b. In center box, after graph & feedback line, set [style]="'margin-bottom: '+graph_height+'px'", so that sticky header stop before graph & feedback.
2. resultLanding.component.html: Removed "uk-height-1-1" class from center box.
3. organization.component.html & project.component.html: In sticky header use <landing-header> instead of <showTitle> (forgotten in commit 8b94b7f98a).
4. organization.component.ts & project.component.ts & resultLanding.component.ts: In errorMessage, use OpenaireEntities in singular.
5. parsingFunctions.class.ts: [Bug fix] Removed "eoscSubjectsFound" from class fields and set it as local variable - bug fixed on back and again on landing.
2022-06-01 15:29:19 +03:00
Konstantinos Triantafyllou fd68a2cb10 Input: Add condition if formControl to avoid undefined errors 2022-06-01 14:12:18 +03:00
Konstantinos Triantafyllou c9c1aff2ff Change queries in advanced to support or not. Add different options for every equality operator. 2022-06-01 13:27:46 +03:00
Konstantina Galouni b0c9ee3736 [Library | new-theme]: parsingFunctions.class.ts: Added method "checkAndAddEoscSubject()" which is called for all subjects (classified or not) and sets eosc subjects when the label is found in "eoscSubjects". 2022-05-31 18:08:05 +03:00
Konstantina Galouni 0f747829f0 [Library | new-theme]: orcid-work.component.ts & result-preview.component.html: result-preview card, fix bottom for small screens - v2. 2022-05-31 15:37:16 +03:00
argirok e118432770 Merge remote-tracking branch 'origin/new-theme' into new-theme 2022-05-31 14:01:54 +03:00
argirok 7054a8f26c parsing functions: update links to market place based on environment 2022-05-31 14:01:29 +03:00
Alex Martzios 6b7ed19221 fix for small screens: result-preview card - orcid button 2022-05-31 12:45:33 +03:00
Alex Martzios 0a46aea1e7 fs-modal changes 2022-05-30 17:56:47 +03:00
Alex Martzios 9f57b1c459 new deposit page designs and search deposit page 2022-05-30 16:52:28 +03:00
argirok b782c52f9c Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-05-30 16:28:49 +03:00
Konstantinos Triantafyllou 5859789119 Fix a bug input component with focus state 2022-05-30 15:42:54 +03:00
Konstantina Galouni e9a2163136 [Library & openaire-theme & Explore | new-theme]: Beta indication in fos & sdgs (search, landing, dedicated pages) | Fixes in offcanvas and search all page for small screens.
1. badge.css: [NEW] Css file for uk-badge added.
2. import.css: Added @import "structure/badge.css";
3. fos.component.html & sdg.component.html: Added beta badge on top left of the title.
4. landing-utils/fos.component.ts & landing-utils/sdg.component.ts: Added [Beta] in title.
5. searchFields.ts: In sdg and fos RESULT_FIELDS, added [Beta] in their names.
6. offcanvas.css: [Bug fix] In rule .offcanvas .uk-offcanvas-bar added "max-width: 100vw", so that offcanvas does not exceed the screen width.
7. searchAll.component.html: Added some classes in <advanced-search-form> and uk-slider to be better displayed in small screens (form within page with some horizontal margins and arrows in slider).
2022-05-30 15:36:33 +03:00
argirok 5667a94756 fix issue with confict in close dropdown and modal 2022-05-30 13:56:14 +03:00
argirok da16692d14 Eosc data transfer update the labels 2022-05-30 12:45:05 +03:00
argirok fd8f53507e Datasource new refine fields datasourcethematic, datasourcejurisdiction
Present boolean filters as Yes/No
In selected filters add filter name for boolean filters
remove boolean sc39 from advanced search
2022-05-30 12:44:39 +03:00
Konstantina Galouni 86b48dc932 Merge remote-tracking branch 'origin/new-theme' into new-theme 2022-05-30 10:39:37 +03:00
Konstantina Galouni 95549185d9 [Library | new-theme]: Allow also ?pid url parameter in datasource landing | Fixes in newSearchPage for service filters.
1. dataProvider.component.ts: [Bug fix] Allow also ?pid url parameter, query accordingly and set canonicalUrl to use it in seoService and scema2jsonld.
2. dataProvider.component.html: Set canonicalUrl into URL of <schema2jsonld> | Use <landing-header> instead of <showTitle>.
3. dataProvider.service.ts: Set url for querying a datasource by pid (if ?pid in landing url param) and parse also the whole record, the objIdentifier and the relcanId.
4. landing-header.component.ts: Added @Input() isSticky: boolean = false; to set less margins when sticky.
5. resultLanding.component.html: Use <landing-header> instead of <showTitle>.
6. resultLanding.component.ts: Use renamed Identifier.getResultPIDFromIdentifiers --> Identifier.getPIDFromIdentifiers.
7. metrics.service.ts: Removed console.log.
8. searchDataproviders.service.ts: Added parsing for relcanId.
9. dataProviderInfo.ts: Added relcanId, objIdentifier, record.
10. result-preview.component.ts: Use renamed Identifier.getResultPIDFromIdentifiers --> Identifier.getPIDFromIdentifiers.
11. string-utils.class.ts: Renamed Identifier.getResultPIDFromIdentifiers --> Identifier.getPIDFromIdentifiers.
12. [SITEMAPS] extractUrlsFromSearch.ts: Use renamed Identifier.getResultPIDFromIdentifiers --> Identifier.getPIDFromIdentifiers.
13. newSearchPage.component.ts: [Bug fix]
   a. entityType for datasources is "dataprovider".
   b. Added service filter options only when entityType == "service".
2022-05-30 10:39:10 +03:00
argirok aff611314e result landing add additional check for dois - transfer service 2022-05-30 10:06:30 +03:00
Konstantinos Triantafyllou 135638ad63 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-05-27 12:22:15 +03:00
Konstantinos Triantafyllou be3020b164 Input component: If in select type more than 7 results available make it autocomplete. Advanced search form add includes/not includes 2022-05-27 12:22:04 +03:00
argirok a223653213 update datatransfer component 2022-05-26 14:05:29 +03:00
argirok e71e493aa2 update Transfer data: enhance list of files, disable Transfer button when path is not valid, add [demo] in the title 2022-05-25 17:56:00 +03:00
Konstantina Galouni 0e8c5832bb [Aggregator & Library| new-theme]: Use <modal-alert> common component in transferData.component.ts instead of uk-modal.
1. transferData.module.ts: Imported AlertModalModule.
2. transferData.component.ts: Use <modal-alert> common component instead of uk-modal | Comment logs.
3 alert.ts:
  a. Added "@Input() public emitHidden: boolean = false;" and "  @Output() public alertHidden: EventEmitter<any> = new EventEmitter();"
  b. On ngAfterViewInit, if emitHidden is true, check when modal is hidden and emit alertHidden (currently used only in transferData.component.ts to reinitialize local fields and route).
2022-05-25 12:52:00 +03:00
Konstantinos Triantafyllou dc242a0a3e Fix quickselections view in medium screens 2022-05-25 12:44:13 +03:00
argirok 9a2b8d3632 storage transfer: add path validator, fix hardcoded url, add scrolling in the list of files 2022-05-24 14:24:54 +03:00
argirok f16f2dd9e1 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-05-23 14:01:51 +03:00
Konstantina Galouni 4db983a91d [Library | new-theme]: parsingFunctions.class.ts: Updated links for eoscSubjects. 2022-05-23 13:23:24 +03:00
argirok c53e23708e update transfer data component - real api calls 2022-05-23 12:54:34 +03:00
Alex Martzios a0ff8d03c3 search all: add slider/arrows in the tabs 2022-05-23 12:52:41 +03:00
Konstantinos Triantafyllou 703dfd39a8 Advanced search form: Add form to search on enter 2022-05-20 18:07:52 +03:00
Konstantina Galouni 35d91a5fc6 [Aggregator & Library | new-theme]: Fixes in search forms and logo | Removed animation in card results | Added service landing links for incompatible datasources in eosc portal.
1. home.component.html:
   a. Removed uk-margin-large-top from search form and logo.
   b. Removed uk-height-medium from  search form and logo.
   c. Move searchImage on top of search form (uk-width-1-1) for small screens.
2. searchMyOrcidResults.component.html: Removed animation with uk-scrollspy.
3. searchAll.component.html: Move searchImage on top of search form (uk-width-1-1) for small screens.
4. newSearchPage.component.html:
   a. Removed animation with uk-scrollspy.
   b. For simple search, move searchImage on top of search form (uk-width-1-1) for small screens.
   c. For advanced search, searchImage is on top of search form for any screen size.
5. result-preview.component.html & result-preview.component.ts: For eosc portalType, added in incompatible datasources link to the service landing page.
6. aggregators.ts:
   a. In #searchImage commented custom margin-left.
   b. In #searchForm commented custom padding and width.
   c. Exclude also .uk-button-link from custom css for buttons with parent .search_box_bg or #searchForm.
2022-05-20 15:20:50 +03:00
Alex Martzios 1ee81c2181 paging: show less pages in smaller screens 2022-05-20 13:12:50 +03:00
Konstantina Galouni 4ce80019e7 [Library | new-theme]: Improvements & Do not show "Add to ORCID" button in search datasources with pids.
1. dataProvider.component.ts: In method "searchRelatedDatasources()", size can be always 0 (refine query).
2. advancedSearchForm.component.html: [Bug fix] Make all the button line clickable and functional in advanced search form.
3. result-preview.component.ts: Added get method "isResultType()" which checks if result.resultType is result, publication, dataset, software, other.
4. result-preview.component.html: [Bug fix] Call <orcid-work> (add/remove from ORCID buttons) only for results - check for identifiers is not enough, now datasources also have pids.
2022-05-19 19:08:04 +03:00
Konstantina Galouni 8154b9f307 [Library | new-theme]: dataProvider.component.html: Do not show "not available" compatibility label in service landing page. 2022-05-19 19:01:37 +03:00
Konstantina Galouni a4912542c0 [Aggregator & Library | new-theme]: Hide datasources in eosc & Do not show compatibility "Not yet registered" in services.
1. app.component.ts: [Bug fix] Add services search page in menu items if "service" entity is enabled (not datasource".
2.  aggregators.ts: Added "datasource" entity and "/search/find/datasources" page in disabled list for eosc.
3. result-preview.component.html:
   a. Do not show "Not yet registered" compatibility label in services.
   b. For eosc, show in datasources "Not yet registered in OpenAIRE".
4. quick-selections.component.ts: Changed uk-child-width-auto@l to uk-child-width-auto@m (not nice in medium screens for 2 types).
5. newSearchPage.component.ts: "Include" filter name for services changed to "Other Services"
2022-05-19 18:35:59 +03:00
Alex Martzios 8a5d5d954a linking: results to match search results and community: whole card to be a pointer 2022-05-19 13:12:59 +03:00
argirok 1a7571593e move datatransfer modules to library 2022-05-19 12:15:52 +03:00
Konstantina Galouni 6caba7a155 [Aggregator | Library | new-theme]: Fixes for eosc portal in search forms.
1. advancedSearchForm.component.html: Updated width in div for entity selection in advanced search form (uk-width-large@m uk-width-2-5@xl uk-width-1-1).
2. newSearchPage.component.html:  In <advanced-search-form> added horizontal padding (on the left it was already there) - the form is centered and leaves some space from the right side of page.
3. aggregators.ts:
   a. Commented background css in .search_box_bg.
   b. Do not apply custom button css for .uk-button-text with parent .search_box_bg or #searchForm.
   c. Added padding: 10px in buttons with parent .search_box_bg or #searchForm.
2022-05-19 12:14:28 +03:00
argirok ba409585c1 add eosc data transfer action button in landing
update properties
2022-05-18 13:30:00 +03:00
Konstantina Galouni 5fbdac1dc3 [Explore & Library | new-theme]: Fixes for orcid dropdown in authors and increase timeout for addThis check for warning.
1. app.component.ts: [Bug fix] First menu item under "Search", set to OpenaireEntities.RESULTS.
2. searchFields.ts: Renamed OpenaireEntities.DATASOURCE to "Data source".
3. addThis.component.ts: [Bug fix] Check for showing warning was missing a not (!).
2022-05-18 12:31:46 +03:00
Konstantina Galouni 9577c7841d [common-assets & Library | new-theme]: Fixes for orcid dropdown in authors and increase timeout for addThis check for warning.
1. addThis.component.ts: [Bug fix] Increased timeout to 4 sec and fix check (sometimes innerText was undefined).
2. searchMyOrcidResults.component.html: [Bug fix] Removed uk-animation-fade from results and added uk-scrollspy.
3. showAuthors.component.ts: [Bug fix] Fixed copy to clipboard - data-clipboard-target was not working because we have multiple clipboards in the same page (reverted code to old way of copying).
4. timeout-interceptor.service.ts: Reverted timeout time for client.
5. utils.css: Added custom css for .orcid-dropdown input (orcid dropdown in authors).
2022-05-17 12:15:15 +03:00
Konstantina Galouni 7d563c19a8 [Explore & Library | new-theme]: Updates of paging in claims and orcid links pages | Fixes for server side rendering.
1. fos.component.ts & sdg.component.ts: [Bug fix] Added properties.domain as prefix in request for vocabulary - Network error on server.
2. displayClaims.component.html: Used <results-and-pages> before results and <paging-no-load> after results.
3. searchMyOrcidResults.component.html: After results use <paging-no-load>.
4. displayClaims.module.ts & searchMyOrcidResults.module.ts: Imported NoLoadPaging.
5. dataProvider.component.ts & organization.component.ts & project.component.ts & resultLanding.component.ts: [Bug fix] Fixed checks in ngAfterContentChecked, not to run on server.
6. dataProvider.service.ts: Added check if there are subjects.
7. orcid-work.component.ts: [Bug fix] On search view, add classes uk-button uk-button-link in orcid actions.
8. newSearchPage.component.ts: Removed console.log.
2022-05-17 00:31:28 +03:00
Konstantina Galouni 2fac23fd10 [Library | new-theme]: 1. showSubjects.component.ts: Ignore specialSubjects and do not add links. | 2. resultLanding.component.html & resultLanding.component.ts: Show button "Check compatible EOSC services" not only in development or beta environments. 2022-05-16 18:42:23 +03:00
argirok 3d945b1e05 make stepper and basket sticky 2022-05-16 17:58:31 +03:00
argirok f2ae3fb355 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-05-16 17:25:42 +03:00
argirok 623f65423b linking add margins, update community modal functionality 2022-05-16 17:25:35 +03:00
Konstantina Galouni 64b0e163fa [Aggregator & Library | new-theme]: [Bug fix] Set properly "dashboard" and "adminToolsPortalType" properties and show "Check compatible EOSC services" button in eosc portal too.
1. env-properties.ts:
   a. In Dashboard type added "aggregator".
   b. In PortalType added "funder", "ri", "project", "organization", "aggregator", "eosc".
2. environments/: Set "dashboard" property to "aggregator" and only for eosc set "adminToolsPortalType" property to "eosc".
3. entitiesSelection.component.ts: Added check if adminToolsPortalType is "eosc".
4. resultLanding.component.ts: In method "hasRightSidebarInfo()" check if adminToolsPortalType is "eosc" to show "Check compatible EOSC services" button.
5. resultLanding.component.html: Show "Check compatible EOSC services" for adminToolsPortalType "explore" or "eosc".
2022-05-16 17:14:50 +03:00
Konstantina Galouni 4242a65199 [Library | new-theme]: [NEW] #6915 - Added new fields in datasources/services.
1. dataProviderInfo.ts: Added fields jurisdiction, thematic, contentpolicy, identifiers.
2. dataProvider.service.ts: Parse new fields.
3. dataProvider.component.html: Added label "Thematic" when true | moved "web page" under the labels | Show identifiers, jurisdiction and contentpolicy.
4. dataProvider.module.ts: Import ResultLandingUtilsModule.
5. parsingFunctions.class.ts: In method "parseIdentifiers()" added parsing for classid "re3data".
6. showIdentifiers.component.ts: Show identifier when key is "re3data" too.
7. string-utils.class.ts: In Identifier class added class and check for "re3data".
8. searchDataproviders.service.ts: In method "parseResults()" parse "pid" and set identifiers.
9. newSearchPage.component.ts: In method "createKeywordQuery()" added check for identifiers for entityTypes "datasource" and "service".
2022-05-16 17:01:35 +03:00
Alex Martzios 8e0ae78383 update 'my links' and 'my orcid links' pages 2022-05-16 14:07:15 +03:00
Konstantina Galouni d61839718e [Library | Trunk]: [NEW] Added service entity.
1. result-preview.component.ts & datasourcesHelper.class.ts & entitiesSelection.component.ts & newSearchPage.component.ts & errorPage.component.ts & searchAll.component.ts: Added case for service entity.
2. searchFields.ts: Added  in OpenaireEntities names for Services | In methods "getFieldName()" and "getFieldParam()" case for service entity.
3. searchDataProviders.component.ts: Parametrize component to show/query for datasources or services.
4. quick-selections.component.ts: Delete reset of resultTypes from "initializeFilters()" method.
5. searchDataproviders.service.ts: In method "numOfSearchDataproviders2()" added parameter "typePathParam" to search for datasources or services | In method "parseResults()" set "entityType" according to eosctype field.
6. portal.ts: In method "getmockPortalInfo()" added entity and routes for service.
7. env-properties.ts: Added properties "searchLinkToService", "searchLinkToServices", "searchLinkToAdvancedServices".
8. dataProvider.component.html: Parametrize component to show for datasources or services | [Bug fix] Added [class.uk-invisible]="!dataProviderInfo" in #graph_and_feedback_template.
9. dataProvider.component.ts: Parametrize component to show/query for datasources or services.
10. dataProvider.service.ts: In method "getDataproviderInfo()" added parameter "typePathParam" to search for datasources or services.
11. searchAll.component.html: Added tab for search services.
2022-05-13 15:57:31 +03:00
Konstantina Galouni 5aa832d698 [Library | Trunk]: advancedSearchForm.component.html: Dropdown for advanced search link (all content) replaced with a link to advanced search results (research products). 2022-05-13 15:46:54 +03:00
Alex Martzios bb4c310ede add padding to footer's top side, change feedback/report issue message on landing pages. change ORCID text tooltip on landing pages, rename ACTIONS in landing pages 2022-05-13 14:51:53 +03:00
argirok f247480aea linking:
- update layout  for communities
- clean up code for communities
- update css for select/remove buttons
2022-05-12 17:59:13 +03:00
argirok b3d38ab102 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-05-12 14:06:27 +03:00
Alex Martzios 1046218717 add eosc services links on landing pages 2022-05-12 14:05:54 +03:00
argirok 4608635879 Claims: add alert when add or remove from the basket 2022-05-11 18:46:51 +03:00
argirok f8b76246f5 linking fix issue with basket tabs 2022-05-11 15:34:38 +03:00
Konstantina Galouni ac2c67d0ca [Library | Trunk]: fetchResearchResults.class.ts: [Bug fix] Rename method "getEntityName()" to "getEnityQueryName()" and return types for queries (wrong usage of OpenaireEntities in commit bd6e141801) 2022-05-11 13:06:07 +03:00
Konstantinos Triantafyllou dea5b96f56 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-05-11 12:55:22 +03:00
Konstantinos Triantafyllou 78b46ae45f Add errorLink property and change routing to this. Add searchPageParams to errorPage 2022-05-11 12:55:14 +03:00
argirok 261670e79b claims: update search input, fix query issues 2022-05-11 12:02:23 +03:00
argirok a0df132a6b Input: for get labels use optionsArray instead of filtered options 2022-05-11 10:17:06 +03:00
argirok 0067239cb6 Claims: fixes for my claims page: new inputs, fix issues with selected types in 1st load, rename entities with OpenaireEntites 2022-05-10 17:28:50 +03:00
Alex Martzios 10c70ad1da delete unused files/methods in landing pages 2022-05-10 12:44:10 +03:00
Konstantina Galouni bd6e141801 [Monitor Dashboard & Library | new-theme]: Renaming entity types using OpenaireEntities.
Files updated: develop.component.ts, methodology.component.ts,  claimEntitiesSelection.component.ts, directLinking.component.ts, linkingGeneric.component.html, linkingGeneric.component.ts, approved.component.ts, searchDataprovidersToDeposit.component.ts, errorPage.component.ts, dataProvider.component.html, dataProvider.component.ts, dataProvider.service.ts, relatedDatasourcesTab.component.ts, project.component.ts, myOrcidLinks.component.ts, searchMyOrcidResults.component.html, searchMyOrcidResults.component.ts, searchAll.component.html, searchAll.component.ts, advancedSearchForm.component.html, advancedSearchForm.component.ts, searchDataProviders.component.ts, searchResearchResults.service.ts, numbers.component.ts, other-portals.component.html, other-portals.component.ts, fetchDataproviders.class.ts, fetchResearchResults.class.ts, searchFields.ts, result-preview.component.ts
2022-05-09 13:13:44 +03:00
argirok 150b26a5d5 Add this: show a message when the share buttons are not loaded 2022-05-06 17:00:52 +03:00
Konstantina Galouni 84cb6b6d96 [Library | new-theme]: In landing pages, title & tabs sticky even when bottom is in viewport | Other versions modals title updated | DMPs tab updated.
1. dataProvider.component.html & project.component.html & resultLanding.component.html: Removed "shouldSticky" check from id="main-tabs-div" - title & tabs sticky even when bottom is in viewport.
2. dataProvider.component.ts & organization.component.ts & project.component.ts & resultLanding.component.ts: Commented shouldSticky and observer for bottom - title & tabs sticky even when bottom is in viewport.
3. organization.component.ts & resultLanding.component.ts: In modal for other versions, title updated without "of".
4. project.component.html: In <search-tab> for DMPs added resultType="DMPs" | Title in DMPs tab changed to Data Management Plans.
5. search-tab.component.ts: Moved <errorMessages> after tab title and <ng-content> | In method "getEntityName()" return "this.resultType" if exists and no other condition matches.
2022-05-06 16:31:40 +03:00
Alex Martzios b851b3e60b add placeholder img 2022-05-06 16:23:02 +03:00
Alex Martzios 24e9424aeb org landing - download modal tweaks 2022-05-06 14:17:13 +03:00
Konstantinos Triantafyllou e39491e61e Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-05-06 14:02:51 +03:00
Konstantinos Triantafyllou 4e57dd41d2 Remove animation fade from results card and add scrollspy. Remove condition for selected filters sections 2022-05-06 13:47:54 +03:00
Konstantina Galouni 06bb169488 [Library | new-theme]: searchFilter.component.html: [Bug fix] Re-added (valueChange)="sort()" on sort by input | searchFilter.component.ts: Remove parameter from sort() method (not needed). 2022-05-06 13:44:59 +03:00
argirok db1cd20867 Add blur background in tabs slider arrows and in search selected filters 2022-05-06 13:13:45 +03:00
Konstantinos Triantafyllou 7153bdc842 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-05-06 12:58:09 +03:00
Konstantinos Triantafyllou daaa885b08 Fix a bug with in slider of selected filters, when it is an empty list 2022-05-06 12:57:57 +03:00
Konstantina Galouni ce53bd9999 [Library | new-theme]: Updated look of message when errorCodes.NONE in <errorMessages>.
1. projects-in-modal.component.ts: Use OpenaireEntities in <errorMessages>.
2. errorMessages.component.ts: Updated look of message when errorCodes.NONE: large, meta text which is center and middle aligned instead of alert.
2022-05-06 12:27:23 +03:00
Konstantinos Triantafyllou 3e446872c9 Fix slider container with offset to avoid hide information in selected filters 2022-05-06 11:34:24 +03:00
Konstantina Galouni 8b94b7f98a [Library & common-assets | new-theme]:
1. landing-utils.css: Deleted .landing-background-default-color (replaced in html with uk-background-default).
2. resultLanding.component.html & project.component.html & organization.component.html & dataProvider.component.html: Updates and fixes for redesign.
   a. #graph_and_feedback outside margins and checks (invisible when no info).
   b. [Bug fix] margin-top of center column fixed (uk-sticky-placeholder was adding space).
   c. [Bug fix] Show again right sidebar when screen becomes medium+.
   d. [Bug fix] Added grid in labels.
3. resultLanding.component.ts & project.component.ts & organization.component.ts & dataProvider.component.ts: Added ResizeObserver and updated how graph_offset is calculated | Added graph_height field to set margin-top of center column.
4. project.component.ts: In getFileNameType() use OpenaireEntities.
5. organization.component.ts:
   a. In contentTypes field added type file names from OpenaireEntities
   b. Added field contentFileName.
   c. Added field shouldSticky and observer for "bottom" to stop sticky title & tabs when bottom is in viewport.
6. dataProvider.component.ts: Added field "provenanceUrls" and method "getProvenanceUrls()" to flatten all urls from dataProviderInfo.provenance.
2022-05-05 20:54:01 +03:00
Konstantina Galouni 39a54e060a [Library | new-theme]: Use OpenaireEntities in search pages
1. newSearchPage.component.html: In graph and feedback, replace uk-text-muted with uk-text-meta and add uk-margin-large-top.
2. datasourcesHelper.class.ts & searchDataProviders.component.ts & searchOrganizations.component.ts & searchProjects.component.ts & searchResearchResults.component.ts: Use OpenaireEntities for result type names.
2022-05-05 20:35:08 +03:00
Konstantina Galouni 0f505c682a [Library | new-theme]:
1. searchDataproviders.service.ts & searchProjects.service.ts: Updated parsing of description (like in services for landing, use ParsingFunctions.parseDescription()).
2. searchFields.ts: Added in OpenaireEntities enum values for type names in files.
3. open-aire-jsonld-converter.service.ts:
   a. Updated parsing of description in methods convertProject() and convertDatasource() - use ParsingFunctions.parseDescription().
   b. In convertDatasource() method set "otherUrl" (not push it) in sameAs (on next commit, dataprovider landing sents all provenance urls as array).
4. jsonld-document-serializer.service.ts: [Bug fix] Added check in "serializeDescription()" method.
2022-05-05 20:29:55 +03:00
Konstantinos Triantafyllou 0168c5e894 Delete some console logs. Change inputs in filters to small instead of x-small 2022-05-05 16:47:21 +03:00
Alex Martzios 07d3c0407d forgotten ; 2022-05-05 15:29:15 +03:00
Alex Martzios a40dfa0165 finish organization landing page 2022-05-05 13:44:46 +03:00
Konstantinos Triantafyllou 057eec2a02 Reorder portal search result information 2022-05-05 12:45:39 +03:00
Konstantinos Triantafyllou 379da49df2 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-05-05 12:13:35 +03:00
Konstantinos Triantafyllou 78a5fb2c75 Quick contact: Add box shadow default on button and uk-dropdown instead of uk-drop 2022-05-05 12:13:28 +03:00
Konstantinos Triantafyllou 575d56c9af Remove hover from result previews 2022-05-05 11:32:06 +03:00
Konstantinos Triantafyllou 74baa0a1c4 Remove card hover from portal results 2022-05-05 11:24:11 +03:00
Konstantinos Triantafyllou 58edff9177 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-05-05 10:42:51 +03:00
Konstantinos Triantafyllou 5bcc3862e6 Fix an error in quick contact about document typeof 2022-05-05 10:42:44 +03:00
Alex Martzios 06e8eb29dd progress on org landing and some other tweaks 2022-05-05 09:32:18 +03:00
Konstantina Galouni 83984ddf79 [Explore & Library & common-assets | new-theme]: No animation in sticky tabs | Tabs stop being sticky when bottom component is in viewport | Updates in powered by bottom message | Updates in statistics in datasource landing.
1. landing-utils.css: Commented transition ease-out in #main-tabs-div.
2. app.component.ts: Added id="bottom" in <bottom>.
3. newSearchPage.component.html: Updated "Powered by OpenAIRE Research Graph" to make the link underlined on hover.
4. metrics.component.ts: Add classes "uk-text-small uk-text-meta" in "Powered by".
5. resultLanding.component.html & project.component.html & dataProvider.component.html:
   a. Updated "Powered by OpenAIRE Research Graph" to make the link underlined on hover.
   b. Add uk-sticky attribute in id="main-tabs-div" only if shouldSticky is true (bottom is not in the viewport).
6. resultLanding.component.ts & project.component.ts & dataProvider.component.ts: Added fields shouldSticky and observer, check in ngAfterViewInit() if bottom is intersecting and kill the observer in ngOnDestroy().
7. statisticsTab.component.ts: Added customContainerClass="uk-background-default" customIframeClass="uk-blend-multiply" in <i-frame>.
8. showAuthors.component.ts: [Bug fix] In "View less authors" make only the link clickable, not the whole row.
2022-05-04 18:09:35 +03:00
Konstantinos Triantafyllou 4aabb739bf Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-05-04 17:17:56 +03:00
Konstantinos Triantafyllou 903267fab5 Contact-us: CHange inputs for small form 2022-05-04 17:17:49 +03:00
Konstantina Galouni 1febf3551d [Library | new-theme]: resultLanding.component.html & project.component.html & dataProvider.component.html: Removed old unused html code. 2022-05-04 14:04:28 +03:00
Konstantina Galouni 5e35f5dff1 [Library | new-theme]: In result, project, dataprovider landing pages use type names from OpenaireEntities.
1. dataProvider.component.html: Use type names from OpenaireEntities | Added missing bottom <helper> and graph_and_feedback_template for small screens.
2. dataProvider.component.ts: Use type names from OpenaireEntities | stickyHeader = false when queryParams change.
3. project.component.html: Use type names from OpenaireEntities.
4. project.component.ts: stickyHeader = false when queryParams change.
5. resultLanding.component.html: Use type names from OpenaireEntities | In  #relation_in_tab, use common component for input instead of mat-select.
6. resultLanding.component.ts:
   a. Use type names from OpenaireEntities.
   b. Added relatedClassFilters: Option[] and use it in input for #relation_in_tab.
   c. stickyHeader = false when queryParams change.
7. resultLanding.module.ts: Imported InputModule.
8. orcid-work.component.ts: Use type names from OpenaireEntities.
9. result-preview.component: Use type names from OpenaireEntities.
2022-05-04 13:57:13 +03:00
Alex Martzios 6c3d1c5127 progress on organization landing - almost ready 2022-05-04 12:47:51 +03:00
argirok 272ca5b81e add check for recaptcha and feedback link 2022-05-03 16:45:23 +03:00
Konstantina Galouni 8559aa439f [Library | new-theme]: metrics.component.ts: Round large numbers in metrics | Use type names from OpenaireEntities. 2022-05-03 14:25:09 +03:00
Konstantina Galouni 9e413e7a2b [Explore & Library | new-theme]: Dataprovider landing page redesign.
1. environments/: Added "fairSharingURL" and "eoscMarketplaceURL".
2. env-properties.ts: Added properties:  fairSharingURL?: string, eoscMarketplaceURL?: string
3. searchFields.ts: In OpenaireEntities added type names also in singular.
4. statisticsTab.component.ts: Use type names from OpenaireEntities.
5. relatedDatasourcesTab.component.ts: Updated paging and align of columns according to mocks | Use type names from OpenaireEntities.
6. dataProvider.module.ts: Added iconsService.registerIcons([graph]).
7. dataProviderInfo.ts:
   	a. "description" type changed from string to string[]
   	b. #7718: Added field provenance: Map<string, {"url": string[]}>;
   	c. export class DataproviderProvenance with "provenance" field with info foreach provenance type.
8. dataProvider.service.ts: Updated parsing for description and originalId (provenanve) (#7718).
9. dataProvider.component: Redesign of datasource landing page.
2022-05-03 14:22:53 +03:00
Konstantina Galouni d054922efa [Library | new-theme]: Fixes and updates for project and result landing pages redesign.
1. statisticsTab.component.ts: Added charts inside cards.
2. landing-header.component.ts: Updated margins according to mocks.
3. project.component.html:  In #graph_and_feedback, updated offset attribute. |  Updated wrapper class from "publication" to "project" | Removed "uk-margin-top" from labels section.
4. project.component.ts:
	a. Added field   public graph_offset: number = 0;
	b. [Bug fix] Fix expressionchangedafterithasbeencheckederror - Updated when "offset" and "graph_offset" (calcGraphOffset()) is calculated.
	c. [Bug fix] Updated checks in hasMetrics().
	d. [Bug fix] Updated title for organizationsModal to "Partners".
5. project.module.ts: Added in constructor iconsService.registerIcons([link, graph]).
6. projectService.module.ts: Removed IconsService - icons should be registred in project.module.
7. resultLanding.component.html: In #graph_and_feedback, updated offset attribute.
8. resultLanding.component.ts: Added field   public graph_offset: number = 0; | [Bug fix] Fix expressionchangedafterithasbeencheckederror - Updated when "offset" and "graph_offset" (calcGraphOffset()) is calculated.
2022-05-03 11:52:07 +03:00
Konstantina Galouni b1c9d3dc01 [Library | new-theme]: project.component.html: Small fixes in project landing redesign. 2022-04-28 16:53:49 +03:00
Konstantina Galouni e658c5d23a [Library | new-theme]: Redesign of project landing page and small upadates on result landing and common components.
1. addThis.component.ts: Updated social icons of addThis.
2. landing-header.component.ts: Added "uk-text-small" in subtitle.
3. metrics.component.ts: Added method "clickedMetrics()" to set "metricsClicked" | Added metricsClicked and metrics.infos conditions for loading table or iframes | Added customContainerClass and customIframeClass in <i-frame>.
4. project.component: Updated project landing page according to UI redesign.
5. project.module.ts: Import LoadingModule, IconsModule, InputModule.
6. project.service.ts: Use parsingFunctions.parseDescription.
7. projectService.module.ts: iconsService.registerIcons([link, graph]).
8. resultLanding.component.html: Small fixes in ui | Added right arrow on tooltips of actions that are links to other pages | Display of description updated as innerHtml (#7345).
9. orcid-work.component.ts: Added flex=true in <icon>.
10. input.component.ts: Added disabled?: boolean in Option interface and show disabled options as muted.
11. projectInfo.ts: Updated description to be string[] instead of string.
12. iframe.component.ts: Added @Input() customContainerClass: string = ""; and @Input() customIframeClass: string = "";
13. search-tab.component.ts: Updated according to redesign | Update "getEntityName()" to return values from OpenaireEntities.
14. tabs.component.ts: Added "uk-height-1-1" in custom tabs | In #mytabs::before set left:0.
2022-04-28 12:13:06 +03:00
argirok fc2fbb5ba0 fix issue with selected types filter 2022-04-21 16:35:34 +03:00
argirok 020a947687 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme
 Conflicts:
	searchPages/searchUtils/newSearchPage.component.html
2022-04-21 16:28:09 +03:00
argirok 8066223086 add uk flex in custom filter 2022-04-21 16:24:41 +03:00
argirok e79275be2a Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-04-21 15:29:09 +03:00
Konstantina Galouni 53d05bf54f [Explore & Library & Common Assets | new-theme]: Updates related to result landing redesign.
1. fos.component.css: Removed rule "mark.highlighted" and ".custom-bottom-border" updated with variables.
2. feedback.component.html: Updated width of email input for small screens.
3. parsingFunctions.class.ts: In "parseAllSubjects()" method, comment otherSubjects and push them in subjects.
4. showIdentifiers.component.ts: Updated classes in <modal-alert>.
5. showSubjects.component.ts: "Subjects by Vocabulary" and "Subjects" separated & view more functionality added in "Subjects".
6. resultLanding.component:
	a. Added button and modal for <addThis> (share in social media).
	b. View more functionality for related organizations.
	c. Graph and feedback section sticky.
	d. Added checks for summary tab and right sidebar.
	e. In small screens made right sidebar offcanvas.
7. resultLanding.module.ts: Updated iconsService.registerIcons to register link, graph, quotes.
8. orcid-work.component.ts: Added visually-hidden in icon buttons for landing | Updated classes in <modal-alert> and use buttons of alert instead of custom.
9. no-load-paging.component.ts: Use new component <results-and-pages> for results and pages number and set uk-flex-right in <paging-no-load> (default is center).
10. cookie-law.css: In ".cookie-law-wrapper" increased z-index from 100 to 1000.
11. showAuthors.component.ts: Removed shadow from search button | Updated classes in <modal-alert>.
12. icons.ts: Added "quotes" svg.
13. alert.ts: Updated modal to have header - body - footer (theme was updated too) | classTitle input set default to "uk-background-primary-opacity" | @Input() overflowBody: boolean = true; added to add overflow in body.
14. paging.module.ts: Added ResultsAndPagesNumComponent in declarations and exports.
15. pagingFormatter.component.ts: Add "uk-invisible" to previous and next buttons instead of hiding them.
16. pagingFormatterNoLoad.component.ts: Add "uk-invisible" to previous and next buttons instead of hiding them | Set customClasses default to "uk-flex-center".
17. tabs.component.ts: Updated margins/ paddings | Added @Input() offsetForSticky:number=0; to compare with the top distance for isSticky.
18. resultsAndPagesNum.component.ts: [NEW] Component to show number of results, number of pages and current page (used in paging).
19. landing-utils.css:
	a. Moved variables in .landing instead of :root.
	b. Added variable --landing-light-color-rgb: var(--light-color-rgb);
	c. Added glass filter in #graph_and_feedback.
	d. Set z-index of #main-tabs-div and #graph_and_feedback to 979 (default 980 caused problems with metrics box).
	e. Added padding-bottom: 80px and margin-top: 80px in .landing-sections.
	f. Added top rule for #right-sidebar-switcher.
	g. Added custom width rules for .landing-left-sidebar-width.
20. css-rules.txt: Added cookie-law-wrapper: 1000 info for z-index
21. explore-custom.css: Added variable --background-primary-rgb: var(--explore-color-rgb);
2022-04-20 17:40:18 +03:00
Konstantinos Triantafyllou 8b7143c8cb Input: Change chip label to small 2022-04-20 13:57:38 +03:00
argirok 01a0a64ff8 update on row slider for selected filters 2022-04-20 11:01:18 +03:00
argirok 2dda0c1630 rename Openaire entities, use them in the filters 2022-04-19 18:47:38 +03:00
argirok 2c83a666dc Merge remote-tracking branch 'origin/new-theme' into new-theme 2022-04-19 18:03:24 +03:00
argirok cf9cb00e49 selected filters in one row slider 2022-04-19 18:03:09 +03:00
Konstantinos Triantafyllou 479e247ee0 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-04-19 16:44:28 +03:00
Konstantinos Triantafyllou e8cb2adf44 Update feedback message after sent 2022-04-19 16:44:20 +03:00
argirok e2a5fd4c9e Merge remote-tracking branch 'origin/new-theme' into new-theme 2022-04-19 16:33:52 +03:00
Konstantinos Triantafyllou 30ddd6b425 Change search-inputs 2022-04-19 16:32:45 +03:00
argirok 99ffee241d fixes in direct linking 2022-04-19 16:25:24 +03:00
Konstantinos Triantafyllou e808c7e26b Update feedback page and fix a bug with events 2022-04-19 16:07:21 +03:00
Konstantinos Triantafyllou 9c1f1dd97d Metrics delete click module and change width rules 2022-04-19 14:04:19 +03:00
Konstantinos Triantafyllou 69273b938a Metrics base on new theme 2022-04-19 13:58:10 +03:00
Konstantinos Triantafyllou b19ef578b4 Update advanced search form 2022-04-19 12:33:52 +03:00
Konstantinos Triantafyllou ca4da85090 Add openAccess in quick selection and make it responsive. Remove enter behaviour for select inputs in advanced-search-input 2022-04-19 02:09:42 +03:00
Konstantinos Triantafyllou 4711531dec Quick-contact: Change shadow for button to dark 2022-04-19 00:06:32 +03:00
Konstantinos Triantafyllou 19bf9f7968 1. Entities Selections: Fix conditions. 2. Filters selected add uk-text-truncate 2022-04-18 14:43:33 +03:00
Konstantinos Triantafyllou 5f042433be Advanced form: apply new design (not completed). Entities selection for advanced form 2022-04-18 11:29:14 +03:00
Konstantinos Triantafyllou 0358887d4f Click event: revert document:click 2022-04-17 15:30:21 +03:00
Konstantinos Triantafyllou 7e9db1d0de CHange keydown listeners to specific key listener to optimize perfomance 2022-04-17 15:25:01 +03:00
Konstantinos Triantafyllou 0384fe87b9 Input make close uk-close. Search-filter: remove stopPropagation from sorting 2022-04-17 01:42:10 +03:00
Konstantina Galouni e28e06b239 [Library & common-assets | new-theme]: Updates for redesign.
1. availableOn.component.ts: Updated class of title to "uk-text-light-grey" and added custom-external icon to links and updated accessright icons.
2. citation.class.ts: Added fileFormatOptions: Option[] to use it in input options.
3. citeThis.component.ts: Updated select inputs using "input" from InputComponent | Updated copy to clipboard button to link.
4. citeThis.module.ts: Import InputModule.
5. fos.component.ts: Updated class of title to "uk-text-light-grey".
6. fundedBy.component.ts: Updated class of title to "uk-text-light-grey" and updated links with uk-text-emphasis class.
7. landing-header.component.ts: Increase authorsLimit to 7 | Changed class of "under curation" to uk-text-primary (used to be custom class).
8. metrics.component.ts: Updated in clickOutside event.
parsingFunctions.class.ts: Updated open, closed and unknown with icon names instead of paths to svgs (download accessright icons).
9. relatedTo.component.ts: Updated class of title to "uk-text-light-grey" and added custom-external for links.
10. resultLandingUtils.module.ts: Inport AlertModalModule (to open modal).
11. sdg.component.ts: Updated class of titlte to "uk-text-light-grey".
12. showIdentifiers.component.ts: Added view more functionality.
13. showPublisher.component.ts: Updated custon-external class.
14. resultLanding.module.ts: registerIcon link.
15. resultLanding.component.html: Updated css for result landing and commented annotations (b2note).
16. orcid-work.component.ts: Updated orcid action button for landing page.
17. orcid.module.ts: registerIcons orcid_add and orcid_bin.
18. customOptions.class.ts: [Bug fix] [By Kostis] registryOptions() was not returning properly httpHeaders.
19. showAuthors.component.ts: Updated css
20. icons.ts: Export svgs orcid_add, orcid_bin, link.
21. alert.ts: Removed margin from title.
22. result-preview.component.html: Title of results set to <h2> and uk-h6 and when links to uk-link-heading | accessRightIcon for hostedBy_collectedFrom.
23. result-preview.module.ts: Imported IconsModule.
24. landing-utils.css: Updates in landing css & css of landing-action-button & added backdrop filter missing rules.
25. utils.css: Updated class orcid-clipboard-wrapper and renamed to clipboad-wrapper | Update class .custom-external to set in content with code instead of name and updated not to underline it on hover
26. library.css: Added class .default-dropdown with max-width: 500px;
2022-04-16 10:47:30 +03:00
Konstantinos Triantafyllou 8df2c1a2e1 Fix a bug with search-form. Change uk-text-muted to uk-text-meta 2022-04-16 01:10:34 +03:00
Konstantinos Triantafyllou cee1d9f876 Add advanced-search-input with entities selections in all search-pages 2022-04-16 00:49:35 +03:00
Konstantinos Triantafyllou d17f9b4d5c Add searchForm input in all search pages 2022-04-15 15:38:41 +03:00
Konstantinos Triantafyllou 73b6704124 1. Search Pages: Download link, search from bg with dark option. 2. Input add a no value selected option for select type. Search input toggle if input has no value. 3. Sidebar: Add uk-nav 2022-04-15 11:08:12 +03:00
Konstantinos Triantafyllou aa210384bc Rename uk-text-primary-gradient to uk-text-background 2022-04-14 12:50:59 +03:00
Konstantinos Triantafyllou bedc28384b Revert on router change check AccessToken 2022-04-13 14:20:07 +03:00
Konstantinos Triantafyllou d9a2f3b0ee Fix a bug in guards regarding deprecated method isLoggedIn 2022-04-13 13:50:55 +03:00
Konstantinos Triantafyllou e6b2f41c8c Click outside optimized and use at input and search-input 2022-04-13 13:00:40 +03:00
Konstantinos Triantafyllou 901078ea42 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-04-13 12:24:25 +03:00
Konstantinos Triantafyllou 131327a326 1. Make AdvancedAsyncSubject available in all envrionments and remove condition about existance of AccessToken. 2. Deprecated is LoggedIn method. 2022-04-13 12:24:14 +03:00
Alex Martzios 6f23b05e5b update newsletter link on footer 2022-04-13 09:43:12 +03:00
argirok 0e8143b4e2 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-04-12 18:18:57 +03:00
argirok 9d245840ad landing tabs - changes for the background color 2022-04-12 18:14:29 +03:00
Konstantinos Triantafyllou d0dc3bd5e8 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-04-12 17:20:59 +03:00
Konstantinos Triantafyllou d983a24aa4 Fix some issues in input and search input. Add search input in search-page. 2022-04-12 17:20:51 +03:00
Konstantina Galouni 322ee51e26 [Library & common-assets| new-theme]: Fixes in custom-external.
1. resultLanding.component.html: [Bug fix] In EGI Notebook, uk-text-uppercase should be in text (custom-external icon could not be loaded).
2. resultLanding.component.ts: Removed unnecessary log.
3. result-preview.component.html: Added properly "custom-external" class.
4. utils.css: In class "custom-external", set verical-align: super.
2022-04-12 16:52:49 +03:00
Konstantinos Triantafyllou c98bf5aa6f Remove a < committed by mistake 2022-04-12 15:38:44 +03:00
Konstantinos Triantafyllou 9893c9d8f9 Add disable behaviour in inputs in search 2022-04-12 15:34:33 +03:00
Konstantina Galouni 599f590b8e [Library | new-theme]: resultLanding.component.html: Linking action button updated to redirect to direct linking page. 2022-04-12 15:20:43 +03:00
Konstantina Galouni 4ddef450a8 [Library | new-theme]: [NEW] landing-utils/: Added fos.component.ts and sdg.component.ts | Redesign updates on availableOn.component.ts & fundedBy.component.ts & relatedTo.component.ts & resultLanding.component.html | resultLanding.component.ts: [Bug Fix] Updated how "isLoggeIn" is calculated (userManagementService.getUserInfo() instead of Session). 2022-04-12 15:15:04 +03:00
Konstantina Galouni bb6c1833a9 [Library | new-theme]: showIdentifiers.component.ts: Optimize imports and use uk-text-meta class | showPublisher.component.ts: Use uk-text-small and uk-text-meta classes. 2022-04-12 15:05:53 +03:00
Konstantina Galouni 84b3a8b75d [Library | new-theme]: resultLandingInfo.ts: Added export interface Context and set in ResultLandingInfo class contexts: Context[]; | parsingFunctions.class.ts: In method "parseContexts()" use interface Context. 2022-04-12 15:01:45 +03:00
Konstantina Galouni d6e9ce2a5c [Library | new-theme]: showAuthors.module.ts: Imported AlertModalModule | showAuthors.component.ts: When authors > 2*threshold, open them in modal & Replaces "view all ... authors" with "+ ... Authors" & updated orcid dropdown according to new theme | landing-header.component.ts: Use "uk-text-small" everywhere and removed @Input() small & change authorLimit from 30 to 3 & removed "small" input from <showAuthors>. 2022-04-12 14:51:54 +03:00
Konstantina Galouni 7d2990d08b [Library | new-theme]: orcid.module.ts: Removed IconsService | orcid-work.component.ts: Updated icons (remove -> delete & preview -> visibility) & grouped tooltips wherever possible (background css not ready) & Removed unused css & Updated orcid buttons for landing page & [Bug fix] Update how "isLoggedIn" is calculated (userManagementService.getUserInfo() instead of Session). 2022-04-12 14:36:31 +03:00
Konstantina Galouni fe3f62b9bd [Library | new-theme]: metrics.component.ts: Replaces old custom class "space" with "uk-margin-small-left" | metrics.component.css: Css updated to move mertics widget and its arrow in a new position (not ready). 2022-04-12 14:21:54 +03:00
Konstantina Galouni fa58577e8c [Library | new-theme]: searchSorting.component.ts & newSearchPage.component.html: Removed ":" after "Sort by" and "Results per page placeholders | result-preview.component.html: Use class uk-text-meta instead of uk-text-muted. 2022-04-12 14:12:45 +03:00
Konstantinos Triantafyllou 337a56ec75 1. Notify Form: Change view of form base on new redesign. 2. Input: Add a new type autocomplete_soft in order to use it in search. 3.Search Input: Add options for autocomplete. 4. Change some dashboard-inputs to inputs 2022-04-11 12:27:10 +03:00
Konstantinos Triantafyllou 41d5926be3 Add truncate in input when is not focused or has select type 2022-04-09 16:19:18 +03:00
Konstantinos Triantafyllou e82c7bb6f4 Deprecated icons that exist in Material Icons 2022-04-09 16:18:30 +03:00
argirok 51efcfc19c Landing tabs: title to appear when tabs stick to top, add css for the sections, css for featured tabs 2022-04-08 18:26:27 +03:00
argirok 4bc50b8b4f Linking: add new inputs, update paging style 2022-04-08 16:55:22 +03:00
argirok 87aa186ea8 add enum of OpenaireEntities 2022-04-08 16:54:45 +03:00
Konstantinos Triantafyllou 4deb378f2d Search Input: Change conditions and add value change emitter. Advanced Search Input: Unfocus on enter 2022-04-08 15:47:03 +03:00
Konstantinos Triantafyllou 41ef72e738 Fix Page header offset on sticky 2022-04-08 13:04:02 +03:00
Konstantinos Triantafyllou c818716190 Change header of pages, entities, portals, classes and classid 2022-04-07 21:28:45 +03:00
Konstantinos Triantafyllou f20fe90aa2 1. Navbar: Change navbar to be sticky always. 2. Search Filter: Add new inputs. 3. Page-content: Remove offset changing base on menu. 4. Pages add new search-input. 5. Advanced Search Input: Add enter behaviour and make inputs by default equal size. 2022-04-07 18:17:52 +03:00
Konstantina Galouni ac3e721dfc [Library & Monitor Dashboard & openaire-theme | new-theme]: Small updates and fixes for sticky buttons & offcanvas on the right | New color #6E6E6E added.
1. monitor.component.html: Filters icon changed | Print button added.
2. monitor.module.ts: Added "filters" in iconsService.registerIcons and removed "print".
3. notification-sidebar.component.css: #notifications-switcher position top changed.
4. notifications-sidebar.component.ts: In read notifications added class "uk-text-light-grey".
5. icons.ts: [NEW] svg icon "filters" added.
6. offcanvas.css: Added variable --offcanvas-button-shadow and use it for offcanvas-switcher.
7. text.css: Added variable --text-light-grey-color: var(--light-grey-color); and class "uk-text-light-grey".
8. variables.css: Added variable --light-grey-color: #6E6E6E;
9. monitor-dashboard-custom.css: Added rules ".stakeholderPage #filters_icon .start" and ".stakeholderPage #filters_icon .end" for filters svg gradient | Added rule for #print_toggle to set top position.
2022-04-07 17:50:49 +03:00
Konstantinos Triantafyllou 95e382fc62 Search input: search on enter 2022-04-07 15:12:25 +03:00
Konstantinos Triantafyllou ad20ad1ea9 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-04-07 01:09:57 +03:00
Konstantinos Triantafyllou 510f4c56ba 1. LayoutService: Delete isDashboard. 2. Navbar: fix a bug with class add and remove. 3. Role-users: Add new search-input. 4. Modal make title h5 2022-04-07 01:09:49 +03:00
argirok b0e4f6f81c Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-04-06 18:28:19 +03:00
argirok 29d92edb91 Content providers: tabs and title sticky on top 2022-04-06 18:27:55 +03:00
Konstantinos Triantafyllou 8205f303a7 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-04-06 18:24:21 +03:00
Konstantinos Triantafyllou bf970593f6 Finish search-input component 2022-04-06 18:24:14 +03:00
argirok 44bb9772a9 tabs: add disabled tab,
Content providers add check for other > 0
2022-04-06 18:02:15 +03:00
argirok 9630d27fe8 Tabs as slider, scroll effect
apply changes for content providers
2022-04-06 17:01:25 +03:00
Alex Martzios acca43d45a tweaks for search page inputs (select) 2022-04-06 16:26:45 +03:00
argirok 01f9facb37 fix filter view-all after merging with linking branch 2022-04-06 14:39:57 +03:00
argirok c5b384c656 Filters in search page: don't render mobile filters, if burger menu is not active 2022-04-06 13:31:52 +03:00
argirok 2370c61eb9 Merge remote-tracking branch 'origin/new-theme' into new-theme-linking 2022-04-06 13:20:13 +03:00
Konstantinos Triantafyllou e2f1cc4957 Merge from master and ignore results landing changes 2022-04-06 12:58:22 +03:00
Konstantinos Triantafyllou 592cbfdf48 Input: Fix a bug with on click event and search reset value 2022-04-06 12:53:26 +03:00
Konstantinos Triantafyllou 6de4cf1282 Remove uikit toggle from search-filters to test perfomance. Fix icon rerendering if svg is changed. Fix some input issues regarding filterOptions 2022-04-06 10:35:10 +03:00
Konstantina Galouni 0c5483ac9b [Library | new-theme]: rangeFilter.component: [Bug fix] In range filters, years were not updating & errors were not properly displayed | search-input.component.ts: Remove styleUrls (file is deleted). 2022-04-05 20:08:11 +03:00
Konstantina Galouni 3af4eabea7 [Library & Monitor Dashboard | new-theme]: Small update on notifications & filters offcanvas.
1. shadow.css: Added variable --shadow-main-dark.
2. offcanvas.css:
   a. Set --offcanvas-shadow: var(--shadow-main-dark);
   b. In class .offcanvas-switcher remove transition (will not be visible when offcanvas is open)
   c. [Bug fix] In class .offcanvas-count increased font size and make background always round, added line-height: 20px.
   d. In rule ".offcanvas .uk-offcanvas-bar" set border-radius to 4px.
3. notification-utils.ts: Full stop added in messages.
4. notification-sidebar.component.css: In rule "#notifications .notification-list ul" set height: calc(100% - 77px).
5. notifications-sidebar.component.ts:
   a. Removed anything related to offcavnas events
   b. Removed commented code
   c. Added in icons visuallyHidden.
6. monitor.component.html:
   a. Removed "open" class when offcanvas is open.
   b. Added in icons visuallyHidden
   c. Added sign in link in filters when user is not logged in
   d. Added uk-text-small class in "Clear".
7. monitor.component.ts:
   a. Removed anything related to offcavnas events
   b. Added method "logIn()".
2022-04-05 19:55:01 +03:00
argirok b20fcfa219 more layout changes for the linking (eg filters, icons, etc) 2022-04-05 18:36:08 +03:00
Konstantina Galouni 362dd1cc80 [Library | new-theme]: Delete fromYearAfterToYear.directive.ts, inValidYear.directive.ts, rangeYearsRequired.directive.ts directives from rangeFilter folder (validator functions moved to string-utils.class.ts (previous commit)). 2022-04-05 16:50:49 +03:00
Konstantina Galouni f3cc4520ad [Library | new-theme]: In range filters, use reactive form (formGroup) instead of template driven form (ngModel) & update inputs using new "input" component & move validators in string-utils.class.ts. 2022-04-05 16:45:38 +03:00
Konstantinos Triantafyllou 8978e1df80 Fix some issues in input. Change class in advanced search input 2022-04-05 15:33:38 +03:00
Alex Martzios dfd5876217 new inputs for search page and other overall tweaks 2022-04-05 15:26:26 +03:00
Konstantinos Triantafyllou 2b8d344bc9 Contact us: change placeholder to dynamic in name field, committed by mistake 2022-04-04 17:30:48 +03:00
Konstantinos Triantafyllou d9496f061f Add new inputs in contact us 2022-04-04 17:23:08 +03:00
Konstantinos Triantafyllou bd0b7a9e9a Add key bind for option selection and make options more flexible 2022-04-04 16:44:00 +03:00
Konstantinos Triantafyllou 70ea6ec60c Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-04-04 13:53:34 +03:00
Konstantinos Triantafyllou f19408b1a8 Fix a bug with options position in modals 2022-04-04 13:53:26 +03:00
Konstantina Galouni c4e6f6e09c [Library & Common-Assets | new-theme]: 1st version of restructure of result landing page according to redesign | Bug fix in method "hasMetrics".
1. landing-header.component.ts: Remove from <showTitle>, isH1 input.
2. metrics.component.ts: On metrics error, emit also "pageViews: 0".
3. showTitle.component.ts: Remove "isH1" input property and add in title class uk-h5 always.
4. resultLanding.component.html: Redesign (currently broken) of result landing page.
5. orcid-work.component.ts: Remove label "Add to / Remove from ORCID".
6. import.css: Import "landing-utils.css".
7. landing-utils.css: Comment all existing css rules and add new.
2022-04-04 12:14:54 +03:00
Konstantinos Triantafyllou 225285c960 Add new inputs modifiers. Add advanced-search-input. 2022-04-04 11:06:34 +03:00
Konstantinos Triantafyllou 1951ae8cdd Add static placeholder and hint in input 2022-03-31 16:39:17 +03:00
Konstantinos Triantafyllou da6f220ae0 Disable sticky of page header if bottom is on the view. Inputs finish all types 2022-03-30 20:47:47 +03:00
Konstantina Galouni 31516e8f55 [Library & Monitor Dashboard | new-theme]: Applied new theme & redesign changes in notifications & filters offcanvas switcher icons and boxes.
1. offcanvas.css: [NEW] Custom css for custom 'offcanvas' classes.
2. import.css: Import new file offcanvas.css
3. structure.css: Removed custom css for notifications offcanvas.
4. monitor.component.ts: Added property "offcanvasOpen" which is set on UIkit.util.on events for offcavnas "#style_switcher" (filters).
5. monitor.component.html: Added "offcanvas-switcher", "offcanvas", "offcanvas-close" classes | Small changes in close button, switcher button and message.
6. monitor-dashboard-custom.css: For #filters_switcher_toggle only top is defined here. Now css will be imported by offcanvas.css file.
7. notification-user.component.ts: Updated default value for property 'colorClass' from 'portal-color' to 'uk-text-primary'.
8. notifications-sidebar.component.ts:
   a. Added property "offcanvasOpen" which is set on UIkit.util.on events for offcavnas "#notifications".
   b. Added "offcanvas-switcher", "offcanvas", "offcanvas-close" classes
   c. Small changes in close button, switcher button and font sizes.
9. notifications-sidebar.module.ts: Removed iconsService.registerIcons from constructor.
10. notification-sidebar.component.css: Unnecessary css removed | css updated and moved to new file offcanvas.css.
2022-03-30 19:18:06 +03:00
Alex Martzios d26f56e260 design tweaks for dashboard - admin pages and start on remove sticky header when reaching footer 2022-03-29 16:05:09 +03:00
Alex Martzios da6636ee79 changes for footer - front pages of monitor and connect 2022-03-28 16:07:34 +03:00
Alex Martzios f232abb633 changes for footer - dashboards 2022-03-28 15:23:59 +03:00
Konstantinos Triantafyllou d2a05db2e3 Fix max-height in select input when value is null 2022-03-28 12:14:16 +03:00
Konstantina Galouni 99ed7ea6ba [Library & Monitor Dashboard | new-theme]: Sidebar & Navbar checks updated to use the same method | "activeMenuItem" in route data (optional) to set which menu item is active when url does not match | Bug fix in <my-tabs>.
1. layout.service.ts: Added "activeMenuItemSubject" to keep value of data['activeMenuItem'].
2. menu.ts: Removed "markAsActive" (not used) | Set RootMenuItem as deprecated (should use only MenuItem) | Added "isTheActiveMenuItem()" method to check if a MenuItem (root or not / sidebar or navbar) is active.
3. navigationBar.component.ts: Updated "isTheActiveMenu()" method to call MenuItem.isTheActiveMenu() | Removed method "isTheActiveMenuItem()".
4. navigationBar.component.html: Always call "isTheActiveMenu()" method.
5. sideBar.component.ts: Added "get currentRoute()" and updated method "isTheActiveMenuItem()".
6. tabs.component.ts: [Bug fix] Removed [class.uk-active] from <li> of tabs (since small-tabs are not currently used it is ok to remove this) - caused by version update of Uikit.
7. monitor-routing.module.ts: Set activeMenuItem: "dashboard" for any path under a stakeholder that has nothing or anything under a topic. | Set activeMenuItem: "search" in paths under search.
8. app-routing.module.ts: Set activeMenuItem: "manage" for paths under admin/:stakeholder.
9. app.component.ts: Updated menu in Admin Dashboard (all items visible and logo of monitor used) | Set value for MenuItem.routeActive when adding menu items of topics and users.
2022-03-28 11:40:21 +03:00
Konstantinos Triantafyllou dc0544d0d8 Page content: Add padding in header and inner. Complete input, textarea and select base on new redesign 2022-03-28 01:21:55 +03:00
Alex Martzios 3fd632a2b7 changes for users, pages and entities pages - redesign 2022-03-24 14:56:55 +02:00
Alex Martzios 59ff682af7 redesign of admin-dashboard pages 2022-03-22 17:47:38 +02:00
Konstantinos Triantafyllou e678ca1072 Merge from master 2022-03-21 14:39:34 +02:00
Konstantinos Triantafyllou 825bfc4cf9 Set timeout for window scrolling 2022-03-21 14:37:26 +02:00
Konstantinos Triantafyllou 3f370dd293 Change sidebar active menu 2022-03-17 13:28:25 +02:00
argirok 6d7b1976a9 Merge branch 'new-theme' into new-theme-linking 2022-03-16 19:18:26 +02:00
argirok b7cc2c0147 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-03-16 19:14:48 +02:00
argirok b027575fc0 claims updates 2022-03-16 18:54:22 +02:00
argirok 7a8358bb47 stepper component v2 2022-03-16 18:53:19 +02:00
argirok f2217a4a38 initial commit of stepper component 2022-03-16 17:24:48 +02:00
Konstantinos Triantafyllou e103ced738 Merge remote-tracking branch 'origin/master' into new-theme 2022-03-16 15:33:05 +02:00
Konstantinos Triantafyllou ed01151b27 Syncronize page content sticky with navbar 2022-03-16 15:10:35 +02:00
Konstantinos Triantafyllou 1a2925a890 Add loading in search page 2022-03-15 16:29:59 +02:00
Alex Martzios e1a632e63f redesign of result-preview component 2022-03-15 13:13:28 +02:00
Konstantinos Triantafyllou 35a8a098c3 Remove uk-width-1-1 from uk-logo and add margin-left 2022-03-14 19:45:11 +02:00
Konstantinos Triantafyllou 4ccabced6d Change smooth-scroll to check last component instead of Route. Page content sticky base on new uikit version 2022-03-14 18:35:00 +02:00
Konstantinos Triantafyllou c49a79c798 Page Content make header sticky and send event in component to handle this event 2022-03-11 01:07:44 +02:00
Konstantinos Triantafyllou 7e76c885ba Add active status and name alternative instead of svg in tabicon 2022-03-10 19:45:44 +02:00
Konstantinos Triantafyllou 2942392d0a Fix sidebar special item. Remove padding from page-content-header 2022-03-10 18:34:26 +02:00
Konstantinos Triantafyllou 2f76a9f7d2 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-03-10 18:29:53 +02:00
Konstantinos Triantafyllou da84e94951 Change filter-tag to uk-label. Change background in quick contact to primary 2022-03-10 18:29:46 +02:00
Konstantinos Triantafyllou 854814d2ac Merge branch 'new-theme' into new-theme-linking 2022-03-09 23:38:48 +02:00
Konstantinos Triantafyllou cb0ac1b9df Navbar make menu position center default. Fix menuitems subnav 2022-03-09 23:38:05 +02:00
argirok 9c349ede97 Merge branch 'new-theme' into new-theme-linking 2022-03-09 11:07:19 +02:00
argirok 2542d452be Merge remote-tracking branch 'origin/new-theme' into new-theme-linking 2022-03-09 10:52:52 +02:00
argirok 7d5ac5eaf9 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-03-09 10:52:29 +02:00
Konstantinos Triantafyllou 53a0cd733b Merge changes from master 2022-03-08 20:42:50 +02:00
Konstantinos Triantafyllou d7598eb350 Change page-content to be sticky on scroll up 2022-03-08 20:35:00 +02:00
Konstantinos Triantafyllou f5b4677b63 Change user menu drop position to bottom-right 2022-03-04 17:50:51 +02:00
Konstantinos Triantafyllou 6fb5cf54ba Add graph as icon in library. Navigation bar remove uk-link from all links. 2022-03-04 17:31:09 +02:00
Konstantinos Triantafyllou 360cc0f3e3 Add extra-s and extra-m to add content after login. Fix position of indicator in mobiles 2022-03-03 18:19:06 +02:00
Konstantinos Triantafyllou 52f1abfdbf Change navbar to sticky only at top. Make page-content header sticky. Fix a bug in icons component 2022-03-03 17:44:59 +02:00
Alex Martzios ca07367d23 result-preview minor tweaks 2022-03-03 16:41:07 +02:00
Konstantinos Triantafyllou 2b7c52a8b0 Merge from master 2022-03-03 14:35:55 +02:00
Konstantinos Triantafyllou 4698a5fafd Delete old sidebar. Make some changes in navbar and user-mini 2022-03-02 23:48:21 +02:00
argirok c9ed6a255b linking updates 2022-03-02 18:08:37 +02:00
Konstantinos Triantafyllou 894ce0add6 Fix flickering in section-scroll. Add event handler in quick contact 2022-03-02 12:27:17 +02:00
argirok dcffb611a2 v2 2022-03-02 12:18:24 +02:00
Konstantinos Triantafyllou 03c06830be Fix section scroll opacity change. Add scrollspy in how-to. Align right for recaptcha in contact us in large screens 2022-03-01 21:09:14 +02:00
Konstantinos Triantafyllou c2b6547b4c Navbar add rules if header menu and header is on center 2022-02-28 18:00:57 +02:00
Konstantinos Triantafyllou d590732aba Change navbar base on new theme 2022-02-28 14:38:26 +02:00
argirok 9e961d46c1 Merge branch 'new-theme' into new-theme-linking 2022-02-25 16:52:30 +02:00
argirok 9222deed7b initial linking changes 2022-02-25 14:52:36 +02:00
Konstantinos Triantafyllou ada419f8e8 Add notification handler. Add contact-us to quick contact and make some changes in contact-us 2022-02-24 18:42:05 +02:00
Konstantinos Triantafyllou 31e5658827 Some css changes in quick contact 2022-02-23 12:33:43 +02:00
Alex Martzios 1a7aee9a2f add changes to the quick-contact component 2022-02-23 10:46:56 +02:00
Konstantinos Triantafyllou 13fee133e4 Add new icon for restricted. Change tabs base on new guidelines. Change how-to base on new mocks 2022-02-23 00:37:18 +02:00
Alex Martzios f3ff37c74c create quick-contact component button and modal 2022-02-22 16:40:08 +02:00
Konstantinos Triantafyllou 50a71ed258 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-02-21 18:03:03 +02:00
Konstantinos Triantafyllou 2942a35ded Merge commit '514cd0dd12407f0b3c09d5f20c39a546888165a9' into new-theme 2022-02-21 18:02:46 +02:00
Konstantinos Triantafyllou 94519de68b Search page: Change form class back to searchForm 2022-02-21 16:34:43 +02:00
Konstantinos Triantafyllou 5c60c42063 Merge remote-tracking branch 'origin/master' into new-theme 2022-02-21 16:33:33 +02:00
Konstantinos Triantafyllou fde8375524 Make a map for dynamic contect in left and scroll section 2022-02-21 16:33:02 +02:00
Konstantinos Triantafyllou 5a69cb2101 Resize icon in portal search result. Delete warning in IconsService. 2022-02-17 17:30:37 +02:00
Konstantinos Triantafyllou f15b8ef8fc Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-02-16 18:28:43 +02:00
Konstantinos Triantafyllou e590ce7b9e Merge commit '014dc9e5562890b61fbafa7705d2f31d0cbcdb74' into new-theme 2022-02-16 18:28:25 +02:00
Konstantinos Triantafyllou 1d541ba121 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-02-16 18:21:33 +02:00
Konstantinos Triantafyllou e5e1f76635 Merge commit '014dc9e5562890b61fbafa7705d2f31d0cbcdb74' into new-theme 2022-02-16 18:21:07 +02:00
Konstantinos Triantafyllou cf6ab4a03b Fix filter on disable bug. Add new private icon in portal-search-results. Add method to convert a stakeholder into StakeholderInfo 2022-02-16 18:18:12 +02:00
Konstantinos Triantafyllou 4e9981f24f Add default size usage in icons. Some changes in portal search results. Delete text-as-svg (no need) 2022-02-16 12:01:41 +02:00
Konstantinos Triantafyllou 4e49e7f489 Add new text-as-svg pipe. Add gradient fucntionallity on icons 2022-02-15 16:25:46 +02:00
Alex Martzios f0086e4797 remove uk-text-muted from how component 2022-02-15 14:49:33 +02:00
Konstantinos Triantafyllou db58e5c3e8 Change search page base on new mocks for portal results 2022-02-14 18:02:00 +02:00
Konstantinos Triantafyllou e5a644f2ae Make breadcrumbs also as Input in search page 2022-02-11 16:00:34 +02:00
Konstantinos Triantafyllou 967aab00d3 Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme 2022-02-11 15:59:40 +02:00
Konstantinos Triantafyllou 5901716bff Merge commit '965b1ee134bc56313b5912e83a2ae23387e4c493' into new-theme 2022-02-11 15:38:12 +02:00
Konstantinos Triantafyllou f8b395dc81 Add description in contact us 2022-02-11 15:35:08 +02:00
Konstantinos Triantafyllou 02a18d48d0 Merge remote-tracking branch 'origin/master' into new-theme 2022-02-11 13:12:39 +02:00
Konstantinos Triantafyllou ef347e9c02 Merge remote-tracking branch 'origin/master' into new-theme 2022-02-08 15:16:49 +02:00
Alex Martzios 4c64aa44a9 add aria-label attribute for cookie-law dismiss button 2022-02-07 11:38:16 +02:00
Konstantinos Triantafyllou 59a7ffd7ce Some small changes in contact and search communities 2022-01-28 13:57:47 +02:00
Konstantina Galouni fca0f49119 [new-theme | Library]: section-scroll.component: Scroll component used by connect home page updated - opacity changes according to intersectionRatio of IntersectionObserver | css for medium screens added. 2022-01-28 11:01:22 +02:00
Alex Martzios a59143f381 Add svg icon option for tabs component 2022-01-21 15:40:30 +02:00
Konstantinos Triantafyllou 03f412c550 Update search page layout base on new theme 2022-01-21 10:20:46 +02:00
Konstantinos Triantafyllou 13efcd8891 Change filters list to uk-list-large 2022-01-20 13:42:10 +02:00
Konstantinos Triantafyllou 7d01dfd8ee Merge remote-tracking branch 'origin/master' into new-theme 2022-01-20 11:19:57 +02:00
Konstantinos Triantafyllou 78ee2e4bcd Update search componenents with new theme 2022-01-20 11:19:44 +02:00
Konstantina Galouni 71800f06c9 [new-theme | Library]: section-scroll component changed to another effect. (not finalized) 2022-01-20 00:47:29 +02:00
Konstantinos Triantafyllou e8f9970074 Icon component: Add visually hidden parameter. Change inside svg instead of scaling. Search change filters to links with uk-label 2022-01-19 14:30:48 +02:00
Konstantinos Triantafyllou a625e59610 Icon component add custom svg input 2022-01-18 14:59:14 +02:00
Konstantinos Triantafyllou 5f7acfdd4d Add material icons on icon component 2022-01-17 19:46:22 +02:00
Konstantinos Triantafyllou 809589b5f9 Merge commit '3228c67a14ecaf0a0434871f1aabf728ac923d31' into new-theme 2022-01-17 19:42:03 +02:00
Konstantinos Triantafyllou 68b0b22754 Add section scroll component 2022-01-13 18:14:09 +02:00
Konstantinos Triantafyllou 83a9f259bf Merge changes from master 2022-01-13 15:57:35 +02:00
Konstantinos Triantafyllou 52e04d7b48 Change contact-us base on new theme. Change modal buttons. Changle default color of loading with uk-text-primary 2022-01-12 14:12:30 +02:00
Konstantinos Triantafyllou 963c088bef Merge remote-tracking branch 'origin/master' into new-theme 2022-01-11 13:15:13 +02:00
argirok a34744e1af apply changes in navbar & footer 2022-01-05 17:28:20 +02:00
536 changed files with 39704 additions and 22826 deletions

200
LICENSE.txt Normal file
View File

@ -0,0 +1,200 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1,6 +1,5 @@
import { Injectable, Inject, PLATFORM_ID } from '@angular/core';
import {Injectable, Inject, PLATFORM_ID, TransferState} from '@angular/core';
import { HttpInterceptor, HttpRequest, HttpHandler } from '@angular/common/http';
import { TransferState } from '@angular/platform-browser';
import { properties } from "../../environments/environment";
@Injectable({
@ -9,29 +8,39 @@ import { properties } from "../../environments/environment";
export class CacheInterceptorService implements HttpInterceptor {
cachingRequests = [
// Remove 2 following lines when bug with hidden refine filters is solved.
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=relfunder&fields=relfundinglevel0_id&fields=relproject&fields=instancetypename&fields=resultlanguagename&fields=community&fields=resulthostingdatasource&fields=country&&fq=resultbestaccessright exact \"Open Access\"&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=funder&fields=fundinglevel0_id&fields=projectstartyear&fields=projectendyear&fields=projectecsc39&&type=projects&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=relfundinglevel0_id&fields=relproject&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&fq=resultbestaccessright exact \"Open Access\"&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=funder&fields=fundinglevel0_id&fields=projectstartyear&fields=projectendyear&fields=projectoamandatepublications&&type=projects&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=relfunder&fields=instancetypename&fields=resultlanguagename&fields=community&fields=resulthostingdatasource&fields=country&&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=relfunder&fields=relfundinglevel0_id&fields=relproject&fields=instancetypename&fields=resultlanguagename&fields=community&fields=resulthostingdatasource&fields=country&&fq=resultbestaccessright%20exact%20%22Open%20Access%22&fq=relfunder%20exact%20%22ec__________%3A%3AEC%7C%7CEuropean%20Commission%7C%7CEC%22&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=relfundinglevel0_id&fields=relproject&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&fq=resultbestaccessright%20exact%20%22Open%20Access%22&fq=relfunder%20exact%20%22ec__________%3A%3AEC%7C%7CEuropean%20Commission%7C%7CEC%22&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=relfunder&fields=instancetypename&fields=resultlanguagename&fields=community&fields=resulthostingdatasource&fields=country&&type=publications&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=relfunder&fields=instancetypename&fields=resultlanguagename&fields=community&fields=resulthostingdatasource&fields=country&&type=datasets&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=relfunder&fields=instancetypename&fields=resultlanguagename&fields=community&fields=resulthostingdatasource&fields=country&&type=software&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=relfunder&fields=instancetypename&fields=resultlanguagename&fields=community&fields=resulthostingdatasource&fields=country&&type=other&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&type=publications&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&type=datasets&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&type=software&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&type=other&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=relfunder&fields=instancetypename&fields=resultlanguagename&fields=community&fields=resulthostingdatasource&fields=country&&fq=resultbestaccessright%20exact%20%22Open%20Access%22&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=resultbestaccessright&fields=relfunder&fields=instancetypename&fields=resultlanguagename&fields=community&fields=resulthostingdatasource&fields=country&&fq=resultbestaccessright exact \"Open Access\"&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=funder&fields=projectstartyear&fields=projectendyear&fields=projectecsc39&&type=projects&page=0&size=0",
"/resources2/?format=json&refine=true&fields=datasourcetypeuiname&fields=datasourceodlanguages&fields=datasourceodcontenttypes&fields=datasourcecompatibilityname&fields=country&fields=collectedfromname&&type=datasources&page=0&size=0",
"/resources2/?format=json&query= ( (reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or reldatasourcecompatibilityid exact openaire4.0 or reldatasourcecompatibilityid exact openaire-cris_1.1 or reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=*) ) &refine=true&fields=country&&type=organizations&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&fq=resultbestaccessright%20exact%20%22Open%20Access%22&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=instancetypename&fields=foslabel&fields=relfunder&fields=sdg&fields=country&fields=resultlanguagename&fields=resulthostingdatasource&fields=community&&fq=resultbestaccessright exact \"Open Access\"&type=results&page=0&size=0",
"/resources2/?format=json&refine=true&fields=funder&fields=projectoamandatepublications&fields=projectstartyear&fields=projectendyear&&type=projects&page=0&size=0",
"/resources2/?format=json&refine=true&fields=eoscdatasourcetype&fields=datasourceodlanguages&fields=datasourceodcontenttypes&fields=datasourcecompatibilityname&fields=country&fields=collectedfromname&fields=datasourcethematic&fields=datasourcejurisdiction&&type=datasources&page=0&size=0",
// "/resources2/?format=json&query= ( (reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or reldatasourcecompatibilityid exact openaire4.0 or reldatasourcecompatibilityid exact openaire-cris_1.1 or reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=*) ) &refine=true&fields=country&&type=organizations&page=0&size=0",
"/resources2/?format=json&refine=true&fields=country&&type=organizations&fq=(reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or reldatasourcecompatibilityid exact openaire4.0 or reldatasourcecompatibilityid exact openaire-cris_1.1 or reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=*)&page=0&size=0&minRef=true",
"/projects/?format=json&refine=true&page=1&size=0&fields=funder",
"/resources2/?format=json&size=0&type=organizations&fq=(reldatasourcecompatibilityid exact driver or reldatasourcecompatibilityid exact driver-openaire2.0 or reldatasourcecompatibilityid exact openaire2.0 or reldatasourcecompatibilityid exact openaire3.0 or reldatasourcecompatibilityid exact openaire4.0 or reldatasourcecompatibilityid exact openaire-cris_1.1 or reldatasourcecompatibilityid exact openaire2.0_data or reldatasourcecompatibilityid exact hostedBy or relproject=*)",
"/resources/?format=json&query=( oaftype exact datasource )&refine=true&fields=datasourcetypeuiname&fields=country&fields=datasourceodsubjects&fields=datasourceodcontenttypes&fields=datasourcecompatibilityname&&type=datasources&page=0&size=0",
// "/projects/?format=json&refine=true&page=1&size=0&fields=funder",
"/projects/?fields=funder&sf=funder&format=json&size=0",
"/results/?fields=relfunder&sf=relfunder&format=json&size=0",
"/resources/?format=json&query=( oaftype exact datasource and (eoscdatasourcetype exact \"Journal Archive\" or eoscdatasourcetype exact \"Repository\"))&refine=true&fields=datasourcetypename&fields=country&fields=datasourceodsubjects&fields=datasourceodcontenttypes&fields=datasourcecompatibilityname&fields=datasourcethematic&fields=datasourcejurisdiction&&type=datasources&page=0&size=0",
"/search/v2/api/datasources/count?format=json", "/search/v2/api/publications/count?format=json", "/search/v2/api/datasets/count?format=json", "/search/v2/api/software/count?format=json", "/search/v2/api/other/count?format=json",
"relresulttype%3Dpublication"
"relresulttype%3Dpublication",
"/resources2/?format=json&size=0&type=projects",
"/resources2/?format=json&size=0&type=datasources",
"/resources2/?format=json&size=0&type=results",
"/resources2/?format=json&size=0&type=results&fq=resultbestaccessright%20exact%20%22Open%20Access%22"
];
@ -49,7 +58,13 @@ export class CacheInterceptorService implements HttpInterceptor {
}
public checkForCachedRequests(url){
if(url.indexOf("refine=true") !== -1 || url.indexOf("/count?format=json") !== -1 || url.indexOf("relresulttype%3Dpublication") !== -1) {
// Do not call cache when it is not enabled at all.
// This property is not correctly used here. A new property should be introduced. For now it is ok.
if (!properties.useLongCache) {
return false;
}
if(url.indexOf("sf=") !== -1 || url.indexOf("refine=true") !== -1 || url.indexOf("/count?format=json") !== -1 || url.indexOf("relresulttype%3Dpublication") !== -1 ||
(url.indexOf("?format=json&size=0&type=") !== -1 && url.indexOf("query=") == -1)) {
return this.cachingRequests.some(partUrl => (url.indexOf(partUrl) !== -1));
}
return false;

View File

@ -1,313 +1,133 @@
<div>
<div>
<div class="uk-grid uk-margin-top uk-animation-fade">
<div class="uk-width-expand">
<div class="uk-grid uk-flex uk-flex-middle">
<div class="uk-width-1-2">
Select communities to link to
</div>
<div class="uk-width-1-2">
<div class="uk-margin">
<div class="uk-inline">
<span class="uk-form-icon uk-icon" ><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg" icon="search" ratio="1"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9" cy="9" r="7"></circle><path fill="none" stroke="#000" stroke-width="1.1" d="M14,14 L18,18 L14,14 Z"></path></svg></span>
<input class=" uk-input uk-width-medium" [(ngModel)]="keyword" name="keyword"
placeholder="Search communities..."/>
<span *ngIf="keyword.length > 0" class="uk-margin-small-right uk-icon" style="cursor: pointer;"
(click)="keyword='';">
<svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg" data-svg="close"><path fill="none" stroke="#000"
stroke-width="1.06"
d="M16,16 L4,4"></path><path
fill="none"
stroke="#000"
stroke-width="1.06"
d="M16,4 L4,16"></path></svg>
</span>
</div>
</div>
<div class="uk-width-xlarge@l uk-width-large" [ngClass]="centerAlign ? 'uk-align-center':''">
<advanced-search-input>
<div input type="select" [(value)]="showOptions.show" placeholder="Type" hint="Select..."
[options]="showOptions.selectOptions" class="uk-width-2-5"></div>
<div class="uk-width-expand" input type="text" [(value)]="keyword" [searchable]="true" placeholder="Entities to link"
[hint]="'Search for ' + openaireEntities.COMMUNITIES + '...'" tooltip="true"></div>
</advanced-search-input>
</div>
<div *ngIf="communities"class="uk-padding">
<div class="uk-grid uk-child-width-1-3" uk-height-match=".uk-card" uk-grid>
<div *ngFor="let community of filter()">
<a class="uk-link-reset uk-height-1-1" (click)="select(community.id, community.label)">
<div [title]="(this.results.length>=basketLimit)?'Basket reached the size limit':''"
class="uk-card uk-card-default uk-card-hover uk-padding-small uk-text-center">
<div class="uk-text-right">
<button class="linking-add-button uk-icon-button-small" [class.uk-disabled]="(this.results.length>=basketLimit)" *ngIf="!isSelected(community.id)">
<icon name="add" [flex]="true"></icon>
</button>
<button *ngIf="isSelected(community.id)" class="linking-selected-button uk-icon-button-small">
<icon name="check" [flex]="true"></icon>
</button>
</div>
<img *ngIf="communityLogos && communityLogos[community.id]"
[src]="communityLogos[community.id] | logoUrl"
class="uk-blend-multiply"
[alt]="((community.title)?community.title:(community.shortTitle?community.shortTitle:'')) + ' logo'"
loading="lazy" style="max-height:70px">
<div class="uk-margin-small-top">
{{community.label}}
</div>
</div>
</a>
</div>
</div>
</div>
<ng-container *ngIf="filter().length == 0">
<div class="uk-alert uk-alert-primary"
role="alert">No Results found
</div>
</ng-container>
</div>
<!-- Categories modal-->
<modal-alert #modal large="true">
<div class="uk-modal-body uk-height-min-medium uk-width-expand">
<div class="uk-margin-bottom">
<input [ngModel]="isSelected(selectedCommunityId)" type="checkbox"
(ngModelChange)="isSelected(selectedCommunityId)?removeById(selectedCommunityId):select(selectedCommunityId,
selectedCommunityLabel);">
<span class="uk-margin-small-left">{{selectedCommunityLabel}}</span>
</div>
<div *ngIf="loading" class="uk-alert uk-alert-primary" role="alert">Loading communities information...</div>
<div *ngIf="error" class="uk-alert uk-alert-warning"
role="alert">An error occurred while loading communities...
</div>
<div class="uk-margin-small-top uk-text-small uk-text-meta" *ngIf="categories[selectedCommunityId] &&
categories[selectedCommunityId].length > 0 ">
Optionally, you can <span class="uk-text-bold">specify additional</span> Community's <span
class="uk-text-bold">paths</span> to link your
sources.
</div>
<div *ngIf="categories[selectedCommunityId] && categories[selectedCommunityId].length == 0 "
class=" uk-text-small uk-text-muted">
No additional community paths found for this community.
</div>
<ul *ngIf="categories[selectedCommunityId] && categories[selectedCommunityId].length > 0 "
class=" uk-list uk-margin-small-top uk-margin-left uk-animation-fade uk-overflow-auto uk-height-medium">
<li *ngFor="let category of categories[selectedCommunityId]">
<div (click)="browseConcepts(category.id)">
<input [ngModel]="isSelected(category.id)" type="checkbox"
(ngModelChange)="isSelected(category.id)?removeById(category.id):addNewContext(selectedCommunityLabel,category.label,{'id':category.id, 'label':category.label});">
<span class="uk-margin-small-left">{{category.label}} </span>
<span *ngIf="!conceptsClassDisplay[category.id]" uk-icon="icon:chevron-down; ratio:0.7"></span>
<span *ngIf="conceptsClassDisplay[category.id]" uk-icon="icon:chevron-up; ratio:0.7"></span>
</div>
<div *ngIf="conceptsCategoryLoading[category.id]" class="uk-alert uk-alert-primary"
role="alert">Loading category information...
</div>
<div class="uk-margin-right uk-padding">
<span *ngFor="let community of communities" [title]="(this.results.length>=basketLimit)?'Basket reached the size limit':''">
<span [class]="((this.results.length>=basketLimit)?'uk-disabled':'')+' uk-margin-small-bottom uk-margin-small-right '+getCommunityClass(community)"
(click)="select(community)" style="cursor:pointer;">
<a href="#modal-categories" uk-toggle>
{{community.label}}
</a>
</span>
</span>
</div>
<div>
<!-- Categories modal-->
<div id="modal-categories" uk-modal="bg-close:false;">
<div class="uk-modal-dialog uk-modal-body uk-height-min-medium">
<a class="uk-modal-close uk-position-right uk-margin-right uk-margin-top" type="button">
<svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" data-svg="close-icon">
<line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"></line>
<line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"></line>
</svg>
</a>
<div class="portal-color uk-margin-top">
<span class="uk-icon-button icon-button-small portal-icon-button uk-icon">
<svg height="20" icon="check" ratio="1" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><polyline fill="none" points="4,10 8,15 17,4" stroke="#000" stroke-width="1.1"></polyline></svg>
<div
*ngIf="conceptsClass[category.id] && conceptsClass[category.id].length == 0 && conceptsClassDisplay[category.id]">No more paths found
</div>
<ul *ngIf="conceptsClass[category.id] && conceptsClassDisplay[category.id]"
class="uk-list uk-animation-fade uk-margin-left uk-margin-top" id="ul_{{category.id}}">
<li *ngFor="let concept1 of conceptsClass[category.id]">
<div (click)="displaySubcategory(concept1.id)">
<input [ngModel]="isSelected(concept1.id)" type="checkbox"
(ngModelChange)="isSelected(concept1.id)?removeById(concept1.id):addNewContext(selectedCommunityLabel,category.label,concept1);">
<span class="uk-margin-small-left">{{concept1.label}}</span>
<span *ngIf="concept1.concepts && concept1.concepts.length==0">
<span *ngIf="!conceptsClassDisplay[concept1.id]" uk-icon="icon:chevron-down; ratio:0.7"></span>
<span *ngIf="conceptsClassDisplay[concept1.id]" uk-icon="icon:chevron-up; ratio:0.7"></span>
</span>
<span
class="uk-text-bold">{{selectedCommunityLabel}}</span> community is now in your Links Basket
</div>
<div *ngIf="loading" class="uk-alert uk-alert-primary" role="alert">Loading communities information...</div>
<div *ngIf="error" class="uk-alert uk-alert-warning"
role="alert">An error occured while loading communities...
</div>
<!-- *ngIf="categories[selectedCommunityId] && categories[selectedCommunityId].length > 0 " -->
<div class="uk-margin-small-top uk-text-small" *ngIf="categories[selectedCommunityId] &&
categories[selectedCommunityId].length > 0 ">
Optionally, you can specify additional Community's paths to link your sources.
</div>
<div *ngIf="categories[selectedCommunityId] && categories[selectedCommunityId].length == 0 "
class=" uk-margin-small-top uk-text-small uk-text-muted">
No aditional community paths found for this community.
</div>
<ul *ngIf="categories[selectedCommunityId] && categories[selectedCommunityId].length > 0 "
class=" uk-list uk-margin-top uk-animation-fade uk-overflow-auto uk-height-medium">
<li *ngFor="let category of categories[selectedCommunityId]">
<span (click)="browseConcepts(category.id)">
<span *ngIf="!conceptsClassDisplay[category.id]" class="uk-icon"><svg width="20" height="20"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
ratio="1"> <polygon
points="8 5 13 10 8 15"></polygon></svg></span>
<span *ngIf="conceptsClassDisplay[category.id]" class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon
points="5 7 15 7 10 12"></polygon></svg>
</span>
{{category.label}} - {{category.id}}</span>
<a *ngIf="!isSelected(category.id)"
(click)="addNewContext(selectedCommunityLabel,category.label,{'id':category.id, 'label':category.label})"
[class]="((this.results.length>=basketLimit)?'uk-disabled':'')+' uk-icon-button icon-button-small'">
<span class="uk-icon" [title]="(this.results.length>=basketLimit)?'Basket reached the size limit':''">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus"
ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17"
height="1"></rect></svg>
</span>
</a>
<span *ngIf="isSelected(category.id)"
class="uk-icon-button icon-button-small portal-icon-button uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="check"
ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.1"
points="4,10 8,15 17,4"></polyline></svg>
</span>
<div *ngIf="conceptsCategoryLoading[category.id]" class="uk-alert uk-alert-primary"
role="alert">Loading category information...
</div>
</div>
<div>
<div
[class]="(conceptsClassDisplay[category.id] && conceptsClass[category.id] && conceptsClass[category.id].length>5)?'uk-panel-scrollable':''">
<div
*ngIf="conceptsClass[category.id] && conceptsClass[category.id].length == 0 && conceptsClassDisplay[category.id]">No more paths found
</div>
<ul *ngIf="conceptsClass[category.id] && conceptsClassDisplay[category.id]"
class="uk-list uk-animation-fade" id="ul_{{category.id}}">
<li *ngFor="let concept1 of conceptsClass[category.id]">
<span (click)="displaySubcategory(concept1.id)">
<span *ngIf="!conceptsClassDisplay[concept1.id] && concept1.concepts" class="uk-icon"><svg
width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon
points="8 5 13 10 8 15"></polygon></svg></span>
<span *ngIf="conceptsClassDisplay[concept1.id] && concept1.concepts" class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon
points="5 7 15 7 10 12"></polygon></svg></span>
{{concept1.label}}
</span>
<a *ngIf="!isSelected(concept1.id)"
(click)="addNewContext(selectedCommunityLabel,category.label,concept1)"
[class]="((this.results.length>=basketLimit)?'uk-disabled':'')+' uk-icon-button icon-button-small'"><span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect
x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
</span></a>
<span *ngIf="isSelected(concept1.id)"
class="uk-icon-button icon-button-small portal-icon-button uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="check"
ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.1"
points="4,10 8,15 17,4"></polyline></svg>
</span>
<div
[class]="(conceptsClassDisplay[concept1.id] && concept1.concepts && concept1.concepts.length>5)?'uk-panel-scrollable':''">
<div
*ngIf="concept1.concepts && concept1.concepts.length==0 && conceptsClassDisplay[concept1.id]">No more paths found
</div>
<ul *ngIf="concept1.concepts && conceptsClassDisplay[concept1.id] " class="uk-animation-fade">
<li *ngFor="let concept2 of concept1.concepts"><span
(click)="displaySubcategory(concept2.id)">
<span *ngIf="!conceptsClassDisplay[concept2.id] && concept2.concepts" class="uk-icon"><svg
width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon
points="8 5 13 10 8 15"></polygon></svg></span>
<span *ngIf="conceptsClassDisplay[concept2.id] && concept2.concepts" class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon
points="5 7 15 7 10 12"></polygon></svg></span>
{{concept2.label}}</span>
<a *ngIf="!isSelected(concept2.id)"
(click)="addNewContext(selectedCommunityLabel,category.label,concept2)"
[class]="((this.results.length>=basketLimit)?'uk-disabled':'')+' uk-icon-button icon-button-small'"><span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect
x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
</span></a>
<span *ngIf="isSelected(concept2.id)"
class="uk-icon-button icon-button-small portal-icon-button uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
icon="check" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.1"
points="4,10 8,15 17,4"></polyline></svg>
</span>
<ul *ngIf="concept2.concepts && conceptsClassDisplay[concept2.id] "
class="uk-animation-fade">
<li *ngFor="let concept3 of concept2.concepts">{{concept3.label}} [title]="(this.results.length>=basketLimit)?'Basket reached the size limit':''"
<a *ngIf="!isSelected(concept3.id)"
(click)="addNewContext(selectedCommunityLabel,category.label,concept3)"
[class]="((this.results.length>=basketLimit)?'uk-disabled':'')+' uk-icon-button icon-button-small'"><span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect
x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
</span></a>
<span *ngIf="isSelected(concept3.id)"
class="uk-icon-button icon-button-small portal-icon-button uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
icon="check" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.1"
points="4,10 8,15 17,4"></polyline></svg>
</span>
</li>
</ul>
</li>
</ul>
</div>
</li>
</ul>
*ngIf="concept1.concepts && concept1.concepts.length==0 && conceptsClassDisplay[concept1.id]">No more paths found
</div>
</li>
</ul>
<!-- </li>
</ul> -->
<p class="">
<button class="uk-button uk-button-default uk-modal-close uk-margin-right uk-margin-top uk-align-right"
type="button">Close
</button>
</p>
</div>
</div>
<!-- <div class="uk-text-large">Select a community <helper div="link-context-form" tooltip=true></helper> </div>
<select [(ngModel)]="selectedCommunityId" (ngModelChange)="communityChanged()" class="uk-margin-large-bottom uk-select uk-width-medium " name="select_funder" >
<option value="0" >Select community</option>
<option *ngFor="let community of communities" [value]="community.id" >{{community.label}}</option>
</select> -->
<!--div class="uk-text-large">and then</div>
<div class=" uk-margin-left uk-margin-left">
<div class=" uk-text-bold">search for community concepts</div>
<table class="uk-margin-remove uk-width-1-1 uk-table uk-table-responsive" ><tr>
<tr>
<td *ngIf="selectedCommunityId != '0' && categories.length > 0" class="uk-width-medium">
<select [(ngModel)]="selectedCategoryId" (ngModelChange)="categoryChanged()" class="uk-select uk-width-medium " name="select_funder" >
<option value="0" >Select category</option>
<option *ngFor="let category of categories" [value]="category.id" >{{category.label}}</option>
</select>
</td><td >
<static-autocomplete [(properties)]=properties [(list)] = concepts [allowDuplicates]=true [showSelected]=false [placeHolderMessage] = "'Concept name'" title = "Concepts" [multipleSelections]=true (addItem) = "select($event)" > </static-autocomplete>
</td></tr>
</table>
</div-->
<!-- <div *ngIf="loading" class="uk-alert uk-alert-primary" role="alert">Loading communities information...</div>
<div *ngIf="error" class="uk-alert uk-alert-warning" role="alert">An error occured while loading communities...</div>
<div class="uk-text-large ">or</div>
<div class=" uk-text-bold uk-margin-bottom uk-margin-left">browse through community categories:
<button uk-toggle="target: #browse; animation: uk-animation-fade" class="uk-button portal-button"> Browse </button>
</div> -->
<div class="uk-margin-left">
<!-- <div id="browse" class=" uk-margin-small">
<div *ngIf="selectedCommunityId =='0'" class="uk-alert uk-alert-warning" >Please select community first...</div>
<div *ngIf="selectedCommunityId !='0'" class="uk-panel uk-panel-scrollable">
<ul class="uk-list ">
<li>
<span (click)="displaySubcategory(selectedCommunityId)" >
<span *ngIf="!conceptsClassDisplay[selectedCommunityId]" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="8 5 13 10 8 15"></polygon></svg></span>
<span *ngIf="conceptsClassDisplay[selectedCommunityId]" class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="5 7 15 7 10 12"></polygon></svg></span>{{selectedCommunityLabel}}
</span>
<a *ngIf="!isSelected(selectedCommunityId)" (click)="addNewContext(selectedCommunityLabel,null,{'id':selectedCommunityId, 'label':selectedCommunityLabel})" class="uk-icon-button icon-button-small uk-icon">
<span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
</span> </a>
<span *ngIf="isSelected(selectedCommunityId)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
<ul *ngIf="conceptsClassDisplay[selectedCommunityId]" class="uk-animation-fade" >
<li *ngFor="let category of categories" >
<span (click)="browseConcepts(category.id)" >
<span *ngIf="!conceptsClassDisplay[category.id]" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="8 5 13 10 8 15"></polygon></svg></span>
<span *ngIf="conceptsClassDisplay[category.id]" class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="5 7 15 7 10 12"></polygon></svg></span>
{{category.label}}</span><a *ngIf="!isSelected(category.id)" (click)="addNewContext(selectedCommunityLabel,category.label,{'id':category.id, 'label':category.label})" class="uk-icon-button icon-button-small" >
<span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
</span></a>
<span *ngIf="isSelected(category.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
<div *ngIf="conceptsCategoryLoading[category.id]" class="uk-alert uk-alert-primary" role="alert">Loading category information...</div>
<ul *ngIf="conceptsClass[category.id] && conceptsClassDisplay[category.id]" class="uk-list uk-animation-fade" id="ul_{{category.id}}" >
<li *ngFor="let concept1 of conceptsClass[category.id]" >
<span (click)="displaySubcategory(concept1.id)" >
<span *ngIf="!conceptsClassDisplay[concept1.id] && concept1.concepts" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="8 5 13 10 8 15"></polygon></svg></span>
<span *ngIf="conceptsClassDisplay[concept1.id] && concept1.concepts" class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="5 7 15 7 10 12"></polygon></svg></span>
{{concept1.label}}
</span>
<a *ngIf="!isSelected(concept1.id)" (click)="addNewContext(selectedCommunityLabel,category.label,concept1)" class="uk-icon-button icon-button-small"><span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
</span></a>
<span *ngIf="isSelected(concept1.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
<ul *ngIf="concept1.concepts && conceptsClassDisplay[concept1.id] " class="uk-animation-fade" >
<li *ngFor="let concept2 of concept1.concepts"><span (click)="displaySubcategory(concept2.id)" >
<span *ngIf="!conceptsClassDisplay[concept2.id] && concept2.concepts" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="8 5 13 10 8 15"></polygon></svg></span>
<span *ngIf="conceptsClassDisplay[concept2.id] && concept2.concepts" class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"> <polygon points="5 7 15 7 10 12"></polygon></svg></span>
{{concept2.label}}</span>
<a *ngIf="!isSelected(concept2.id)" (click)="addNewContext(selectedCommunityLabel,category.label,concept2)" class="uk-icon-button icon-button-small"><span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
</span></a>
<span *ngIf="isSelected(concept2.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
<ul *ngIf="concept2.concepts && conceptsClassDisplay[concept2.id] " class="uk-animation-fade" >
<li *ngFor="let concept3 of concept2.concepts">{{concept3.label}}
<a *ngIf="!isSelected(concept3.id)" (click)="addNewContext(selectedCommunityLabel,category.label,concept3)" class="uk-icon-button icon-button-small"><span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg>
</span></a>
<span *ngIf="isSelected(concept3.id)" class="uk-label uk-label-success uk-margin-small-top">Added</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul *ngIf="concept1.concepts && conceptsClassDisplay[concept1.id] "
class="uk-list uk-animation-fade uk-margin-left uk-margin-top">
<li *ngFor="let concept2 of concept1.concepts">
<div (click)="displaySubcategory(concept2.id)">
<input [ngModel]="isSelected(concept2.id)" type="checkbox"
(ngModelChange)="isSelected(concept2.id)?removeById(concept2.id):addNewContext(selectedCommunityLabel,category.label,concept2);" >
<span *ngIf="concept2.concepts && concept2.concepts.length==0">
<span class="uk-margin-small-left">{{concept2.label}}</span><span *ngIf="!conceptsClassDisplay[concept1.id]" uk-icon="icon:chevron-down; ratio:0.7"></span>
<span *ngIf="conceptsClassDisplay[concept1.id]" uk-icon="icon:chevron-up; ratio:0.7"></span>
</span>
</div>
<ul *ngIf="concept2.concepts && conceptsClassDisplay[concept2.id] "
class="uk-list uk-animation-fade uk-margin-left uk-margin-top">
<li *ngFor="let concept3 of concept2.concepts">
<input [ngModel]="isSelected(concept3.id)" type="checkbox"
(ngModelChange)="isSelected(concept3.id)?removeById(concept2.id):addNewContext(selectedCommunityLabel,category.label,concept3);">
<span class="uk-margin-small-left">{{concept3.label}}</span>
</li>
</ul>
</li>
</ul>
</ul>
</div>
</div> -->
</div>
</li>
</ul>
</div>
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
<div *ngIf="infoMessage.length > 0" class="uk-alert uk-alert-primary" role="alert">{{infoMessage}}</div>
</div>
</div>
</li>
</ul>
</div>
<div *ngIf="warningMessage.length > 0" class="uk-alert uk-alert-warning" role="alert">{{warningMessage}}</div>
<div *ngIf="infoMessage.length > 0" class="uk-alert uk-alert-primary" role="alert">{{infoMessage}}</div>
</modal-alert>

View File

@ -1,11 +1,13 @@
import {Component, Input} from '@angular/core';
import {Component, Input, ViewChild} from '@angular/core';
import {Router} from '@angular/router';
import {ContextsService} from './service/contexts.service';
import {ClaimEntity} from './claimHelper.class';
import {Session} from '../../login/utils/helper.class';
import {LoginErrorCodes} from '../../login/utils/guardHelper.class';
import {ClaimEntity, ShowOptions} from './claimHelper.class';
import {EnvProperties} from '../../utils/properties/env-properties';
import {Subscriber} from "rxjs";
import {OpenaireEntities} from "../../utils/properties/searchFields";
import {CommunitiesService} from "../../connect/communities/communities.service";
import {UserManagementService} from "../../services/user-management.service";
import {Session} from "../../login/utils/helper.class";
declare var UIkit: any;
@ -15,13 +17,16 @@ declare var UIkit: any;
})
export class ClaimContextSearchFormComponent {
@Input() public centerAlign: boolean = false;
@Input() public results:ClaimEntity[];
@Input() public sources;
@Input() public properties: EnvProperties;
@Input() communityId: string = null;
@Input() public inlineClaim: boolean = false;
@Input() basketLimit;
@Input() showOptions:ShowOptions;
@ViewChild('modal') modal;
modalClicked = false;
public selectedCommunityId: string = "0";
public selectedCategoryId: string = "0";
public query = '';
@ -38,11 +43,47 @@ export class ClaimContextSearchFormComponent {
public loading: boolean = false;
public error: boolean = false;
@Input() localStoragePrefix: string = "";
openaireEntities = OpenaireEntities;
entitiesSelectOptions;
keyword = "";
subscriptions = [];
communityLogos = {};
communityIds = [];
user = null;
ngOnInit() {
this.getCommunities();
this.entitiesSelectOptions = this.showOptions.selectOptions;
//get community logos
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
this.user = user;
this.subscriptions.push(this._communitiesService.getCommunities(this.properties, this.properties.communityAPI+"/communities/").subscribe(
communitiesResults => {
if(communitiesResults!=null) {
this.communityLogos = {};
for (let community of communitiesResults) {
if(community.logoUrl && community.logoUrl.length > 0) {
this.communityLogos[community.communityId] = community;
}
}
this.communityIds = communitiesResults.filter(community => {
return community.claim == "all" ||
Session.isCommunityCurator(this.user) ||
Session.isClaimsCurator(this.user) ||
(community.claim == "membersOnly" && Session.isSubscribedTo("community", community.communityId,this.user)) ||
(community.claim == "managersOnly" && Session.isManager("community", community.communityId,this.user))
}).map(community => community.communityId);
this.getCommunities();
}
},
error => {
this.getCommunities();
}
));
}, error => {
}));
}
ngOnDestroy() {
this.subscriptions.forEach(subscription => {
@ -51,36 +92,63 @@ export class ClaimContextSearchFormComponent {
}
});
}
constructor(private _contextService: ContextsService, private router: Router) {
constructor(private _contextService: ContextsService, private router: Router, private _communitiesService: CommunitiesService, private userManagementService: UserManagementService,) {
}
getCommunityClass(community) {
let addclass = "";
if (this.isSelected(community.id)) {
addclass += " contextlabelSelected ";
} else {
addclass += " contextlabelNotSelected ";
}
if (this.keyword.length > 0) {
if (community.label.toLowerCase().indexOf(this.keyword.toLowerCase()) == -1) {
addclass += " fadeOut "
}
}
return addclass + 'uk-label';
filter() {
return this.communities?this.communities.filter(community => this.keyword.length ==0 || community.label.toLowerCase().indexOf(this.keyword.toLowerCase()) != -1):[];
}
select(community) {
remove(community: any) {
this.selectedCommunityId = community.id;
this.selectedCommunityLabel = community.label;
this.getCategories();
if (this.isSelected(community.id)) {
this.removeById(community.id);
this.openModal();
}
removeById(id) {
let index: number = -1;
for (let _i = 0; _i < this.results.length; _i++) {
let item = this.results[_i];
if (item.id == id) {
index = _i;
}
}
if (index > -1) {
this.results.splice(index, 1);
if (this.results != null) {
localStorage.setItem(this.localStoragePrefix, JSON.stringify(this.results));
}
UIkit.notification(OpenaireEntities.COMMUNITY + ' removed from your basket!', {
status: 'warning',
timeout: 4000,
pos: 'bottom-right'
});
}
}
select(communityId, communityLabel) {
console.log("SELECT", communityId)
this.selectedCommunityId = communityId;
this.selectedCommunityLabel = communityLabel;
this.getCategories();
if (this.isSelected(communityId)) {
this.removeById(communityId);
} else {
this.addNewContext(community.label, null, {'id': community.id, 'label': community.label});
this.addNewContext(communityLabel, null, {'id': communityId, 'label': communityLabel});
}
}
public openModal() {
this.modalClicked = true;
this.modal.cancelButton = false;
this.modal.okButton = false;
this.modal.alertTitle = this.selectedCommunityLabel;
this.modal.open();
}
isSelected(id): boolean {
for (let _i = 0; _i < this.results.length; _i++) {
let item = this.results[_i];
@ -91,44 +159,40 @@ export class ClaimContextSearchFormComponent {
}
return false;
}
addNewContext(community, category, concept, notify = true) {
// if (this.results.length > 50) {
// UIkit.notification({
// message: 'Your basket exceeds the number of allowed concepts (50)',
// status: 'warning',
// timeout: 1500,
// pos: 'top-center'
// });
// return;
// }
getClaimEntity(community, category, concept){
const entity: ClaimEntity = new ClaimEntity() ;
entity.type = "community";
entity.context = {community: community, category: category, concept: concept};
entity.id = entity.context.concept.id;
return entity;
}
addNewContext(community, category, concept, notify = true) {
const entity: ClaimEntity = this.getClaimEntity(community, category, concept) ;
this.warningMessage = "";
if (!this.isSelected(entity.id)) {
this.results.push(entity);
localStorage.setItem(this.localStoragePrefix, JSON.stringify(this.results));
UIkit.notification(OpenaireEntities.COMMUNITY + ' added in your basket!', {
status: 'success',
timeout: 4000,
pos: 'bottom-right'
});
}
}
getCommunities() {
if (!Session.isLoggedIn()) {
this.saveStateAndRedirectLogin();
} else {
this.loading = true;
this.subscriptions.push(this._contextService.getPublicCommunitiesByState().subscribe(
this.subscriptions.push(this._contextService.getCommunitiesByState().subscribe(
data => {
this.communities = data;
this.communities = data.filter(community => {
return this.communityIds.indexOf(community.id) != -1
});
if (this.communities.length > 0) {
this.communities.sort((n1, n2) => n1.label > n2.label);
this.communities.sort((n1, n2) => n1.title > n2.title);
}
this.loading = false;
if (this.communityId != null) {
if (this.communityId != null && this.communityIds.indexOf(this.communityId) != -1) {
//preselect community
this.selectedCommunityId = this.communityId;
for (let i = 0; i < this.communities.length; i++) {
@ -151,25 +215,26 @@ export class ClaimContextSearchFormComponent {
this.error = true;
}
));
}
}
getCategories() {
this.loading = true;
// this.categories=[];
if (this.selectedCommunityId != '0') {
if (!Session.isLoggedIn()) {
this.saveStateAndRedirectLogin();
} else {
if (this.categories[this.selectedCommunityId]) {
this.loading = false;
if(this.categories[this.selectedCommunityId].length > 0){
this.openModal()
}
return;
}
this.subscriptions.push(this._contextService.getCategories(this.selectedCommunityId, this.properties.contextsAPI).subscribe(
data => {
if(data.length > 0){
this.openModal()
}
this.categories[this.selectedCommunityId] = data;
this.concepts = [];
if (this.query !== "") {
@ -185,78 +250,8 @@ export class ClaimContextSearchFormComponent {
}
));
}
}
}
/*
getConcepts() {
this.loading = true;
if (this.selectedCategoryId != '0') {
if (!Session.isLoggedIn()) {
this.saveStateAndRedirectLogin();
} else {
this.concepts = [];
this._contextService.getConcepts(this.selectedCategoryId, "", true, this.properties.contextsAPI).subscribe(
data => {
this.concepts = data;
for (var i = 0; i < data.length; i++) {
if (data[i].hasSubConcept == true) {
this.getSubConcepts(data[i].id);
}
}
this.addCommunityInConcepts();
if (this.query !== "") {
var event = {value: ""};
event.value = this.query;
// this.filter(event);
}
this.loading = false;
},
err => {
//console.log(err);
this.handleError("Error getting concepts for category with id: " + this.selectedCategoryId, err);
this.loading = false;
}
);
}
} else {
this.concepts = [];
this.loading = false;
}
}*/
/*
getSubConcepts(conceptId) {
this.loading = true;
if (this.selectedCategoryId != '0') {
if (!Session.isLoggedIn()) {
this.saveStateAndRedirectLogin();
} else {
this._contextService.getSubConcepts(conceptId, "", true, this.properties.contextsAPI).subscribe(
data => {
for (var i = 0; i < data.length; i++) {
this.concepts.push(data[i]);
}
if (this.query !== "") {
var event = {value: ""};
event.value = this.query;
// this.filter(event);
}
this.loading = false;
},
err => {
//console.log(err);
this.handleError("Error getting subconcepts for concept with id: " + conceptId, err);
this.loading = false;
}
);
}
} else {
this.concepts = [];
this.loading = false;
}
}*/
displaySubcategory(id) {
if (this.conceptsClassDisplay[id] != null) {
@ -268,9 +263,6 @@ export class ClaimContextSearchFormComponent {
}
browseConcepts(categoryId) {
if (!Session.isLoggedIn()) {
this.saveStateAndRedirectLogin();
} else {
if (this.conceptsClass[categoryId] != null) {
this.conceptsClassDisplay[categoryId] = !this.conceptsClassDisplay[categoryId];
return;
@ -298,8 +290,6 @@ export class ClaimContextSearchFormComponent {
this.conceptsCategoryLoading[categoryId] = false;
}
));
}
}
browseSubConcepts(categoryId, conceptId) {
@ -321,59 +311,6 @@ export class ClaimContextSearchFormComponent {
}
// communityChanged(){
// this.warningMessage = "";
// this.infoMessage = "";
// for(var i = 0; i< this.communities.length; i++){
// if(this.communities[i].id==this.selectedCommunityId){
// this.selectedCommunityLabel = this.communities[i].label;
// break;
// }
// }
// this.selectedCategoryId = "0";
// this.selectedCategoryLabel="Select Category:";
// if(this.selectedCommunityId != "0"){
// this.getCategories();
// }
// }
// categoryChanged(){
// this.warningMessage = "";
// this.infoMessage = "";
// for(var i = 0; i< this.categories.length; i++){
// if(this.categories[i].id==this.selectedCategoryId){
// this.selectedCategoryLabel = this.categories[i].label;
// break;
// }
// }
// this.getConcepts();
// }
/* addCommunityInConcepts() {
this.concepts.push({"id": this.selectedCommunityId, "label": this.selectedCommunityLabel});
// if(this.autocomplete){
// this.autocomplete.updateList(this.concepts);
// }
}*/
saveStateAndRedirectLogin() {
// if(this.projects != null){
// localStorage.setItem(this.localStoragePrefix + "projects", JSON.stringify(this.projects));
// }
// localStorage.setItem(this.localStoragePrefix + "contexts", JSON.stringify(this.selectedList));
if (this.results != null) {
localStorage.setItem(this.localStoragePrefix + "results", JSON.stringify(this.results));
}
if (this.sources != null) {
localStorage.setItem(this.localStoragePrefix + "sources", JSON.stringify(this.sources));
}
this.router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this.router.url
}
});
}
private static handleError(message: string, error) {
console.error("Claim context search form (component): " + message, error);
}

View File

@ -1,18 +1,26 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module';
import { SharedModule } from '../../../openaireLibrary/shared/shared.module';
import { ClaimContextSearchFormComponent } from './claimContextSearchForm.component';
import {StaticAutocompleteModule} from '../../utils/staticAutoComplete/staticAutoComplete.module';
import { RouterModule } from '@angular/router';
import {HelperModule} from '../../utils/helper/helper.module';
import {ClaimProjectsSearchFormModule} from "./claimProjectSearchForm.module";
import {AdvancedSearchInputModule} from "../../sharedComponents/advanced-search-input/advanced-search-input.module";
import {InputModule} from "../../sharedComponents/input/input.module";
import {CommunitiesService} from "../../connect/communities/communities.service";
import {LogoUrlPipeModule} from "../../utils/pipes/logoUrlPipe.module";
import {IconsModule} from "../../utils/icons/icons.module";
import {AlertModalModule} from "../../utils/modal/alertModal.module";
@NgModule({
imports: [
SharedModule,RouterModule,
SharedModule, RouterModule,
StaticAutocompleteModule,
HelperModule
HelperModule, ClaimProjectsSearchFormModule, AdvancedSearchInputModule, InputModule, LogoUrlPipeModule, IconsModule, AlertModalModule
],
providers: [CommunitiesService],
declarations: [
ClaimContextSearchFormComponent
], exports: [ClaimContextSearchFormComponent ]

View File

@ -1,5 +1,7 @@
//Classes used in linking / inlinelinking when selecting an entity
import {HelperFunctions} from "../../utils/HelperFunctions.class";
import {OpenaireEntities} from "../../utils/properties/searchFields";
import {ClaimsProperties} from "./claims.properties";
export class ClaimResult {
public source: string;
@ -27,6 +29,7 @@ export class ClaimResult {
export class ClaimProject {
public funderId: string;
public funderShortname: string;
public funderName: string;
public acronym: string;
public startDate: string;
@ -36,6 +39,12 @@ export class ClaimProject {
public fundingLevel0: string;
public url: string;
}
export class ClaimOrganization {
public name: string;
// public shortName: string;
public url: string;
// public country: string;
}
export class ClaimContext {
public community: string;
@ -70,6 +79,7 @@ export class ClaimEntity {
result: ClaimResult;
project: ClaimProject;
context: ClaimContext;
organization: ClaimOrganization;
constructor() {
this.warningMessages = [];
@ -91,6 +101,7 @@ export class ClaimRecord2Insert {
targetAccessRights: string;
targetEmbargoEndDate: string;
claimedInDashboard: string;
idSuffix:string;
constructor() {
@ -105,7 +116,7 @@ export class ClaimDBRecord {
targetType: string;
semantics: string;
approved: string;
source: ClaimDBResult | ClaimProject | ClaimContext;
source: ClaimDBResult | ClaimDBProject | ClaimDBContext;
target: ClaimDBResult;
indexed:boolean;
}
@ -114,7 +125,12 @@ export class ClaimDBContext {
title: string;
openaireId: string;
}
export class ClaimDBOrganization {
openaireId: string;
name: string;
shortName: string;
country: string;
}
export class ClaimDBProject {
openaireId: string;
name: string;
@ -142,9 +158,9 @@ export class ShowOptions {
show: string; //show values: source, result, project, context, claim
linkTo: string; // linkTo /values: result, project, context
linkToEntities: string[]; // show linkToEntities /values: result, project, context
basketShowSources: boolean;
basketShowLinksTo: boolean;
basketShowSources: boolean = true;
basketShowLinksTo: boolean = false;
selectOptions= [];
constructor() {
this.show = "source";
this.linkTo = "project";
@ -155,23 +171,37 @@ export class ShowOptions {
showSource() {
this.show = "source";
this.basketswitchToSources();
HelperFunctions.scroll();
}
basketswitchToSources() {
this.basketShowLinksTo = false;
this.basketShowSources = true;
HelperFunctions.scroll();
}
showLinkTo() {
this.show = this.linkTo;
basketswitchToLinkTo() {
this.basketShowLinksTo = true;
this.basketShowSources = false;
}
showLinkTo() {
// console.log(this.linkTo, "showLinkTo")
this.show = this.linkTo;
this.basketswitchToLinkTo();
HelperFunctions.scroll();
}
showBasketSources() {
if (this.show != 'source') {
this.basketShowSources = !this.basketShowSources;
this.basketShowLinksTo = !this.basketShowSources;
initSelectOptions(claimProperties:ClaimsProperties){
let options =[];
if(this.linkToEntities.indexOf('result')!=-1){
options.push({value: 'result',label: OpenaireEntities.RESULTS})
}
if(this.linkToEntities.indexOf('project')!=-1){
options.push({value: 'project',label: claimProperties.SELECT_ENTITIES.projects})
}
if(this.linkToEntities.indexOf('context')!=-1){
options.push({value: 'context',label: OpenaireEntities.COMMUNITIES})
}
this.selectOptions = options;
console.log(options, claimProperties.SELECT_ENTITIES.projects)
}
}

View File

@ -1,197 +1,76 @@
<form class=" uk-margin-top uk-animation ">
<div class="uk-margin-small-bottom">Start searching for projects and add them to the basket to link them to your sources
<!-- <helper div="link-project-form" tooltip=true></helper> -->
</div>
<!-- <input class=" uk-input uk-width-large" [(ngModel)]="keyword" name="keyword" placeholder="Search for projects..."/>-->
<div class="uk-inline">
<a *ngIf="keyword.length > 0" class="uk-form-icon uk-form-icon-flip"
(click)="keyword = ''"
uk-icon="icon: close"></a>
<input type="text" class="uk-input uk-width-xlarge@l uk-width-large@m uk-width-medium"
placeholder="Search for projects..." aria-describedby="sizing-addon2"
[(ngModel)]="keyword" name="keyword">
</div>
<span class="input-group-btn space">
<button (click)="search(page,size)" type="submit" class=" uk-button portal-button">Search</button>
</span>
</form>
<div *ngIf="!showResults">
<div class="uk-text-center uk-text-large uk-text-muted uk-margin-large-top">No project results yet... <br>Start
searching for projects to add them in the Basket
<div class="uk-width-xlarge@l uk-width-large" [ngClass]="centerAlign ? 'uk-align-center':''">
<advanced-search-input (searchEmitter)="search(page,size)">
<div input type="select" [(value)]="showOptions.show" placeholder="Type" hint="Select..."
[options]="showOptions.selectOptions" class="uk-width-auto "></div>
<div *ngIf="funderOptions && funderOptions.length > 0" input type="select" [(value)]="selectedFunder" placeholder="Funder" hint="Select Funder..."
[options]="funderOptions" class="uk-width-expand" (valueChange)="funderChanged($event)"></div>
<div *ngIf="selectedFunder && selectedFunder.number > 1" class="uk-width-expand" input type="text" [(value)]="keyword" [searchable]="true" placeholder="Projects to link"
[hint]="'Search for ' + openaireEntities.PROJECTS + '...'" tooltip="true" [disabled]="!selectedFunder"></div>
</advanced-search-input>
</div>
<div *ngIf=" openaireResultsStatus != errorCodes.LOADING && !isNoProjectFunder && this.selectedFunder && openaireResults.length == 0">
<div class="uk-text-center uk-text-large uk-text-meta uk-margin-large-top">No {{openaireEntities.PROJECT.toLowerCase()}} results yet... <br>Start
searching for {{openaireEntities.PROJECTS.toLowerCase()}} to add them in the Basket
</div>
</div>
<div *ngIf="showResults" class="uk-margin-top">
<div *ngIf="openaireResultsStatus == errorCodes.NONE" class="uk-alert uk-alert-primary"
role="alert">No Results found
<div *ngIf=" openaireResultsStatus != errorCodes.LOADING && this.funderOptions.length > 1 && !this.selectedFunder">
<div class="uk-text-center uk-text-large uk-text-meta uk-margin-large-top">Select funder to proceed
</div>
<div *ngIf="openaireResultsStatus == errorCodes.ERROR" class="uk-alert uk-alert-warning"
role="alert">An Error Occured
</div>
<div *ngIf="openaireResultsStatus == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger"
role="alert">Service not available
</div>
<div class="uk-grid">
<div class="search-filters uk-width-medium">
<!-- <div class="uk-width-1-1 uk-margin-small-bottom ">
<div *ngIf="countFilters()>0" class="uk-margin-small-bottom">
<span *ngIf = "searchUtils.keyword.length > 0"><span class="uk-text-bold">Keywords:</span>
<a (click) = "clearKeywords() " title="Remove keywords" [class]="((disableForms)?' uk-disabled':' ')+' portal-color '"><span class=" clickable " aria-hidden="true"><span class="uk-icon ">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
</span></span></a>
<span [innerHtml]="searchUtils.keyword"></span>
</span>
<div *ngFor="let filter of filters " >
<span *ngIf = "filter.countSelectedValues > 0"> <span class="uk-text-bold">{{filter.title}}:</span>
<span *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; " >
<a [title]="'Remove '+value.name"(click) = "removeFilter(value, filter) " [class]="((disableForms)?' uk-disabled':' ')+' portal-color '"><span class=" clickable" aria-hidden="true"><span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
</span></span></a>
<span [innerHtml]="(value.name.length > 25)?value.name.substring(0,25)+'...':value.name" [title]="value.name"></span><span *ngIf="!end" class=" ">, </span>
</span>
</span>
</div>
<div class="uk-margin-top">
<div class="uk-grid" uk-grid>
<div *ngIf="!isNoProjectFunder && openaireResultsStatus != errorCodes.LOADING && openaireResultsNum > 1 " class="search-filters uk-width-1-1">
<div class="uk-grid uk-grid-small" uk-grid>
<ng-container *ngFor="let filter of rangeFilters">
<div>
<dropdown-filter [name]="filter.selectedFromAndToValues?filter.selectedFromAndToValues:filter.title"
dropdownMinWidth="450">
<div class="uk-padding-small">
<range-filter [isDisabled]="openaireResultsStatus == errorCodes.LOADING"
[filter]="filter" (onFilterChange)="dateFilterChanged(filter)"
[showQuickButtons]="false"
></range-filter>
</div>
</dropdown-filter>
</div>
</div>
<div class="uk-margin-small-bottom uk-margin-small-top uk-grid">
<a *ngIf="countFilters()>1" (click)="clearFilters()" [class]="((disableForms)?'uk-disabled uk-link-muted':'')+' portal-link ' + 'uk-width-1-2'">
Clear All
</a>
</div>
</div> -->
<div *ngIf="countFilters()>0" class="uk-grid uk-flex uk-flex-bottom">
<div class="uk-grid">
<h6 class="uk-text-bold">Filters</h6>
<a *ngIf="countFilters()>1" (click)="clearFilters()"
[class]="((openaireResultsStatus ==
errorCodes.LOADING)?'uk-disabled uk-link-muted':'')+' portal-link '">
Clear All
</a>
</div>
<div *ngIf="countFilters()>0" class="uk-grid uk-grid-small uk-text-small uk-margin-small-top " uk-grid>
<ng-container *ngFor="let filter of rangeFilters " >
<ng-container *ngIf = "filter.selectedFromAndToValues">
<span [title]="'Remove '+ filter.selectedFromAndToValues" (click) = "removeRangeFilter(filter) " >
<span class="selectedFilterLabel ">
<a [class]="((openaireResultsStatus ==
errorCodes.LOADING)?' uk-disabled':' ')+' uk-link-text '">
<span class=" clickable" aria-hidden="true">
<span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
</span>
</span>
<span class="uk-margin-small-left">{{filter.selectedFromAndToValues}}</span>
</a>
</span>
</span>
</ng-container>
</ng-container>
<ng-container *ngFor="let filter of filters " >
<ng-container *ngIf = "filter.countSelectedValues > 0">
<span *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; "
[title]="'Remove '+value.name" (click) = "removeFilter(value, filter) " >
<!-- if no grid on the div above, remove it and move class 'selectedFilterLabel' on top span -->
<span class="selectedFilterLabel ">
<a [class]="((openaireResultsStatus ==
errorCodes.LOADING)?' uk-disabled':' ')+' uk-link-text '">
<span class=" clickable" aria-hidden="true">
<span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
</span>
</span>
<span class="uk-margin-small-left" [innerHtml]="(value.name.length > 34)?value.name.substring(0,34)+'...':value.name"></span>
</a>
</span>
</span>
</ng-container>
</ng-container>
</div>
</div>
<!--<ul class="uk-list">
<li class="uk-open">
<h6 class="uk-margin-bottom-remove ">Active between
</h6>
<div aria-expanded="false">
<div class="searchFilterBoxValues ">
<form class="uk-inline">
<input class=" uk-input uk-width-2-5" [(ngModel)]="startYear" name="keyword"
placeholder="Year (e.g 1990)"/>
<input class=" uk-input uk-width-2-5" [(ngModel)]="endYear" name="keyword"
placeholder="Year (e.g 1990)"/>
<button type="submit" (click)="yearChanged()" style="cursor: pointer;" class="uk-icon"><svg width="20"
height="20"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
icon="chevron-right"
ratio="1"><polyline
fill="none" stroke="#000" stroke-width="1.03" points="7 4 13 10 7 16"></polyline></svg></button>
</form>
</div>
</ng-container>
<ng-container *ngFor="let filter of filters ">
<div>
<dropdown-filter [count]="filter.countSelectedValues" [name]="filter.title"
dropdownMinWidth="450">
<div class="uk-padding-small">
<search-filter [isDisabled]="openaireResultsStatus == errorCodes.LOADING"
[filter]="filter" [filterValuesNum]="0" [showResultCount]=true
(onFilterChange)="filterChanged($event)" [actionRoute]="false"></search-filter>
</div>
</dropdown-filter>
</div>
</li>
</ul>-->
<ng-container *ngFor="let filter of rangeFilters">
<li>
<range-filter [isDisabled]="openaireResultsStatus ==
errorCodes.LOADING" [filter]="filter" (onFilterChange)="dateFilterChanged(filter)"
[showQuickButtons]="false"
></range-filter>
</li>
</ng-container>
<search-filter *ngFor="let filter of filters " [isDisabled]="false" [filter]="filter" [showResultCount]=true
(onFilterChange)="filterChanged($event)" [actionRoute]="false"></search-filter>
</ng-container>
</div>
<!-- </ng-container>-->
</div>
<div class="uk-width-expand@m uk-width-1-1@s uk-first-column">
<!-- <div *ngIf="openaireResultsNum != null && openaireResultsNum > 0" class="uk-clearfix portal-hr ">
<div class="uk-grid">
<div *ngIf="openaireResultsNum>0" class="uk-width-1-2">
<span class="portal-color">{{openaireResultsNum|number}}</span> projects, page <span
class="portal-color">{{openaireResultsPage | number}}</span> of <span
class="portal-color">{{totalPages(openaireResultsNum)|number}}</span>
</div>
<div class="uk-width-1-2 uk-padding-remove">
<paging-no-load class="uk-float-right" [currentPage]="openaireResultsPage"
[totalResults]="openaireResultsNum" [term]="keyword" [size]="size"
(pageChange)="openaireResultsPageChange($event)"></paging-no-load>
</div>
</div>
</div>-->
<div *ngIf="openaireResultsNum != null && openaireResultsNum > 0" class="uk-clearfix ">
<div class= "paging-hr searchPaging uk-margin-small-bottom"
*ngIf="(openaireResultsNum > 0) || (openaireResultsStatus == errorCodes.LOADING)">
<div class="uk-panel uk-margin-small-top uk-grid uk-flex uk-flex-middle">
<div class="uk-width-1-1@s uk-width-1-2@m uk-text-uppercase"
*ngIf="openaireResultsNum > 0">
<span class="uk-text-bold">{{openaireResultsNum|number}}</span>
<span class="uk-text-muted uk-text-uppercase"> projects, page </span>
<span class="uk-text-bold">{{openaireResultsPage | number}}</span>
<span class="uk-text-muted uk-text-uppercase"> of </span>
<span class="uk-text-bold">{{(totalPages(openaireResultsNum)|number)}}</span>
</div>
<div class="float-children-right-at-medium margin-small-top-at-small uk-width-expand uk-padding-remove-left">
<paging-no-load class="uk-float-right" [currentPage]="openaireResultsPage"
[totalResults]="openaireResultsNum" [term]="keyword"
[size]="size" (pageChange)="openaireResultsPageChange($event)"></paging-no-load>
</div>
</div>
</div>
<div *ngIf="openaireResultsStatus == errorCodes.NONE" class="uk-alert uk-alert-primary"
role="alert">No Results found
</div>
<div *ngIf="openaireResultsStatus == errorCodes.ERROR" class="uk-alert uk-alert-warning"
role="alert">An Error Occured
</div>
<div *ngIf="openaireResultsStatus == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger"
role="alert">Service not available
</div>
<div *ngIf="openaireResultsStatus == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1"
role="alert"><span class="loading-gif uk-align-center"></span></div>
role="alert">
<loading></loading>
</div>
<claim-results [localStoragePrefix]="localStoragePrefix" [results]=openaireResults
[selectedResults]=selectedProjects [basketLimit]="basketLimit"></claim-results>
<div *ngIf="isNoProjectFunder && openaireResultsStatus != errorCodes.LOADING " class="uk-alert uk-alert-default"><span class=" uk-text-bold">{{selectedFunder.name}}</span> has no projects. Proceed to next step. </div>
<div *ngIf="openaireResultsNum != null && openaireResultsNum > 0 && openaireResultsStatus != errorCodes.LOADING " class="uk-flex uk-flex-center ">
<paging-no-load [currentPage]="openaireResultsPage"
[totalResults]="openaireResultsNum" [term]="keyword"
[size]="size" (pageChange)="openaireResultsPageChange($event)"></paging-no-load>
</div>
</div>
</div>
</div>

View File

@ -1,4 +1,4 @@
import {Component, ElementRef, EventEmitter, Input, Output} from '@angular/core';
import {Component, ElementRef, EventEmitter, Input, Output, ViewChild} from '@angular/core';
import {SearchProjectsService} from '../../services/searchProjects.service';
import {ProjectService} from '../../landingPages/project/project.service';
import {ClaimEntity, ClaimProject} from './claimHelper.class';
@ -7,9 +7,11 @@ import {ErrorCodes} from '../../utils/properties/errorCodes';
import {StringUtils} from "../../utils/string-utils.class";
import {Filter, Value} from "../../searchPages/searchUtils/searchHelperClasses.class";
import {RangeFilter} from "../../utils/rangeFilter/rangeFilterHelperClasses.class";
import {SearchFields} from "../../utils/properties/searchFields";
import {OpenaireEntities, SearchFields} from "../../utils/properties/searchFields";
import {NewSearchPageComponent} from "../../searchPages/searchUtils/newSearchPage.component";
import {Subscriber} from "rxjs";
import { properties } from 'src/environments/environment';
import {error} from "protractor";
declare var UIkit:any;
@ -20,26 +22,17 @@ declare var UIkit:any;
})
export class ClaimProjectsSearchFormComponent {
ngOnInit() {
// this.getFunders();
// this.search(this.page, this.size);
}
// @ViewChild (ModalLoading) loading : ModalLoading ;
// @Input() public inline: boolean = false ; // for claimed started from landing pages
public query = '';
@Input() public centerAlign: boolean = false;
@Input() public selectedProjects:ClaimEntity[]=[] ;
public elementRef;
// public funders:string[];
// public selectedFunderId:string ="0";
// selectedFunderName:string ="Select funder:";
@Output() projectSelected = new EventEmitter();
@Input() public properties:EnvProperties;
public properties:EnvProperties = properties;
@Input() public inlineClaim:boolean=false;
@Input() localStoragePrefix:string = "";
@Input() basketLimit;
@Input() showOptions;
public errorCodes:ErrorCodes = new ErrorCodes();
public projects:string[];
public warningMessage = "";
@ -52,58 +45,92 @@ export class ClaimProjectsSearchFormComponent {
keyword:string = '';
showResults = false;
// public openaireRefineFields: string[] = ["relfunder", "relproject", "resultbestaccessright", "instancetypename", "resultlanguagename", "community"];
// public openaireRefineFieldsQuery: string = "&refine=true&fields=funder&fields=projectstartyear&fields=projectendyear&fields=projectecsc39";
public refineFields: string[] = ["funder"];
public refineFieldsQuery: string = "&refine=true&fields=funder";
filters = [];
prevFilters = [];
// startYear = "";
// endYear = "";
public rangeFilters: RangeFilter[] = [];
public searchFields: SearchFields = new SearchFields();
public rangeFields:string[][] = this.searchFields.PROJECT_RANGE_FIELDS;
openaireEntities = OpenaireEntities;
sub;
selectedFunder = null;
funderOptions = [];
isNoProjectFunder = false;
constructor(private _service: ProjectService, private _projectService: SearchProjectsService, myElement: ElementRef) {
this.elementRef = myElement;
this.rangeFilters = RangeFilter.parse(this.rangeFields,"project");
this.rangeFilters = RangeFilter.parse(this.rangeFields,"project");
this.getFunders();
}
sub;
ngOnDestroy() {
if (this.sub instanceof Subscriber) {
this.sub.unsubscribe();
}
}
getFunders(){
this.openaireResultsStatus = this.errorCodes.LOADING;
this.showResults = true;
this.sub = this._projectService.advancedSearchProjects("", 1, 0, this.properties,
this.refineFieldsQuery, this.refineFields, "&type=projects&sf=funder").subscribe(
data => {
for(let v of data[2][0].values){
let option = {value : v, label: v.name};
this.funderOptions.push(option);
}
this.openaireResultsStatus = this.errorCodes.DONE;
}, error =>{
this.openaireResultsStatus = this.errorCodes.ERROR;
})
}
search(page,size) {
if(this.keyword.length == 0){
this.showResults =false;
return;
funderChanged(value){
this.keyword = ""
this.selectedFunder = value;
this.isNoProjectFunder = this.selectedFunder && this.selectedFunder.number == 1;
this.openaireResults = [];
if(this.isNoProjectFunder){
this.showResults = true;
this.search(1,1);
}else{
this.openaireResults = [];
}
this.showResults =true;
}
search(page,size) {
/* if (this.keyword.length == 0) {
this.showResults = false;
return;
}*/
this.showResults = true;
this.openaireResults = [];
this.openaireResultsStatus = this.errorCodes.LOADING;
this.prevFilters = this.filters;
//searchProjects (params: string, refineParams:string, page: number, size: number, refineFields:string[] , properties:EnvProperties ):any {
this.sub = this._projectService.searchProjects(this.createOpenaireQueryParams(),(page==1)? this.refineFieldsQuery:null, page, size, (page==1)?this.refineFields:[], this.properties).subscribe(
this.sub = this._projectService.advancedSearchProjects(this.createOpenaireQueryParams(), page, size, this.properties, null, [], this.createOpenaireRefineQuery()).subscribe(
// this.sub = this._projectService.searchProjects(this.createOpenaireQueryParams(),(page==1)? this.refineFieldsQuery:null, page, size, (page==1)?this.refineFields:[], this.properties).subscribe(
data => {
if(data != null) {
this.openaireResultsPage=page;
this.openaireResultsNum = data[0];
this.openaireResults =ClaimProjectsSearchFormComponent.openaire2ClaimEntity(data[1], this.properties);
if(data[2] && data[2].length > 0){
this.filters = this.checkSelectedFilters( data[2], this.prevFilters);
}
this.openaireResultsStatus = this.errorCodes.DONE;
if(this.openaireResultsNum == 0){
this.openaireResultsStatus = this.errorCodes.NONE;
}
}else {
this.openaireResultsStatus = this.errorCodes.ERROR;
if (data != null) {
this.openaireResultsPage = page;
this.openaireResultsNum = data[0];
this.openaireResults = ClaimProjectsSearchFormComponent.openaire2ClaimEntity(data[1], this.properties);
if (data[2] && data[2].length > 0) {
this.filters = this.checkSelectedFilters(data[2], this.prevFilters);
}
},
this.openaireResultsStatus = this.errorCodes.DONE;
if (this.openaireResultsNum == 0) {
this.openaireResultsStatus = this.errorCodes.NONE;
this.filters = this.checkSelectedFilters([], this.prevFilters);
}
/* if(this.isNoProjectFunder && this.claimResultsComponent){
this.claimResultsComponent.add(this.openaireResults[0])
}*/
} else {
this.openaireResultsStatus = this.errorCodes.ERROR;
}
},
err => {
this.openaireResultsStatus = this.errorCodes.ERROR;
//console.log(err.status);
@ -111,85 +138,23 @@ export class ClaimProjectsSearchFormComponent {
}
);
}
// select(entity){
// if(this.selectedProjects.length > 50){
// UIkit.notification({
// message : 'Your basket exceeds the number of allowed projects (50)',
// status : 'warning',
// timeout : 1500,
// pos : 'top-center'
// });
// return;
// }
// this.query = "";
// // this.searchTermStream.next(this.query); //clear
// entity = entity.value;
// // var project: ClaimProject = new ClaimProject();
// // project.funderId = entity.funderId;
// // project.funderName = entity.funderName;
// // project.id = entity.id;
// // project.projectName = entity.projectName;
// // project.projectAcronym = entity.projectAcronym;
// // project.startDate = entity.startDate;
// // project.endDate = entity.endDate;
// // project.code = entity.code;
// // project.jurisdiction = entity.jurisdiction;
// // project.fundingLevel0 = entity.fundingLevel0;
//
//
// var index:number =this.selectedProjects.indexOf(entity);
// var found:boolean = false;
// this.warningMessage = "";
//
// for (var _i = 0; _i < this.selectedProjects.length; _i++) {
// let project = this.selectedProjects[_i];
// if(entity.id == project.id){
// found=true;
// this.warningMessage = "Project already in your basket";
// }
// }
//
// if (!found) {
// this.selectedProjects.push(entity);
// if(this.selectedProjects != null){
// localStorage.setItem(this.localStoragePrefix + "projects", JSON.stringify(this.selectedProjects));
// }
// this.projectSelected.emit({
// value: true
// });
//
// }
// }
/* static showItem(item):string{
return ((item.field[1]['@value'])?item.field[1]['@value']+" - ":"" ) + item.field[3]['@value'];
}*/
remove(item){
remove(item){
let index:number =this.selectedProjects.indexOf(item);
if (index > -1) {
this.selectedProjects.splice(index, 1);
}
}
/* handleClick(event){
var clickedComponent = event.target;
var inside = false;
do {
if (clickedComponent === this.elementRef.nativeElement) {
inside = true;
}
clickedComponent = clickedComponent.parentNode;
} while (clickedComponent);
}*/
static openaire2ClaimEntity(items, properties:EnvProperties){
static openaire2ClaimEntity(items, properties:EnvProperties){
const projects: ClaimEntity[] = [];
for(const item of items){
const entity: ClaimEntity = new ClaimEntity();
entity.project = new ClaimProject();
entity.project.funderId = item.funderId;
entity.project.funderName = item.funderShortname;
entity.project.funderShortname = item.funderShortname?item.funderShortname:(entity.project.funderId.split("::")[1]);
entity.project.funderName = item.funderName;
entity.id = item.id;
entity.project.url = properties.searchLinkToProject + entity.id;
entity.project.url = (item.code !="unidentified") ? properties.searchLinkToProject + entity.id : null;
entity.title = item.title.name;
entity.project.acronym = item.acronym;
entity.project.startDate = item.startYear;
@ -212,12 +177,16 @@ export class ClaimProjectsSearchFormComponent {
}
createOpenaireQueryParams():string {
createOpenaireQueryParams(): string {
let query = "";
if(this.keyword.length > 0){
query += "q=" + StringUtils.quote(StringUtils.URIEncode(this.keyword));
if (this.keyword.length > 0) {
// query += "q=" + StringUtils.quote(StringUtils.URIEncode(this.keyword));
query += StringUtils.quote(StringUtils.URIEncode(this.keyword));
}
return query;
}
createOpenaireRefineQuery(): string {
/*if(this.startYear.length > 0 ){
query+='&fq=projectstartyear exact \"'+this.startYear+'\"'
}
@ -225,30 +194,33 @@ export class ClaimProjectsSearchFormComponent {
query+='&fq=projectendyear exact \"'+this.endYear+'\"'
}*/
let allFqs = "";
for (let filter of this.filters){
if(filter.countSelectedValues > 0){
let count_selected=0;
for (let filter of this.filters) {
if (filter.countSelectedValues > 0) {
let count_selected = 0;
let fq = "";
for (let value of filter.values){
if(value.selected == true){
for (let value of filter.values) {
if (value.selected == true) {
count_selected++;
fq+=(fq.length > 0 ? " " + filter.filterOperator + " ":"" ) + filter.filterId + " exact " + (StringUtils.quote(value.id));
fq += (fq.length > 0 ? " " + filter.filterOperator + " " : "") + filter.filterId + " exact " + (StringUtils.quote(value.id));
}
}
if(count_selected > 0){
fq="&fq="+StringUtils.URIEncode(fq);
if (count_selected > 0) {
fq = "&fq=" + StringUtils.URIEncode(fq);
allFqs += fq;
}
}
}
for (let i=0; i<this.rangeFilters.length; i++){
if(this.isNoProjectFunder){
allFqs += "&fq=" + StringUtils.URIEncode( "funder exact " + (StringUtils.quote(this.selectedFunder.id))); ;
}
for (let i = 0; i < this.rangeFilters.length; i++) {
let filter = this.rangeFilters[i];
//selectedFromValue, selectedToValue, equalityOp, equalityOpFrom, equalityOpTo, filterOp ){
allFqs+= NewSearchPageComponent.createRangeFilterQuery(this.rangeFields[i],filter.selectedFromValue, filter.selectedToValue, " within ", ">=" ,"<=", "and" )
allFqs += NewSearchPageComponent.createRangeFilterQuery(this.rangeFields[i], filter.selectedFromValue, filter.selectedToValue, " within ", ">=", "<=", "and")
}
return query+allFqs;
return allFqs + "&type=projects";
}
public yearChanged() {
this.search(this.page, this.size);
@ -283,7 +255,21 @@ export class ClaimProjectsSearchFormComponent {
}
}
filter.countAllValues = filter.values.length;
}
if(filters.length == 0 ){
for(let j=0; j< prevFilters.length ; j++) {
let filter = Object.assign({}, prevFilters[j]);
filter.values = [];
for (let filterValue of prevFilters[j].values) {
if (filterValue.selected) {
filterValue.number = 0;
filter.values.push(filterValue);
}
}
filter.countAllValues = filter.values.length;
filters.push(filter)
}
}
return filters;
}

View File

@ -1,11 +1,9 @@
import { NgModule } from '@angular/core';
import {NgModule} from '@angular/core';
import { SharedModule } from '../../shared/shared.module';
import { CommonModule } from '@angular/common';
import {SharedModule} from '../../shared/shared.module';
import {CommonModule} from '@angular/common';
import {ClaimProjectsSearchFormComponent} from './claimProjectSearchForm.component';
// import {LoadingModalModule} from '../../utils/modal/loadingModal.module';
import {ProjectServiceModule} from '../../landingPages/project/projectService.module';
import {ProjectsServiceModule} from '../../services/projectsService.module';
import {EntitiesAutocompleteModule} from '../../utils/entitiesAutoComplete/entitiesAutoComplete.module';
@ -13,23 +11,26 @@ import {HelperModule} from '../../utils/helper/helper.module';
import {ClaimResultsModule} from './claimResults.module';
import {PagingModule } from '../../utils/paging.module';
import {PagingModule} from '../../utils/paging.module';
import {SearchFilterModule} from '../../searchPages/searchUtils/searchFilter.module';
import {RangeFilterModule} from "../../utils/rangeFilter/rangeFilter.module";
import {AdvancedSearchInputModule} from "../../sharedComponents/advanced-search-input/advanced-search-input.module";
import {InputModule} from "../../sharedComponents/input/input.module";
import {DropdownFilterModule} from "../../utils/dropdown-filter/dropdown-filter.module";
import {LoadingModule} from "../../utils/loading/loading.module";
@NgModule({
imports: [
SharedModule, CommonModule,
// LoadingModalModule,
ProjectServiceModule, ProjectsServiceModule, EntitiesAutocompleteModule, HelperModule,
PagingModule, SearchFilterModule, ClaimResultsModule, RangeFilterModule
],
@NgModule({
imports: [
SharedModule, CommonModule,
// LoadingModalModule,
ProjectServiceModule, ProjectsServiceModule, EntitiesAutocompleteModule, HelperModule,
PagingModule, SearchFilterModule, ClaimResultsModule, RangeFilterModule, AdvancedSearchInputModule, InputModule, DropdownFilterModule, LoadingModule
],
providers:[
],
declarations: [
ClaimProjectsSearchFormComponent
],
exports: [ClaimProjectsSearchFormComponent ]
})
declarations: [
ClaimProjectsSearchFormComponent,
],
exports: [ClaimProjectsSearchFormComponent]
})
export class ClaimProjectsSearchFormModule { }

View File

@ -1,28 +1,21 @@
<form class=" uk-margin-top">
<div class="uk-margin-small-bottom">Start searching Research Outcomes and add them to the Basket to Link
<!-- <helper div="link-entity-form" styleName="" tooltip=true></helper> -->
<div class="uk-flex uk-flex-center uk-flex-left@m">
<div *ngIf="showOptions && showOptions.linkToEntities.length > 0" class="uk-width-xlarge@l uk-width-large" [ngClass]="centerAlign ? 'uk-align-center':''">
<advanced-search-input (searchEmitter)="search(true)">
<div input type="select" [(value)]="showOptions.show" placeholder="Type" hint="Select..."
[options]="showOptions.selectOptions" class="uk-width-2-5"></div>
<div class="uk-width-expand" input type="text" [(value)]="keyword" [searchable]="true" placeholder="Entities to link"
[hint]="'Search for ' + openaireEntities.RESULTS.toLowerCase() + '...'" tooltip="true"></div>
</advanced-search-input>
</div>
<!-- <input class=" uk-input uk-width-large form-control" [(ngModel)]="keyword" name="keyword"-->
<!-- placeholder="Search for research outcomes..."/>-->
<div class="uk-inline">
<a *ngIf="keyword.length > 0" class="uk-form-icon uk-form-icon-flip"
(click)="keyword = ''"
uk-icon="icon: close"></a>
<input type="text" class="uk-input uk-width-xlarge@l uk-width-large@m uk-width-medium"
placeholder="Search for research outcomes..." aria-describedby="sizing-addon2"
[(ngModel)]="keyword" name="keyword">
<div *ngIf="!showOptions" class="uk-width-xlarge@l uk-width-large">
<div search-input [(value)]="keyword" [placeholder]="'Search for ' + openaireEntities.RESULTS.toLowerCase() + '...'"
[searchInputClass]="'inner background'" (searchEmitter)="search(true)"></div>
</div>
<span class="input-group-btn space">
<button (click)="search(true)" type="submit" class=" uk-button portal-button">Search</button>
</span>
<!--helper div="link-entity-form" styleName="uk-width-medium"></helper-->
</form>
</div>
<div *ngIf="!showSearchResults">
<div class="uk-text-center uk-text-large uk-text-muted uk-margin-large-top">
No research outcomes yet...<br>Start searching for research outcomes to add them in the Basket
<div class="uk-text-center uk-text-large uk-text-meta uk-margin-large-top">
No {{showOptions?openaireEntities.RESULTS.toLowerCase() :'sources'}} yet...<br>Use the searchbar to find and link
{{showOptions?openaireEntities.RESULTS.toLowerCase() :'sources'}}.
</div>
</div>
<div *ngIf="showSearchResults" class="uk-margin-top uk-animation">
@ -54,135 +47,63 @@
</div>
<div *ngIf="crossrefResultsNum != null && crossrefResultsNum > 0" class="uk-clearfix ">
<div class="uk-grid">
<!-- <div *ngIf="crossrefResultsNum>0" class="uk-width-1-2">
<span class="portal-color">{{crossrefResultsNum|number}}</span> research outcomes, page <span
class="portal-color">{{crossrefPage | number}}</span> of <span
class="portal-color">{{countTotalPages(crossrefResultsNum)|number}}</span>
</div>-->
<div class="uk-width-1-1@s uk-width-1-2@m uk-text-uppercase"
*ngIf="crossrefResultsNum > 0">
{{crossrefResultsNum|number}}
<span class="uk-text-muted uk-text-uppercase"> research outcomes, page </span>
{{crossrefPage | number}}
<span class="uk-text-muted uk-text-uppercase"> of </span>
{{(countTotalPages(crossrefResultsNum)|number)}}
</div>
<div class="uk-width-1-2 uk-padding-remove-left">
<paging-no-load class="uk-float-right" [currentPage]="crossrefPage" [totalResults]="crossrefResultsNum"
[term]="keyword"
[size]="size" (pageChange)="crossrefPageChange($event)"></paging-no-load>
</div>
</div>
</div>
<div *ngIf="crossrefStatus === errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1"
role="alert"><span class="loading-gif uk-align-center"></span></div>
role="alert">
<loading></loading>
</div>
<div>
<claim-results [localStoragePrefix]=localStoragePrefix [results]=crossrefResults
[selectedResults]=selectedResults [basketLimit]="basketLimit"></claim-results>
</div>
<div class="uk-flex uk-flex-center" *ngIf="crossrefStatus != errorCodes.LOADING && crossrefResultsNum>0 ">
<paging-no-load
[currentPage]="crossrefPage" [totalResults]="crossrefResultsNum"
[term]="keyword"
[size]="size" (pageChange)="crossrefPageChange($event)"></paging-no-load>
</div>
</div>
</div>
<div *ngIf="activeTab == 'openaire'" id="openaire" class="uk-animation-fade">
<div class="uk-grid">
<div class="search-filters uk-width-medium">
<div *ngIf="countFilters()>0" class="uk-grid uk-flex uk-flex-bottom">
<div class="uk-grid">
<h6 class="uk-text-bold">Filters</h6>
<a *ngIf="countFilters()>1" (click)="clearFilters()"
[class]="((openaireResultsStatus ==
errorCodes.LOADING)?'uk-disabled uk-link-muted':'')+' portal-link '">
Clear All
</a>
</div>
<div *ngIf="countFilters()>0" class="uk-grid uk-grid-small uk-text-small uk-margin-small-top " uk-grid>
<ng-container *ngFor="let filter of rangeFilters " >
<ng-container *ngIf = "filter.selectedFromAndToValues">
<span [title]="'Remove '+ filter.selectedFromAndToValues" (click) = "removeRangeFilter(filter) " >
<span class="selectedFilterLabel ">
<a [class]="((openaireResultsStatus ==
errorCodes.LOADING)?' uk-disabled':' ')+' uk-link-text '">
<span class=" clickable" aria-hidden="true">
<span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
</span>
</span>
<span class="uk-margin-small-left">{{filter.selectedFromAndToValues}}</span>
</a>
</span>
</span>
</ng-container>
</ng-container>
<ng-container *ngFor="let filter of openaireResultsfilters " >
<ng-container *ngIf = "filter.countSelectedValues > 0">
<span *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; "
[title]="'Remove '+value.name" (click) = "removeFilter(value, filter) " >
<!-- if no grid on the div above, remove it and move class 'selectedFilterLabel' on top span -->
<span class="selectedFilterLabel ">
<a [class]="((openaireResultsStatus ==
errorCodes.LOADING)?' uk-disabled':' ')+' uk-link-text '">
<span class=" clickable" aria-hidden="true">
<span class="uk-icon">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
</span>
</span>
<span class="uk-margin-small-left" [innerHtml]="(value.name.length > 34)?value.name.substring(0,34)+'...':value.name"></span>
</a>
</span>
</span>
</ng-container>
</ng-container>
</div>
</div>
<!-- Type filter-->
<ul class="uk-list" >
<!--<li class="uk-open uk-margin-small-bottom">
<h6 class="uk-margin-bottom-remove ">Result Type (4)
</h6>
<div aria-expanded="false">
<div class="searchFilterBoxValues ">
<div *ngFor="let type of openaireTypeValues" class="uk-animation-fade filterItem">
<div title="{{type.title}}">
<input [value]="type.value" [(ngModel)]="openaireResultsType" [name]=type.value
type="radio" (ngModelChange)="openaireTypeChanged(type.value)"/>
{{_formatName(type.title,type.count)}}
<span *ngIf="type.count!=null">{{' (' + (type.count|number) + ')'}}</span>
</div>
</div>
</div>
</div>
</li>-->
<div class="search-filters uk-width-1-1">
<div *ngIf="openaireResultsNum > 0" class="uk-grid uk-grid-small" uk-grid>
<ng-container *ngFor="let filter of rangeFilters">
<li>
<range-filter [isDisabled]="openaireResultsStatus ==
errorCodes.LOADING" [filter]="filter" (onFilterChange)="dateFilterChanged(filter)"
[showQuickButtons]="false"
></range-filter>
</li>
<div>
<dropdown-filter [name]="filter.selectedFromAndToValues?filter.selectedFromAndToValues:filter.title"
dropdownMinWidth="450">
<div class="uk-padding-small">
<range-filter [isDisabled]="openaireResultsStatus == errorCodes.LOADING"
[filter]="filter" (onFilterChange)="dateFilterChanged(filter)"
[showQuickButtons]="false"
></range-filter>
</div>
</dropdown-filter>
</div>
</ng-container>
</ul>
<search-filter *ngFor="let filter of openaireResultsfilters " [isDisabled]="openaireResultsStatus ==
errorCodes.LOADING" [filter]="filter"
[showResultCount]=true
(onFilterChange)="filterChanged($event)" [actionRoute]="false"></search-filter>
<ng-container *ngFor="let filter of openaireResultsfilters ">
<div *ngIf="(filter.values.length != 0 )">
<dropdown-filter [count]="filter.countSelectedValues" [name]="filter.title"
dropdownMinWidth="450">
<div class="uk-padding-small">
<search-filter [isDisabled]="openaireResultsStatus == errorCodes.LOADING"
[filter]="filter" [filterValuesNum]="0" [showResultCount]=true
(onFilterChange)="filterChanged($event)" [actionRoute]="false"></search-filter>
</div>
</dropdown-filter>
</div>
</ng-container>
</div>
</div>
<div class="uk-width-expand@m uk-width-1-1@s uk-first-column">
<div class="uk-margin-top">
<!-- <quick-selections [resultTypes]="resultTypes"
(typeChange)="openaireTypeChanged()" [isDisabled]="openaireResultsStatus ==
errorCodes.LOADING"
[quickFilter]="quickFilter" [QFselected]="(quickFilter)?quickFilter.selected:null"
[properties]="properties">
</quick-selections>-->
<div class="">
<div *ngIf="openaireResultsStatus == errorCodes.NONE" class="uk-alert uk-alert-primary"
role="alert">No Results found
</div>
@ -192,31 +113,17 @@
<div *ngIf="openaireResultsStatus == errorCodes.NOT_AVAILABLE" class="uk-alert uk-alert-danger"
role="alert">Service not available
</div>
<div *ngIf="openaireResultsNum != null && openaireResultsNum > 0" class="uk-clearfix ">
<div class= "paging-hr searchPaging uk-margin-small-bottom"
*ngIf="(openaireResultsNum > 0) || (openaireResultsStatus == errorCodes.LOADING)">
<div class="uk-panel uk-margin-small-top uk-grid uk-flex uk-flex-middle">
<div class="uk-width-1-1@s uk-width-1-2@m uk-text-uppercase"
*ngIf="openaireResultsNum > 0">
<span class="uk-text-bold">{{openaireResultsNum|number}}</span>
<span class="uk-text-muted uk-text-uppercase"> research outcomes, page </span>
<span class="uk-text-bold">{{openaireResultsPage | number}}</span>
<span class="uk-text-muted uk-text-uppercase"> of </span>
<span class="uk-text-bold">{{(countTotalPages(openaireResultsNum)|number)}}</span>
</div>
<div class="float-children-right-at-medium margin-small-top-at-small uk-width-expand uk-padding-remove-left" *ngIf=" openaireResultsStatus != errorCodes.LOADING">
<paging-no-load class="uk-float-right" [currentPage]="openaireResultsPage"
[totalResults]="openaireResultsNum" [term]="keyword"
[size]="size" (pageChange)="openaireResultsPageChange($event)"></paging-no-load>
</div>
</div>
</div>
</div>
<div *ngIf="openaireResultsStatus === errorCodes.LOADING"
class="uk-animation-fade uk-margin-top uk-width-1-1"
role="alert"><span class="loading-gif uk-align-center"></span></div>
role="alert"><loading></loading></div>
<claim-results [localStoragePrefix]=localStoragePrefix
[results]=openaireResults [selectedResults]=selectedResults [basketLimit]="basketLimit"></claim-results>
<div class="uk-flex uk-flex-center" *ngIf=" openaireResultsStatus != errorCodes.LOADING && openaireResultsNum != null && openaireResultsNum > 0" >
<paging-no-load [currentPage]="openaireResultsPage"
[totalResults]="openaireResultsNum" [term]="keyword"
[size]="size" (pageChange)="openaireResultsPageChange($event)"></paging-no-load>
</div>
</div>
</div>
</div>
@ -231,30 +138,7 @@
<div *ngIf="orcidStatus == errorCodes.NONE && orcidResultsNum == -1"
class="uk-alert uk-alert-primary "> No results found
</div>
<div *ngIf=" ((orcidResultsNum >0) && (totalPages > 1) && ( 0 < page && page <= totalPages )) "
class="uk-clearfix">
<div class="uk-grid">
<!--<div *ngIf="orcidResultsNum>0" class="uk-width-1-2">
<span class="portal-color">{{orcidResultsNum|number}}</span> research outcomes, page <span
class="portal-color">{{orcidPage | number}}</span> of <span
class="portal-color">{{countTotalPages(orcidResultsNum)|number}}</span>
</div>-->
<div class="uk-width-1-1@s uk-width-1-2@m uk-text-uppercase"
*ngIf="orcidResultsNum > 0">
{{orcidResultsNum|number}}
<span class="uk-text-muted uk-text-uppercase"> research outcomes, page </span>
{{orcidPage | number}}
<span class="uk-text-muted uk-text-uppercase"> of </span>
{{(countTotalPages(orcidResultsNum)|number)}}
</div>
<div class="uk-width-1-2 uk-padding-remove-left">
<paging-no-load class="uk-float-right" [currentPage]="orcidPage" [totalResults]="orcidResultsNum"
[term]="keyword" [size]="size"
(pageChange)="orcidPageChange($event)"></paging-no-load>
</div>
</div>
</div>
<div *ngIf="orcidResultsNum >= 0" class="panel-body">
<span><span class="uk-text-bold">Showing results for</span>
<a target="_blank" href="http://orcid.org/{{authorId}}"> <span
@ -284,9 +168,18 @@
[selectedResults]=selectedResults [basketLimit]="basketLimit"></claim-results>
<div *ngIf="orcidResultsNum == 0" class="uk-alert uk-alert-primary uk-margin-top"> No results found</div>
</div>
<div *ngIf=" ((orcidResultsNum >0) && (totalPages > 1) && ( 0 < page && page <= totalPages )) "
class="uk uk-flex uk-flex-center">
<paging-no-load [currentPage]="orcidPage" [totalResults]="orcidResultsNum"
[term]="keyword" [size]="size"
(pageChange)="orcidPageChange($event)"></paging-no-load>
</div>
</div>
<div *ngIf="orcidStatus == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1" role="alert">
<span class="loading-gif uk-align-center"></span></div>
<loading></loading></div>
</div>
</div>
<div *ngIf="activeTab == 'datacite'" id="datacite" class="uk-animation-fade">
@ -297,35 +190,18 @@
role="alert">Service not available
</div>
<div class="uk-margin-top">
<div *ngIf="dataciteResultsNum != null && dataciteResultsNum > 0" class="uk-clearfix ">
<div class="uk-grid">
<!-- <div *ngIf="dataciteResultsNum>0" class="uk-width-1-2">
<span class="portal-color">{{dataciteResultsNum|number}}</span> research outcomes, page <span
class="portal-color">{{datacitePage | number}}</span> of <span
class="portal-color">{{countTotalPages(dataciteResultsNum)|number}}</span>
</div>-->
<div class="uk-width-1-1@s uk-width-1-2@m uk-text-uppercase"
*ngIf="dataciteResultsNum > 0">
{{dataciteResultsNum|number}}
<span class="uk-text-muted uk-text-uppercase"> research outcomes, page </span>
{{datacitePage | number}}
<span class="uk-text-muted uk-text-uppercase"> of </span>
{{(countTotalPages(dataciteResultsNum)|number)}}
</div>
<div class="uk-width-1-2 uk-padding-remove-left">
<paging-no-load class="uk-float-right" [currentPage]="datacitePage" [totalResults]="dataciteResultsNum"
[term]="keyword"
[size]="size" (pageChange)="datacitePageChange($event)"></paging-no-load>
</div>
</div>
</div>
<div *ngIf="dataciteStatus == errorCodes.LOADING" class="uk-animation-fade uk-margin-top uk-width-1-1"
role="alert"><span class="loading-gif uk-align-center"></span></div>
role="alert"><loading></loading></div>
<div>
<claim-results [localStoragePrefix]=localStoragePrefix *ngIf="dataciteResults.length > 0 "
[results]=dataciteResults [selectedResults]=selectedResults [basketLimit]="basketLimit"></claim-results>
</div>
<div *ngIf="dataciteResultsNum != null && dataciteResultsNum > 0" class="uk uk-flex uk-flex-center ">
<paging-no-load [currentPage]="datacitePage" [totalResults]="dataciteResultsNum"
[term]="keyword"
[size]="size" (pageChange)="datacitePageChange($event)"></paging-no-load>
</div>
</div>
</div>

View File

@ -11,7 +11,7 @@ import {Filter, Value} from "../../searchPages/searchUtils/searchHelperClasses.c
import {forkJoin, Observable, Subscriber} from 'rxjs';
import {NewSearchPageComponent} from "../../searchPages/searchUtils/newSearchPage.component";
import {RangeFilter} from "../../utils/rangeFilter/rangeFilterHelperClasses.class";
import {SearchFields} from "../../utils/properties/searchFields";
import {OpenaireEntities, SearchFields} from "../../utils/properties/searchFields";
@Component({
selector: 'claim-result-search-form',
templateUrl: 'claimResultSearchForm.component.html',
@ -23,13 +23,15 @@ export class ClaimResultSearchFormComponent {
source: string = "datacite";
type: string = "dataset";
showSearchResults: boolean = false;
@Input() public centerAlign: boolean = false;
@Input() public select: boolean = true;
@Input() public keyword: string = '';
@Input() public selectedResults: ClaimEntity[];
@Input() public properties: EnvProperties;
@Input() localStoragePrefix: string = "";
@Input() basketLimit;
@Input() showOptions;
openaireEntities = OpenaireEntities;
public errorCodes: ErrorCodes = new ErrorCodes();
dataciteResults: ClaimEntity[] = [];
@ -863,7 +865,7 @@ export class ClaimResultSearchFormComponent {
}
}
filter.countAllValues = filter.values.length;
}
return filters;
}

View File

@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module';
import { SharedModule } from '../../../openaireLibrary/shared/shared.module';
import { CommonModule } from '@angular/common';
import { MatSelectModule } from "@angular/material/select";
import {ClaimResultSearchFormComponent} from './claimResultSearchForm.component';
@ -17,10 +17,16 @@ import {HelperModule} from '../../utils/helper/helper.module';
import {SearchFilterModule} from '../../searchPages/searchUtils/searchFilter.module';
import {QuickSelectionsModule} from "../../searchPages/searchUtils/quick-selections.module";
import {RangeFilterModule} from "../../utils/rangeFilter/rangeFilter.module";
import {ClaimProjectsSearchFormModule} from "./claimProjectSearchForm.module";
import {AdvancedSearchInputModule} from "../../sharedComponents/advanced-search-input/advanced-search-input.module";
import {InputModule} from "../../sharedComponents/input/input.module";
import {SearchInputModule} from "../../sharedComponents/search-input/search-input.module";
import {DropdownFilterModule} from "../../utils/dropdown-filter/dropdown-filter.module";
import {LoadingModule} from "../../utils/loading/loading.module";
@NgModule({
imports: [SharedModule, CommonModule, SearchResearchResultsServiceModule, PagingModule, SearchCrossrefServiceModule,
SearchDataciteServiceModule, HelperModule, SearchFilterModule, ClaimResultsModule, MatSelectModule, QuickSelectionsModule, RangeFilterModule],
SearchDataciteServiceModule, HelperModule, SearchFilterModule, ClaimResultsModule, MatSelectModule, QuickSelectionsModule, RangeFilterModule, ClaimProjectsSearchFormModule, AdvancedSearchInputModule, InputModule, SearchInputModule, DropdownFilterModule, LoadingModule],
providers:[
SearchOrcidService
],

View File

@ -6,78 +6,69 @@ declare var UIkit: any;
@Component({
selector: 'claim-results',
template: `
<ul *ngIf="results.length > 0 " class="uk-list uk-list-divider">
<li *ngFor=" let entity of results " [class]="(isSelected(entity))?'uk-block-muted':''">
<div>
<div class="uk-text-muted">
{{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
</div>
<div *ngIf="results.length > 0 " class="uk-margin-top">
<div *ngFor="let entity of results" class="uk-card">
<div class="uk-padding-small">
<div class="uk-grid">
<div class="uk-width-expand">
<claim-title [entity]="entity"></claim-title>
<div class="uk-width-expand uk-margin-right">
<claim-title [entity]="entity" [showIcon]="false"></claim-title>
<claim-result-metadata [entity]="entity"></claim-result-metadata>
<claim-project-metadata [entity]="entity"></claim-project-metadata>
</div>
<div class="uk-margin-auto-vertical uk-padding-remove-left uk-margin-small-left" [title]="(this.selectedResults.length>=basketLimit)?'Basket reached the size limit':''">
<a [class]="(this.selectedResults.length>=basketLimit)?'uk-icon-button uk-disabled':'uk-icon-button'" *ngIf="!isSelected(entity)"
<div class="uk-margin-auto-vertical uk-padding-remove-left uk-margin-small-left uk-margin-small-right" [title]="(this.selectedResults.length>=basketLimit)?'Basket reached the size limit':''">
<button class="linking-add-button uk-icon-button-small" [class.uk-disabled]="(this.selectedResults.length>=basketLimit)" *ngIf="!isSelected(entity)"
(click)="add(entity)">
<span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus"
ratio="1"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17"
height="1"></rect></svg>
</span>
</a>
<span *ngIf="isSelected(entity)" class="uk-icon-button portal-icon-button">
<span class="uk-icon" >
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="check" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.1" points="4,10 8,15 17,4"></polyline></svg>
</span>
</span>
<icon name="add" [flex]="true"></icon>
</button>
<button *ngIf="isSelected(entity)" class="linking-selected-button uk-icon-button-small" (click)="remove(entity)">
<icon name="check" [flex]="true"></icon>
</button>
</div>
</div>
</div>
</li>
</ul>`,
</div>
</div>
`
})
export class ClaimResultsComponent {
@Input() results: ClaimEntity[];
@Input() selectedResults: ClaimEntity[];
@Input() localStoragePrefix: string = "";
@Input() basketLimit;
private isSelected(result: ClaimEntity) {
let found: boolean = false;
const id = result.id;
for (let _i = 0; _i < this.selectedResults.length; _i++) {
let item = this.selectedResults[_i];
if (item.id && item.id == id) {
found = true;
break;
}
}
return found;
// indexOf doesn't work when results came from
// return this.selectedResults.indexOf(entity)!=-1;
ngOnInit() {
}
public isSelected(item: ClaimEntity) {
return !!this.selectedResults.find(result => item.id === result.id);
}
add(item: ClaimEntity) {
// if (this.selectedResults.length > this.basketLimit) {
// UIkit.notification({
// message: 'Your basket exceeds the number of allowed results (150)',
// status: 'warning',
// timeout: 1500,
// pos: 'top-center'
// });
// return;
// }
let found: boolean = this.isSelected(item);
if (!found) {
this.selectedResults.push(item);
localStorage.setItem(this.localStoragePrefix, JSON.stringify(this.selectedResults));
UIkit.notification(item.type + ' added in your basket!', {
status: 'success',
timeout: 4000,
pos: 'bottom-right'
});
}
}
remove(item: ClaimEntity) {
const index: number = this.selectedResults.findIndex(result => item.id === result.id);
if (index > -1) {
this.selectedResults.splice(index, 1);
if (this.selectedResults != null) {
localStorage.setItem(this.localStoragePrefix, JSON.stringify(this.selectedResults));
}
UIkit.notification(item.type + ' removed from your basket!', {
status: 'warning',
timeout: 4000,
pos: 'bottom-right'
});
}
}
}

View File

@ -1,16 +1,17 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module';
import { SharedModule } from '../../../openaireLibrary/shared/shared.module';
import { CommonModule } from '@angular/common';
import {ClaimResultsComponent} from './claimResults.component';
import {ClaimEntitiesMetadataModule} from "../linking/selected/ClaimEntitiesMetadata.module";
import {IconsModule} from "../../utils/icons/icons.module";
@NgModule({
imports: [
SharedModule, CommonModule, ClaimEntitiesMetadataModule
imports: [
SharedModule, CommonModule, ClaimEntitiesMetadataModule, IconsModule
],
],
providers:[
],
declarations: [

View File

@ -0,0 +1,23 @@
export class ClaimsProperties{
ALLOW_ORGANIZATION_LINKING:boolean = false;
SELECT_ENTITIES = {
projects:"Funding"
}
INLINE_ENTITY = {
show: true,
guideText : null
}
BASKET ={
source_title: "Source",
target_title: "Link source to"
}
METADATA_PREVIEW ={
source_title: "Source",
target_title: "Link to",
edit_source_title: "Edit",
edit_target_title: "Edit",
edit_target_icon: "edit"
}
}

View File

@ -1,170 +1,142 @@
<schema2jsonld *ngIf="url" [URL]="url" [name]="pageTitle" type="other"></schema2jsonld>
<div class="uk-width-1-1">
</div>
<div class="uk-grid helper-grid">
<div class="uk-width-expand ">
<div
class="uk-card-body uk-padding-remove-bottom uk-padding-remove-top " [class.paging-hr]="
!pageLoading && claims && claims.length > 0">
<div class="uk-grid">
<div class="uk-width-expand uk-position-relative uk-margin-small-top">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']"></helper>
<div *ngIf="filterForm" [id]="actions?'page_content_actions':null" [class.uk-blur-background]="actions" [attr.uk-sticky]="(actions)?'media: @m':null" [attr.offset]="offset">
<div [class.uk-padding-small]="actions" class="uk-padding-remove-vertical">
<form class="">
<div class="uk-width-1-1 uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle uk-grid" uk-grid>
<div #searchInputComponent search-input [control]="filterForm.controls.keyword" [showSearch]="false" placeholder="Search links"
[selected]="inputkeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="resetInput()"
[bordered]="true" colorClass="uk-text-secondary"></div>
</div>
<div class=" uk-grid uk-flex-middle">
<div class="">Filter by: </div>
<div class="uk-width-medium uk-padding-remove uk-margin-small-left" dashboard-input
[formInput]="filterForm.get('entities')"
placeholder="Search by entities"
type="chips" [options]="allOptions" chipLabel="label">
</div>
<div class="">Sort by: </div>
<div class="uk-width-medium uk-padding-remove uk-margin-small-left" dashboard-input
[formInput]="filterForm.get('sort')"
type="select"
[options]="sortOptions">
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle">
<div search-input [disabled]="loading" [searchControl]="filterForm.controls.keyword" searchInputClass="outer"
placeholder="Search links" class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"
(searchEmitter)="changeKeyword()" [expandable]="true"></div>
</div>
</div>
</form>
<div *ngIf="!(pageLoading || showErrorMessage || showForbiddenMessage || userValidMessage.length > 0 || (claims &&
claims.length
==0))"
class="searchPaging uk-panel uk-margin-top "
data-uk-grid-margin="">
<div class="uk-grid uk-flex-middle">
<div class="uk-width-1-2">
<div *ngIf="enableDelete && claims && claims.length > 0">
<span class="uk-margin-small-top">
<input id="checkAll" type="checkbox" (click)="selectAll($event)"
[ngModel]="selected.length==claims.length"/>
</span>
<a [class]=" ' grey-portal-link uk-margin-medium-left '+(selected.length > 0?'':'uk-disabled')"
(click)="confirmOpen()">
<span class="uk-icon "><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
icon="trash" ratio="1"><polyline fill="none" stroke="#000"
points="6.5 3 6.5 1.5 13.5 1.5 13.5 3"></polyline><polyline
fill="none" stroke="#000" points="4.5 4 4.5 18.5 15.5 18.5 15.5 4"></polyline><rect x="8" y="7"
width="1"
height="9"></rect><rect
x="11" y="7" width="1" height="9"></rect><rect x="2" y="3" width="16" height="1"></rect></svg></span>
Delete <span
*ngIf="selected.length > 0 && selected.length < resultsNum">{{selected.length | number}}</span><span
*ngIf="selected.length == resultsNum"> all </span> links
</a>
</div>
</div>
<div [class.uk-padding]="actions" class="uk-padding-remove-vertical">
<div class="uk-margin-small-top">
<results-and-pages [type]="resultsNum !== 1?'Links':'Link'" [page]="page" [pageSize]="size" [hasSearch]="true" [searchTerm]="keyword"
[totalResults]="resultsNum" customClasses="uk-margin-remove"></results-and-pages>
</div>
<div class="uk-grid uk-flex-middle uk-margin-small-top" uk-grid>
<div *ngIf="fetchBy != 'User' && properties.environment == 'development'" >
<input [(ngModel)]="mine" [checked]="mine" (ngModelChange)="goTo(1)" type="checkbox" class="uk-checkbox"> Mine
</div>
<div *ngIf="resultsNum" class="uk-width-1-2 uk-grid uk-flex-right uk-flex-middle ">
<div class="uk-text-muted uk-text-uppercase">
<span class="uk-text-bold">{{resultsNum|number}}</span> links, page <span
class="uk-text-bold">{{page | number}}</span> of <span
class="uk-text-bold">{{totalPages(resultsNum)|number}}</span>
<div>
<dropdown-filter #dropdownFilter dropdownClass="uk-width-medium uk-padding-small"
name="Type of Entity" [disabled]="loading" [count]="entities.length">
<h6 class="uk-margin-remove-bottom" title="Type of Entity">Type of Entity</h6>
<ul class="uk-list uk-margin-remove-bottom">
<li *ngFor="let option of allOptions">
<a class="uk-link-text">
<label (click)="select(option.value, $event, dropdownFilter)" class="uk-flex uk-flex-middle">
<input class="uk-checkbox"
type="checkbox" [checked]="isSelected(option.value)">
<span class="uk-margin-small-left">{{option.label}}</span>
</label>
</a>
</li>
</ul>
</dropdown-filter>
</div>
<div>
<div input inputClass="flat x-small" placeholder="Sort by"
[formInput]="filterForm.get('sort')" class="uk-width-small"
type="select" [options]="sortOptions">
</div>
</div>
<div class="uk-width-expand@l uk-width-1-1 uk-flex uk-flex-right@m uk-flex-center">
<paging-no-load [currentPage]="page" [totalResults]="resultsNum" [size]="size"
[loading]="pageLoading"
(pageChange)="pageChange($event)" class="uk-float-right"></paging-no-load>
[loading]="false" (pageChange)="pageChange($event)"></paging-no-load>
</div>
</div>
</div>
</div>
<loading *ngIf="pageLoading" class="uk-padding"></loading>
<div *ngIf="!pageLoading" >
<div *ngIf="showErrorMessage " class="uk-alert uk-alert-danger ">
An Error occured.
</div>
<div *ngIf="showForbiddenMessage " class="uk-alert uk-alert-danger ">
You are not authorized to view the results.
</div>
<div *ngIf=" userValidMessage.length > 0 " class="uk-alert uk-alert-danger ">
User session is not valid. Please login again.
</div>
<div *ngIf=" claims && claims.length == 0" class="uk-margin-top">
<div class="uk-alert uk-alert-primary ">No entries found.</div>
</div>
<div class="uk-margin-small-top">
<div *ngFor="let claim of claims "
class="uk-card uk-card-default uk-card-body uk-margin-bottom ng-star-inserted">
<div class="uk-grid">
<div *ngIf="enableDelete">
<input [id]="claim.id" type="checkbox" (click)="select(claim,$event)"
[ngModel]="isSelected(claim.id)"/>
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
<div *ngIf="loading" class="uk-position-center">
<loading></loading>
</div>
<div *ngIf="!loading">
<div *ngIf="claims && claims.length == 0" class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
<div>No links found</div>
</div>
<div class="uk-width-expand">
<div class="uk-margin-bottom">
<claim-entity [entity]="claim.target" [type]="claim.targetType" [properties]=properties
[externalPortalUrl]=externalPortalUrl [source]="true"></claim-entity>
</div>
<div class="uk-margin-small-bottom">
<span *ngIf="isClaimAvailable(claim) else notAvailable" class="uk-label uk-label-success"
[attr.uk-tooltip]="'title:<div class=\'uk-margin uk-padding-small\'>The link information is available in the portal and the APIs.</div>'"
>available
</span>
<ng-template #notAvailable><span class="uk-label uk-label-danger"
[attr.uk-tooltip]="'title:<div class=\'uk-margin uk-padding-small\'>The link information will be added in the portal and the APIs in the next content provision workflow.</div>'"
>pending</span></ng-template>
<ng-container *ngIf="claims && claims.length > 0">
<div class="uk-flex uk-flex-middle uk-margin-top uk-margin-small-bottom uk-padding-small uk-padding-remove-horizontal">
<div class="uk-width-xsmall uk-flex uk-flex-center uk-flex-middle">
<label>
<input id="checkAll" type="checkbox" (click)="selectAll($event)" class="uk-checkbox" title="Select All"
[ngModel]="selected.length == claims.length"/>
</label>
</div>
<button class="uk-button uk-button-link" [class.uk-disabled]="selected.length == 0" [disabled]="selected.length == 0"
(click)="deleteOpen()">
<span>Delete ({{selected.length}})</span>
</button>
</div>
<div class="uk-margin-small-bottom"><span *ngIf="showUserEmail" class="uk-margin-right"><span class="title">Claimed by:</span>
{{claim.userMail}}</span>
<span
class="title">Claimed date:</span> {{claim.date}}</div>
<div class="uk-margin-small-bottom uk-margin-top">
<!-- <span class="title">Link to:</span> -->
<claim-entity [entity]="claim.source" [type]="claim.sourceType" [source]="false" [properties]=properties
[externalPortalUrl]=externalPortalUrl></claim-entity>
<ul class="uk-margin-small-top uk-list uk-list-striped">
<li *ngFor="let claim of claims; let i=index" class="uk-flex uk-flex-middle uk-padding-small uk-padding-remove-horizontal">
<div class="uk-width-xsmall uk-flex uk-flex-center uk-flex-middle">
<input type="checkbox" class="uk-checkbox"
[id]="claim.id" (click)="selectClaim(claim, $event)" [ngModel]="isSelectedClaim(claim.id)">
</div>
<div class="uk-width-expand">
<div class="uk-grid uk-grid-small uk-flex-middle" uk-grid>
<div class="uk-width-expand">
<div class="uk-margin-small-bottom">
<claim-entity [entity]="claim.target" [type]="claim.targetType" [properties]=properties
[externalPortalUrl]=externalPortalUrl [source]="true" [linkAvailable]="isClaimAvailable(claim)"></claim-entity>
</div>
<div class="uk-margin-small-bottom">
<span *ngIf="isClaimAvailable(claim) else notAvailable" class="uk-label uk-label-small uk-label-success"
[attr.uk-tooltip]="'title: The link information is available in the portal and the APIs.'">available</span>
<ng-template #notAvailable>
<span class="uk-label uk-label-small uk-label-danger"
[attr.uk-tooltip]="'title:The link information will be added in the portal and the APIs in the next content provision workflow.'">pending</span>
</ng-template>
</div>
<div class="uk-text-small">
<div *ngIf="showUserEmail" class="uk-margin-xsmall-bottom">
<span class="uk-text-meta">Claimed by:</span>
<span class="uk-margin-xsmall-left">{{claim.userMail}}</span>
</div>
<div>
<span class="uk-text-meta">Claimed date:</span>
<span class="uk-margin-xsmall-left">{{claim.date}}</span>
</div>
</div>
</div>
<div class="uk-visible@m">
<div class="claim-divider">
<icon class="uk-position-center" name="link" customClass="uk-text-primary" ratio="2" [flex]="true"></icon>
</div>
</div>
<div class="uk-width-1-2@m uk-width-1-1">
<claim-entity [entity]="claim.source" [type]="claim.sourceType" [source]="false" [properties]=properties
[externalPortalUrl]=externalPortalUrl></claim-entity>
</div>
</div>
</div>
<div class="uk-width-xsmall uk-flex uk-flex-center uk-flex-middle">
<button class="uk-button uk-button-link uk-flex uk-flex-middle" (click)="deleteOpen(i)">
<icon name="delete" [flex]="true"></icon>
</button>
</div>
</li>
</ul>
<div class="uk-margin-medium-top uk-flex uk-flex-center uk-flex-right@m">
<paging-no-load *ngIf="resultsNum" [currentPage]="page" [totalResults]="resultsNum" [size]="size"
(pageChange)="pageChange($event)"></paging-no-load>
</div>
</div>
</div>
</div>
</div>
<div *ngIf="!( showErrorMessage || showForbiddenMessage || userValidMessage.length > 0 || (claims
&& claims.length
==0))" class="paging-hr uk-margin-top">
<div class="uk-grid ">
<div *ngIf="resultsNum>0" class="uk-width-1-2 uk-text-muted uk-text-uppercase">
<span class="uk-text-bold">{{resultsNum|number}}</span> links, page <span
class="uk-text-bold">{{page | number}}</span> of <span
class="uk-text-bold">{{totalPages(resultsNum)|number}}</span>
</div>
<div *ngIf="resultsNum" class="uk-width-1-2 ">
<paging-no-load [currentPage]="page" [totalResults]="resultsNum" [size]="size"
(pageChange)="pageChange($event)" class="uk-float-right"></paging-no-load>
</ng-container>
</div>
</div>
</div>
</div>
</div>
<helper *ngIf="pageContents && pageContents['right'] && pageContents['right'].length > 0"
[texts]="pageContents['right']" class="uk-width-1-5"></helper>
</div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']"></helper>
<modal-alert (alertOutput)="confirmClose()">
<h4 class="modal-title uk-text-bold " id="myModalLabel">Are you sure?</h4>
<p>
You are about to delete {{this.selected.length}} link(s) you selected. <br>
<span class="uk-text-bold">
Usually it takes 2-4 weeks for the links to permanently disappear from the Openaire platfrom.
</span>
</p>
<p>Do you want to delete the link(s)?</p>
<modal-alert #deleteModal [overflowBody]="false" (alertOutput)="delete()">
</modal-alert>
<modal-loading [message]="'Please wait...'"></modal-loading>

View File

@ -0,0 +1,7 @@
@import (reference) "~src/assets/openaire-theme/less/_import-variables";
.claim-divider {
position: relative;
padding: 0 20px;
height: 100%;
}

View File

@ -1,14 +1,11 @@
import {Component, Input, ViewChild} from '@angular/core';
import {Component, Input, OnDestroy, OnInit, ViewChild} from '@angular/core';
import {Location} from '@angular/common';
import {ActivatedRoute, Router} from '@angular/router';
import {Subject, Subscriber} from 'rxjs';
import {debounceTime, distinctUntilChanged} from 'rxjs/operators';
import {ClaimsService} from '../service/claims.service';
import {ModalLoading} from '../../../utils/modal/loading.component';
import {AlertModal} from '../../../utils/modal/alert';
import {Session, User} from '../../../login/utils/helper.class';
import {User} from '../../../login/utils/helper.class';
import {EnvProperties} from '../../../utils/properties/env-properties';
import {LoginErrorCodes} from '../../../login/utils/guardHelper.class';
import {SEOService} from '../../../sharedComponents/SEO/SEO.service';
import {IndexInfoService} from '../../../utils/indexInfo.service';
import {ClaimDBRecord} from '../claimHelper.class';
@ -17,19 +14,19 @@ import {HelperService} from '../../../utils/helper/helper.service';
import {Meta, Title} from '@angular/platform-browser';
import {PiwikService} from '../../../utils/piwik/piwik.service';
import {properties} from '../../../../../environments/environment';
import {FormArray, FormBuilder, FormGroup} from '@angular/forms';
import {FormBuilder, FormGroup} from '@angular/forms';
import {Option} from '../../../sharedComponents/input/input.component';
import {SearchInputComponent} from '../../../sharedComponents/search-input/search-input.component';
import {OpenaireEntities} from "../../../utils/properties/searchFields";
import {HelperFunctions} from "../../../utils/HelperFunctions.class";
import {NotificationHandler} from "../../../utils/notification-handler";
import {DropdownFilterComponent} from "../../../utils/dropdown-filter/dropdown-filter.component";
declare var UIkit;
@Component({
selector: 'displayClaims',
templateUrl: 'displayClaims.component.html',
// providers: [ClaimsService]
styleUrls: ['displayClaims.component.less']
})
export class DisplayClaimsComponent {
@Input() piwikSiteId = null;
export class DisplayClaimsComponent implements OnInit, OnDestroy {
@Input() pageTitle: string = "";
properties: EnvProperties;
public searchTermStream = new Subject<string>();
@ -42,50 +39,40 @@ export class DisplayClaimsComponent {
@Input() isAdmin: boolean = false;
page: number = 1;
size: number = 50;
defaultSize:number = 50;
sizes = [10, 20, 30, 50];
keyword: string; // the keyword string to give to the request as parameter
inputkeyword: string; // the string written in the input field (keyword=inputkeyword when its length is bigger than 3 and the user stops typing)
@ViewChild('searchInputComponent') searchInputComponent: SearchInputComponent;
types = ["All", "Project", "Context", "Result", "User"];
pageLoading:boolean = false;
types = ["All", "Project", "Context", "Result", "User", "Organization"];
loading: boolean = false;
@Input() fetchBy: string;
@Input() fetchId: string;
@Input() user: User;
resultsNum: number;
resultsNum: number = 0;
claims: ClaimDBRecord[];
@Input() externalPortalUrl: string = null;
@Input() claimsInfoURL: string;// ="https://www.openaire.eu/linking";
lastIndexDate = null;
@ViewChild(ModalLoading) loading: ModalLoading;
public filterForm: FormGroup;
public entitiesCtrl: FormArray;
public entities: string[] = [];
selected = [];
mine = false;
allOptions: Option[] = [{label: "Projects", value: {id:"project", label: "Projects"}},{label: "Publications", value:{id:"publication", label: "Publications"}},{label: "Research data", value: {id:"dataset", label: "Research data"}},
{label: "Software", value: {id:"software", label: "Software"}},{label: "Other reserch products", value: {id:"other", label: "Other reserch products"}},{label: "Communities", value: {id:"context", label: "Communities"}}];
allOptions: Option[] = [
{label: OpenaireEntities.PUBLICATIONS, value: "publication"},
{label: OpenaireEntities.DATASETS, value: "dataset"},
{label: OpenaireEntities.SOFTWARE, value: "software"},
{label: OpenaireEntities.OTHER, value: "other"},
{label: OpenaireEntities.PROJECTS, value: "project"},
{label: OpenaireEntities.COMMUNITIES, value: "context"}];
sortOptions: Option[] = [
{label:"Date (recent) ", value:{ sort: "date", descending: true }}, {label:"Date (oldest) ", value:{ sort: "date",descending:false }},
// {label:"User (desc) ", value:{ sort: "user",descending: true }}, {label:"User (asc) ", value:{ sort: "user",descending:false }},
// {label:"Title (desc) ", value:{ sort: "source",descending: true }}, {label:"Title (asc) ", value:{ sort: "source",descending:false }},
{label:"Title (desc) ", value:{ sort: "target",descending: true }}, {label:"Title (asc) ", value: { sort: "target",descending:false }},
{label: "Date (recent) ", value: {sort: "date", descending: true}},
{label: "Date (oldest) ", value: {sort: "date", descending: false}},
{label: "Title (desc) ", value: {sort: "target", descending: true}},
{label: "Title (asc) ", value: {sort: "target", descending: false}},
];
entityTypes: string[] = [];
// descending = true;
// sortby = "date";
selected = [];
// deleteMessage: string = "";
showErrorMessage: boolean = false;
showForbiddenMessage: boolean = false;
userValidMessage: string = "";
//params for pagingFormatter to use when navigate to page
index: number;
params;
@ViewChild(AlertModal) alert;
@ViewChild("deleteModal") deleteModal;
claimsDeleted: number = 0;
@Input() communityId: string = null;
@ -93,36 +80,44 @@ export class DisplayClaimsComponent {
url = null;
public pageContents = null;
/* Sticky actions */
@Input()
public actions: boolean = false;
public offset: number;
constructor(private _claimService: ClaimsService, private route: ActivatedRoute, private _router: Router, private location: Location,
private _meta: Meta, private _title: Title, private _piwikService: PiwikService,
private seoService: SEOService, private indexInfoService: IndexInfoService, private helper: HelperService, private _fb: FormBuilder) {
}
ngOnInit() {
this.entitiesCtrl = this._fb.array([]);
if (typeof document !== "undefined" && this.actions) {
this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--header-height'));
}
this.entities = [];
this.filterForm = this._fb.group({
keyword: [''],
entities: this.entitiesCtrl,
entities: this._fb.control(this.entities),
sort: this._fb.control(this.sortOptions[0].value)
});
this.properties = properties;
this.url = properties.domain + properties.baseLink + this._router.url;
if(!this.myClaims){
this.sortOptions.push({label:"User (desc) ", value:{ sort: "user",descending: true }});
this.sortOptions.push( {label:"User (asc) ", value:{ sort: "user",descending:false }})
if (!this.myClaims) {
this.sortOptions.push({label: "User (desc) ", value: {sort: "user", descending: true}});
this.sortOptions.push({label: "User (asc) ", value: {sort: "user", descending: false}})
}
var description = "Openaire, linking, claim, publication, research data, software, other research product, project, community";
this.updateTitle(this.pageTitle);
this.updateDescription(description);
this.updateUrl(this.url);
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe());
}
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
this.subscriptions.push(this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
this.pageContents = contents;
}));
if(properties.adminToolsPortalType !== "explore") {
this.subscriptions.push(this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
this.pageContents = contents;
}));
}
this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(res => {
this.lastIndexDate = res;
}));
@ -138,18 +133,14 @@ export class DisplayClaimsComponent {
this.fetchId = (this.fetchId) ? this.fetchId : params['fetchId'];
this.fetchId = this.fetchId ? this.fetchId : '';
}
let page = (params['page'] === undefined) ? 1 : +params['page'];
let size = (params['size'] === undefined) ? this.defaultSize : +params['size'];
this.mine = (params['mine'] == 'true' ? true:false);
this.keyword = (params['keyword'] ? params['keyword'] : "");
this.filterForm.get('keyword').setValue(this.keyword);
this.inputkeyword = this.keyword;
this.page = (page <= 0) ? 1 : page;
this.size = (size <= 0) ? this.defaultSize : size;
this.entityTypes = [];//(params['types']?params['types']:[]);
// this.setTypes(params['types']); // check the appropriate checkboxes
this.setSortby(params['sort']);
this.setTypes(params['types']); // check the appropriate checkboxes
this.setSortBy(params['sort']);
this.getClaims();
this.subscriptions.push(this.searchTermStream
.pipe(debounceTime(300), distinctUntilChanged())
@ -161,9 +152,6 @@ export class DisplayClaimsComponent {
this.subscriptions.push(this.filterForm.get('entities').valueChanges.subscribe(value => {
this.goTo();
}));
this.subscriptions.push(this.filterForm.get('keyword').valueChanges.subscribe(value => {
this.changekeyword();
}));
this.subscriptions.push(this.filterForm.get('sort').valueChanges.subscribe(value => {
this.goTo();
}));
@ -176,126 +164,101 @@ export class DisplayClaimsComponent {
subscription.unsubscribe();
}
});
if(this.subResults){
if (this.subResults) {
this.subResults.unsubscribe();
}
}
getClaims() {
if (!Session.isLoggedIn()) {
this.userValidMessage = "User session has expired. Please login again.";
this._router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this._router.url
let types = '';
for (let type of this.entities) {
types += (types.length > 0 ? '&' : '') + "types=" + type;
}
this.loading = true;
if (this.subResults) {
this.subResults.unsubscribe();
}
if (this.fetchBy == "Project") {
this.subResults = this._claimService.getClaimsByProject(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe(
data => {
this.manageAPIData(data);
this.loading = false;
},
err => {
this.handleErrors(err, "Error getting claims for project with id: " + this.fetchId);
}
});
);
} else if (this.fetchBy == "Organization") {
this.subResults = this._claimService.getClaimsByOrganization(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL, this.mine).subscribe(
data => {
this.manageAPIData(data);
this.loading = false;
},
err => {
this.handleErrors(err, "Error getting claims for project with id: " + this.fetchId);
}
);
} else if (this.fetchBy == "User") {
this.subResults = this._claimService.getClaimsByUser(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe(
data => {
this.manageAPIData(data);
this.loading = false;
},
err => {
this.handleErrors(err, "Error getting claims for user with id: " + this.fetchId);
this.loading = false;
}
);
} else if (this.fetchBy == "Result") {
this.subResults = this._claimService.getClaimsByResult(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe(
data => {
this.manageAPIData(data);
this.loading = false;
},
err => {
this.handleErrors(err, "Error getting claims for entity with id: " + this.fetchId);
this.loading = false;
}
);
} else if (this.fetchBy == "Context") {
this.subResults = this._claimService.getClaimsBycontext(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL, this.mine).subscribe(
data => {
this.manageAPIData(data);
this.loading = false;
},
err => {
this.handleErrors(err, "Error getting claims for context with id: " + this.fetchId);
this.loading = false;
}
);
} else {
this.selected = [];
let types = '';
this.showErrorMessage = false;
this.showForbiddenMessage = false;
for (let type of this.entitiesCtrl.getRawValue()) {
types += (this.entitiesCtrl.getRawValue().length > 0 ? '&' : '') + "types=" + type.id;
}
this.pageLoading = true;
if(this.subResults){
this.subResults.unsubscribe();
}
if (this.fetchBy == "Project") {
this.subResults = this._claimService.getClaimsByProject(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe(
data => {
this.manageAPIData(data);
this.pageLoading = false;
},
err => {
this.handleErrors(err, "Error getting claims for project with id: " + this.fetchId);
}
);
} else if (this.fetchBy == "User") {
this.subResults = this._claimService.getClaimsByUser(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe(
data => {
this.manageAPIData(data);
this.pageLoading = false;
},
err => {
this.handleErrors(err, "Error getting claims for user with id: " + this.fetchId);
this.pageLoading = false;
}
);
} else if (this.fetchBy == "Result") {
this.subResults = this._claimService.getClaimsByResult(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe(
data => {
this.manageAPIData(data);
this.pageLoading = false;
},
err => {
this.handleErrors(err, "Error getting claims for entity with id: " + this.fetchId);
this.pageLoading = false;
}
);
} else if (this.fetchBy == "Context") {
this.subResults = this._claimService.getClaimsBycontext(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe(
data => {
this.manageAPIData(data);
this.pageLoading = false;
},
err => {
this.handleErrors(err, "Error getting claims for context with id: " + this.fetchId);
this.pageLoading = false;
}
);
} else {
this.subResults = this._claimService.getClaims(this.size, this.page, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe(
data => {
this.manageAPIData(data);
this.pageLoading = false;
},
err => {
this.handleErrors(err, "Error getting claims");
this.pageLoading = false;
}
);
}
this.subResults = this._claimService.getClaims(this.size, this.page, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL, this.mine).subscribe(
data => {
this.manageAPIData(data);
this.loading = false;
},
err => {
this.handleErrors(err, "Error getting claims");
this.loading = false;
}
);
}
}
manageAPIData(data) {
this.claims = data.data;
this.resultsNum = data.total;
this.resultsNum = +data.total;
}
handleErrors(err, message) {
this.showErrorMessage = true;
console.error("Dispaly Claims (component): " + message +" " + (err && err.error?err.error:''));
try {
let error = err && err.error?err.error:err;
if (error.code && error.code == 403) {
this.showErrorMessage = false;
this.showForbiddenMessage = true;
if(!Session.isLoggedIn()) {
this._router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this._router.url
}
});
}
}
} catch (e) {
}
NotificationHandler.rise(message, "danger");
console.error("Display Claims (component): " + message + " " + (err && err.error ? err.error : ''));
}
goTo(page: number = 1) {
this.page = page;
this.location.go(location.pathname, this.getParametersString());
HelperFunctions.scroll();
this.getClaims();
}
@ -304,175 +267,92 @@ export class DisplayClaimsComponent {
params += (this.page == 1 ? "" : (params.length > 0 ? '&' : '') + "page=" + this.page);
params += (this.size == 10 ? "" : (params.length > 0 ? '&' : '') + "size=" + this.size);
let types = "";
for (let type of this.entitiesCtrl.getRawValue()) {
types += (this.entitiesCtrl.getRawValue().length > 0 ? ',' : '') + type.id;
for (let type of this.entities) {
types += (types.length > 0 ? ',' : '') + type;
}
params += (this.entitiesCtrl.getRawValue().length > 0) ? (params.length > 0 ? '&' : '') + "types=" + types : "";
if (this.isAdmin) {
params += (this.fetchBy == 'All' ? "" : (params.length > 0 ? '&' : '') + "fetchBy=" + this.fetchBy);
params += (this.fetchId == '' ? "" : (params.length > 0 ? '&' : '') + "fetchId=" + this.fetchId);
}
params += (this.filterForm.get("sort").value.sort == 'date' && this.filterForm.get("sort").value.descending ? "" : (params.length > 0 ? '&' : '') + "sort=" +this.filterForm.get("sort").value.sort + "-" + this.filterForm.get("sort").value.descending);
params += (this.entities.length > 0) ? (params.length > 0 ? '&' : '') + "types=" + types : "";
params += (this.filterForm.get("sort").value.sort == 'date' && this.filterForm.get("sort").value.descending ? "" : (params.length > 0 ? '&' : '') + "sort=" + this.filterForm.get("sort").value.sort + "-" + this.filterForm.get("sort").value.descending);
params += (this.keyword == '' ? "" : (params.length > 0 ? '&' : '') + "keyword=" + this.keyword);
if (this.communityId != null) {
params += "&communityId=" + this.communityId;
}
return params;
}
setSortby(sortby: string) {
setSortBy(sortby: string) {
let sort = "date";
let desc = "desc";
if(sortby && sortby.split("-").length == 2){
if (sortby && sortby.split("-").length == 2) {
sort = sortby.split("-")[0];
desc = sortby.split("-")[1];
}
let option = this.sortOptions.find( option => option.value.sort == sort && ((option.value.descending && desc=="desc") || (!option.value.descending && desc=="asc")));
this.filterForm.get("sort").setValue(option?option.value:this.sortOptions[0].value);
let option = this.sortOptions.find(option => option.value.sort == sort && ((option.value.descending && desc == "desc") || (!option.value.descending && desc == "asc")));
this.filterForm.get("sort").setValue(option ? option.value : this.sortOptions[0].value);
}
changekeyword() {
setTypes(typesParam: string) {
for (let type of typesParam ? typesParam.split(',') : []) {
this.entities.push(type);
}
}
if (this.filterForm.get("keyword").value.length >= 3 || this.filterForm.get("keyword").value.length == 0) {
changeKeyword() {
if (this.filterForm.get("keyword") && (this.filterForm.get("keyword").value?.length >= 3 || this.filterForm.get("keyword").value?.length == 0)) {
this.searchTermStream.next(this.filterForm.get("keyword").value);
}
}
select(item: any, event) {
let value = event.currentTarget.checked;
if (value) {
this.selected.push(item);
} else {
for (var _i = 0; _i < this.selected.length; _i++) {
let claim = this.selected[_i];
if (claim['id'] == item.id) {
this.selected.splice(_i, 1);
select(value: string, event, dropdownFilter: DropdownFilterComponent) {
if(event.target instanceof HTMLInputElement) {
dropdownFilter.closeDropdown();
if(event.target.checked && !this.entities.find(entity => value === entity)) {
this.entities.push(value);
} else if(!event.target.checked) {
let index = this.entities.indexOf(value);
if(index !== -1) {
this.entities.splice(index, 1);
}
}
this.filterForm.get('entities').setValue(this.entities);
}
}
selectAll(event) {
let value = event.currentTarget.checked;
if (value) {
this.selected = [];
for (let _i = 0; _i < this.claims.length; _i++) {
let claim = this.claims[_i];
this.selected.push(claim);
}
} else {
this.selected = [];
}
isSelected(value: string) {
return this.filterForm && this.filterForm.get('entities').value.find(entity => entity === value);
}
isSelected(id: string) {
for (let _i = 0; _i < this.selected.length; _i++) {
let claim = this.selected[_i];
if (claim['id'] == id) {
return true;
}
}
return false;
}
confirmOpen() {
if (this.selected.length <= 0) {
} else {
this.alert.cancelButton = true;
this.alert.okButton = true;
this.alert.alertTitle = "";// "Delete " + this.selected.length + " links(s)";
this.alert.okButtonLeft = false;
// this.alert.message = this.selected.length + " links will be deleted. Do you want to proceed? ";
this.alert.okButtonText = "Delete";
this.alert.cancelButtonText = "Cancel";
this.alert.open();
}
}
confirmClose() {
this.delete();
deleteOpen(index: number = null) {
this.index = index;
this.deleteModal.alertTitle = 'Delete Confirmation';
this.deleteModal.message = 'Are you sure you want to delete ' + (this.index != null ? '1' : this.selected.length) + ' link(s)?';
this.deleteModal.okButtonText = 'Yes';
this.deleteModal.open();
}
delete() {
this.loading.open();
this.claimsDeleted = 0;
let ids = [];
for (let i = 0; i < this.selected.length; i++) {
let id = this.selected[i].id;
ids.push(id);
}
this.batchDeleteById(ids);
}
batchDeleteById(ids: string[]) {
if (!this.user) {
this.userValidMessage = "User session has expired. Please login again.";
this._router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this._router.url
let claimsToBeDeleted = ((this.index != null) ? [this.claims[this.index].id] : this.selected.map(claim => claim.id));
console.log(claimsToBeDeleted);
this.subscriptions.push(this._claimService.deleteBulk(claimsToBeDeleted, this.properties.claimsAPIURL).subscribe(
res => {
if (this.index != null) {
this.claims.splice(this.index, 1);
this.resultsNum = this.resultsNum - 1;
NotificationHandler.rise('Link has been deleted successfully');
} else {
claimsToBeDeleted.forEach(claimId => {
this.claims.splice(this.claims.findIndex((id) => id == claimId), 1);
});
this.resultsNum = this.resultsNum - claimsToBeDeleted.length;
NotificationHandler.rise(claimsToBeDeleted.length + ' links have been deleted successfully');
}
});
} else {
//console.warn("Deleting claim with ids:"+ids);
this.subscriptions.push(this._claimService.deleteBulk(ids, this.properties.claimsAPIURL).subscribe(
res => {
//console.info('Delete response'+res.code );
//console.warn("Deleted ids:"+ res.deletedIds);
//console.warn("Not found ids:"+ res.notFoundIds);
//remove this claim from the
let newClaims = this.claims;
for (let id of res.deletedIds) {
for (let _i = 0; _i < this.claims.length; _i++) {
let claim = this.claims[_i];
if (claim['id'] == id) {
newClaims.splice(_i, 1);
}
}
for (let _i = 0; _i < this.selected.length; _i++) {
let claim = this.selected[_i];
if (claim['id'] == id) {
this.selected.splice(_i, 1);
}
}
}
this.claims = newClaims;
this.resultsNum = this.resultsNum - res.deletedIds.length;
this.loading.close();
if (res.deletedIds.length > 0) {
UIkit.notification('<div class = " " >' + res.deletedIds.length + ' link(s) successfully deleted.</div>', {
status: 'success',
timeout: 6000,
pos: 'bottom-right'
});
}
if (res.notFoundIds.length > 0) {
UIkit.notification('<div class = " " >' + res.notFoundIds.length + ' link(s) couldn\'t be deleted.</div>', {
status: 'danger',
timeout: 6000,
pos: 'bottom-right'
});
}
let goToPage = this.page;
if (this.totalPages(this.resultsNum) < this.page && this.page > 0) {
goToPage = this.page - 1;
}
this.goTo(goToPage);
}, err => {
//console.log(err);
this.handleErrors(err,"Error deleting claims with ids: " + ids);
this.showErrorMessage = true;
this.loading.close();
}));
}
this.selected = [];
let goToPage = this.page;
if (this.totalPages(this.resultsNum) < this.page && this.page > 0) {
goToPage = this.page - 1;
}
this.goTo(goToPage);
}, err => {
this.handleErrors(err, "Error deleting claim with id: " + this.claims[this.index].id);
}
));
}
pageChange($event) {
@ -489,12 +369,8 @@ export class DisplayClaimsComponent {
if (claimDateStr < lastUpdateDateStr) {
return true;
} else {
if (claim.target.collectedFrom != "infrastruct_::openaire" && claim.indexed) {
// check if direct index succeded
return true
}
return claim.target.collectedFrom != "infrastruct_::openaire";
}
return false;
}
totalPages(totalResults: number): number {
@ -505,6 +381,43 @@ export class DisplayClaimsComponent {
return totalPages;
}
selectClaim(item: any, event) {
let value = event.currentTarget.checked;
if (value) {
this.selected.push(item);
} else {
for (var _i = 0; _i < this.selected.length; _i++) {
let claim = this.selected[_i];
if (claim['id'] == item.id) {
this.selected.splice(_i, 1);
}
}
}
}
selectAll(event) {
let value = event.currentTarget.checked;
if (value) {
this.selected = [];
for (let _i = 0; _i < this.claims.length; _i++) {
let claim = this.claims[_i];
this.selected.push(claim);
}
} else {
this.selected = [];
}
}
isSelectedClaim(id: string) {
for (let _i = 0; _i < this.selected.length; _i++) {
let claim = this.selected[_i];
if (claim['id'] == id) {
return true;
}
}
return false;
}
private updateDescription(description: string) {
this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'");
@ -516,7 +429,7 @@ export class DisplayClaimsComponent {
_prefix = "OpenAIRE | ";
}
var _title = _prefix + ((title.length > 50) ? title.substring(0, 50) : title);
if(this.myClaims) {
if (this.myClaims) {
this._title.setTitle(_title);
}
this._meta.updateTag({content: _title}, "property='og:title'");
@ -525,12 +438,4 @@ export class DisplayClaimsComponent {
private updateUrl(url: string) {
this._meta.updateTag({content: url}, "property='og:url'");
}
public onSearchClose() {
this.inputkeyword = this.filterForm.get('keyword').value;
}
public resetInput() {
this.inputkeyword = null;
this.searchInputComponent.reset()
}
}

View File

@ -17,16 +17,20 @@ import {HelperModule} from '../../../utils/helper/helper.module';
import {Schema2jsonldModule} from '../../../sharedComponents/schema2jsonld/schema2jsonld.module';
import { SEOServiceModule } from '../../../sharedComponents/SEO/SEOService.module';
import {IndexInfoServiceModule} from "../../../utils/indexInfoService.module";
import {PiwikServiceModule} from "../../../utils/piwik/piwikService.module";
import {SearchInputModule} from '../../../sharedComponents/search-input/search-input.module';
import {InputModule} from '../../../sharedComponents/input/input.module';
import {LoadingModule} from '../../../utils/loading/loading.module';
import {NoLoadPaging} from "../../../searchPages/searchUtils/no-load-paging.module";
import {IconsModule} from "../../../utils/icons/icons.module";
import {DropdownFilterModule} from "../../../utils/dropdown-filter/dropdown-filter.module";
import {IconsService} from "../../../utils/icons/icons.service";
import {link} from "../../../utils/icons/icons";
@NgModule({
imports: [
CommonModule, FormsModule, RouterModule, ClaimServiceModule, LoadingModalModule, AlertModalModule,
ClaimEntityFormatterModule, PagingModule, HelperModule, Schema2jsonldModule, SEOServiceModule, PiwikServiceModule,
IndexInfoServiceModule, MatSelectModule, SearchInputModule, MatAutocompleteModule, MatChipsModule, MatFormFieldModule, MatSlideToggleModule, InputModule, LoadingModule
ClaimEntityFormatterModule, PagingModule, HelperModule, Schema2jsonldModule, SEOServiceModule,
IndexInfoServiceModule, MatSelectModule, SearchInputModule, MatAutocompleteModule, MatChipsModule, MatFormFieldModule, MatSlideToggleModule, InputModule, LoadingModule, NoLoadPaging, IconsModule, DropdownFilterModule
],
declarations: [
@ -37,4 +41,8 @@ import {LoadingModule} from '../../../utils/loading/loading.module';
DisplayClaimsComponent
]
})
export class DisplayClaimsModule { }
export class DisplayClaimsModule {
constructor(private iconsService: IconsService) {
this.iconsService.registerIcons([link])
}
}

View File

@ -1,6 +1,8 @@
import {Component, Input} from '@angular/core';
import {EnvProperties} from '../../../utils/properties/env-properties';
import {ClaimDBContext, ClaimDBProject, ClaimDBResult} from "../claimHelper.class";
import {ClaimDBContext, ClaimDBOrganization, ClaimDBProject, ClaimDBResult} from "../claimHelper.class";
import {OpenaireEntities} from "../../../utils/properties/searchFields";
import {StringUtils} from "../../../utils/string-utils.class";
//Usage Example "<claim-entity [entity]="" [type]="" > </claim-entity>"
@ -9,39 +11,49 @@ import {ClaimDBContext, ClaimDBProject, ClaimDBResult} from "../claimHelper.clas
selector: 'claim-entity',
template: `
<div *ngIf="type == 'publication' || type == 'dataset' || type == 'software' || type == 'other'"
[title]="(type == 'publication'?'Publication':(type == 'dataset'?'research data':(type == 'other'?'other research product':'software')))">
<div *ngIf="source" class="uk-text-muted title">{{type == 'publication'?'publication':(type == 'dataset'?'research data':(type == 'other'?'other':'software'))}}</div>
<span *ngIf="!source" class="title">Link to {{type == 'publication'?'publication':(type == 'dataset'?'research data':(type == 'other'?'other':'software'))}}: </span>
<publication-title [entity]="entity" param="id"
path="/search/result" [externalPortalUrl]=externalPortalUrl></publication-title>
[attr.uk-tooptip]="getEntityName(type)">
<div *ngIf="source" class="uk-text-small">
{{getEntityName(type)}}
</div>
<div>
<span *ngIf="!source" class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
<publication-title [entity]="entity" param="id"
path="/search/result" [externalPortalUrl]=externalPortalUrl [linkAvailable]="linkAvailable"></publication-title>
</div>
</div>
<div *ngIf="type == 'project' " title="Project">
<span class="uk-text-muted title">Link to project: </span>
<div *ngIf="type == 'project'" [attr.uk-tooptip]="getEntityName(type)">
<span class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
<project-title [project]="entity" [searchLink]=properties.searchLinkToProject
[externalPortalUrl]=externalPortalUrl></project-title>
</div>
<div *ngIf="type == 'context' " title="Concept">
<span class="uk-text-muted title">Link to community: </span> <span class="uk-text-large">{{entity.title}}</span>
<div *ngIf="type == 'organization'" [attr.uk-tooptip]="getEntityName(type)">
<span class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
<organization-title [organization]="entity"></organization-title>
</div>
<div *ngIf="type == 'context'">
<span class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
<h6 class="uk-h6 uk-margin-remove">
<span class="uk-text-truncate" uk-tooltip="Concept">{{entity.title}}</span>
</h6>
</div>
`
})
export class ClaimEntityFormatter {
@Input() entity: ClaimDBResult | ClaimDBContext | ClaimDBProject;
@Input() entity: ClaimDBResult | ClaimDBContext | ClaimDBProject | ClaimDBOrganization;
@Input() type: string;
@Input() properties: EnvProperties;
@Input() externalPortalUrl: string = null;
@Input() source: boolean = true;
@Input() linkAvailable: boolean = true;
public openAIREEntities = OpenaireEntities;
constructor() {
}
ngOnInit() {
public getEntityName(entityType:string) {
return StringUtils.getEntityName(entityType);
}
}

View File

@ -5,18 +5,19 @@ import { RouterModule } from '@angular/router';
import {ProjectTitleFormatter} from './projectTitleFormatter.component';
import {PublicationTitleFormatter} from './publicationTitleFormatter.component';
import {ClaimEntityFormatter} from './claimEntityFormatter.component';
import {OrganizationTitleFormatterComponent} from "./organizationTitleFormatter.component";
@NgModule({
imports: [
CommonModule, RouterModule
],
declarations: [
ProjectTitleFormatter, PublicationTitleFormatter, ClaimEntityFormatter
ProjectTitleFormatter, PublicationTitleFormatter, ClaimEntityFormatter, OrganizationTitleFormatterComponent
],
providers: [ ],
exports: [
ProjectTitleFormatter, PublicationTitleFormatter, ClaimEntityFormatter
ProjectTitleFormatter, PublicationTitleFormatter, ClaimEntityFormatter, OrganizationTitleFormatterComponent
]
})

View File

@ -0,0 +1,18 @@
import {Component, Input} from '@angular/core';
@Component({
selector: 'organization-title',
template: `
<h6 *ngIf="organization" class="uk-margin-remove multi-line-ellipsis lines-2">
<p class="uk-margin-remove">
{{(organization.shortName ? ('[' + organization.shortName + '] ') : '')}}{{organization.name}}
</p>
</h6>
`
})
export class OrganizationTitleFormatterComponent {
@Input() organization: any;
public url: string;
}

View File

@ -7,24 +7,26 @@ import {properties} from "../../../../../environments/environment";
@Component({
selector: 'project-title',
template: `
<span *ngIf="externalPortalUrl" class="project-title uk-text-large">
<span><a
[href]="externalPortalUrl + projectUrl + '?projectId='+project['openaireId']">{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}</a></span>
</span>
<span *ngIf="!externalPortalUrl" class="project-title uk-text-large">
<span><a [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])"
routerLinkActive="router-link-active"
[routerLink]="projectUrl">{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}} </a></span>
</span>
<span *ngIf="project['funderName']">
<span class="uk-text-muted title"> Funder: </span>{{project['funderName']}}
<ng-container>
<h6 class="uk-margin-remove multi-line-ellipsis lines-2">
<p class="uk-margin-remove">
<a *ngIf="externalPortalUrl" [href]="externalPortalUrl + projectUrl + '?projectId='+project['openaireId']" class="uk-link uk-link-heading" [class.uk-disabled]="project.name == 'unidentified'">
{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}
</a>
<a *ngIf="!externalPortalUrl" [routerLink]="projectUrl" [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])" class="uk-link uk-link-heading" [class.uk-disabled]="project.name == 'unidentified'">
{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}
</a>
</p>
</h6>
</ng-container>
<span *ngIf="project['funderName']" class="uk-margin-small-top">
<span class="uk-text-meta">Funder: </span>{{project['funderName']}}
</span>
`
})
export class ProjectTitleFormatter {
@Input() project: string[];
@Input() project: any;
@Input() searchLink: string;
@Input() externalPortalUrl: string = null;
public url: string;

View File

@ -6,41 +6,23 @@ import {RouterHelper} from '../../../utils/routerHelper.class';
@Component({
selector: 'publication-title',
template: `
<span *ngIf="!externalPortalUrl" class="publication-title uk-text-large">
<span *ngIf="entity.openaireId"><a [queryParams]="routerHelper.createQueryParam(param,entity.openaireId)" routerLinkActive="router-link-active"
[routerLink]="path"> {{entity.title?entity.title:"[No title available]"}}</a></span>
<!--span *ngIf="url" class="uk-margin-small-left" ><a target="_blank" href="{{url}}" >
(<span class="custom-external custom-icon" ></span>link)</a></span-->
</span>
<span *ngIf="externalPortalUrl" class="publication-title uk-text-large">
<span *ngIf="entity.openaireId"><a [href]="externalPortalUrl + path+'?'+param+'='+entity.openaireId"> {{entity.title}}</a></span>
</span>
<!-- <div *ngIf="entity.accessRights || entity.bestLicense">-->
<!-- <span class="uk-text-muted">Access mode </span>{{entity.accessRights}} {{entity.bestLicense}}-->
<!-- <span class=" " *ngIf="entity.accessRights == 'EMBARGO' && entity.embargoEndDate"> {{entity.embargoEndDate}}</span>-->
<!-- </div>-->
<ng-container *ngIf="entity.openaireId">
<h6 class="uk-margin-remove multi-line-ellipsis lines-2">
<p class="uk-margin-remove">
<a *ngIf="!externalPortalUrl" [queryParams]="routerHelper.createQueryParam(param,entity.openaireId)"
[routerLink]="path" class="uk-link uk-link-heading" [class.uk-disabled]="!linkAvailable">{{entity.title?entity.title:"[No title available]"}}</a>
<a *ngIf="externalPortalUrl" [href]="externalPortalUrl + path+'?'+param+'='+entity.openaireId" class="uk-link uk-link-heading custom-external" [class.uk-disabled]="!linkAvailable">{{entity.title?entity.title:"[No title available]"}}</a>
</p>
</h6>
</ng-container>
`
})
export class PublicationTitleFormatter {
// @Input() title: string;
// @Input() url: string;
// @Input() id: string;
@Input() param: string;
@Input() path: string;
@Input() entity: any;
@Input() externalPortalUrl: string = null;
@Input() linkAvailable: boolean = true;
public routerHelper: RouterHelper = new RouterHelper();
constructor() {
}
ngOnInit() {
}
}

View File

@ -10,44 +10,45 @@ export class ClaimsService {
}
private getClaimRequest(size : number, page : number, url :string, fromCache:boolean):any {
return this.http.get(url, CustomOptions.getAuthOptions());
return this.http.get(url, CustomOptions.getAuthOptionsWithBody());
}
getClaims( size : number, page : number, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string):any {
let url = apiUrl +"claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+"&"+types;
getClaims( size : number, page : number, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string, mine:boolean):any {
let url = apiUrl +"claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types) + (mine?"&mine=true":"") + (mine?"&mine=true":"");
return this.getClaimRequest(size,page,url,true);
}
getClaimsByUser( size : number, page : number, user:string, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string):any {
//console.info('ClaimsService: getClaims for user : '+user);
let url = apiUrl +"users/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+"&"+types;
let url = apiUrl +"users/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types);
return this.getClaimRequest(size,page,url,false);
}
getClaimsBycontext( size : number, page : number, contextId:string, keyword:string, sortby: string, descending: boolean, types: string , apiUrl:string):any {
getClaimsBycontext( size : number, page : number, contextId:string, keyword:string, sortby: string, descending: boolean, types: string , apiUrl:string, mine:boolean):any {
//console.info('ClaimsService: getClaims for context : '+contextId);
let url = apiUrl +"contexts/"+contextId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+"&"+types;
let url = apiUrl +"contexts/"+contextId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types);
return this.getClaimRequest(size,page,url,true);
}
getClaimsByResult( size : number, page : number, resultId:string, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string ):any {
//console.info('ClaimsService: getClaims for entity : '+resultId);
let url = apiUrl +"results/"+resultId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+"&"+types;
let url = apiUrl +"results/"+resultId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types);
return this.getClaimRequest(size,page,url,true);
}
getClaimsByProject( size : number, page : number, projectId:string, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string ):any {
//console.info('ClaimsService: getClaims for project : '+projectId);
let url = apiUrl +"projects/"+projectId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+"&"+types;
let url = apiUrl +"projects/"+projectId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types);
return this.getClaimRequest(size,page,url,true);
}
getClaimsByOrganization( size : number, page : number, organizationId:string, keyword:string, sortby: string, descending: boolean, types: string, apiUrl:string, mine:boolean):any {
let url = apiUrl +"organizations/"+organizationId+"/claims"+"?offset="+(size*(page-1) + "&limit="+size)+"&keyword="+keyword+"&sortby="+sortby+"&descending="+descending+(types.length>0?"&"+types:types) + (mine?"&mine=true":"");
return this.getClaimRequest(size,page,url,true);
}
deleteClaimById(claimId:string , apiUrl:string):any{
//console.warn('Trying to delete claim with id : '+claimId);
let url = apiUrl +"claims/"+claimId;
// let headers = new Headers({ 'Content-Type': 'application/json' });
// let options = new RequestOptions({ headers: headers });
return this.http.delete( url, CustomOptions.getAuthOptionsWithBody())//.map(request => <any> request.json())
// .do(request => console.info("After delete" ))
.pipe(catchError(this.handleError));
}
@ -61,10 +62,7 @@ export class ClaimsService {
}
url= apiUrl +"claims/bulk?"+url;
// let headers = new Headers({ 'Content-Type': 'application/json' });
// let options = new RequestOptions({ headers: headers });
return this.http.delete( url, CustomOptions.getAuthOptions())//.map(request => <any> request.json())
// .do(request => console.info("After delete" ))
return this.http.delete( url, CustomOptions.getAuthOptionsWithBody())//.map(request => <any> request.json())
.pipe(catchError(this.handleError));
}
@ -72,40 +70,27 @@ export class ClaimsService {
// console.warn('Trying toinsert claims : '+claims);
let url = apiUrl +"claims/bulk";
let body = JSON.stringify( claims );
//console.warn('Json body: : '+body);
// let headers = new Headers({ 'Content-Type': 'application/json' });
// let options = new RequestOptions({ headers: headers });
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody())
//.map(res => res.json())
//.do(request => console.info("Insert Response:"+request.status) )
.pipe(catchError(this.handleError));
}
insertClaim(claim, apiUrl:string):any{
//console.warn('Trying toinsert claim : '+claim);
let url = apiUrl +"claims";
let body = JSON.stringify( claim );
// let headers = new Headers({ 'Content-Type': 'application/json' });
// let options = new RequestOptions({ headers: headers });
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody())
//.map(res => res.json())
//.do(request => console.info("Insert Response:"+request.status) )
.pipe(catchError(this.handleError));
}
insertDirectRecords(records, apiUrl:string):any{
//console.warn('Trying to feedrecords : '+records);
let url = apiUrl +"feed/bulk";
let body = JSON.stringify( records );
//console.warn('Json body: : '+body);
// let headers = new Headers({ 'Content-Type': 'application/json' });
// let options = new RequestOptions({ headers: headers });
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody())
//.map(res => res.json())
//.do(request => console.info("Insert Response:"+request) )
.pipe(catchError(this.handleError));
}
getStatus(jobId, apiUrl:string):any{
let url = apiUrl +"jobStatus/" + jobId;
return this.http.get(url,CustomOptions.getAuthOptionsWithBody())
.pipe(catchError(this.handleError));
}
private handleError (error: Response) {
// in a real world app, we may send the error to some remote logging infrastructure
// instead of just logging it to the console
@ -113,22 +98,4 @@ export class ClaimsService {
return observableThrowError(error || 'Server error');
}
// getClaim(id:string, apiUrl:string):any {
// let url = apiUrl+"claims/"+id;
// return new Promise((resolve, reject) => {
// this.http.get(url)
// //.map(res => res.json())
// .subscribe(
// data => {
// resolve(data['data']);
// },
// err => {
// reject(err);
// }
// )
// ;
// });
// }
}

View File

@ -7,7 +7,7 @@ import {properties} from "../../../../../environments/environment";
@Injectable({ providedIn: 'root' })
export class ContextsService {
private communitiesSubject: BehaviorSubject<any> = new BehaviorSubject(null);
private promise: Promise<any>;
private promise: Promise<void>;
private sub: Subscription = null;
constructor(private http: HttpClient=null ) {
@ -34,7 +34,7 @@ export class ContextsService {
public initCommunities() {
let url = properties.contextsAPI + 's/';
this.promise = new Promise<any>((resolve => {
this.promise = new Promise<void>((resolve => {
this.sub = this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => this.parseCommunities(res, true) ))
.subscribe(

View File

@ -2,8 +2,10 @@ import {throwError as observableThrowError} from 'rxjs';
import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {ClaimEntity, ClaimResult} from '../claimHelper.class';
import {map} from "rxjs/operators";
import {map, timeout} from "rxjs/operators";
import {EnvProperties} from "../../../utils/properties/env-properties";
import {properties} from "../../../../../environments/environment";
import {StringUtils} from "../../../utils/string-utils.class";
@Injectable()
export class SearchCrossrefService {
@ -20,7 +22,9 @@ export class SearchCrossrefService {
}
searchCrossrefByDOIs(DOIs: string[], properties: EnvProperties, parse: boolean = false): any {
searchCrossrefByDOIs(DOIs: string[], properties: EnvProperties, parse: boolean = false, file: boolean = false): any {
let timeoutTime: number = properties.environment == "production" ? 6000 : 12000;
// let timeoutTimeForFile: number = 60000;
var doisParams = "";
for (var i = 0; i < DOIs.length; i++) {
@ -28,11 +32,21 @@ export class SearchCrossrefService {
}
let url = properties.searchCrossrefAPIURL + '?filter=' + doisParams;
return this.http.get(url)
//.map(request => <any> request.json().message)
.pipe(map(request => request['message']))
.pipe(map(request => [request["total-results"], parse ? this.parse(request['items']) : request]))
//.catch(this.handleError);
// .pipe(timeout(file ? timeoutTimeForFile : (timeoutTime)))
.pipe(timeout(timeoutTime))
.pipe(map(request => request['message']))
.pipe(map(request => [request["total-results"], parse ? this.parse(request['items']) : request]))
}
searchCrossrefByDOI(DOI: string): any {
let timeoutTimeForFile: number = 20000;
let url = properties.searchCrossrefAPIURL + '/' + StringUtils.URIEncode(DOI);
return this.http.get(url)
.pipe(timeout(timeoutTimeForFile))
.pipe(map(request => request['message']))
.pipe(map(request => this.parse(request)))
}
searchCrossrefByMultipleDOIs(dois: string[], properties: EnvProperties, parse: boolean = false): any {
let url = properties.searchCrossrefAPIURL + '?filter=doi:';
for (var i = 0; i < dois.length; i++) {
@ -56,8 +70,11 @@ export class SearchCrossrefService {
parse(response): ClaimEntity[] {
const results: ClaimEntity[] = [];
for (let i = 0; i < response.length; i++) {
const item = response[i];
let length = Array.isArray(response) ? response.length : 1;
for (let i = 0; i < length; i++) {
const item = Array.isArray(response) ? response[i] : response;
const entity: ClaimEntity = new ClaimEntity();
entity.result = new ClaimResult();
entity.result.publisher = null;

View File

@ -3,7 +3,7 @@ import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {EnvProperties} from '../../../utils/properties/env-properties';
import {ClaimEntity, ClaimResult} from '../claimHelper.class';
import {catchError, map} from 'rxjs/operators';
import {catchError, map, timeout} from 'rxjs/operators';
import {properties} from "../../../../../environments/environment";
@ -21,10 +21,14 @@ export class SearchDataciteService {
//.catch(this.handleError);
}
getDataciteResultByDOI(doi: string, properties: EnvProperties, parse: boolean = false): any {
getDataciteResultByDOI(doi: string, properties: EnvProperties, parse: boolean = false, file: boolean = false): any {
let timeoutTime: number = properties.environment == "production" ? 6000 : 12000;
let timeoutTimeForFile: number = 20000;
let url = properties.searchDataciteAPIURL + '/' + doi;
let key = url;
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(timeout(file ? timeoutTimeForFile : (timeoutTime)))
.pipe(map(request => (parse ? SearchDataciteService.parse([request["data"]])[0] : request)), catchError(err => of(null)));
}
@ -46,7 +50,6 @@ export class SearchDataciteService {
static parse(response): ClaimEntity[] {
const results: ClaimEntity[] = [];
console.log(response);
for (let i = 0; i < response.length; i++) {
const item = response[i];
const entity: ClaimEntity = new ClaimEntity();
@ -55,22 +58,20 @@ export class SearchDataciteService {
entity.result.journal = null;
entity.result.DOI = item.attributes.doi;
entity.id = item.attributes.doi;
entity.title = item.attributes.title;
entity.title = Array.isArray(item.attributes.titles) && item.attributes.titles[0].title?item.attributes.titles[0].title:null;
entity.result.url = properties.doiURL + item.attributes.doi;
entity.result.source = 'datacite';
entity.type = 'dataset';
entity.result.date = item.attributes.published;
entity.result.date = item.attributes.publicationYear;
entity.result.accessRights = "OPEN";
entity.result.publisher = item.attributes['container-title'];
entity.result.publisher = item.attributes['publisher'];
entity.result.journal = null;
entity.result.record = item;
if (item.attributes.author) {
if (item.attributes.creators) {
entity.result.authors = [];
for (let j = 0; j < item.attributes.author.length; j++) {
const author = item.attributes.author[j];
if(author.family || author.literal) {
entity.result.authors.push((author.family) ? author.family + (author.given ? ', ' + author.given : '') : author.literal);
}
for (let j = 0; j < item.attributes.creators.length; j++) {
const author = item.attributes.creators[j].name;
entity.result.authors.push(author);
}
}
results.push(entity);

View File

@ -21,14 +21,38 @@ export class SearchOrcidService {
let url = properties.searchOrcidURL + term + '/record';
return this.http.get(url, { headers: headers })
//.map(res => res.json()['person'])
.pipe(map(res => res['person']))
.pipe(map(res => [res['name']['given-names'],
res['name']['family-name'],
res['name']]))
.pipe(map(res => SearchOrcidService.parseOrcidAuthor(res, authorIds, authors, addId)));
}
//.map(res => res.json()['person'])
.pipe(map(res => res['person']))
.pipe(map(res => [res['name']['given-names'],
res['name']['family-name'],
res['name'], res['name']['institution-name']]))
.pipe(map(res => SearchOrcidService.parseOrcidAuthor(res, authorIds, authors, addId)));
}
searchOrcidSingleAuthor(term: string, properties: EnvProperties, addId): any {
//var headers = new Headers();
//headers.append('Accept', 'application/orcid+json');
let headers = new HttpHeaders({'Accept': 'application/orcid+json'});
let url ="https://pub.orcid.org/v3.0/expanded-search/?q=orcid:" + term + '&start=0&rows=50';
return this.http.get(url, {headers: headers})
.pipe(map(res => res['expanded-result']))
.pipe(map(res => {
if(res) {
for (let auth_result of res) {
const author = {};
author['id'] = auth_result['orcid-id'];
author['authorGivenName'] = auth_result['given-names'];
author['authorFamilyName'] = auth_result['family-names'];
author['institutions'] = auth_result['institution-name'];
return author;
}
}
return null;
}));
}
searchOrcidAuthors(term: string,
properties: EnvProperties): any {
@ -45,17 +69,46 @@ export class SearchOrcidService {
}
searchOrcidAuthorsNew(term: string,
properties: EnvProperties, size = 10): any {
let headers = new HttpHeaders({'Accept': 'application/orcid+json'});
// let url = properties.searchOrcidURL+'search?defType=edismax&q='+term+'&qf=given-name^1.0+family-name^2.0+other-names^1.0+credit-name^1.0&start=0&rows=10';
let url = /*properties.searchOrcidURL +*/ 'https://pub.orcid.org/v3.0/expanded-search?q=' + StringUtils.URIEncode('{!edismax qf="given-and-family-names^50.0 family-name^10.0 given-names^10.0 credit-name^10.0 other-names^5.0 text^1.0" pf="given-and-family-names^50.0" bq="current-institution-affiliation-name:[* TO *]^100.0 past-institution-affiliation-name:[* TO *]^70" mm=1}') + term + '&start=0&rows=' + size;
// given-and-family-names^50.0 family-name^10.0 given-names^10.0 credit-name^10.0 other-names^5.0 text^1.0" pf="given-and-family-names^50.0" bq="current-institution-affiliation-name:[* TO *]^100.0 past-institution-affiliation-name:[* TO *]^70" mm=1}
// https://pub.orcid.org/v3.0/expanded-search/?q=%7B!edismax%20qf%3D%22given-and-family-names%5E50.0%20family-name%5E10.0%20given-names%5E10.0%20credit-name%5E10.0%20other-names%5E5.0%20text%5E1.0%22%20pf%3D%22given-and-family-names%5E50.0%22%20bq%3D%22current-institution-affiliation-name%3A%5B*%20TO%20*%5D%5E100.0%20past-institution-affiliation-name%3A%5B*%20TO%20*%5D%5E70%22%20mm%3D1%7Dpaolo%20manghi&start=0&rows=50
//q={!edismax qf="given-and-family-names^50.0 family-name^10.0 given-names^5.0 credit-name^10.0 other-names^5.0 text^1.0" pf="given-and-family-names^50.0" mm=1}alessia bardi&start=0&rows=10
let key = url;
return this.http.get(url, {headers: headers})
.pipe(map(res => res['expanded-result']))
.pipe(map(res => {
let authors = [];
if(res) {
for (let auth_result of res) {
const author = {};
author['id'] = auth_result['orcid-id'];
author['authorGivenName'] = auth_result['given-names'];
author['authorFamilyName'] = auth_result['family-names'];
author['institutions'] = auth_result['institution-name'];
authors.push(author);
}
}
return authors;
}));
}
searchOrcidPublications(id: string, properties: EnvProperties, parse: boolean = false): any {
let headers = new HttpHeaders({'Accept': 'application/orcid+json'});
let url = properties.searchOrcidURL + id + '/works';
return this.http.get(url, { headers: headers })
.pipe(map(res => res['group']))
.pipe(map(request => (parse ? SearchOrcidService.parse(id, request) : request)));
}
return this.http.get(url, { headers: headers })
.pipe(map(res => res['group']))
.pipe(map(request => (parse ? SearchOrcidService.parse(id, request) : request)));
}
static parseOrcidAuthor(data: any, authorIds: string[], authors, addId): any {
console.log(data)
if (data[2] != null) {
if (addId) {
authorIds.push(data[2].path);
@ -72,7 +125,12 @@ export class SearchOrcidService {
} else {
author['authorFamilyName'] = "";
}
if (data[3] != null) {
author['institution'] = data[3];
}
console.log(author['institution'])
authors.push(author);
return true;
}
return false;

View File

@ -1,9 +1,7 @@
import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import {SearchZenodoCommunitiesService} from './searchZenodoCommunities.service';
import {SearchOrcidService} from "./searchOrcid.service";
@NgModule({
@ -13,9 +11,9 @@ import {SearchZenodoCommunitiesService} from './searchZenodoCommunities.service'
declarations: [
],
providers:[
SearchZenodoCommunitiesService
SearchOrcidService
],
exports: [
]
})
export class SearchZenodoCommunitiesServiceModule { }
export class SearchOrcidServiceModule { }

View File

@ -1,5 +1,5 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module';
import { SharedModule } from '../../../openaireLibrary/shared/shared.module';
import { CommonModule } from '@angular/common';
import {StartOverComponent} from './startOver.component';
import {AlertModalModule} from '../../utils/modal/alertModal.module';

View File

@ -10,18 +10,17 @@ import {Subscriber} from "rxjs";
@Component({
selector: 'claims-admin',
template: `
<div id="tm-main" [class]="((isConnect)?'':'uk-section') +' uk-padding-remove-top tm-middle'">
<div [class.uk-section]="!isConnect">
<div uk-grid class="uk-margin-small-top">
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first">
<div [class.uk-container]="!isConnect" [class.uk-container-large]="!isConnect">
<div *ngIf="!isConnect" class="uk-article-title custom-article-title">
<h1 *ngIf="!isConnect" class="uk-h2">
Manage links
</div>
</h1>
<div>
<displayClaims *ngIf="user" [user]="user" [enableDelete]=true [myClaims]=false
[isAdmin]=true [fetchBy]="(fetchId=='openaire')?null:fetchBy"
[fetchId]="(fetchId=='openaire')?null:fetchId"
[fetchId]="(fetchId=='openaire')?null:fetchId" [actions]="isConnect"
[communityId]="(fetchBy && fetchBy == 'Context' && fetchId && fetchId!='openaire')?fetchId:null"
[externalPortalUrl]=externalPortalUrl [claimsInfoURL]=claimsInfoURL
pageTitle="Manage links"></displayClaims>
@ -30,9 +29,7 @@ import {Subscriber} from "rxjs";
</div>
</div>
</div>
`,
})
export class ClaimsAdminComponent {
@Input() fetchBy: string;
@ -40,7 +37,6 @@ export class ClaimsAdminComponent {
@Input() isConnect: boolean = false;
@Input() externalPortalUrl: string;
@Input() claimsInfoURL: string;
@Input() userInfoURL: string;
public user: User = null;
sub;

View File

@ -1,11 +1,8 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module';
import { SharedModule } from '../../../openaireLibrary/shared/shared.module';
import { ClaimsAdminComponent } from './claimsAdmin.component';
import {DisplayClaimsModule} from '../claim-utils/displayClaims/displayClaims.module';
import { AdminLoginGuard} from'../../login/adminLoginGuard.guard';
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
@NgModule({
imports: [
@ -13,7 +10,7 @@ import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
DisplayClaimsModule
],
providers:[AdminLoginGuard, PreviousRouteRecorder,IsRouteEnabled],
providers:[],
declarations: [
ClaimsAdminComponent
],

View File

@ -18,26 +18,12 @@ export class ClaimsByTokenService {
let key = url;
return this.http.get(url, CustomOptions.getAuthOptions());
//.map(res => <any> res.text())
//.map(request => <any> request.json());
return this.http.get(url, CustomOptions.getAuthOptionsWithBody());
}
/*
getClaims(email: string, token: string, user_token: string):any {
let url = OpenaireProperties.getClaimsAPIURL(); // What else?
let body = JSON.stringify( {"email": email, "token": token} );
console.warn('Json body: : '+body);
let headers = new Headers({ 'Content-Type': 'application/json' });
let options = new RequestOptions({ headers: headers });
return this.http.post(url, body, options)
.map(res => res.json())
.do(request => console.info("Insert Response:"+request.status) )
.catch(this.handleError);
}
*/
updateClaimsCuration( selectedRight: Set<string>, selectedWrong: Set<string>, apiURL:string) {
let url = apiURL + "curate/bulk";

View File

@ -1,6 +1,6 @@
<linking-generic *ngIf="validInput" [localStoragePrefix]="localStoragePrefix" [results]="results" [sources]="sources"
[communityId]="communityId" [inlineEntity]="inlineEntity" [showOptions]="showOptions"
[piwikSiteId]="piwikSiteId" pageTitle="Direct Linking">
pageTitle="Direct Linking" [claimsProperties]="claimsProperties">
</linking-generic>
<div *ngIf="validInput== false" id="tm-main" class=" uk-section uk-padding-remove-top tm-middle">

View File

@ -1,13 +1,17 @@
import {Component, Input, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {EnvProperties} from '../../utils/properties/env-properties';
import {ClaimEntity, ClaimProject, ShowOptions} from '../claim-utils/claimHelper.class';
import {ClaimEntity, ClaimOrganization, ClaimProject, ShowOptions} from '../claim-utils/claimHelper.class';
import {EntitiesSearchService} from '../../utils/entitiesAutoComplete/entitySearch.service';
import {SearchResearchResultsService} from '../../services/searchResearchResults.service';
import {LinkingGenericComponent} from "../linking/linkingGeneric.component";
import {ClaimResultSearchFormComponent} from "../claim-utils/claimResultSearchForm.component";
import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
import {OpenaireEntities} from "../../utils/properties/searchFields";
import {StringUtils} from "../../utils/string-utils.class";
import {ClaimProjectsSearchFormComponent} from "../claim-utils/claimProjectSearchForm.component";
import {ClaimsProperties} from "../claim-utils/claims.properties";
@Component({
@ -15,26 +19,26 @@ import {properties} from "../../../../environments/environment";
templateUrl: 'directLinking.component.html'
})
export class DirectLinkingComponent {
@Input() piwikSiteId = null;
@ViewChild(LinkingGenericComponent) linking: LinkingGenericComponent;
results: ClaimEntity[] = [];
// linkType: string = "project"; // link type (selected in home page) : project, context, software, etc
/* url Parameters for inline linking */
id: string = null; //entity id
@Input() id: string = null; //entity id
type: string = null; // entity type (publication or dataset)
// linkTo: string = null; // entity type (project or context or entity)
// linkToEntities: string[] = [];
showOptions:ShowOptions = new ShowOptions();
validEntityTypes = ["dataset", "publication", "software", "orp", "project", "context"];
validEntityTypes = ["dataset", "publication", "software", "other", "project", "context", "organization"];
sources: ClaimEntity[] = [];
inlineEntity: ClaimEntity = null;
validInput: boolean = null;//'true;
properties: EnvProperties;
@Input() communityId: string = null;
localStoragePrefix: string = "";
@Input() organizationClaim: boolean = false;
@Input() claimsProperties:ClaimsProperties = new ClaimsProperties();
constructor(private _router: Router, private route: ActivatedRoute,private entitySearch:EntitiesSearchService,
private _searchResearchResultsService: SearchResearchResultsService) {}
subscriptions = [];
@ -47,20 +51,21 @@ export class DirectLinkingComponent {
}
ngOnInit() {
this.properties = properties;
/* if(!this.claimsProperties){
this.claimsProperties = new ClaimsProperties();
}*/
this.subscriptions.push(this.route.queryParams.subscribe(params => {
this.id = params['id'];
this.type = params['type'];
this.showOptions.linkTo = params['linkTo'];
if(this.organizationClaim){
this.type = "organization";
this.showOptions.linkTo = "result";
}else {
this.id = params['id'];
this.type = params['type'];
this.showOptions.linkTo = params['linkTo'];
}
if (this.type != null && this.showOptions.linkTo != null) {
this.type = (this.validEntityTypes.indexOf(this.type) != -1) ? this.type : 'publication';
this.showOptions.linkTo = (this.validEntityTypes.indexOf(this.showOptions.linkTo) != -1 || this.showOptions.linkTo == "result") ? this.showOptions.linkTo : 'project';
// this.show = (this.linkTo != "entity") ? "claim" : "entity";
// this.linkType = this.linkTo;
// let isInlineResult: boolean = false; // is a link entity - entity
// if ((this.type == "publication" || this.type == "dataset" || this.type == "software") && ((this.linkTo == "publication" || this.linkTo == "dataset" || this.linkTo == "software" || this.linkTo == "orp") || this.linkTo == "entity")) {
// isInlineResult = true;
// }
this.localStoragePrefix = (this.communityId ? (this.communityId + "_") : '') + this.type.substr(0, 3) + "_" + this.showOptions.linkTo.substr(0, 3) + "_";
if (localStorage.getItem(this.localStoragePrefix + "results")) {
@ -73,20 +78,22 @@ export class DirectLinkingComponent {
if (this.type == "project") {
// this.linkType = "project";
this.getProjectById(this.id);
} else if (this.type == "organization") {
this.getOrganizationById(this.id);
} else if (this.type == "publication") {
this.getResearchResultById("publication", this.id);
} else if (this.type == "dataset") {
this.getResearchResultById("dataset", this.id);
} else if (this.type == "software") {
this.getResearchResultById("software", this.id);
} else if (this.type == "orp") {
} else if (this.type == "other") {
this.getResearchResultById("other", this.id);
} else {
this.validInput = this.isValidInput(null);
}
//set which entities it is allowed to link to.
// add first the
if(this.type == "project"){
if(this.type == "project" || this.type == "organization"){
this.showOptions.linkToEntities = ["result"];
this.showOptions.linkTo = "result";
}else{
@ -100,24 +107,27 @@ export class DirectLinkingComponent {
this.showOptions.linkToEntities = ["result","project","context" ];
}
}
} else {
this.validInput = this.isValidInput(null);
}
} else {
this.validInput = this.isValidInput(null);
}));
}
}));
}
isValidInput(result: ClaimEntity) {
if (result == null) {
return false;
} else if (this.type == "project" && this.showOptions.linkTo != "result") {
} else if (this.type == "organization" && !this.claimsProperties.ALLOW_ORGANIZATION_LINKING) {
return false;
} else if (["dataset", "publication", "software", "orp"].indexOf(this.type) != -1 && (["project", "context", "result"].indexOf(this.showOptions.linkTo) == -1)) {
} else if ((this.type == "project" || this.type == "organization") && this.showOptions.linkTo != "result") {
return false;
} else if (["project", "dataset", "publication", "software", "orp"].indexOf(this.type) == -1) {
} else if (["dataset", "publication", "software", "other"].indexOf(this.type) != -1 && (["project", "context", "result"].indexOf(this.showOptions.linkTo) == -1)) {
return false;
} else if (["project", "dataset", "publication", "software", "other", "organization"].indexOf(this.type) == -1) {
return false;
} else {
return true;
@ -135,6 +145,17 @@ export class DirectLinkingComponent {
this.handleError("Error getting project by id: " + id, err);
}));
}
getOrganizationById(id: string) {
this.subscriptions.push(this.entitySearch.fetchByType(id,"organization", this.properties).subscribe(
data => {
this.createClaimEntity(data, "organization");
},
err => {
this.validInput = this.isValidInput(null);
//console.log("An error occured")
this.handleError("Error getting project by id: " + id, err);
}));
}
getResearchResultById(resultType: string, id: string) {
this.subscriptions.push(this._searchResearchResultsService.searchById(resultType, id, this.properties).subscribe(data => {
@ -143,7 +164,7 @@ export class DirectLinkingComponent {
err => {
this.validInput = this.isValidInput(null);
//console.log("An error occured")
this.handleError("Error getting "+this.getEntityName(resultType, false, true)+" by id: " + id, err);
this.handleError("Error getting "+this.getEntityName(resultType, false)+" by id: " + id, err);
}));
}
@ -156,16 +177,28 @@ export class DirectLinkingComponent {
entity.type = "project";
entity.title = project.projectName;
entity.project = new ClaimProject();
entity.project.url = properties.searchLinkToProject + entity.id;
entity.project.acronym = project.projectAcronym;
entity.project.code = project.code;
entity.project.endDate = project.endDate;
entity.project.funderId = project.funderId;
entity.project.funderShortname = project.funderShortName?project.funderShortName:(entity.project.funderId.split("::")[1]);
entity.project.funderName = project.funderName;
entity.project.fundingLevel0 = project.fundingLevel0;
entity.project.jurisdiction = project.jurisdiction;
entity.project.startDate = project.startDate;
this.inlineEntity = entity;
}else{
}else if(type =="organization"){
let organization = data[0];
let entity:ClaimEntity = new ClaimEntity();
entity.id = organization.id;
entity.type = "organization";
entity.title = organization.label;
entity.organization = new ClaimOrganization();
// entity.organization.url = properties.searchLinkToOrganization + entity.id;
entity.organization.name = organization.label;
this.inlineEntity = entity;
}else{
results = ClaimResultSearchFormComponent.openaire2ClaimResults(data, this.properties);
}
@ -179,15 +212,7 @@ export class DirectLinkingComponent {
console.error("Direct Linking Page: " + message, error);
}
private getEntityName (entityType:string, plural:boolean, full:boolean): string {
if(entityType == "publication") {
return "publication" + (plural ? "s" : "");
} else if(entityType == "dataset") {
return (full ? "research data" : ("dataset" + (plural ? "s" : "")));
} else if(entityType == "software") {
return "software";
} else if(entityType == "other") {
return (full ? ("other research product" + (plural ? "s" : "")) : "other");
}
private getEntityName (entityType:string, plural:boolean) {
return StringUtils.getEntityName(entityType, plural);
}
}

View File

@ -1,13 +1,10 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module';
import { SharedModule } from '../../../openaireLibrary/shared/shared.module';
import { DirectLinkingComponent } from './directLinking.component';
import {EntitySearchServiceModule} from '../../utils/entitiesAutoComplete/entitySearchService.module';
import {SearchResearchResultsServiceModule} from '../../services/searchResearchResultsService.module';
import {LoginGuard} from'../../login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
import {LinkingGenericModule} from '../linking/linkingGeneric.module';
@ -18,7 +15,7 @@ import {LinkingGenericModule} from '../linking/linkingGeneric.module';
EntitySearchServiceModule, SearchResearchResultsServiceModule,
Schema2jsonldModule, SEOServiceModule, LinkingGenericModule
],
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
providers:[],
declarations: [
DirectLinkingComponent
], exports:[DirectLinkingComponent]

View File

@ -21,15 +21,17 @@ declare var UIkit: any;
<div>
<!--div class="uk-text-lead">Upload a DOI csv file <helper div="link-result-bulk" tooltip=true ></helper></div>
<label for="exampleInputFile">Select a file: </label-->
<div class="js-upload" uk-form-custom>
<input id="exampleInputFile" class="uk-width-medium" type="file" (change)="fileChangeEvent($event)"/>
<span class="uk-link " style="text-decoration: underline;">Upload a DOI's CSV file </span>
<div class="uk-float-left">
<span class="js-upload" uk-form-custom>
<input id="exampleInputFile" class="uk-width-medium" type="file" (change)="fileChangeEvent($event)"/>
<span class="uk-link " style="text-decoration: underline;">Upload a DOI's CSV file </span>
</span>
<!--button class="uk-button portal-button" type="button" tabindex="-1" [class.disabled]="!enableUpload" ><span class="uk-margin-small-right uk-icon" >
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <polyline fill="none" stroke="#000" points="5 8 9.5 3.5 14 8 "></polyline> <rect x="3" y="17" width="13" height="1"></rect>
<line fill="none" stroke="#000" x1="9.5" y1="15" x2="9.5" y2="4"></line></svg></span> Select</button-->
<!--helper div="link-result-bulk" tooltip=true ></helper-->
<span class=" " title="{{tooltip}}" uk-tooltip><span class="uk-icon" uk-icon="icon: info; ratio: 0.8">&nbsp; </span> </span>
</div>
<span class=" " title="{{tooltip}}" uk-tooltip><span class="uk-icon" uk-icon="icon: info; ratio: 0.8">&nbsp; </span> </span>
<div *ngIf="showReport" uk-alert class="uk-alert-primary">
<a class="uk-alert-close" uk-close></a>
<div>Uploaded file contains <span
@ -107,17 +109,16 @@ export class BulkClaimComponent {
exceedsLimit = false;
@Input() basketLimit ;
tooltip = `
<div class="uk-padding-small uk-padding-remove-right uk-padding-remove-left">
<div >
<div><span class="uk-text-bold">CSV format:</span> <br>&quot;DOI&quot;,&quot;ACCESS_MODE&quot;,&quot;DATE&quot;</div>
<br>
<div class=" uk-text-small">
<div>- DOI is required</div>
<div>- Access mode: <br> OPEN, CLOSED, EMBARGO</div>
<div>- Embargo end date:<br> YYYY-MM-DD </div>
</div>
<div>
<div class="uk-margin-bottom">Up to 100 DOIs</div>
<div><span class="uk-text-bold">CSV format:</span> <br>&quot;DOI&quot;,&quot;ACCESS_MODE&quot;,&quot;DATE&quot;</div>
<br>
<div class="uk-text-small">
<div>- DOI is required</div>
<div>- Access mode: <br> OPEN, CLOSED, EMBARGO</div>
<div>- Embargo end date:<br> YYYY-MM-DD </div>
</div>
</div>`;
</div>`;
constructor(private _searchCrossrefService: SearchCrossrefService, private _searchDataciteService: SearchDataciteService) {
this.filesToUpload = [];
}
@ -226,7 +227,7 @@ export class BulkClaimComponent {
}
makeFileRequest(url: string, params: Array<string>, files: Array<File>) {
return new Promise((resolve, reject) => {
return new Promise<void>((resolve, reject) => {
const formData: any = new FormData();
const xhr = new XMLHttpRequest();
for (let i = 0; i < files.length; i++) {
@ -247,11 +248,12 @@ export class BulkClaimComponent {
}
fetchResult(id: string, accessMode: string, date: string, row: number) {
this.subscriptions.push(this._searchCrossrefService.searchCrossrefByDOIs([id], this.properties, true).subscribe(
// this.subscriptions.push(this._searchCrossrefService.searchCrossrefByDOIs([id], this.properties, true, true).subscribe(
this.subscriptions.push(this._searchCrossrefService.searchCrossrefByDOI(id).subscribe(
data => {
const result:ClaimEntity = data[1][0];
if (data[1].length > 0) {
if (data.length > 0) {
const result:ClaimEntity = data[0];
this.foundIds.push(id);
result.result.accessRights = accessMode;
result.result.embargoEndDate = date;
@ -267,11 +269,16 @@ export class BulkClaimComponent {
}
},
err => {
//console.log(err);
// console.log(err);
BulkClaimComponent.handleError("Error getting crossref by DOIs: " + id, err);
this.notFoundIds.push(id);
this.notFoundIdsRow.push(row);
this.endOfFetching();
if(err.status == 404) {
this.searchInDatacite(id, accessMode, date, row);
} else {
this.notFoundIds.push(id);
this.notFoundIdsRow.push(row);
this.endOfFetching();
}
}
));
}

View File

@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../../shared/shared.module';
import { SharedModule } from '../../../../openaireLibrary/shared/shared.module';
import {LoadingModalModule} from '../../../utils/modal/loadingModal.module';
import {BulkClaimComponent} from './bulkClaim.component';
import {SearchCrossrefServiceModule} from '../../claim-utils/service/searchCrossrefService.module';

View File

@ -14,46 +14,53 @@ import {
Message
} from "../../claim-utils/claimHelper.class";
import {UserManagementService} from "../../../services/user-management.service";
import {Subscriber} from "rxjs";
import {Subscriber, timer} from "rxjs";
import {map} from "rxjs/operators";
import {LogService} from "../../../utils/log/log.service";
@Component({
selector: 'claim-insert',
template: `
<div class="uk-width-1-1">
<modal-loading [message]="'Please wait...'"></modal-loading>
<modal-alert (alertOutput)="confirmClose()">
<h4 class="modal-title uk-text-bold " id="myModalLabel">Confirmation notice</h4>
<p>All the links you provided will be published in the OpenAIRE platform. <br>
Please make sure that the information is valid.<br>
<span class="uk-text-bold">In some cases, links take some time to be published.</span><br>
For more information please check the linking status in My-Links page.
</p>
<p>
Do you confirm the information you provide is valid?
</p>
</modal-alert>
<div class="uk-clearfix">
<div>
<div *ngIf="!claiming " (click)="insert()" style="width: 350px;"
[class]="getButtonClass()">CONFIRM LINKING
<span [class]="(defaultColors?'':' uk-margin-small-top ')+'uk-icon uk-float-right uk-text-bold uk-margin-small-right'">
<svg width="30" height="30" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
icon="chevron-right" ratio="1.5"><polyline fill="none" stroke="#000" stroke-width="1.03"
points="7 4 13 10 7 16"></polyline></svg>
</span>
</div>
</div>
</div>
<div (click)="insert()" class="uk-card-footer uk-flex uk-flex-center clickable"
[class.uk-tile-primary]="(results.length > 0 && (sources.length > 0 || inlineEntity))"
[class.uk-background-muted]="!(results.length > 0 && (sources.length > 0 || inlineEntity))"
[class.uk-disabled]="!(results.length > 0 && (sources.length > 0 || inlineEntity))">
<button class="uk-flex uk-flex-middle uk-button uk-button-text"
[class.uk-disabled]="!(results.length > 0 && (sources.length > 0 || inlineEntity))"
[disabled]="!(results.length > 0 && (sources.length > 0 || inlineEntity))">
<icon name="link" visuallyHidden="link" [flex]="true"></icon>
<div class="uk-width-expand uk-margin-small-left">CONFIRM LINKING</div>
</button>
</div>
<modal-loading [message]="'Please wait...'">
<div *ngIf="claimsJob">
<div *ngIf="claimsJob && claimsJob.insertedIds.length <1" class="uk-text-meta uk-text-small">
Initiating process....</div>
<div *ngIf="claimsJob && claimsJob.insertedIds.length >0" class="uk-text-meta uk-text-small">
{{claimsJob.insertedIds.length}} out of {{claims2Insert}} links created.</div>
<div *ngIf="feedRecordsJob && feedRecordsJob.insertedIds.length >0" class="uk-text-meta uk-text-small">
{{feedRecordsJob.insertedIds.length}} out of {{records2Insert}} records added in the index...</div>
<div *ngIf="claimsJob.status != 'COMPLETE'" class="uk-text-meta uk-text-small">
Please don't close the window, process is ongoing...</div>
</div>
</modal-loading>
<modal-alert (alertOutput)="confirmClose()">
<h4 class="modal-title uk-text-bold " id="myModalLabel">Confirmation notice</h4>
<p>All the links you provided will be published in the OpenAIRE platform. <br>
Please make sure that the information is valid.<br>
<span class="uk-text-bold">In some cases, links take some time to be published.</span><br>
For more information please check the linking status in My-Links page.
</p>
<p>
Do you confirm the information you provide is valid?
</p>
</modal-alert>
`
})
export class ClaimInsertComponent {
constructor(private claimService: ClaimsService, private _router: Router, private route: ActivatedRoute,
private userManagementService: UserManagementService) {
private userManagementService: UserManagementService, private _logService: LogService) {
}
subscriptions = [];
ngOnDestroy() {
@ -67,6 +74,32 @@ export class ClaimInsertComponent {
this.subscriptions.push(this.route.queryParams.subscribe(params => {
this.params = params;
}));
if(localStorage.getItem(this.localStoragePrefix + "claimsJob")){
this.claimsJob = JSON.parse(localStorage.getItem(this.localStoragePrefix + "claimsJob"));
this.feedRecordsJob = JSON.parse(localStorage.getItem(this.localStoragePrefix + "feedRecordsJob"));
if(this.claimsJob.status != "COMPLETE"){
this.claiming = true;
let loadingTimerSubscription = timer(0, 1000).pipe(
map(() => {
if(this.loading) {
this.loading.open();
loadingTimerSubscription.unsubscribe();
}
})
).subscribe();
this.subscriptions.push(loadingTimerSubscription);
let timerSubscription = timer(0, 10000).pipe(
map(() => {
this.getStatus(); // load data contains the http request
})
).subscribe();
this.subscriptions.push(timerSubscription);
}else{
this.claimsJob = null;
}
}
}
params = {};
@ -91,15 +124,16 @@ export class ClaimInsertComponent {
private errorInClaims: ClaimRecord2Insert[] = [];
private insertedRecords = [];
private errorInRecords = [];
public claimsJob;
public feedRecordsJob;
public claims2Insert;
public records2Insert
infoToLog = [];
public insert() {
this.confirmOpen();
this.confirmOpen();
}
saveAndNavigate(){
localStorage.setItem(this.localStoragePrefix + "results", JSON.stringify(this.results));
if (this.sources != null) {
localStorage.setItem(this.localStoragePrefix + "sources", JSON.stringify(this.sources));
}
this.saveLocalStorage();
this._router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
@ -113,6 +147,7 @@ export class ClaimInsertComponent {
this.errorInClaims = [];
this.insertedRecords = [];
this.errorInRecords = [];
this.infoToLog = [];
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
if (!user) {
this.saveAndNavigate();
@ -121,13 +156,14 @@ export class ClaimInsertComponent {
this.loading.open();
let claims: ClaimRecord2Insert[] = [];
let directclaims: DirectIndexRecord[] = [];
let idSuffix = (new Date()).getTime() + "";
let dashboard = this.properties.environment+"_"+this.properties.dashboard + (this.communityId?("_"+this.communityId):'');
for (let j = 0; j < this.sources.length; j++) { // if an external result -> direct insert in the index
const result: ClaimEntity = this.sources[j];
if (result.result && ["crossref", "datacite", "orcid"].indexOf(result.result.source) != -1) {
directclaims.push({
"id": result.id,
"record": ClaimInsertComponent.createDirectClaim(result, this.results)
"record": ClaimInsertComponent.createDirectClaim(result, this.results, idSuffix)
});
}
}
@ -138,12 +174,12 @@ export class ClaimInsertComponent {
if (this.sources.length > 0) {
directclaims.push({
"id": entity.id,
"record": ClaimInsertComponent.createDirectClaim(entity, this.sources)
"record": ClaimInsertComponent.createDirectClaim(entity, this.sources, idSuffix)
});
} else if (this.inlineEntity) {
} else if (this.inlineEntity && this.inlineEntity.type != "organization") {
directclaims.push({
"id": entity.id,
"record": ClaimInsertComponent.createDirectClaim(entity, [this.inlineEntity])
"record": ClaimInsertComponent.createDirectClaim(entity, [this.inlineEntity], idSuffix)
});
}
@ -152,28 +188,35 @@ export class ClaimInsertComponent {
for (let j = 0; j < this.sources.length; j++) {
const result: ClaimEntity = this.sources[j]; // this is a research result
if (entity.result) {
claims.push(ClaimInsertComponent.createResultClaim(result, entity, user.email, dashboard));
claims.push(ClaimInsertComponent.createResultClaim(result, entity, user.email, dashboard, idSuffix));
} else if (entity.context) {
claims.push(ClaimInsertComponent.createContextClaim(result, entity, user.email, dashboard));
claims.push(ClaimInsertComponent.createContextClaim(result, entity, user.email, dashboard, idSuffix));
} else if (entity.project) {
claims.push(ClaimInsertComponent.createProjectClaim(result, entity, user.email, dashboard));
claims.push(ClaimInsertComponent.createProjectClaim(result, entity, user.email, dashboard, idSuffix));
/* } else if (entity.organization) {
claims.push(ClaimInsertComponent.createOrganizationClaim(result, entity, user.email, dashboard, idSuffix));*/
}
this.infoToLog.push([ result.title?result.title: result.id, entity.title?entity.title:entity.id]);
}
if (this.inlineEntity) {
this.infoToLog.push([ this.inlineEntity.title?this.inlineEntity.title: this.inlineEntity.id, entity.title?entity.title:entity.id]);
if (this.inlineEntity.result) {
if (entity.result) {
claims.push(ClaimInsertComponent.createResultClaim(this.inlineEntity, entity, user.email, dashboard));
claims.push(ClaimInsertComponent.createResultClaim(this.inlineEntity, entity, user.email, dashboard, idSuffix));
} else if (entity.context) {
claims.push(ClaimInsertComponent.createContextClaim(this.inlineEntity, entity, user.email, dashboard));
claims.push(ClaimInsertComponent.createContextClaim(this.inlineEntity, entity, user.email, dashboard, idSuffix));
} else if (entity.project) {
claims.push(ClaimInsertComponent.createProjectClaim(this.inlineEntity, entity, user.email, dashboard));
claims.push(ClaimInsertComponent.createProjectClaim(this.inlineEntity, entity, user.email, dashboard, idSuffix));
}
} else if (this.inlineEntity.project) {
if (entity.result) {
claims.push(ClaimInsertComponent.createProjectClaim(entity, this.inlineEntity, user.email, dashboard));
claims.push(ClaimInsertComponent.createProjectClaim(entity, this.inlineEntity, user.email, dashboard, idSuffix));
}
} else if (this.inlineEntity.organization) {
if (entity.result) {
claims.push(ClaimInsertComponent.createOrganizationClaim(entity, this.inlineEntity, user.email, dashboard, idSuffix));
}
}
}
@ -184,12 +227,15 @@ export class ClaimInsertComponent {
//first call direct index service - when call is done (success or error) call isertBulkClaims method to insert claims in DB
// console.log("directclaims");
// console.log(directclaims);
if (directclaims.length > 0 && this.properties.environment != "development"){
if (directclaims.length > 0/* && this.properties.environment != "development"*/){
this.subscriptions.push(this.claimService.insertDirectRecords(directclaims, this.properties.claimsAPIURL).subscribe(
data => {
this.insertedRecords = data.insertedIds;
this.errorInRecords = data.errorInClaims;
this.feedRecordsJob = data.data;
this.records2Insert = directclaims.length;
console.log(data);
// this.insertedRecords = data.insertedIds;
//
// this.errorInRecords = data.errorInClaims;
this.isertBulkClaims(claims);
},
err => {
@ -197,12 +243,12 @@ export class ClaimInsertComponent {
if (err.code && err.code == 403) {
this.saveAndNavigate();
}
if (err.insertedIds && err.insertedIds.length > 0) {
/* if (err.insertedIds && err.insertedIds.length > 0) {
this.insertedRecords = err.insertedIds;
}
if (err.errorInClaims && err.errorInClaims.length > 0) {
this.errorInRecords = err.errorInClaims;
}
}*/
this.isertBulkClaims(claims);
ClaimInsertComponent.handleError("Error inserting direct records: " + JSON.stringify(directclaims), err);
@ -216,30 +262,24 @@ export class ClaimInsertComponent {
}
private isertBulkClaims(claims: ClaimRecord2Insert[]) {
console.log("claims");
console.log(claims);
this.errors.splice(0, this.errors.length);
this.subscriptions.push(this.claimService.insertBulkClaims(claims, this.properties.claimsAPIURL).subscribe(
data => {
this.insertedClaims = data.insertedIds;
this.errorInClaims = data.errorInClaims;
//TODO remove - testing having errors in claims
// this.insertedClaims.pop();
// this.insertedClaims.pop();
// this.errorInClaims.push(claims[1]);
// this.insertedClaims.splice(0,this.insertedClaims.length);
// this.errorInClaims = claims;
//remove till here
if (claims.length != this.insertedClaims.length) {
let error: ClaimsErrorMessage = new ClaimsErrorMessage();
error.type = "claimServiceFail2Insert";
error.inserted = this.insertedClaims.length;
error.failed = this.errorInClaims.length;
this.createErrorMessagesPerEntity((this.insertedClaims.length == 0));
this.errors.push(error);
this.claims2Insert = claims.length;
this.claimsJob = data.data;
if(this.properties.logServiceUrl) {
for(let info of this.infoToLog) {
this.subscriptions.push(this._logService.logLink(this.properties, info[0],info[1]).subscribe(res => {
}));
}
}
this.afterclaimsInsertion();
this.saveLocalStorage();
let timerSubscription = timer(0, 10000).pipe(
map(() => {
this.getStatus(); // load data contains the http request
})
).subscribe();
this.subscriptions.push(timerSubscription);
},
err => {
err = err && err.error?err.error:err;
@ -342,19 +382,27 @@ export class ClaimInsertComponent {
}
private afterclaimsInsertion() {
this.loading.close();
this.claiming = false;
this.loading.close();
if (this.errorInClaims.length == 0 && this.insertedClaims.length > 0) {
localStorage.removeItem(this.localStoragePrefix + "sources");
localStorage.removeItem(this.localStoragePrefix + "results");
this._router.navigate(['/myclaims'], {queryParams: this.params});
localStorage.removeItem(this.localStoragePrefix + "claimsJob");
localStorage.removeItem(this.localStoragePrefix + "feedRecordsJob");
if(this.properties.myClaimsLink && this.properties.myClaimsLink.indexOf(".") == -1) {
this._router.navigate([this.properties.myClaimsLink], {queryParams: this.params});
}else if(this.properties.myClaimsLink && this.properties.myClaimsLink.indexOf(".") != -1) {
this._router.navigate([this.properties.myClaimsLink], {relativeTo: this.route});
}else{
this._router.navigate(["/"]);
}
}
}
private static createContextClaim(resultEntity: ClaimEntity, contextEntity: ClaimEntity, user: any, dashboard:string): ClaimRecord2Insert {
private static createContextClaim(resultEntity: ClaimEntity, contextEntity: ClaimEntity, user: any, dashboard:string, idSuffix:string): ClaimRecord2Insert {
return {
claimedBy: user,
sourceId: contextEntity.context.concept.id,
@ -367,11 +415,12 @@ export class ClaimInsertComponent {
targetCollectedFrom: resultEntity.result.source,
targetAccessRights: resultEntity.result.accessRights,
targetEmbargoEndDate: ClaimInsertComponent.getEmbargoEndDate(resultEntity),
claimedInDashboard : dashboard
claimedInDashboard : dashboard,
idSuffix : idSuffix
};
}
private static createProjectClaim(resultEntity: ClaimEntity, projectEntity: ClaimEntity, user: any, dashboard:string): ClaimRecord2Insert {
private static createProjectClaim(resultEntity: ClaimEntity, projectEntity: ClaimEntity, user: any, dashboard:string, idSuffix:string): ClaimRecord2Insert {
return {
claimedBy: user,
sourceId: projectEntity.id,
@ -384,11 +433,29 @@ export class ClaimInsertComponent {
targetCollectedFrom: resultEntity.result.source,
targetAccessRights: resultEntity.result.accessRights,
targetEmbargoEndDate: ClaimInsertComponent.getEmbargoEndDate(resultEntity),
claimedInDashboard : dashboard
claimedInDashboard : dashboard,
idSuffix : idSuffix
};
}
private static createOrganizationClaim(resultEntity: ClaimEntity, organizationEntity: ClaimEntity, user: any, dashboard:string, idSuffix:string): ClaimRecord2Insert {
return {
claimedBy: user,
sourceId: organizationEntity.id,
sourceType: "organization",
sourceCollectedFrom: "openaire",
sourceAccessRights: "OPEN",
sourceEmbargoEndDate: "",
targetId: resultEntity.id,
targetType: resultEntity.type,
targetCollectedFrom: resultEntity.result.source,
targetAccessRights: resultEntity.result.accessRights,
targetEmbargoEndDate: ClaimInsertComponent.getEmbargoEndDate(resultEntity),
claimedInDashboard : dashboard,
idSuffix : idSuffix
};
}
private static createResultClaim(inlineResult: ClaimEntity, resultEntity: ClaimEntity, user: string, dashboard:string): ClaimRecord2Insert {
private static createResultClaim(inlineResult: ClaimEntity, resultEntity: ClaimEntity, user: string, dashboard:string, idSuffix:string): ClaimRecord2Insert {
return {
claimedBy: user,
@ -402,7 +469,9 @@ export class ClaimInsertComponent {
targetCollectedFrom: inlineResult.result.source,
targetAccessRights: inlineResult.result.accessRights,
targetEmbargoEndDate: ClaimInsertComponent.getEmbargoEndDate(inlineResult),
claimedInDashboard : dashboard
claimedInDashboard : dashboard,
idSuffix : idSuffix
};
}
@ -412,12 +481,13 @@ export class ClaimInsertComponent {
}
return ""
}
static createDirectClaim(resultEntity: ClaimEntity, results: ClaimEntity[]) {
static createOpenAIREId(id, idSuffix:string):string {
return id.indexOf( "::" ) == -1 ? ("userclaim___::" + Md5.hashStr(id + idSuffix)):id;
}
static createDirectClaim(resultEntity: ClaimEntity, results: ClaimEntity[], idSuffix:string) {
let entity = {};
const md5_id = Md5.hashStr(resultEntity.id);
entity["originalId"] = "userclaim___::" + md5_id;
entity["openaireId"] = "userclaim___::" + md5_id;
entity["originalId"] = this.createOpenAIREId(resultEntity.id, idSuffix);
entity["openaireId"] = this.createOpenAIREId(resultEntity.id, idSuffix);
entity["title"] = resultEntity.title;
entity["title"] = (Array.isArray(resultEntity.title) && resultEntity.title.length > 0) ? resultEntity.title[0] : resultEntity.title;
@ -466,7 +536,7 @@ export class ClaimInsertComponent {
entity["linksToProjects"] = [];
}
let project: ClaimEntity = results[i];
entity["linksToProjects"].push("info:eu-repo/grantAgreement/" + project.project.funderName + "/" + project.project.fundingLevel0 + "/" + project.project.code + "/" + project.project.jurisdiction + "/" + project.title + "/" + project.project.acronym);
entity["linksToProjects"].push("info:eu-repo/grantAgreement/" + project.project.funderShortname + "/" + project.project.fundingLevel0 + "/" + project.project.code + "/" + project.project.jurisdiction + "/" + project.title + "/" + project.project.acronym);
} else if (results[i].context) {
@ -524,10 +594,77 @@ export class ClaimInsertComponent {
}
if(this.defaultColors){
buttonClass+=" linksbaskettitles uk-padding-small ";
}else{
buttonClass+=" uk-button uk-button-large ";
}
return buttonClass + "uk-text-center ";
}
getStatus(){
if(this.feedRecordsJob && ! (this.feedRecordsJob.status == "COMPLETE" || this.feedRecordsJob.status == "ERROR") ) {
this.subscriptions.push(this.claimService.getStatus(this.feedRecordsJob.id, this.properties.claimsAPIURL).subscribe(data => {
this.feedRecordsJob = data.data;
// console.log("feed", this.feedRecordsJob.status);
if (this.feedRecordsJob.status == "COMPLETE" || data.data.status == "ERROR") {
this.insertedRecords = this.feedRecordsJob.insertedIds;
this.errorInRecords = this.feedRecordsJob.errorInClaims;
}
}, err => {
let error: ClaimsErrorMessage = new ClaimsErrorMessage();
error.type = "jobError";
this.createErrorMessagesPerEntity((this.insertedClaims.length == 0));
this.errors.push(error);
this.afterclaimsInsertion();
this.feedRecordsJob = null;
localStorage.removeItem(this.localStoragePrefix + "feedRecordsJob");
}
));
}
if(this.claimsJob) {
this.subscriptions.push(this.claimService.getStatus(this.claimsJob.id, this.properties.claimsAPIURL).subscribe(data => {
this.claimsJob = data.data;
// console.log("claim: ", this.claimsJob.status, this.feedRecordsJob.status?this.feedRecordsJob.status:" no feed job");
if ((this.claimsJob.status == "COMPLETE" || data.data.status == "ERROR") && ( !this.feedRecordsJob || (this.feedRecordsJob.status == "COMPLETE" || data.data.status == "ERROR")) ) {
this.insertedClaims = this.claimsJob.insertedIds;
this.errorInClaims = this.claimsJob.errorInClaims;
if (this.claims2Insert != this.insertedClaims.length) {
let error: ClaimsErrorMessage = new ClaimsErrorMessage();
error.type = "claimServiceFail2Insert";
error.inserted = this.insertedClaims.length;
error.failed = this.errorInClaims.length;
this.createErrorMessagesPerEntity((this.insertedClaims.length == 0));
this.errors.push(error);
}
this.afterclaimsInsertion();
}
}, err => {
let error: ClaimsErrorMessage = new ClaimsErrorMessage();
error.type = "jobError";
this.createErrorMessagesPerEntity((this.insertedClaims.length == 0));
this.errors.push(error);
this.afterclaimsInsertion();
this.claimsJob = null;
localStorage.removeItem(this.localStoragePrefix + "claimsJob");
}
));
}
}
saveLocalStorage(){
if (this.results != null) {
localStorage.setItem(this.localStoragePrefix + "results", JSON.stringify(this.results));
}
if (this.sources != null) {
localStorage.setItem(this.localStoragePrefix + "sources", JSON.stringify(this.sources));
}
if (this.claimsJob != null) {
localStorage.setItem(this.localStoragePrefix + "claimsJob", JSON.stringify(this.claimsJob));
}
if (this.feedRecordsJob != null) {
localStorage.setItem(this.localStoragePrefix + "feedRecordsJob", JSON.stringify(this.feedRecordsJob));
}
}
}

View File

@ -1,14 +1,16 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../../shared/shared.module';
import { SharedModule } from '../../../../openaireLibrary/shared/shared.module';
import {AlertModalModule} from '../../../utils/modal/alertModal.module';
import {LoadingModalModule} from '../../../utils/modal/loadingModal.module';
import {ClaimInsertComponent} from './insertClaim.component';
import {ClaimServiceModule} from '../../claim-utils/service/claimsService.module';
import {IconsModule} from "../../../utils/icons/icons.module";
import {LogServiceModule} from "../../../utils/log/LogService.module";
@NgModule({
imports: [
SharedModule, AlertModalModule, LoadingModalModule, ClaimServiceModule
SharedModule, AlertModalModule, LoadingModalModule, ClaimServiceModule, IconsModule, LogServiceModule
],
declarations: [ClaimInsertComponent],
exports:[ ClaimInsertComponent]

View File

@ -1,353 +1,263 @@
<metadata-preview *ngIf="showOptions.show=='claim' && properties" class="uk-margin-top"
[results]="results" [sources]="sources"
[localStoragePrefix]="localStoragePrefix" [inlineEntity]="inlineEntity"
[showOptions]="showOptions" [properties]=properties [pageContents]="pageContents"
[defaultColors]="(communityId?false:true)" [communityId]="communityId"
>
</metadata-preview>
<div id="tm-main" class="uk-section uk-padding-remove-top tm-middle" *ngIf="showOptions.show != 'claim'">
<div class="uk-grid">
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<schema2jsonld *ngIf="url" [URL]="url" name="Link your research outcomes" type="other"></schema2jsonld>
<div [class]="((showOptions.show == 'claim')?'':' uk-margin-top ')+' uk-container uk-container-large '">
<div>
<!-- <div class="uk-width-1-1">
<helper position="top"></helper>
</div> -->
<div class="uk-grid helper-grid">
<!-- <helper position="left" styleName=" uk-width-1-5 uk-padding-left"></helper>-->
<div class="uk-width-expand">
<ng-template #destinations_basket>
<div *ngIf="(results.length)> 0 || showOptions.show=='result'" class="uk-padding-small uk-padding-remove-horizontal" style="min-height: 17px;">
<start-over *ngIf=" (results.length)> 0"
[results]="results" [localStoragePrefix]="localStoragePrefix+'results'"
message="all results (projects, communities, research results)"
class="uk-float-right"></start-over>
<bulk-claim *ngIf="showOptions.show=='result'" [results]="results" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'"
[basketLimit]="basketLimit"></bulk-claim>
</div>
<div class="uk-padding-small uk-padding-remove-horizontal">
<div *ngIf="results.length >= basketLimit "
class="uk-alert uk-alert-warning uk-text-center">
Basket reached the size limit. No more entities can be added.
</div>
<claim-selected-results sectionTitle="Selected Results" [results]="results"
[localStoragePrefix]="localStoragePrefix+'results'" type="target">
</claim-selected-results>
<div *ngIf="(results.length) == 0 " class=" uk-text-center">
No entities to link with the sources. Start adding entities from the left panel.
</div>
<div *ngIf="properties" class="uk-section uk-section-default white-box-with-border uk-padding-small uk-padding-remove-top">
</div>
</ng-template>
<div style=""
[class]="((showOptions.show == 'claim')?'':' uk-margin-top ')+' uk-container uk-container-large '">
<div id="basketStickTop"></div>
<div class="uk-grid" *ngIf="showOptions.show!='claim'" >
<div class="uk-width-2-3">
<div class="uk-margin-small-bottom">
<!-- <div *ngIf="showOptions.show!='source' && showOptions.show != 'claim' && showOptions.linkToEntities.length > 1">-->
<!-- <mat-form-field class="matSelectionFormField">-->
<!-- <mat-label>Sort by:</mat-label>-->
<!-- <mat-select [(ngModel)]="showOptions.show" class="uk-width-auto uk-text-bold matSelection"-->
<!-- *ngIf="showOptions.linkToEntities.length > 1"-->
<!-- [disableOptionCentering]="true"-->
<!-- panelClass="matSelectionPanel">-->
<!-- <mat-option *ngIf="showOptions.linkToEntities.indexOf('project')!=-1 "-->
<!-- value="project">PROJECTS</mat-option>-->
<!-- <mat-option *ngIf="showOptions.linkToEntities.indexOf('result')!=-1 " value="result">RESEARCH-->
<!-- RESULTS</mat-option>-->
<!-- <mat-option *ngIf="showOptions.linkToEntities.indexOf('context')!=-1 " value="context">COMMUNITIES-->
<!-- </mat-option>-->
<!-- </mat-select>-->
<!-- </mat-form-field>-->
<!-- </div>-->
<span *ngIf="showOptions.show!='source' && showOptions.show != 'claim' && showOptions.linkToEntities.length > 1"
class="uk-flex-inline uk-flex-middle uk-width-3-5@m uk-width-1-1@s">
<span class="uk-width-1-4 uk-text-muted uk-text-large">LINK TO </span>
<mat-select [(ngModel)]="showOptions.show" class="uk-width-3-4@m matSelection"
*ngIf="showOptions.linkToEntities.length > 1"
[disableOptionCentering]="true"
panelClass="matSelectionPanel">
<mat-option *ngIf="showOptions.linkToEntities.indexOf('project')!=-1 "
value="project">PROJECTS</mat-option>
<mat-option *ngIf="showOptions.linkToEntities.indexOf('result')!=-1 " value="result">RESEARCH
RESULTS</mat-option>
<mat-option *ngIf="showOptions.linkToEntities.indexOf('context')!=-1 " value="context">COMMUNITIES
</mat-option>
</mat-select>
</span>
<span *ngIf="showOptions.show!='source' && showOptions.show != 'claim' && showOptions.linkToEntities.length ==1">
<span>LINK TO </span>
<span class=" uk-width-auto uk-text-bold">
<span *ngIf="showOptions.linkToEntities.indexOf('project')!=-1 "
value="project">PROJECTS</span>
<span *ngIf="showOptions.linkToEntities.indexOf('result')!=-1 " value="result">RESEARCH
RESULTS</span>
<span *ngIf="showOptions.linkToEntities.indexOf('context')!=-1 " value="context">COMMUNITIES
</span>
</span>
</span>
<span *ngIf="showOptions.show=='source'" class="uk-text-bold">
ADD LINKING SOURCES
</span>
</div>
<div *ngIf="showOptions.show=='source'">
<claim-result-search-form [selectedResults]="sources" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'sources'" [basketLimit]="basketLimit"
></claim-result-search-form>
</div>
<div *ngIf="showOptions.show=='project'">
<claim-projects-search-form [selectedProjects]="results" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'" [basketLimit]="basketLimit"
></claim-projects-search-form>
</div>
<div *ngIf="showOptions.show=='context'">
<claim-contexts-search-form [communityId]=communityId [results]="results" [sources]="sources"
[properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'" [basketLimit]="basketLimit"
></claim-contexts-search-form>
</div>
<div *ngIf="showOptions.show=='result'">
<claim-result-search-form [selectedResults]="results" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'" [basketLimit]="basketLimit"
></claim-result-search-form>
</div>
</div>
<!-- Basket-->
<div *ngIf="showOptions.show != 'claim'" class="uk-width-1-3" style="" >
<div id="basket" uk-sticky=" offset: 130; top:#basketStickTop; bottom: #basketStickBottom;"
style="z-index: 0">
<h6 class="linksbasketheader uk-margin-bottom uk-text-bold">
LINKS BASKET
</h6>
<div class="linksbasket uk-inline uk-width-1-1" style="">
<div *ngIf="inlineEntity == null">
<div class="linksbaskettitles uk-padding-small uk-animation-toggle"
(click)="showOptions.showBasketSources()"
[style.cursor]="(showOptions.show!='source'?'pointer':'default')">
<div class="uk-h6 uk-margin-remove portal-color" >
SOURCES ({{(sources.length) | number}})
<span *ngIf="showOptions.show!='source' && !showOptions.basketShowSources"
class="uk-icon"><svg width="20"
height="20"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
icon="chevron-left"
ratio="1"><polyline
fill="none" stroke="#000" stroke-width="1.03" points="13 16 7 10 13 4"></polyline></svg></span>
<span *ngIf="showOptions.show!='source' && showOptions.basketShowSources"
class="uk-icon"><svg width="20"
height="20"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
icon="chevron-down"
ratio="1"><polyline
fill="none" stroke="#000" stroke-width="1.03" points="16 7 10 13 4 7"></polyline></svg></span>
</div>
Research results to link
<div class="linking uk-background-default">
<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 *ngIf="!inlineEntity" [breadcrumbs]="breadcrumbs"></breadcrumbs>
<!-- [routerLink]="inlineEntity.result?.url.split('?')[0]"-->
<!-- [queryParams]="routerHelper.createQueryParam(inlineEntity.result?.url.split('?')[1].split('=')[0], inlineEntity.id)"-->
<a *ngIf="inlineEntity && inlineEntity.result"
(click)="back()"
class="uk-button uk-button-link uk-text-transform-none uk-flex uk-flex-middle">
<icon name="west" [flex]="true"></icon>
<span class="uk-margin-small-left">Back to {{getEntityName(inlineEntity.type, false)}}</span>
</a>
<a *ngIf="inlineEntity && inlineEntity.project"
[routerLink]="inlineEntity.project?.url?.split('?')[0]"
[queryParams]="routerHelper.createQueryParam(inlineEntity.project?.url.split('?')[1].split('=')[0], inlineEntity.id)"
class="uk-button uk-button-link uk-text-transform-none uk-flex uk-flex-middle">
<icon name="west" [flex]="true"></icon>
<span class="uk-margin-small-left">Back to {{getEntityName(inlineEntity.type, false)}}</span>
</a>
</div>
</div>
<div *ngIf="!inlineEntity" uk-sticky="offset: 65; end: #pageBottom; media: @m" class="uk-blur-background">
<div class="uk-section-xsmall">
<stepper>
<step [status]="stepStatus('source')" stepId="source" stepNumber="1"
[stepText]="'Find Sources'" (stepChanged)="stepHasChanged($event)"
[active]="this.showOptions.show" [showStepLine]="false"></step>
<step [status]="stepStatus('target')" stepId="target" [stepNumber]="2"
[stepText]="'Link Sources to Entities'"
(stepChanged)="stepHasChanged($event)" [active]="this.showOptions.show"
[showStepLine]="true"></step>
<step [status]="stepStatus('claim')" stepId="claim" [stepNumber]="3"
[stepText]="'Summarize and finish'"
(stepChanged)="stepHasChanged($event)" [active]="this.showOptions.show"
[showStepLine]="true"></step>
</stepper>
</div>
</div>
<div id="pageTop"></div>
<metadata-preview *ngIf="showOptions.show=='claim' && properties" class="uk-margin-top"
[results]="results" [sources]="sources"
[localStoragePrefix]="localStoragePrefix" [inlineEntity]="inlineEntity"
[showOptions]="showOptions" [properties]=properties [pageContents]="pageContents"
[defaultColors]="!communityId" [communityId]="communityId" [claimsProperties]="claimsProperties"
>
</metadata-preview>
<div id="tm-main" class="uk-section uk-padding-remove-top" *ngIf="showOptions.show != 'claim'">
<div>
<schema2jsonld *ngIf="url" [URL]="url" name="Link your {{openaireEntities.RESULTS}}" type="other"></schema2jsonld>
<div class="uk-container uk-container-large">
<div *ngIf="properties && claimsProperties" class="uk-section uk-padding-remove-top">
<div class="uk-container uk-container-large">
<div class="uk-grid basketContainer" *ngIf="showOptions.show!='claim'" uk-grid>
<div class="uk-width-2-3@m uk-position-z-index uk-flex-first@m uk-flex-last uk-margin-medium-top">
<h2 *ngIf="inlineEntity && claimsProperties.INLINE_ENTITY.show" class="uk-text-center">Link source to</h2>
<div *ngIf="inlineEntity && claimsProperties.INLINE_ENTITY.guideText" class="uk-text-center">{{claimsProperties.INLINE_ENTITY.guideText}}</div>
<div *ngIf="showOptions.show=='source'">
<claim-result-search-form [selectedResults]="sources" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'sources'"
[basketLimit]="basketLimit" [centerAlign]="!!inlineEntity"
></claim-result-search-form>
</div>
<div *ngIf="showOptions.show=='project'">
<claim-projects-search-form [selectedProjects]="results" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'"
[basketLimit]="basketLimit" [showOptions]="showOptions"
[centerAlign]="!!inlineEntity"
></claim-projects-search-form>
</div>
<div *ngIf="showOptions.show=='context'">
<claim-contexts-search-form [communityId]=communityId [results]="results" [sources]="sources"
[properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'"
[basketLimit]="basketLimit" [showOptions]="showOptions"
[centerAlign]="!!inlineEntity"
></claim-contexts-search-form>
</div>
<div *ngIf="showOptions.show=='result'">
<claim-result-search-form [selectedResults]="results" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'"
[basketLimit]="basketLimit" [showOptions]="showOptions"
[centerAlign]="!!inlineEntity"
></claim-result-search-form>
</div>
</div>
<!-- Basket-->
<div *ngIf="showOptions.show != 'claim'" class="uk-width-1-3@m uk-flex-last@m uk-flex-first uk-margin-medium-top">
<div id="basket" uk-sticky="offset: 220; end: !*; media: @m" style="z-index: 0!important;">
<div class="uk-card uk-card-default linkingBasket">
<div class="uk-card-body uk-padding-small">
<div>
<ng-container *ngIf="inlineEntity">
<div *ngIf="claimsProperties.INLINE_ENTITY.show" class="uk-margin-small-bottom">
<div class="uk-text-emphasis uk-text-bolder">{{claimsProperties.BASKET.source_title}}</div>
<claim-selected-results [results]="[inlineEntity]"
[localStoragePrefix]="localStoragePrefix+'sources'" class=""
[enableRemove]="false" type="source">
</claim-selected-results>
</div>
<div *ngIf="showOptions.basketShowSources"
class=" uk-margin-remove-top uk-height-medium uk-overflow-auto ">
<div class="uk-background-muted uk-padding-small " style="min-height: 17px;">
<div *ngIf="showOptions.show != 'source'" class="uk-text-center">
<a (click)="showOptions.showSource()">
<!--span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus" ratio="1"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg></span-->
Edit sources</a>
</div>
<start-over *ngIf="showOptions.show == 'source' && (sources.length)> 0"
[results]="sources"
[localStoragePrefix]="localStoragePrefix+'sources'"
message="all sources" class="uk-float-right"></start-over>
<bulk-claim *ngIf="showOptions.show == 'source'" [results]="sources"
[properties]=properties
[localStoragePrefix]="localStoragePrefix+'sources'" [basketLimit]="basketLimit"
>
</bulk-claim>
</div>
<div class="uk-animation-slide-top-small uk-padding-small">
<div *ngIf="(sources.length) == 0 " class="uk-alert no-selected-message uk-text-center">
No Sources added yet. Start adding sources from the left panel. Or upload a DOI's CSV file.
</div>
<div *ngIf="sources.length >= basketLimit "
class="uk-alert uk-alert-warning uk-text-center">
Basket reached the size limit. No more sources can be added.
</div>
<claim-selected-results [results]="sources"
[localStoragePrefix]="localStoragePrefix+'sources'" class=""
[enableRemove]="showOptions.show == 'source'">
</claim-selected-results>
<div id="test1"></div>
</div>
</div>
</div>
<div *ngIf="inlineEntity"
class="linkInlineEntity uk-padding-small">
<div class="uk-h6 linkInlineEntity uk-margin-small-bottom ">
SOURCE
</div>
<claim-title [entity]="inlineEntity" [slice]="true" [sliceSize]="45"
[shortVersion]="true"></claim-title>
<div *ngIf="claimsProperties.INLINE_ENTITY.show" class="uk-padding-small uk-padding-remove-horizontal"><hr class="uk-margin-remove"/></div>
<div class="uk-margin-small-top">
<span class="uk-label custom-label linkInlineEntityLabel"
title="Type">{{inlineEntity.type}}</span>
<span *ngIf="inlineEntity.project">
<span class="uk-label custom-label linkInlineEntityLabel"
title="Funder">{{inlineEntity.project.funderName}}</span>
<!-- <span class="uk-label custom-label " title="Type">{{inlineEntity.type}}</span>-->
</span>
<span *ngIf="inlineEntity.result">
<span class="uk-label custom-label linkInlineEntityLabel "
title="Access mode">{{inlineEntity.result.accessRights}}</span>
</span>
<div class="uk-text-emphasis uk-text-bolder">{{claimsProperties.BASKET.target_title}} <span *ngIf="results.length> 0">({{(results.length) | number}})</span></div>
<ng-container *ngTemplateOutlet="destinations_basket"></ng-container>
</div>
</ng-container>
</div>
<div *ngIf="showOptions.show !='source'">
<div class=" linksbaskettitles uk-padding-small uk-animation-toggle" (click)="showOptions.basketShowLinksTo=!showOptions.basketShowLinksTo;
showOptions.basketShowSources=!showOptions.basketShowLinksTo ">
<div *ngIf="!inlineEntity"> <!--Enable toggle -->
<span class="uk-h6 uk-margin-remove portal-color" >
LINK TO ({{(results.length) | number}})
<span *ngIf="!showOptions.basketShowLinksTo" class="uk-icon"><svg width="20"
height="20"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
icon="chevron-left"
ratio="1"><polyline
fill="none" stroke="#000" stroke-width="1.03"
points="13 16 7 10 13 4"></polyline></svg></span>
<span *ngIf="showOptions.basketShowLinksTo" class="uk-icon"><svg width="20"
height="20"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
icon="chevron-down"
ratio="1"><polyline
fill="none" stroke="#000" stroke-width="1.03"
points="16 7 10 13 4 7"></polyline></svg></span>
</span>
</div>
<div *ngIf="inlineEntity"> <!--Inline Entity - no toggle -->
<span class="uk-h6 uk-margin-remove portal-color">
LINK TO ({{(results.length) | number}})
</span>
</div>
<ng-container *ngIf="!inlineEntity">
<ul class="uk-tab" uk-tab>
<li [class.uk-active]="showOptions.basketShowSources"
(click)="showOptions.basketswitchToSources()">
<a>
Sources to link ({{(sources.length) |number}})
</a>
</li>
<li [class.uk-disabled]="sources.length == 0"
[class.uk-active]="showOptions.basketShowLinksTo">
<a (click)="showOptions.basketswitchToLinkTo()">Link to <span
*ngIf="results.length> 0">({{(results.length) | number}})</span>
</a>
</li>
</ul>
<div *ngIf="showOptions.basketShowSources">
<div class="uk-height-max-medium uk-overflow-auto uk-padding uk-padding-remove-left uk-padding-remove-vertical">
<div *ngIf="showOptions.show == 'source'" class="uk-padding-small uk-padding-remove-horizontal" style="min-height:17px;">
<start-over *ngIf="showOptions.show == 'source' && sources.length> 0"
[results]="sources"
[localStoragePrefix]="localStoragePrefix+'sources'"
message="all sources" class="uk-float-right"></start-over>
<bulk-claim *ngIf="showOptions.show == 'source'" [results]="sources"
[properties]=properties
[localStoragePrefix]="localStoragePrefix+'sources'" [basketLimit]="basketLimit"
>
</bulk-claim>
<div class="linksBasketSubtitles">
Entities to link with the sources
</div>
</div>
<div *ngIf="showOptions.basketShowLinksTo"
class="uk-height-medium uk-overflow-auto">
<div *ngIf=" (results.length)> 0 || showOptions.show=='result'"
class="uk-background-muted uk-padding-small " style="min-height: 17px;">
<start-over *ngIf=" (results.length)> 0"
[results]="results" [localStoragePrefix]="localStoragePrefix+'results'"
message="all results (projects, communities, research results)"
class="uk-float-right"></start-over>
<bulk-claim *ngIf="showOptions.show=='result'" [results]="results" [properties]=properties
[localStoragePrefix]="localStoragePrefix+'results'" [basketLimit]="basketLimit"></bulk-claim>
</div>
<div class="uk-padding-small uk-animation-slide-top-small">
<div *ngIf="results.length >= basketLimit "
class="uk-alert uk-alert-warning uk-text-center">
Basket reached the size limit. No more entities can be added.
</div>
<claim-selected-results sectionTitle="Selected Results" [results]="results"
[localStoragePrefix]="localStoragePrefix+'results'">
</claim-selected-results>
<div *ngIf="(results.length) == 0 " class="uk-alert no-selected-message uk-text-center">
No entities to link with the sources. Start adding entities from the left panel.
<div class="uk-padding-small uk-padding-remove-horizontal">
<div *ngIf="sources.length == 0" class="uk-text-center uk-text-meta">
No Sources added yet. Start adding sources from the left panel. Or upload a DOI's CSV file.
</div>
<div *ngIf="sources.length >= basketLimit " class="uk-alert uk-alert-warning uk-text-center">
Basket reached the size limit. No more sources can be added.
</div>
<claim-selected-results *ngIf="sources.length > 0" [results]="sources"
[localStoragePrefix]="localStoragePrefix+'sources'" class=""
[enableRemove]="true" type="source">
</claim-selected-results>
</div>
</div>
</div>
</div>
</div>
<div *ngIf="showOptions.show=='source'"
[class]="((sources.length)>0?'linksbaskettitlesPortalColor ':'uk-disabled')+ ' linksbaskettitles uk-padding-small'"
(click)="openSelectionModal(); ">
<!--show = linkTo; basketShowSources=false;
basketShowLinksTo=true;-->
<div class="uk-h6 uk-margin-remove portal-color">CONTINUE TO - LINK TO <span
*ngIf="results.length > 0">({{(results.length) | number}})</span>
<span class="uk-icon uk-float-right uk-text-bold uk-margin-small-right">
<svg width="30" height="30" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
icon="chevron-right" ratio="1.5"><polyline fill="none" stroke="#000" stroke-width="1.03"
points="7 4 13 10 7 16"></polyline></svg>
</span>
</div>
<div class="linksBasketSubtitles">
Entities to link with the sources
</div>
</div>
<div *ngIf="showOptions.show!='source'"
[class]="((results.length)>0?'linksbaskettitlesPortalColor ':'uk-disabled')+ ' linksbaskettitles uk-margin-small-top uk-padding-small'"
style="height:auto !important; " (click)="showOptions.show = 'claim'; scrollUp();">
<div class="uk-margin-remove portal-color uk-text-center">
FINISH LINKING
<span class="uk-icon uk-float-right uk-text-bold uk-margin-small-right">
<svg width="30" height="30" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
icon="chevron-right" ratio="1.5"><polyline fill="none" stroke="#000" stroke-width="1.03"
points="7 4 13 10 7 16"></polyline></svg>
</span>
</div>
<div *ngIf="showOptions.basketShowLinksTo">
<div class="uk-height-max-medium uk-overflow-auto uk-padding uk-padding-remove-left uk-padding-remove-vertical">
<ng-container *ngTemplateOutlet="destinations_basket"></ng-container>
</div>
</div>
</ng-container>
</div>
</div>
<div *ngIf="showOptions.show == 'source'"
class="uk-card-footer uk-flex uk-flex-center clickable"
[class.uk-tile-primary]="sources.length > 0"
[class.uk-background-muted]="sources.length == 0"
[class.uk-disabled]="sources.length == 0"
(click)="stepHasChanged('target')">
<button class="uk-flex uk-flex-middle uk-button uk-button-text"
[class.uk-disabled]="sources.length == 0" [disabled]="sources.length == 0">
<icon name="link" visuallyHidden="link" [flex]="true"></icon>
<div class="uk-width-expand uk-margin-small-left">STEP 2 - LINK SOURCES TO ENTITIES</div>
</button>
</div>
<div *ngIf="showOptions.show != 'source'"
class="uk-card-footer uk-flex uk-flex-center clickable"
[class.uk-tile-primary]="results.length > 0"
[class.uk-background-muted]="results.length == 0"
[class.uk-disabled]="results.length == 0" (click)="stepHasChanged('claim')">
<button class="uk-flex uk-flex-middle uk-button uk-button-text"
[class.uk-disabled]="results.length == 0" [disabled]="results.length == 0">
<icon *ngIf="inlineEntity" name="link" visuallyHidden="link" [flex]="true"></icon>
<div class="uk-width-expand uk-margin-small-left"><ng-container *ngIf="!inlineEntity">STEP {{inlineEntity ? '2' : '3'}} - </ng-container>SUMMARISE</div>
</button>
</div>
</div>
<div id="basketStickBottom"></div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
</div>
<!-- <helper position="right" styleName=" uk-width-1-5"></helper>-->
</div>
<!-- <helper position="bottom"></helper>-->
<!-- <helper position="right" styleName=" uk-width-1-5"></helper>-->
</div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']"></helper>
</div>
</div>
</div>
</div>
</div>
<div id="pageBottom"></div>
<modal-alert (alertOutput)="closeSelectionModal($event)">
<div class="uk-grid uk-text-center uk-padding uk-child-width-1-3">
<div *ngIf="showOptions.linkToEntities.indexOf('project')!=-1 " (click)="closeSelectionModal('project')" class="clickable">
<button class="uk-icon-button">
<span class="uk-icon">
<svg height="20" icon="album" ratio="1" viewBox="0 0 20 20" width="20"
xmlns="http://www.w3.org/2000/svg"><rect height="1" width="10" x="5" y="2"></rect><rect
height="1" width="14" x="3" y="4"></rect><rect fill="none" height="11" stroke="#000"
width="17" x="1.5"
y="6.5"></rect></svg></span>
</button>
<div>Projects</div>
</div>
<div *ngIf="showOptions.linkToEntities.indexOf('result')!=-1 " (click)="closeSelectionModal('result')"
class="clickable">
<button class="uk-icon-button">
<span class="uk-icon">
<svg height="20" icon="copy" ratio="1" viewBox="0 0 20 20" width="20"
xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="16" stroke="#000"
width="12" x="3.5" y="2.5"></rect><polyline
fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg>
</span>
</button>
<div>Research results</div>
</div>
<div *ngIf="showOptions.linkToEntities.indexOf('context')!=-1 " (click)="closeSelectionModal('context')"
class="clickable">
<button class="uk-icon-button">
<span class="uk-icon">
<svg height="20" icon="users" ratio="1" viewBox="0 0 20 20" width="20"
xmlns="http://www.w3.org/2000/svg"><circle cx="7.7" cy="8.6" fill="none" r="3.5"
stroke="#000" stroke-width="1.1"></circle><path
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3" fill="none"
stroke="#000" stroke-width="1.1"></path><path
d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"
fill="none" stroke="#000" stroke-width="1.1"></path></svg></span>
</button>
<div>Communities</div>
</div>
</div>
</modal-alert>
</div>
<modal-alert (alertOutput)="closeSelectionModal($event)" >
<div class="uk-grid uk-text-center uk-margin-expand uk-padding uk-child-width-1-3">
<div *ngIf="showOptions.linkToEntities.indexOf('project')!=-1 " (click)="closeSelectionModal('project')"
style="cursor:pointer;">
<button class="uk-icon-button portal-button">
<span class="uk-icon">
<svg height="20" icon="album" ratio="1" viewBox="0 0 20 20" width="20"
xmlns="http://www.w3.org/2000/svg"><rect height="1" width="10" x="5" y="2"></rect><rect
height="1" width="14" x="3" y="4"></rect><rect fill="none" height="11" stroke="#000"
width="17" x="1.5" y="6.5"></rect></svg></span>
</button>
<div>Projects</div>
</div>
<div *ngIf="showOptions.linkToEntities.indexOf('result')!=-1 " (click)="closeSelectionModal('result')"
style="cursor:pointer;">
<button class="uk-icon-button portal-button">
<span class="uk-icon">
<svg height="20" icon="copy" ratio="1" viewBox="0 0 20 20" width="20"
xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="16" stroke="#000"
width="12" x="3.5" y="2.5"></rect><polyline
fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg></span>
</button>
<div>Research results</div>
</div>
<div *ngIf="showOptions.linkToEntities.indexOf('context')!=-1 " (click)="closeSelectionModal('context')"
style="cursor:pointer;">
<button class="uk-icon-button portal-button">
<span class="uk-icon">
<svg height="20" icon="users" ratio="1" viewBox="0 0 20 20" width="20"
xmlns="http://www.w3.org/2000/svg"><circle cx="7.7" cy="8.6" fill="none" r="3.5"
stroke="#000" stroke-width="1.1"></circle><path
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3" fill="none"
stroke="#000" stroke-width="1.1"></path><path
d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"
fill="none" stroke="#000" stroke-width="1.1"></path></svg></span>
</button>
<div>Communities</div>
</div>
</div>
</modal-alert>

View File

@ -1,4 +1,4 @@
import {Component, Input, ViewChild} from '@angular/core';
import {ChangeDetectorRef, Component, Input, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {Meta, Title} from '@angular/platform-browser';
import {EnvProperties} from '../../utils/properties/env-properties';
@ -11,17 +11,21 @@ import {HelperService} from "../../utils/helper/helper.service";
import {PiwikService} from "../../utils/piwik/piwik.service";
import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
declare var UIkit:any;
import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
import {OpenaireEntities} from "../../utils/properties/searchFields";
import {StringUtils} from "../../utils/string-utils.class";
import {RouterHelper} from "../../utils/routerHelper.class";
import { Location } from '@angular/common';
import {LoginErrorCodes} from "../../login/utils/guardHelper.class";
import {UserManagementService} from "../../services/user-management.service";
import {ClaimsProperties} from "../claim-utils/claims.properties";
@Component({
selector: 'linking-generic',
templateUrl: 'linkingGeneric.component.html'
})
export class LinkingGenericComponent {
@Input() piwikSiteId = null;
@Input() pageTitle: string = " Create links between research objects";
@Input() pageTitle: string = "Create links between research objects";
piwiksub:any;
@Input() communityId:string= null;
@ -38,28 +42,43 @@ export class LinkingGenericComponent {
// show linkToEntities /values: result, project, context
@Input() sources:ClaimEntity[] =[];
properties:EnvProperties;
properties:EnvProperties = properties;
public openaireEntities = OpenaireEntities;
@Input() localStoragePrefix:string = "linking_";
url=null;
@ViewChild(AlertModal) alert;
public pageContents = null;
@Input() breadcrumbs: Breadcrumb[] = [];
public routerHelper: RouterHelper = new RouterHelper();
@Input() claimsProperties:ClaimsProperties = new ClaimsProperties();
constructor (private _router: Router, private route: ActivatedRoute, private entitySearch:EntitiesSearchService,
private _meta: Meta, private _title: Title, private _piwikService:PiwikService,
private seoService: SEOService, private helper: HelperService ) {
private seoService: SEOService, private helper: HelperService, private cdr: ChangeDetectorRef,
private location: Location, private userManagementService: UserManagementService) {
}
subscriptions = [];
ngOnInit() {
/* if(!this.claimsProperties){
this.claimsProperties = new ClaimsProperties();
}*/
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
if (!user) {
this.saveStateAndRedirectLogin();
}
}));
if(this.breadcrumbs.length === 0) {
this.breadcrumbs.push({name: 'home', route: '/'});
this.breadcrumbs.push({name: "Link", route: null});
}
this.showOptions.show = 'source';
this.showOptions.initSelectOptions(this.claimsProperties);
if(this.inlineEntity){
this.showOptions.basketShowSources = false;
this.showOptions.basketShowLinksTo = true;
this.showOptions.showLinkTo();
// this.showOptions.basketShowLinksTo = true;
this.showOptions.show = this.showOptions.linkTo;
}
this.properties = properties;
this.url = this.properties.domain + this.properties.baseLink+this._router.url;
var description = "Linking is a functionality provided by OpenAIRE, in order to link research results with a project, a research community or other research results.";
@ -69,13 +88,13 @@ export class LinkingGenericComponent {
this.seoService.createLinkForCanonicalURL(this.url, false);
if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.piwikSiteId).subscribe());
}
this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle).subscribe());
if(properties.adminToolsPortalType !== "explore") {
this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
this.pageContents = contents;
})
}
if( typeof localStorage !== 'undefined') {
@ -87,6 +106,11 @@ export class LinkingGenericComponent {
if(localStorage.getItem(this.localStoragePrefix + "sources")){
this.sources = JSON.parse(localStorage.getItem(this.localStoragePrefix + "sources"));
}
if(localStorage.getItem(this.localStoragePrefix + "claimsJob")){
let job = JSON.parse(localStorage.getItem(this.localStoragePrefix + "claimsJob"));
if(job.status != "COMPLETE"){
this.showOptions.show = 'claim'; }
}
}
}
@ -141,4 +165,78 @@ export class LinkingGenericComponent {
private updateUrl(url:string) {
this._meta.updateTag({content:url},"property='og:url'");
}
stepHasChanged(stepId){
if(stepId == 'source'){
// console.log("show source")
this.showOptions.showSource();
}else if(stepId == 'target'){
// console.log("show target")
this.showOptions.show = this.showOptions.linkTo;
this.showOptions.showLinkTo();
}else if(stepId == 'claim'){
// console.log("show target")
this.showOptions.show = 'claim';
}
this.cdr.detectChanges();
HelperFunctions.scroll(true);
// console.log('stepHasChanged', stepId, this.showOptions.show)
}
stepStatus(stepId){
if(stepId == 'source'){
if(this.showOptions.show == 'source'){
return 'active';
}else if(this.sources.length > 0){
return 'done';
}else{
return 'default';
}
}else if(stepId=='target'){
if(this.showOptions.show != 'source' && this.showOptions.show != 'claim'){
return 'active';
}else if(this.results.length > 0){
return 'done';
}else if(this.sources.length == 0 && !this.inlineEntity){
return 'disabled';
}else{
return 'default';
}
}else if(stepId=='claim'){
if(this.showOptions.show == 'claim'){
return 'active';
}else if(this.results.length > 0 && (this.inlineEntity || this.sources.length > 0)){
return 'default';
}else if(!(this.results.length > 0 && (this.inlineEntity || this.sources.length > 0))){
return 'disabled';
}
}
}
private getEntityName (entityType:string, plural:boolean) {
return StringUtils.getEntityName(entityType, plural);
}
back(): void {
if(typeof document !== 'undefined') {
this.location.back();
}
}
saveStateAndRedirectLogin() {
if (this.results != null) {
localStorage.setItem(this.localStoragePrefix + "results", JSON.stringify(this.results));
}
if (this.sources != null) {
localStorage.setItem(this.localStoragePrefix + "sources", JSON.stringify(this.sources));
}
this._router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this._router.url
}
});
}
}

View File

@ -1,41 +1,45 @@
import { NgModule } from '@angular/core';
import { MatSelectModule } from "@angular/material/select";
import {NgModule} from '@angular/core';
import {MatSelectModule} from "@angular/material/select";
import { SharedModule } from '../../shared/shared.module';
import {SharedModule} from '../../../openaireLibrary/shared/shared.module';
import {SelectedProjectsModule} from './selected/selectedProjects.module';
import {SelectedContextsModule} from './selected/selectedContexts.module';
import {SelectedPublicationsModule} from './selected/selectedResults.module';
import {LinkingGenericComponent} from './linkingGeneric.component';
import {StartOverModule} from '../claim-utils/startOver.module';
import {LoginGuard} from'../../login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
import {ClaimContextSearchFormModule} from '../claim-utils/claimContextSearchForm.module';
import {ClaimProjectsSearchFormModule} from '../claim-utils/claimProjectSearchForm.module';
import {BulkClaimModule} from './bulkClaim/bulkClaim.module';
import {ClaimResultSearchFormModule} from '../claim-utils/claimResultSearchForm.module';
import {HelperModule} from '../../utils/helper/helper.module';
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
import {Schema2jsonldModule} from '../../sharedComponents/schema2jsonld/schema2jsonld.module';
import { SEOServiceModule } from '../../sharedComponents/SEO/SEOService.module';
import {SEOServiceModule} from '../../sharedComponents/SEO/SEOService.module';
import {MetadataPreviewModule} from './selected/metadataPreview.module';
import {ClaimEntitiesMetadataModule} from "./selected/ClaimEntitiesMetadata.module";
import {AlertModalModule} from '../../utils/modal/alertModal.module';
import {PiwikServiceModule} from "../../utils/piwik/piwikService.module";
import {BreadcrumbsModule} from "../../utils/breadcrumbs/breadcrumbs.module";
import {StepperModule} from "../../sharedComponents/stepper/stepper.module";
import {IconsModule} from "../../utils/icons/icons.module";
import {IconsService} from "../../utils/icons/icons.service";
import {link} from "../../utils/icons/icons";
@NgModule({
imports: [
SharedModule, SelectedProjectsModule, SelectedContextsModule,
SelectedPublicationsModule,
StartOverModule,
StartOverModule,
ClaimContextSearchFormModule, ClaimProjectsSearchFormModule, BulkClaimModule, ClaimResultSearchFormModule,
HelperModule, Schema2jsonldModule, SEOServiceModule, MetadataPreviewModule, ClaimEntitiesMetadataModule, AlertModalModule,
PiwikServiceModule,
MatSelectModule
MatSelectModule, BreadcrumbsModule, StepperModule, IconsModule
],
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
providers: [],
declarations: [
LinkingGenericComponent
], exports:[
LinkingGenericComponent ]
], exports: [
LinkingGenericComponent]
})
export class LinkingGenericModule { }
export class LinkingGenericModule {
constructor(private iconsService: IconsService) {
this.iconsService.registerIcons([link]);
}
}

View File

@ -1,15 +1,23 @@
import {NgModule} from '@angular/core';
import {SharedModule} from '../../../shared/shared.module';
import {SharedModule} from '../../../../openaireLibrary/shared/shared.module';
import {ClaimEntityTitleComponent} from "./ClaimEntityTitle.component";
import {ClaimEntityResultMetadataComponent} from "./ClaimEntityResultMetadata.component";
import {ClaimEntityProjectMetadataComponent} from "./ClaimEntityProjectMetadata.component";
import {IconsService} from "../../../utils/icons/icons.service";
import {coins} from "../../../utils/icons/icons";
import {IconsModule} from "../../../utils/icons/icons.module";
@NgModule({
imports: [
SharedModule
SharedModule,
IconsModule
],
declarations: [
ClaimEntityTitleComponent, ClaimEntityResultMetadataComponent, ClaimEntityProjectMetadataComponent
], exports:[ ClaimEntityTitleComponent, ClaimEntityResultMetadataComponent, ClaimEntityProjectMetadataComponent]
})
export class ClaimEntitiesMetadataModule { }
export class ClaimEntitiesMetadataModule {
constructor(private _iconsService:IconsService) {
this._iconsService.registerIcons([coins])
}
}

View File

@ -0,0 +1,11 @@
@import (reference) "~src/assets/openaire-theme/less/_import-variables";
.claim-entity-metadata {
& > *:not(:last-child):not(.other-separator)::after {
content: "\2022";
font-weight: normal;
margin-left: @global-xsmall-margin;
margin-right: @global-xsmall-margin;
}
}

View File

@ -3,25 +3,37 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class';
@Component({
selector: 'claim-project-metadata',
template:
`
<div *ngIf="entity.type == 'project' && entity.project" class="uk-grid uk-margin-remove-top uk-text-small">
<div class="uk-width-1-2">
<div *ngIf="entity.project.funderName">
<span class="uk-text-muted">Funder </span>{{entity.project.funderName}}
</div>
template: `
<ng-container *ngIf="entity.type == 'project' && entity.project">
<div *ngIf="!shortVersion" class="claim-entity-metadata uk-flex-inline uk-flex-wrap uk-text-xsmall uk-text-emphasis"
[class.uk-margin-xsmall-top]="!shortVersion">
<span class="uk-text-capitalize">
{{entity.type == 'project' && entity.project.code == 'unidentified'?'funder':entity.type}}
</span>
<span *ngIf="entity.project.startDate || entity.project.endDate">
{{(entity.project.startDate) ? entity.project.startDate : 'Unknown'}}{{'-' + ((entity.project.endDate) ? entity.project.endDate : 'Unknown')}}
</span>
</div>
<div class="uk-width-1-2">
<div *ngIf="shortVersion && entity.type == 'project' && entity.project.code == 'unidentified'" class="claim-entity-metadata uk-flex-inline uk-flex-wrap uk-text-xsmall uk-text-emphasis"
[class.uk-margin-xsmall-top]="!shortVersion">
<span class="uk-text-capitalize">
funder
</span>
</div>
<div *ngIf="entity.project.code!='unidentified'" class="uk-text-small uk-flex uk-flex-wrap" [style.grid-gap]="shortVersion?'0px':'10px'"
[class.uk-margin-small-top]="!shortVersion">
<div *ngIf="entity.project.code">
<span class="uk-text-muted">GrandId </span>{{entity.project.code}}
<span class="uk-text-meta">Project Code: </span>{{entity.project.code}}
</div>
<div *ngIf=" !shortVersion && (entity.project.startDate || entity.project.endDate)">
<span
class="uk-text-muted">Duration </span>{{(entity.project.startDate) ? entity.project.startDate : 'Unknown'}}{{'-' + ((entity.project.endDate) ? entity.project.endDate : 'Unknown')}}
<div *ngIf="entity.project.funderName || entity.project.funderShortname">
<span class="uk-text-meta">Funding: </span>{{entity.project.funderName?entity.project.funderName:entity.project.funderShortname}}
</div>
</div>
</div>
`
</ng-container>
`,
styleUrls: ['ClaimEntityMetadata.component.less']
})

View File

@ -3,33 +3,38 @@ import {ClaimEntity} from '../../claim-utils/claimHelper.class';
@Component({
selector: 'claim-result-metadata',
template:
`
template: `
<div *ngIf="entity.result">
<div *ngIf="entity.result.authors && entity.result.authors.length >0 " class="uk-text-small">
<span class="uk-text-muted">Authors </span>
<!-- display all existing data similar to entity-metadata -->
<div *ngIf="!shortVersion" class="claim-entity-metadata uk-flex-inline uk-flex-wrap uk-text-xsmall uk-text-emphasis uk-margin-xsmall-top">
<span class="uk-text-capitalize uk-text-italic">
{{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
</span>
<span *ngIf="entity.result.publisher!=null">
{{entity.result.publisher}}
</span>
<span *ngIf="entity.result.date">
<span [class]="(getProjectDurationMessage(entity)?'uk-text-warning':'')">{{entity.result.date}}</span>
</span>
<span *ngIf="entity.result.journal!=null">
{{entity.result.journal}}
</span>
<div *ngIf="entity.result.editors && entity.result.editors.length > 0">
{{sliceArray(entity.result.editors)}}
</div>
</div>
<div *ngIf="entity.result.authors && entity.result.authors.length > 0" class="uk-flex uk-flex-wrap uk-text-small uk-text-emphasis uk-text-italic"
[class.uk-margin-small-top]="!shortVersion">
{{sliceArray(entity.result.authors)}}
</div>
<div *ngIf="!shortVersion && entity.result.editors&& entity.result.editors.length > 0" class="uk-text-small">
<span class="uk-text-muted">Editors </span>
{{sliceArray(entity.result.editors)}}
</div>
<div *ngIf="!shortVersion" class="uk-grid uk-margin-remove uk-text-small">
<div class="uk-width-1-2 uk-padding-remove-left">
<span *ngIf="entity.result.publisher!=null"><span
class="uk-text-muted">Publisher</span> {{entity.result.publisher}}</span>
<span *ngIf="entity.result.journal!=null"><span
class="uk-text-muted">Journal</span> {{entity.result.journal}}</span>
</div>
<div class="uk-width-1-2">
<span *ngIf="entity.result.date"><span class="uk-text-muted">Published in </span> <span
[class]="(getProjectDurationMessage(entity)?'uk-text-warning':'')">{{entity.result.date}}</span></span>
<div [class]="(getProjectDurationMessage(entity)?'uk-text-warning':'')">{{getProjectDurationMessage(entity)}}
</div>
</div>
<div class="uk-text-small uk-margin-top">
<span *ngIf="getProjectDurationMessage(entity)" [class]="(getProjectDurationMessage(entity)?'uk-text-warning':'')">
{{getProjectDurationMessage(entity)}}
</span>
</div>
</div>
`
`,
styleUrls: ['ClaimEntityMetadata.component.less']
})

View File

@ -1,66 +1,94 @@
import {Component, Input} from '@angular/core';
import {ClaimEntity} from '../../claim-utils/claimHelper.class';
import {StringUtils} from "../../../utils/string-utils.class";
@Component({
selector: 'claim-title',
template:
`
<span class="uk-text-bold">
<a *ngIf="entity.result && entity.result.url" target="_blank" [href]="entity.result.url"
class="uk-link">{{entity.title ? sliceString(entity.title) : '[No title available]'}}</a>
<span
*ngIf="(entity.result && !entity.result.url)">{{entity.title ? sliceString(entity.title) : '[No title available]'}}</span>
<span *ngIf="entity.type=='project' && entity.project">
<a *ngIf="entity.project && entity.project.url" target="_blank" [href]="entity.project.url"
class="uk-link">
<span *ngIf="!shortVersion">
{{(entity.project.acronym ? '[' + entity.project.acronym + '] ' : '') + entity.title}}
</span>
<span *ngIf="shortVersion">
{{(entity.project.acronym ? sliceString(entity.project.acronym):sliceString(entity.title))}}
</span>
</a>
<span
*ngIf="(entity.project && !entity.project.url)">
<span *ngIf="!shortVersion">
{{(entity.project.acronym ? '[' + entity.project.acronym + '] ' : '') + entity.title}}
</span>
<span *ngIf="shortVersion">
{{(entity.project.acronym ? sliceString(entity.project.acronym):sliceString(entity.title))}}
</span>
</span>
template: `
<div class="uk-grid uk-flex uk-flex-middle">
<span *ngIf="showIcon" class="uk-flex uk-margin-xsmall-right">
<icon *ngIf="entity.result" class=" uk-text-small uk-text-meta" name="insert_drive_file">
</span>
<span *ngIf="entity.type=='community' && entity.context">
<span *ngIf=" entity.context.community != entity.context.concept.label">
{{entity.context.community }} > {{entity.context.category}} >
</span>
<span> {{entity.context.concept.label}}</span>
</span>
</icon>
<icon *ngIf="entity.project && entity.project.code !='unidentified'" class=" uk-text-small uk-text-meta" name="assignment_turned_in">
</icon>
<icon *ngIf="entity.project && entity.project.code =='unidentified'" class="uk-text-small uk-text-meta" name="coins" [ratio]="1.4">
</icon>
<icon *ngIf="entity.organization" class=" uk-text-small uk-text-meta" name="account_balance">
</icon>
<icon *ngIf="entity.type=='community'" class=" uk-text-small uk-text-meta" style="margin-right: 2px;" name="people">
</icon>
</span>
<div class="uk-width-expand multi-line-ellipsis lines-3" style="word-break: break-word;"
[class.uk-padding-remove-left]="showIcon" [class.uk-text-truncate]="shortVersion">
<div class="uk-margin-remove uk-text-break uk-inline-block"
[class.uk-h6]="!shortVersion" [class.uk-text-bold]="shortVersion">
<a *ngIf="entity.result && entity.result.url" target="_blank" [href]="entity.result.url"
class="uk-link uk-text-decoration-none uk-width-expand">
{{entity.title ? sliceString(entity.title) : '[No title available]'}}
</a>
<span *ngIf="(entity.result && !entity.result.url)">
{{entity.title ? sliceString(entity.title) : '[No title available]'}}
</span>
<span *ngIf="entity.type=='project' && entity.project && entity.project.code =='unidentified'">
<span *ngIf="!shortVersion">
{{(entity.project.funderShortname ? '[' + entity.project.funderShortname + '] ' : '') + entity.project.funderName}}
</span>
<span *ngIf="shortVersion">
{{sliceString(entity.project.funderName)}}
</span>
</span>
<span *ngIf="entity.type=='project' && entity.project && entity.project.code!='unidentified'">
<a *ngIf="entity.project && entity.project.url" target="_blank" [href]="entity.project.url"
class="uk-link uk-text-decoration-none uk-width-expand">
<span *ngIf="!shortVersion">
{{(entity.project.acronym ? '[' + entity.project.acronym + '] ' : '') + entity.title}}
</span>
<span *ngIf="shortVersion">
{{(entity.project.acronym ? sliceString(entity.project.acronym):sliceString(entity.title))}}
</span>
</a>
<span *ngIf="(entity.project && !entity.project.url)">
<span *ngIf="!shortVersion">
{{(entity.project.acronym ? '[' + entity.project.acronym + '] ' : '') + entity.title}}
</span>
<span *ngIf="shortVersion">
{{(entity.project.acronym ? sliceString(entity.project.acronym):sliceString(entity.title))}}
</span>
</span>
</span>
<span *ngIf="entity.type=='organization' && entity.organization">
{{sliceString(entity.title)}}
</span>
<span *ngIf="entity.type=='community' && entity.context">
<span *ngIf=" entity.context.community != entity.context.concept.label">
{{entity.context.community }} > {{entity.context.category}} >
</span>
<span>
{{entity.context.concept.label}}
</span>
</span>
</div>
</div>
</div>
`
})
export class ClaimEntityTitleComponent {
@Input() entity: ClaimEntity;
@Input() slice:boolean = false;
@Input() sliceSize:number = 45;
@Input() shortVersion: boolean = false;
@Input() showIcon: boolean = false;
ngOnInit() {
}
sliceString(mystr:string): string {
if(this.slice){
return StringUtils.sliceString(mystr,this.sliceSize);
}
return mystr;
if(this.slice){
// return StringUtils.sliceString(mystr,this.sliceSize);
}
return mystr;
}
}

View File

@ -1,452 +1,314 @@
<div class="uk-section uk-padding-remove-top uk-padding-remove-bottom ">
<div
[class]="((defaultColors)?'linkingToolbar':'communityPanelBackground')+' uk-padding-small'">
<div class="uk-container uk-container-large uk-margin-small-top uk-padding-small">
<div class="uk-grid">
<div class="uk-padding-remove-left uk-margin-auto-vertical back uk-link">
<span
(click)="showOptions.showLinkTo()"
style="cursor:pointer">
<span class="uk-icon">
<svg width="30" height="30" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-left"
ratio="1.5"><polyline fill="none" stroke="#000" stroke-width="1.03"
points="13 16 7 10 13 4"></polyline></svg></span>
BACK
</span>
</div>
<div class="uk-width-expand">
<h6 class="uk-text-bold">
LINKING CONFIRMATION
</h6>
Confirm that the links you provided are all correct
</div>
<claim-insert [results]="results" [sources]="sources" [inlineEntity]="inlineEntity"
[properties]=properties [localStoragePrefix]=localStoragePrefix
class=" " [errors]="errors" (insertFinished)="runValidation(false); updateLocalStorage();"
[defaultColors]="defaultColors" [communityId]="communityId">
</claim-insert>
</div>
</div>
</div>
</div>
<div id="tm-main" class="uk-section uk-margin-small-top tm-middle uk-padding-remove-top">
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<div class="uk-container uk-container-large">
<div *ngIf="properties" class="uk-section uk-section-default uk-padding-remove-top">
<div class="uk-margin-top">
<div class="uk-grid">
<div class="uk-width-expand">
<div>
<div class=" uk-margin uk-h6 uk-text-primary uk-animation-toggle"
(click)="showSources=!showSources; ">
SOURCES ({{sources.length + (inlineEntity ? 1 : 0) | number}})
<span *ngIf="!showSources" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg" icon="chevron-left"
ratio="1"><polyline fill="none" stroke="#000"
stroke-width="1.03"
points="13 16 7 10 13 4"></polyline></svg></span>
<span *ngIf="showSources" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg" icon="chevron-down"
ratio="1"><polyline fill="none" stroke="#000"
stroke-width="1.03"
points="16 7 10 13 4 7"></polyline></svg></span>
</div>
<ul *ngIf="inlineEntity && showSources" class="uk-list uk-animation-fade">
<li
[class]="((inlineEntity.warningMessages.length > 0)?' warningBorder ':'')+
+((inlineEntity.errorMessages.length > 0)?' dangerBorder ':'') +
' uk-alert'" >
<div class="uk-grid uk-text-small">
<div class="uk-text-muted uk-width-1-2">
{{(!inlineEntity.result) ? inlineEntity.type : ((inlineEntity.result && inlineEntity.result.source == 'openaire') ? inlineEntity.type : (inlineEntity.result && inlineEntity.result.source + ' result'))}}
</div>
<div *ngIf="inlineEntity.errorMessages.length > 0"
class="uk-text-danger uk-width-1-2"> Link couldn't be saved
</div>
</div>
<!-- <div class="uk-text-muted">-->
<!-- {{(!inlineEntity.result) ? inlineEntity.type : ((inlineEntity.result && inlineEntity.result.source == 'openaire') ? inlineEntity.type : (inlineEntity.result && inlineEntity.result.source + ' result'))}}-->
<!-- </div>-->
<div>
<claim-title [entity]="inlineEntity"></claim-title>
</div>
<claim-result-metadata [entity]="inlineEntity"></claim-result-metadata>
<claim-project-metadata [entity]="inlineEntity"></claim-project-metadata>
</li>
</ul>
<div *ngIf="!inlineEntity && sources.length == 0 && showSources">
<div class="uk-alert dangerBorder no-selected-message uk-text-center">
<span class="uk-text-bold uk-text-danger"> SOURCES cannot be empty.</span>
Start by adding your linking sources first, go to <a (click)="showOptions.showSource() " class="uk-link">
sources
page</a>.
</div>
</div>
<ul *ngIf="!inlineEntity && sources.length > 0 && showSources" class="uk-list uk-animation-fade">
<li *ngFor=" let entity of sources "
[class]="((entity.warningMessages.length > 0)?' warningBorder ':'')+
+((entity.errorMessages.length > 0)?' dangerBorder ':'') +
' uk-alert'">
<!-- <div class="uk-text-muted">-->
<!-- {{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}-->
<!-- </div>-->
<div class="uk-grid uk-text-small">
<div class="uk-text-muted uk-width-1-2">
{{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
</div>
<div *ngIf="entity.errorMessages.length > 0"
class="uk-text-danger uk-width-1-2"> Link couldn't be saved
</div>
</div>
<div class="uk-grid uk-margin-remove-top">
<div class="uk-width-expand">
<claim-title [entity]="entity"></claim-title>
<claim-result-metadata [entity]="entity"></claim-result-metadata>
<claim-project-metadata [entity]="entity"></claim-project-metadata>
<div *ngIf="entity.result && entity.result.source && entity.result.source!='openaire' "
class="uk-grid uk-margin-remove-left uk-margin-small-top uk-text-small">
<div class="uk-width-1-2 uk-padding-remove-left">
<!-- <span class="uk-text-muted">Type </span>-->
<!-- <mat-select [(ngModel)]="entity.type" name="{{'select_type_'+entity.id}}"-->
<!-- class="uk-select uk-width-small matSelection"-->
<!-- [disableOptionCentering]="true"-->
<!-- panelClass="entitiesSelectionPanel">-->
<!-- <mat-option [value]="'publication'"-->
<!-- (click)="onTypeChanged('publication',entity, false)">Publication-->
<!-- </mat-option>-->
<!-- <mat-option [value]="'dataset'"-->
<!-- (click)="onTypeChanged('dataset',entity, false)">Research data-->
<!-- </mat-option>-->
<!-- <mat-option [value]="'software'" (click)="onTypeChanged('software',entity, false)">Software-->
<!-- </mat-option>-->
<!-- <mat-option [value]="'other'"-->
<!-- (click)="onTypeChanged('other',entity, false)">Other research product-->
<!-- </mat-option>-->
<!-- </mat-select>-->
<mat-form-field class="matSelectionFormField">
<mat-label>Type</mat-label>
<mat-select [(ngModel)]="entity.type" name="{{'select_type_'+entity.id}}"
class="matSelection"
[disableOptionCentering]="true"
panelClass="entitiesSelectionPanel">
<mat-option [value]="'publication'"
(click)="onTypeChanged('publication',entity, false)">Publication
</mat-option>
<mat-option [value]="'dataset'"
(click)="onTypeChanged('dataset',entity, false)">Research data
</mat-option>
<mat-option [value]="'software'" (click)="onTypeChanged('software',entity, false)">Software
</mat-option>
<mat-option [value]="'other'"
(click)="onTypeChanged('other',entity, false)">Other research product
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="uk-width-1-2">
<div class="uk-grid">
<!-- <span class="uk-text-muted uk-margin-small-top uk-padding-remove-left">Access mode</span>-->
<mat-form-field class="matSelectionFormField">
<mat-label>Access mode </mat-label>
<mat-select [(ngModel)]="entity.result.accessRights" name="{{'select_rights_'+entity.id}}"
class="uk-padding-remove-left matSelection"
[disableOptionCentering]="true"
panelClass="matSelectionPanel">
<mat-option *ngFor="let type of accessTypes" [value]="type"
(click)="accessRightsTypeChanged(type,entity, false)">{{type}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="entity.result.accessRights== 'EMBARGO'">
<input matInput [matDatepicker]="picker" placeholder="Choose embargo end date"
(click)="picker.open()" [ngModel]="embargoEndDates[entity.id+'_source']"
(dateInput)="onDateChanged($event, entity, false)" (dateChange)="onDateChanged($event, entity, false)">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker [startAt]="embargoEndDates[entity.id+'_source']" ng-model-options="{ timezone: 'utc' }"></mat-datepicker>
</mat-form-field>
</div>
<div *ngIf="entity.result.accessRights== 'EMBARGO' && getEmbargoEndDateMessage(entity)"
[class]="(getEmbargoEndDateMessage(entity)?'uk-text-warning':'')">{{getEmbargoEndDateMessage(entity)}}
</div>
</div>
</div>
</div>
<div class=" uk-margin-auto-vertical uk-padding-remove-left uk-margin-small-left">
<a class=" uk-icon-button "
(click)="remove(entity, false)">
<span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="minus"
ratio="1"><rect height="1" width="18" y="9" x="1"></rect></svg>
</span>
</a>
</div>
</div>
</li>
</ul>
</div>
<!-- Results-->
<div>
<div class=" uk-margin uk-h6 uk-text-primary "
(click)="showLinksTo=!showLinksTo; ">
LINK TO ({{results.length | number}})
<span *ngIf="!showLinksTo" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
icon="chevron-left" ratio="1"><polyline
fill="none" stroke="#000" stroke-width="1.03" points="13 16 7 10 13 4"></polyline></svg></span>
<span *ngIf="showLinksTo" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
icon="chevron-down" ratio="1"><polyline
fill="none" stroke="#000" stroke-width="1.03" points="16 7 10 13 4 7"></polyline></svg></span>
</div>
<div *ngIf="results.length == 0 && showLinksTo">
<div class="uk-alert dangerBorder no-selected-message uk-text-center">
<span class="uk-text-bold uk-text-danger"> LINK TO list cannot be empty.</span>
Select an entity type to link to:
<div class="uk-grid uk-text-center uk-margin-expand uk-padding-small uk-child-width-1-3 uk-width-large uk-margin-auto ">
<div *ngIf="showOptions.linkToEntities.indexOf('project')!=-1 "
(click)="goTo('project')"
style="cursor:pointer;">
<button class="uk-icon-button portal-button">
<span class="uk-icon">
<svg height="20" icon="album" ratio="1" viewBox="0 0 20 20" width="20"
xmlns="http://www.w3.org/2000/svg"><rect height="1" width="10" x="5" y="2"></rect><rect
height="1" width="14" x="3" y="4"></rect><rect fill="none" height="11" stroke="#000"
width="17" x="1.5" y="6.5"></rect></svg></span>
</button>
<div>Projects</div>
</div>
<div *ngIf="showOptions.linkToEntities.indexOf('result')!=-1 " (click)="goTo('result')"
style="cursor:pointer;">
<button class="uk-icon-button portal-button">
<span class="uk-icon">
<svg height="20" icon="copy" ratio="1" viewBox="0 0 20 20" width="20"
xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="16" stroke="#000"
width="12" x="3.5" y="2.5"></rect><polyline
fill="none" points="5 0.5 17.5 0.5 17.5 17" stroke="#000"></polyline></svg></span>
</button>
<div>Research results</div>
</div>
<div *ngIf="showOptions.linkToEntities.indexOf('context')!=-1 "
(click)="goTo('context')"
style="cursor:pointer;">
<button class="uk-icon-button portal-button">
<span class="uk-icon">
<svg height="20" icon="users" ratio="1" viewBox="0 0 20 20" width="20"
xmlns="http://www.w3.org/2000/svg"><circle cx="7.7" cy="8.6" fill="none" r="3.5"
stroke="#000" stroke-width="1.1"></circle><path
d="M1,18.1 C1.7,14.6 4.4,12.1 7.6,12.1 C10.9,12.1 13.7,14.8 14.3,18.3" fill="none"
stroke="#000" stroke-width="1.1"></path><path
d="M11.4,4 C12.8,2.4 15.4,2.8 16.3,4.7 C17.2,6.6 15.7,8.9 13.6,8.9 C16.5,8.9 18.8,11.3 19.2,14.1"
fill="none" stroke="#000" stroke-width="1.1"></path></svg></span>
</button>
<div>Communities</div>
</div>
</div>
</div>
</div>
<ul *ngIf="results.length > 0 && showLinksTo" class="uk-list uk-animation-fade">
<li *ngFor=" let entity of results "
[class]="((entity.warningMessages.length > 0)?' warningBorder ':'')+
+((entity.errorMessages.length > 0)?' dangerBorder ':'') +
' uk-alert'" style="z-index: 0 !important;">
<div class="uk-grid uk-text-small">
<div class="uk-text-muted uk-width-1-2">
{{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
</div>
<div *ngIf="entity.errorMessages.length > 0"
class="uk-text-danger uk-width-1-2"> Link couldn't be saved
</div>
</div>
<div class="uk-grid uk-margin-remove-top">
<div class="uk-width-expand">
<claim-title [entity]="entity"></claim-title>
<claim-result-metadata [entity]="entity"></claim-result-metadata>
<claim-project-metadata [entity]="entity"></claim-project-metadata>
<div *ngIf="entity.result && entity.result.source && entity.result.source!='openaire' "
class="uk-grid uk-text-small uk-margin-remove-left uk-margin-small-top">
<div class="uk-width-1-2 uk-padding-remove-left">
<!-- <span class="uk-text-muted">Type </span>-->
<mat-form-field class="matSelectionFormField">
<mat-label>Type</mat-label>
<mat-select [(ngModel)]="entity.type" name="{{'select_type_'+entity.id}}"
class=" matSelection"
[disableOptionCentering]="true"
panelClass="matSelectionPanel">
<mat-option [value]="'publication'"
(click)="onTypeChanged('publication',entity, false)">Publication
</mat-option>
<mat-option [value]="'dataset'"
(click)="onTypeChanged('dataset',entity, false)">Research data
</mat-option>
<mat-option [value]="'software'" (click)="onTypeChanged('software',entity, false)">Software
</mat-option>
<mat-option [value]="'other'"
(click)="onTypeChanged('other',entity, false)">Other research product
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="uk-width-1-2">
<div class="uk-grid">
<!-- <span class="uk-text-muted uk-margin-small-top uk-padding-remove-left">Access mode</span>-->
<mat-form-field class="matSelectionFormField">
<mat-label>Access mode </mat-label>
<mat-select [(ngModel)]="entity.result.accessRights" name="{{'select_rights_'+entity.id}}"
class=" uk-padding-remove-left matSelection"
[disableOptionCentering]="true"
panelClass="matSelectionPanel">
<mat-option *ngFor="let type of accessTypes" [value]="type"
(click)="accessRightsTypeChanged(type,entity, true)">{{type}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="entity.result.accessRights== 'EMBARGO'">
<input matInput [matDatepicker]="picker" placeholder="Choose embargo end date"
(click)="picker.open()" [ngModel]="embargoEndDates[entity.id+'_result']"
(dateInput)="onDateChanged($event, entity, true)"
(dateChange)="onDateChanged($event, entity, true)">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker [startAt]="embargoEndDates[entity.id+'_result']" ng-model-options="{ timezone: 'utc' }"></mat-datepicker>
</mat-form-field>
</div>
<div *ngIf="entity.result.accessRights== 'EMBARGO' && getEmbargoEndDateMessage(entity)"
[class]="(getEmbargoEndDateMessage(entity)?'uk-text-warning':'')">{{getEmbargoEndDateMessage(entity)}}
</div>
</div>
</div>
</div>
<div class="uk-margin-auto-vertical uk-padding-remove-left uk-margin-small-left">
<a class="uk-icon-button "
(click)="remove(entity, true)">
<span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="minus"
ratio="1"><rect height="1" width="18" y="9" x="1"></rect></svg>
<div class="uk-section uk-margin-small-top uk-padding-remove-top">
<div class="uk-container uk-container-large">
<div *ngIf="properties" class="uk-section uk-padding-remove-top">
<div class="uk-margin-top">
<div class="uk-grid" uk-grid>
<div class="uk-width-expand">
<div class="uk-card uk-card-default">
<div class="uk-card-body">
<div class="uk-grid uk-grid-divider uk-child-width-1-1@s" uk-grid [class.uk-child-width-1-2@m] = "claimsProperties.INLINE_ENTITY.show" >
<!-- Sources-->
<div *ngIf="claimsProperties.INLINE_ENTITY.show">
<div class=" uk-margin uk-animation-toggle">
<span class="uk-h6 "> {{claimsProperties.METADATA_PREVIEW.source_title}} ({{sources.length + (inlineEntity ? 1 : 0) | number}})
</span>
</a>
</div>
<a *ngIf="!inlineEntity" class="uk-float-right uk-text-small" (click)="showOptions.showSource() "> <span
uk-icon="pencil" class="uk-margin-xsmall-right"></span>{{claimsProperties.METADATA_PREVIEW.edit_source_title}}</a>
</div>
</li>
</ul>
</div>
</div>
<div class="uk-width-1-3" *ngIf="errors.length > 0 || warnings.length > 0">
<!-- Errors and Warning -->
<div *ngIf="errors.length > 0" class=" uk-margin uk-h6 uk-text-primary uk-animation-toggle"
(click)="showErrors=!showErrors ">
ERRORS ({{errors.length | number}})
<span *ngIf="!showErrors" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
icon="chevron-left" ratio="1"><polyline
fill="none" stroke="#000" stroke-width="1.03" points="13 16 7 10 13 4"></polyline></svg></span>
<span *ngIf="showErrors" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
icon="chevron-down" ratio="1"><polyline
fill="none" stroke="#000" stroke-width="1.03" points="16 7 10 13 4 7"></polyline></svg></span>
</div>
<div *ngIf="errors.length > 0 && showErrors" class=" uk-animation-fade">
<div *ngFor=" let message of errors " class="uk-alert dangerBorder">
<div *ngIf="message.type == 'claimServiceFail2Insert'">
<div class="">
<span class="uk-text-danger uk-text-bold"> Fail to save {{message.failed|number}}
{{message.failed > 1 ? 'links.' : 'link.'}}</span>
<br>
<div
*ngIf="message.inserted>0">But {{message.inserted|number}} link{{message.inserted > 1 ? 's' : ''}} was
successfully inserted.
<div>
<a routerLinkActive="router-link-active" routerLink="/myclaims">Manage your links here</a>
<ul *ngIf="inlineEntity" class="uk-list uk-animation-fade uk-list-divider">
<li>
<div class="uk-grid uk-text-small uk-margin-top">
<div class="uk-text-muted uk-width-1-2 uk-flex uk-flex-middle">
<span class="material-icons uk-text-small uk-text-meta">insert_drive_file</span>
{{(!inlineEntity.result) ? inlineEntity.type : ((inlineEntity.result && inlineEntity.result.source == 'openaire') ? inlineEntity.type : (inlineEntity.result && inlineEntity.result.source + ' result'))}}
</div>
<div *ngIf="inlineEntity.errorMessages.length > 0"
class="uk-text-danger uk-width-1-2"> Link couldn't be saved
</div>
</div>
<!-- <div class="uk-text-muted">-->
<!-- {{(!inlineEntity.result) ? inlineEntity.type : ((inlineEntity.result && inlineEntity.result.source == 'openaire') ? inlineEntity.type : (inlineEntity.result && inlineEntity.result.source + ' result'))}}-->
<!-- </div>-->
<div class="">
<claim-title [shortVersion]="true" [entity]="inlineEntity" [showIcon]="false"></claim-title>
</div>
<claim-result-metadata [entity]="inlineEntity"></claim-result-metadata>
<claim-project-metadata [entity]="inlineEntity"></claim-project-metadata>
</li>
</ul>
<div *ngIf="!inlineEntity && sources.length == 0 ">
<div class="uk-alert dangerBorder no-selected-message uk-text-center">
<span class="uk-text-bold uk-text-danger"> SOURCES cannot be empty.</span><br>
Start by adding your linking sources first, go to <a (click)="showOptions.showSource() "
class="uk-link">
step 1</a>.
</div>
</div>
</div>
<ul *ngIf="!inlineEntity && sources.length > 0 " class="uk-list uk-animation-fade uk-list-divider">
<li *ngFor=" let entity of sources ">
<div class="uk-grid uk-text-small uk-margin-top">
<!-- <div class="uk-text-muted uk-width-1-2 uk-flex uk-flex-middle">
<span class="material-icons uk-text-small uk-text-meta">insert_drive_file</span>
{{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
</div> -->
<div *ngIf="entity.errorMessages.length > 0"
class="uk-text-danger uk-width-1-2"> Link couldn't be saved
</div>
</div>
<div class="uk-grid uk-margin-remove-top uk-margin-bottom">
<div *ngIf="message.type == 'claimServiceFail'">
<div class="uk-width-expand ">
<div class="">
<span class="uk-text-danger uk-text-bold"> An error occured while saving your links.</span>
<br>
None of the links saved.
</div>
</div>
</div>
</div>
<div *ngIf="warnings.length > 0"
class=" uk-margin uk-h6 uk-text-primary uk-animation-toggle"
(click)="showWarnings=!showWarnings "> WARNINGS
({{warnings.length
| number}})
<span *ngIf="!showWarnings" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
icon="chevron-left" ratio="1"><polyline
fill="none" stroke="#000" stroke-width="1.03" points="13 16 7 10 13 4"></polyline></svg></span>
<span *ngIf="showWarnings" class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
icon="chevron-down" ratio="1"><polyline
fill="none" stroke="#000" stroke-width="1.03" points="16 7 10 13 4 7"></polyline></svg></span>
</div>
<claim-title [shortVersion]="true" [entity]="entity" [showIcon]="false"></claim-title>
<claim-result-metadata [entity]="entity"></claim-result-metadata>
<claim-project-metadata [entity]="entity"></claim-project-metadata>
<div *ngIf="entity.result && entity.result.source && entity.result.source!='openaire' "
class="uk-grid uk-margin-remove-left uk-margin-small-top uk-text-small">
<div class="uk-width-1-2 uk-padding-remove-left">
<!-- <span class="uk-text-muted">Type </span>-->
<!-- <mat-select [(ngModel)]="entity.type" name="{{'select_type_'+entity.id}}"-->
<!-- class="uk-select uk-width-small matSelection"-->
<!-- [disableOptionCentering]="true"-->
<!-- panelClass="entitiesSelectionPanel">-->
<!-- <mat-option [value]="'publication'"-->
<!-- (click)="onTypeChanged('publication',entity, false)">Publication-->
<!-- </mat-option>-->
<!-- <mat-option [value]="'dataset'"-->
<!-- (click)="onTypeChanged('dataset',entity, false)">Research data-->
<!-- </mat-option>-->
<!-- <mat-option [value]="'software'" (click)="onTypeChanged('software',entity, false)">Software-->
<!-- </mat-option>-->
<!-- <mat-option [value]="'other'"-->
<!-- (click)="onTypeChanged('other',entity, false)">Other research product-->
<!-- </mat-option>-->
<!-- </mat-select>-->
<div *ngIf="warnings.length > 0 && showWarnings " class=" uk-animation-fade">
<div *ngFor=" let message of warnings " class="uk-alert warningBorder">
<div *ngIf="message.type == 'embargoEndDate'">
<div class="uk-text-warning uk-text-bold">
Embargo date must be later than published date in
</div>
<div class="">
{{message.resultTitle}}
</div>
</div>
<div *ngIf="message.type == 'projectDuration'">
<div class="uk-text-warning uk-text-bold">
Published date must be in the project's date boundaries
(from {{message.projectInfo.startDate}}{{(message.projectInfo.endDate) ? (' to ' + (addStringToNumber(message.projectInfo.endDate, 5))) : ''}}) in
</div>
<div class="">
{{message.resultTitle}}
</div>
<div class="uk-text-muted uk-text-small">
with link to
</div>
<div class="">
{{message.projectInfo.title}}
</div>
<div><span class="uk-text-muted uk-text-small">
Project boundaries: </span>({{message.projectInfo.startDate}}{{(message.projectInfo.endDate) ? (' - ' + (message.projectInfo.endDate) + ') +5 years') : ')'}}
</div>
</div>
<mat-form-field class="matSelectionFormField">
<mat-label>Type</mat-label>
<mat-select [(ngModel)]="entity.type" name="{{'select_type_'+entity.id}}"
class="matSelection"
[disableOptionCentering]="true"
panelClass="entitiesSelectionPanel">
<mat-option [value]="'publication'"
(click)="onTypeChanged('publication',entity, false)">Publication
</mat-option>
<mat-option [value]="'dataset'"
(click)="onTypeChanged('dataset',entity, false)">Research data
</mat-option>
<mat-option [value]="'software'" (click)="onTypeChanged('software',entity, false)">
Software
</mat-option>
<mat-option [value]="'other'"
(click)="onTypeChanged('other',entity, false)">Other research product
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="uk-width-1-2">
<div class="uk-grid">
<!-- <span class="uk-text-muted uk-margin-small-top uk-padding-remove-left">Access mode</span>-->
<mat-form-field class="matSelectionFormField">
<mat-label>Access mode</mat-label>
<mat-select [(ngModel)]="entity.result.accessRights"
name="{{'select_rights_'+entity.id}}"
class="uk-padding-remove-left matSelection"
[disableOptionCentering]="true"
panelClass="matSelectionPanel">
<mat-option *ngFor="let type of accessTypes" [value]="type"
(click)="accessRightsTypeChanged(type,entity, false)">{{type}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="entity.result.accessRights== 'EMBARGO'">
<input matInput [matDatepicker]="picker" placeholder="Choose embargo end date"
(click)="picker.open()" [ngModel]="embargoEndDates[entity.id+'_source']"
(dateInput)="onDateChanged($event, entity, false)"
(dateChange)="onDateChanged($event, entity, false)">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker [startAt]="embargoEndDates[entity.id+'_source']"
ng-model-options="{ timezone: 'utc' }"></mat-datepicker>
</mat-form-field>
</div>
<div *ngIf="entity.result.accessRights== 'EMBARGO' && getEmbargoEndDateMessage(entity)"
[class]="(getEmbargoEndDateMessage(entity)?'uk-text-warning':'')">{{getEmbargoEndDateMessage(entity)}}
</div>
</div>
</div>
</div>
<div class=" uk-margin-auto-vertical uk-padding-remove-left uk-margin-small-left">
<a class=" uk-link "
(click)="remove(entity, false)">
<span uk-icon="close"> </span>
</a>
</div>
</div>
</li>
</ul>
</div>
<!-- Results-->
<div class=" ">
<div class=" uk-margin uk-grid">
<span class=" uk-h6 uk-width-expand"> {{claimsProperties.METADATA_PREVIEW.target_title}} ({{results.length | number}})</span>
<div class="uk-width-auto uk-flex">
<icon [name]="claimsProperties.METADATA_PREVIEW.edit_target_icon" [flex]="true"></icon>
<a class=" uk-margin-left-xsmall uk-text-small" (click)="showOptions.showLinkTo()">
{{claimsProperties.METADATA_PREVIEW.edit_target_title}}</a>
</div>
</div>
<div *ngIf="results.length == 0">
<div class="uk-alert dangerBorder no-selected-message uk-text-center">
<span class="uk-text-bold uk-text-danger"> LINK TO list cannot be empty.</span><br>
Start by adding sources to link to first, go to <a (click)="showOptions.showLinkTo() "
class="uk-link">
step 2</a>.
</div>
</div>
<ul *ngIf="results.length > 0 " class="uk-list uk-animation-fade uk-list-divider">
<li *ngFor=" let entity of results "
style="z-index: 0 !important;">
<div class="uk-grid uk-text-small uk-margin-top">
<!-- <div class="uk-text-muted uk-width-1-2 uk-flex uk-flex-middle">
<span *ngIf="entity.result" class="material-icons uk-text-small uk-text-meta">insert_drive_file
</span>
<span *ngIf="entity.project"
class="material-icons uk-text-small uk-text-meta">assignment_turned_in
</span>
<span *ngIf="entity.type=='community'"
class="material-icons uk-text-small uk-text-meta">people
</span>
{{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
</div> -->
<div *ngIf="entity.errorMessages.length > 0"
class="uk-text-danger uk-width-1-2"> Link couldn't be saved
</div>
</div>
<div class="uk-grid uk-margin-remove-top uk-margin-bottom">
<div class="uk-width-expand">
<claim-title [shortVersion]="true" [entity]="entity" [showIcon]="false"></claim-title>
<claim-result-metadata [entity]="entity"></claim-result-metadata>
<claim-project-metadata [entity]="entity"></claim-project-metadata>
</div>
<div class="uk-margin-auto-vertical uk-padding-remove-left uk-margin-small-left">
<a class="uk-link "
(click)="remove(entity, true)">
<span uk-icon="close"> </span>
</a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
<modal-alert (alertOutput)="confirmClose()">
</modal-alert>
<claim-insert [results]="results" [sources]="sources" [inlineEntity]="inlineEntity"
[properties]=properties [localStoragePrefix]=localStoragePrefix
class=" " [errors]="errors" (insertFinished)="runValidation(false); updateLocalStorage();"
[defaultColors]="defaultColors" [communityId]="communityId">
</claim-insert>
</div>
<div class="uk-width-1-3" *ngIf="errors.length > 0 || warnings.length > 0">
<!-- Errors and Warning -->
<div *ngIf="errors.length > 0" class=" uk-margin uk-h6 uk-text-danger uk-animation-toggle">
ERRORS ({{errors.length | number}})
</div>
<div *ngIf="errors.length > 0 " class="">
<div *ngFor=" let message of errors " class="uk-alert uk-alert-danger">
<div *ngIf="message.type == 'claimServiceFail2Insert'">
<div class="">
<span class=" uk-text-bold"> Fail to save {{message.failed|number}}
{{message.failed > 1 ? 'links.' : 'link.'}}</span>
<br>
<div
*ngIf="message.inserted>0">But {{message.inserted|number}}
link{{message.inserted > 1 ? 's' : ''}} was
successfully inserted.
<div>
<a routerLinkActive="router-link-active" routerLink="/myclaims">Manage your links here</a>
</div>
</div>
</div>
</div>
<div *ngIf="message.type == 'claimServiceFail'">
<div class="">
<span class=" uk-text-bold"> An error occured while saving your links.</span>
<br>
None of the links saved.
</div>
</div>
<div *ngIf="message.type == 'jobError'">
<div class="">
<span class=" uk-text-bold">The saving status of your links can't be fetched. Please check your links or start over. </span>
<br>
<a routerLinkActive="router-link-active" routerLink="/myclaims">Manage your links here</a>
</div>
</div>
</div>
</div>
<div *ngIf="warnings.length > 0"
class=" uk-margin uk-h6 uk-text-warning uk-animation-toggle"> WARNINGS
({{warnings.length
| number}})
</div>
<div *ngIf="warnings.length > 0 " class="">
<div *ngFor=" let message of warnings " class="uk-alert uk-alert-warning">
<div *ngIf="message.type == 'embargoEndDate'">
<div class="uk-text-bold">
Embargo date must be later than published date in
</div>
<div class="">
{{message.resultTitle}}
</div>
</div>
<div *ngIf="message.type == 'projectDuration'">
<div class="uk-text-bold">
Published date must be in the project's date boundaries
(from {{message.projectInfo.startDate}}{{(message.projectInfo.endDate) ? (' to ' + (addStringToNumber(message.projectInfo.endDate, 5))) : ''}}
) in
</div>
<div class="">
{{message.resultTitle}}
</div>
<div class="uk-text-muted uk-text-small">
with link to
</div>
<div class="">
{{message.projectInfo.title}}
</div>
<div><span class="uk-text-muted uk-text-small">
Project boundaries: </span>({{message.projectInfo.startDate}}{{(message.projectInfo.endDate) ? (' - ' + (message.projectInfo.endDate) + ') +5 years') : ')'}}
</div>
</div>
</div>
</div>
</div>
</div>
<modal-alert (alertOutput)="confirmClose()">
</modal-alert>
</div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0" [texts]="pageContents['bottom']"></helper>
</div>
</div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']"></helper>
</div>

View File

@ -4,6 +4,7 @@ import {ClaimEntity, ClaimsErrorMessage, Message, ShowOptions} from '../../claim
import {EnvProperties} from "../../../utils/properties/env-properties";
import {Dates} from "../../../utils/string-utils.class";
import {HelperFunctions} from "../../../utils/HelperFunctions.class";
import {ClaimsProperties} from "../../claim-utils/claims.properties";
@Component({
selector: 'metadata-preview',
@ -12,10 +13,10 @@ import {HelperFunctions} from "../../../utils/HelperFunctions.class";
})
export class MetadataPreviewComponent {
showSources = true;
showLinksTo = true;
showErrors = true;
showWarnings = true;
/* showSources = true;
showLinksTo = true;*/
// showErrors = true;
// showWarnings = true;
@Input() results: ClaimEntity[];
@Input() sources: ClaimEntity[];
@Input() title: string = "Research Results";
@ -28,6 +29,7 @@ export class MetadataPreviewComponent {
@ViewChild(AlertModal) alertApplyAll;
@Input() localStoragePrefix: string = "";
@Input() communityId:string= null;
@Input() claimsProperties:ClaimsProperties;
errors:ClaimsErrorMessage[] = [];
warnings:Message[] = [];
public commonAccessRights = "OPEN"; // for access rights- changes when user apply a change to every entity
@ -40,10 +42,10 @@ export class MetadataPreviewComponent {
ngOnInit() {
this.setEmbargoEndDates();
if (this.inlineEntity) {
/* if (this.inlineEntity) {
this.showSources = true;
this.showLinksTo = true;
}
}*/
this.runValidation(true);
}
setEmbargoEndDates(){

View File

@ -1,5 +1,5 @@
import {NgModule} from '@angular/core';
import {SharedModule} from '../../../shared/shared.module';
import {SharedModule} from '../../../../openaireLibrary/shared/shared.module';
import {MetadataPreviewComponent} from './metadataPreview.component';
import {AlertModalModule} from '../../../utils/modal/alertModal.module';
import {ClaimEntitiesMetadataModule} from "./ClaimEntitiesMetadata.module";
@ -10,6 +10,8 @@ import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatSelectModule } from '@angular/material/select';
import {HelperModule} from "../../../utils/helper/helper.module";
import {SelectedPublicationsModule} from "./selectedResults.module";
import {IconsModule} from "../../../utils/icons/icons.module";
@NgModule({
imports: [
@ -17,8 +19,8 @@ import {HelperModule} from "../../../utils/helper/helper.module";
AlertModalModule,
ClaimEntitiesMetadataModule,
InsertClaimsModule,
MatDatepickerModule, MatNativeDateModule, MatFormFieldModule, MatInputModule, MatSelectModule,
HelperModule
MatDatepickerModule, MatNativeDateModule, MatFormFieldModule, MatInputModule, MatSelectModule,
HelperModule, SelectedPublicationsModule, IconsModule
],
declarations: [MetadataPreviewComponent],
exports:[MetadataPreviewComponent]

View File

@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../../shared/shared.module';
import { SharedModule } from '../../../../openaireLibrary/shared/shared.module';
import {ClaimSelectedContextsComponent} from './selectedContexts.component';
@NgModule({

View File

@ -2,7 +2,7 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { SharedModule } from '../../../shared/shared.module';
import { SharedModule } from '../../../../openaireLibrary/shared/shared.module';
import {ClaimSelectedProjectsComponent} from './selectedProjects.component';
@NgModule({

View File

@ -1,19 +1,27 @@
<ul *ngIf="results.length > 0 " class="uk-list uk-list-divider">
<li *ngFor=" let entity of results " >
<div class="uk-text-muted">
<li *ngFor=" let entity of results " class="">
<!--<div class="uk-text-muted">
{{(!entity.result) ? entity.type : ((entity.result && entity.result.source == 'openaire') ? entity.type : (entity.result && entity.result.source + ' result'))}}
</div>
<div class="uk-grid">
<div class="uk-width-expand">
<claim-title [entity]="entity" [slice]="true" [sliceSize]="45" [shortVersion]="true"></claim-title>
<claim-result-metadata [entity]="entity" [slice]="true" [sliceSize]="5" [shortVersion]="true"></claim-result-metadata>
<claim-project-metadata [entity]="entity" [slice]="true" [sliceSize]="5" [shortVersion]="true"></claim-project-metadata>
</div>-->
<div class="uk-grid uk-flex uk-flex-middle uk-margin-small-top uk-margin-small-bottom uk-margin-remove-left">
<!--<div >
<span *ngIf="type == 'source' || entity.result" class="material-icons uk-text-small uk-text-meta">insert_drive_file
</span>
<span *ngIf="type == 'target' && entity.project"
class="material-icons uk-text-small uk-text-meta">assignment_turned_in
</span>
<span *ngIf="entity.type=='community'"
class="material-icons uk-text-small uk-text-meta">people
</span>
</div>-->
<div class="uk-width-expand uk-padding-remove-left uk-margin-small-left">
<claim-title [entity]="entity" [slice]="true" [sliceSize]="45" [shortVersion]="shortVersion" [showIcon]="true"></claim-title>
<claim-result-metadata [entity]="entity" [slice]="true" [sliceSize]="5" [shortVersion]="shortVersion"></claim-result-metadata>
<claim-project-metadata [entity]="entity" [slice]="true" [sliceSize]="5" [shortVersion]="shortVersion"></claim-project-metadata>
</div>
<div class="uk-margin-auto-vertical uk-padding-remove-left uk-margin-small-left" *ngIf="enableRemove">
<a class=" uk-icon-button " (click)="remove(entity)" >
<span class="uk-icon" >
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="minus" ratio="1"><rect height="1" width="18" y="9" x="1"></rect></svg>
</span>
<a class=" uk-link " (click)="remove(entity)" >
<span uk-icon="close"> </span>
</a>
</div>
</div>

View File

@ -1,6 +1,6 @@
import {Component, Input} from '@angular/core';
import {ClaimEntity} from '../../claim-utils/claimHelper.class';
declare var UIkit: any;
@Component({
selector: 'claim-selected-results',
templateUrl: 'selectedResults.component.html'
@ -11,7 +11,8 @@ export class ClaimSelectedResultsComponent {
@Input() sectionTitle: string = "Research Results";
@Input() localStoragePrefix: string = "";
@Input() enableRemove:boolean = true;
@Input() type: "source" | "target";
@Input() shortVersion:boolean = true;
ngOnInit() {
}
@ -23,6 +24,11 @@ export class ClaimSelectedResultsComponent {
if (this.results != null) {
localStorage.setItem(this.localStoragePrefix, JSON.stringify(this.results));
}
UIkit.notification(item.type + ' removed from your basket!', {
status: 'warning',
timeout: 4000,
pos: 'bottom-right'
});
}
}

View File

@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../../shared/shared.module';
import { SharedModule } from '../../../../openaireLibrary/shared/shared.module';
import {ClaimSelectedResultsComponent} from './selectedResults.component';
import {AlertModalModule} from '../../../utils/modal/alertModal.module';
import { MyDatePickerModule } from '../../../utils/my-date-picker/my-date-picker.module';

View File

@ -8,25 +8,19 @@ import {Subscriber} from "rxjs";
@Component({
selector: 'my-claims',
template: `
<div id="tm-main" class=" uk-section uk-padding-remove-top tm-middle">
<div class="uk-grid uk-margin-small-top" >
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
<div class="uk-container uk-container-large">
<div class="uk-article-title custom-article-title">
My links
</div>
<div class=" ">
Manage your links in OpenAIRE
</div>
<div>
<displayClaims *ngIf="user" [user]="user" [enableDelete]=true [myClaims]=true [isAdmin]=false [showUserEmail]=false
[claimsInfoURL]=claimsInfoURL [communityId]=communityId
[piwikSiteId]="piwikSiteId" pageTitle="My links">
</displayClaims>
</div>
</div>
<div class="uk-section">
<div class="uk-container uk-container-large">
<h1 class="uk-h2 uk-margin-remove">
My links
</h1>
<div class="uk-text-meta">
Manage your links in OpenAIRE
</div>
<div class="uk-margin-top">
<displayClaims *ngIf="user" [user]="user" [enableDelete]=true [myClaims]=true [isAdmin]=false [showUserEmail]=false
[claimsInfoURL]=claimsInfoURL [communityId]=communityId
pageTitle="My links">
</displayClaims>
</div>
</div>
</div>
@ -36,8 +30,6 @@ import {Subscriber} from "rxjs";
export class MyClaimsComponent {
@Input() claimsInfoURL: string;
@Input() communityId:string;
@Input() piwikSiteId = null;
@Input() userInfoURL: string;
public user: User = null;
constructor(private userManagementService: UserManagementService, private _router: Router) {}

View File

@ -1,11 +1,8 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module';
import { SharedModule } from '../../../openaireLibrary/shared/shared.module';
import { MyClaimsComponent } from './myClaims.component';
import {DisplayClaimsModule} from '../claim-utils/displayClaims/displayClaims.module';
import {LoginGuard} from'../../login/loginGuard.guard';
import {PreviousRouteRecorder} from '../../utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
@NgModule({
imports: [
@ -13,7 +10,7 @@ import {IsRouteEnabled} from '../../error/isRouteEnabled.guard';
DisplayClaimsModule
],
providers:[LoginGuard, PreviousRouteRecorder, IsRouteEnabled],
providers:[],
declarations: [
MyClaimsComponent
], exports: [MyClaimsComponent]

View File

@ -3,25 +3,29 @@ import {HttpClient, HttpHeaders} from '@angular/common/http';
import {BehaviorSubject, Observable, Subscriber} from 'rxjs';
import {Affiliation} from '../../utils/entities/CuratorInfo';
import {properties} from "../../../../environments/environment";
import {AdvancedAsyncSubject} from "../../utils/AdvancedAsyncSubject";
@Injectable()
export class AffiliationService {
private affiliationsSubject: BehaviorSubject<Affiliation[]> = new BehaviorSubject([]);
sub;
constructor(private http: HttpClient) {
}
ngOnDestroy() {
this.clearSubscriptions();
}
clearSubscriptions(){
clearSubscriptions() {
if (this.sub instanceof Subscriber) {
this.sub.unsubscribe();
}
}
public initAffiliations(communityId: string): void {
let url = properties.communityAPI + communityId + "/organizations";
this.sub = this.http.get<Affiliation[]>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url).subscribe((affiliations) => {
this.sub = this.getAffiliations(communityId).subscribe((affiliations) => {
this.affiliationsSubject.next(affiliations);
},
error => {
@ -33,6 +37,11 @@ export class AffiliationService {
return this.affiliationsSubject.asObservable();
}
public getAffiliations(communityId: string): Observable<Affiliation[]> {
let url = properties.communityAPI + communityId + "/organizations";
return this.http.get<Affiliation[]>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
}
public updateAffiliation(url: string, affiliation: Affiliation) {
let headers = new HttpHeaders({'Content-Type': 'application/json', 'accept': 'application/json'});
return this.http.post<Affiliation>(url, JSON.stringify(affiliation), {headers: headers});

View File

@ -5,11 +5,12 @@ import { EnvProperties} from '../../utils/properties/env-properties';
import {ConnectHelper} from '../connectHelper';
import {SearchCommunityDataprovidersService} from '../contentProviders/searchDataproviders.service';
import {properties} from "../../../../environments/environment";
import {OpenaireEntities} from "../../utils/properties/searchFields";
@Component({
selector: 'approved-by-community',
template: `
<span *ngIf="approved" class="uk-align-right uk-label custom-label uk-label-success">Community Approved</span>
<span *ngIf="approved" class="uk-align-right uk-label custom-label uk-label-success">{{openaireEntities.COMMUNITY}} Approved</span>
`
})
@ -21,6 +22,7 @@ export class ApprovedByCommunityComponent {
private communityContentProviders = [];
properties:EnvProperties;
public openaireEntities = OpenaireEntities;
constructor (private route: ActivatedRoute, private _searchDataprovidersService: SearchCommunityDataprovidersService) {}
@ -40,7 +42,7 @@ export class ApprovedByCommunityComponent {
this.approved = this.checkApproval();
},
error => {
this.handleError("Error getting content providers for community with id: "+this.communityId, error);
this.handleError("Error getting "+OpenaireEntities.DATASOURCES+" for "+OpenaireEntities.COMMUNITY+" with id: "+this.communityId, error);
}
);
}
@ -58,6 +60,6 @@ export class ApprovedByCommunityComponent {
}
private handleError(message: string, error) {
console.error("Approved by Community (component): "+message, error);
console.error("Approved by "+OpenaireEntities.COMMUNITY+" (component): "+message, error);
}
}

View File

@ -56,12 +56,11 @@ export class CommunitiesService {
result['description'] = resData.description;
result['date'] = resData.creationDate;
result['status'] = 'all';
result['claim'] = resData.claim;
result['membership'] = resData.membership;
if (resData.hasOwnProperty('status')) {
result['status'] = resData.status;
const status = ['all', 'hidden', 'manager'];
if (status.indexOf(result['status']) === -1) {
result['status'] = 'hidden';
}
result.validateStatus();
}
if (resData.type != null) {
result['type'] = resData.type;

View File

@ -1,22 +1,103 @@
import {properties} from "../../../../environments/environment";
export class Layout {
_id:string;
portalPid:string;
layoutOptions:CustomizationOptions;
constructor(community, options:CustomizationOptions){
_id: string;
portalPid: string;
layoutOptions: CustomizationOptions;
date;
constructor(community, options: CustomizationOptions) {
this.portalPid = community;
this.layoutOptions = options;
}
public static getVariables(options: CustomizationOptions): {} | null {
if (options) {
let variables = {};
if (options.identity) {
variables['@global-primary-background'] = Layout.convertRGBAtoRGB(options.identity.mainColor);
variables['@global-secondary-background'] = Layout.convertRGBAtoRGB(options.identity.secondaryColor);
}
if (options.backgrounds) {
variables['@general-search-form-background'] = Layout.convertRGBAtoRGB(options.backgrounds.form.color);
variables['@global-background'] = Layout.convertRGBAtoRGB(options.backgrounds.light.color);
variables['@hero-background-image'] = (options.backgrounds.form.imageFile ? (this.getUrl(properties.utilsService + '/download/' + options.backgrounds.form.imageFile)) : 'none');
variables['@hero-background-position'] = options.backgrounds.form.position;
variables['@hero-fonts-mode'] = options.backgrounds.form.fontsDarkMode == true ?'dark':'light';
}
if (options.buttons) {
//general
variables['@button-border-width'] = options.buttons.lightBackground.borderWidth + "px";
variables['@button-border-radius'] = options.buttons.lightBackground.borderRadius + "px";
// default -> on dark background todo check again when we have sucj=h buttons
variables['@button-default-background'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.backgroundColor);
variables['@button-default-color'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.color);
variables['@button-default-border'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.borderColor);
variables['@button-default-hover-background'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.backgroundColor);
variables['@button-default-hover-color'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.color);
variables['@button-default-hover-border'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.borderColor);
variables['@button-default-active-background'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.backgroundColor);
variables['@button-default-active-color'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.color);
variables['@button-default-active-border'] = Layout.convertRGBAtoRGB(options.buttons.darkBackground.onHover.borderColor);
// primary
variables['@button-primary-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.backgroundColor);
variables['@button-primary-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.color);
variables['@button-primary-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.borderColor);
variables['@button-primary-hover-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.backgroundColor);
variables['@button-primary-hover-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.color);
variables['@button-primary-hover-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.borderColor);
variables['@button-primary-active-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.backgroundColor);
variables['@button-primary-active-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.color);
variables['@button-primary-active-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.onHover.borderColor);
// secondary
variables['@button-secondary-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.color);
variables['@button-secondary-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.backgroundColor);
variables['@button-secondary-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.backgroundColor);
variables['@button-secondary-hover-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.backgroundColor);
variables['@button-secondary-hover-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.color);
variables['@button-secondary-hover-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.borderColor);
variables['@button-secondary-active-background'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.backgroundColor);
variables['@button-secondary-active-color'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.color);
variables['@button-secondary-active-border'] = Layout.convertRGBAtoRGB(options.buttons.lightBackground.borderColor);
}
return variables;
}
return null;
}
public static getUrl(url) {
return 'url("' + url + '")';
}
public static convertRGBAtoRGB(color: string): string {
if(color.includes('rgba')) {
const regexPattern = /rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/;
const matches = color.match(regexPattern);
const [, r, g, b, a] = matches;
let R = parseInt(r)*parseFloat(a) + (1 - parseFloat(a))*255;
let G = parseInt(g)*parseFloat(a) + (1 - parseFloat(a))*255;
let B = parseInt(b)*parseFloat(a) + (1 - parseFloat(a))*255;
return 'rgb(' + R + ',' + G + ',' + B + ',' + ')';
} else {
return color;
}
}
}
export class CustomizationOptions {
identity: {
mainColor: string;
secondaryColor: string;
};
identityIsCustom:boolean;
backgroundsAndButtonsIsCustom:boolean;
identityIsCustom: boolean;
backgroundsIsCustom: boolean;
buttonsIsCustom: boolean;
backgrounds: {
dark: {
color: string; //background
color: string; //background
}
light: {
color: string; //background
@ -25,7 +106,8 @@ export class CustomizationOptions {
color: string; //background
imageUrl: string;
imageFile: string;
position:string;
position: string;
fontsDarkMode:boolean;
}
};
buttons: {
@ -34,31 +116,33 @@ export class CustomizationOptions {
};
constructor(mainColor: string = null, secondaryColor: string = null) {
this.identity= {
this.identity = {
mainColor: mainColor ? mainColor : CustomizationOptions.getIdentity().mainColor,
secondaryColor : secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor,
secondaryColor: secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor,
};
this.identityIsCustom = false;
this.backgroundsAndButtonsIsCustom = false;
this.backgrounds={
dark : {
this.backgroundsIsCustom = false;
this.buttonsIsCustom = false;
this.backgrounds = {
dark: {
color: this.identity.mainColor,
},
light : {
color: CustomizationOptions.getRGBA(this.identity.mainColor,0.05),
light: {
color: "#f9f9f9" //CustomizationOptions.getRGBA(this.identity.mainColor,0.05),
},
form : {
color: CustomizationOptions.getRGBA(this.identity.mainColor,0.15),
imageUrl : null,
imageFile : null,
position: null
form: {
color: CustomizationOptions.getRGBA(this.identity.mainColor, 0.15),
imageUrl: null,
imageFile: null,
position: null,
fontsDarkMode: true
}
};
this.buttons = {
darkBackground: {
isDefault:true,
isDefault: true,
backgroundColor: "#ffffff",
color: "#000000",
borderStyle: "solid",
@ -72,7 +156,7 @@ export class CustomizationOptions {
}
},
lightBackground: {
isDefault:true,
isDefault: true,
backgroundColor: this.identity.mainColor,
color: '#ffffff',
borderStyle: "solid",
@ -88,79 +172,93 @@ export class CustomizationOptions {
};
}
public static checkForObsoleteVersion(current:CustomizationOptions, communityId:string){
let defaultCO = new CustomizationOptions(CustomizationOptions.getIdentity(communityId).mainColor,CustomizationOptions.getIdentity(communityId).secondaryColor);
public static checkForObsoleteVersion(current: CustomizationOptions, communityId: string) {
if(communityId === 'connect') {
return null;
}
let defaultCO = new CustomizationOptions(CustomizationOptions.getIdentity(communityId).mainColor, CustomizationOptions.getIdentity(communityId).secondaryColor);
let updated = Object.assign({}, defaultCO);
if(current.identity && current.identity.mainColor && current.identity.secondaryColor ) {
updated = new CustomizationOptions(current.identity.mainColor, current.identity.secondaryColor);
}
if(!current.backgrounds){
current.backgrounds = Object.assign({}, updated.backgrounds);
}
if(!current.backgrounds.dark){
current.backgrounds.dark = Object.assign({}, updated.backgrounds.dark);
}
if(!current.backgrounds.light){
current.backgrounds.light = Object.assign({}, updated.backgrounds.light);
}
if(!current.backgrounds.form){
current.backgrounds.form = Object.assign({}, updated.backgrounds.form);
}
if(!current.backgrounds.form.position){
current.backgrounds.form.position = "center bottom"
}
if(!current.buttons){
current.buttons = Object.assign({}, updated.buttons);
}
if(!current.buttons.darkBackground){
current.buttons.darkBackground = Object.assign({}, updated.buttons.darkBackground);
}
if(!current.buttons.lightBackground){
current.buttons.lightBackground = Object.assign({}, updated.buttons.lightBackground);
}
if(!current.hasOwnProperty('identityIsCustom')){
current.identityIsCustom = (JSON.stringify(current.identity) != JSON.stringify(defaultCO.identity));
}
if(!current.hasOwnProperty('backgroundsAndButtonsIsCustom')){
current.identityIsCustom = (JSON.stringify(current.backgrounds) != JSON.stringify(updated.backgrounds) || JSON.stringify(current.buttons) != JSON.stringify(updated.buttons)) ;
if (!current) {
current = Object.assign({}, defaultCO);
} else {
if (current.identity && current.identity.mainColor && current.identity.secondaryColor) {
updated = new CustomizationOptions(current.identity.mainColor, current.identity.secondaryColor);
}
if (!current.backgrounds) {
current.backgrounds = Object.assign({}, updated.backgrounds);
}
if (!current.backgrounds.dark) {
current.backgrounds.dark = Object.assign({}, updated.backgrounds.dark);
}
if (!current.backgrounds.light) {
current.backgrounds.light = Object.assign({}, updated.backgrounds.light);
}
if (!current.backgrounds.form) {
current.backgrounds.form = Object.assign({}, updated.backgrounds.form);
}
if (!current.backgrounds.form.position) {
current.backgrounds.form.position = "center bottom"
}
if (current.backgrounds.form.fontsDarkMode == undefined) {
current.backgrounds.form.fontsDarkMode = true;
}
if (!current.buttons) {
current.buttons = Object.assign({}, updated.buttons);
}
if (!current.buttons.darkBackground) {
current.buttons.darkBackground = Object.assign({}, updated.buttons.darkBackground);
}
if (!current.buttons.lightBackground) {
current.buttons.lightBackground = Object.assign({}, updated.buttons.lightBackground);
}
if (!current.hasOwnProperty('identityIsCustom')) {
current.identityIsCustom = (JSON.stringify(current.identity) != JSON.stringify(defaultCO.identity));
}
if (!current.hasOwnProperty('backgroundsAndButtonsIsCustom') || (!current.hasOwnProperty('backgroundsIsCustom') || (!current.hasOwnProperty('buttonsIsCustom')))) {
current.identityIsCustom = (JSON.stringify(current.backgrounds) !=
JSON.stringify(updated.backgrounds) || JSON.stringify(current.buttons) != JSON.stringify(updated.buttons));
}
}
return current;
}
public static getIdentity(community:string=null){
let COLORS= {
default:{
mainColor:'#4687E6',
public static getIdentity(community: string = null) {
let COLORS = {
default: {
mainColor: '#4687E6',
secondaryColor: '#2D72D6'
},
"covid-19":{
mainColor:"#03ADEE",
"covid-19": {
mainColor: "#03ADEE",
secondaryColor: "#F15157"
}
};
if(community && COLORS[community]){
if (community && COLORS[community]) {
return COLORS[community];
}
return COLORS.default;
}
public static getRGBA(color, A){
if(color.indexOf("#")!=-1){
return 'rgba('+parseInt(color.substring(1,3),16)+','+parseInt(color.substring(3,5),16)+','+parseInt(color.substring(5,7),16)+','+A+')';
public static getRGBA(color, A) {
if (color.indexOf("#") != -1) {
return 'rgba(' + parseInt(color.substring(1, 3), 16) + ',' + parseInt(color.substring(3, 5), 16) + ',' + parseInt(color.substring(5, 7), 16) + ',' + A + ')';
}
return color;
}
public static isForLightBackground(color:string){
public static isForLightBackground(color: string) {
let L, r, g, b, a = 1;
if(color.length == 7 || color.length == 9) {
if (color.length == 7 || color.length == 9) {
r = parseInt(color.substring(1, 3), 16);
g = parseInt(color.substring(3, 5), 16);
b = parseInt(color.substring(5, 7), 16);
if(color.length == 9) {
a = parseInt(color.substring(7, 9), 16);
if (color.length == 9) {
a = parseInt(color.substring(7, 9), 16);
}
}else if(color.length > 9){
} else if (color.length > 9) {
let array = color.split("rgba(")[1].split(")")[0].split(",");
r = parseInt(array[0]);
g = parseInt(array[1]);
@ -168,7 +266,7 @@ export class CustomizationOptions {
a = +array[3];
}
const brightness = r* 0.299 + g * 0.587 + b * 0.114 + (1 - a) * 255;
const brightness = r * 0.299 + g * 0.587 + b * 0.114 + (1 - a) * 255;
return (brightness < 186)
@ -188,8 +286,9 @@ export class CustomizationOptions {
}
export class ButtonsCustomization{
isDefault:boolean;
export class ButtonsCustomization {
isDefault: boolean;
backgroundColor: string;
color: string;
borderStyle: string;

View File

@ -5,13 +5,14 @@ import {map} from "rxjs/operators";
import {BehaviorSubject, from, Observable, Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
import {StringUtils} from "../../utils/string-utils.class";
import {SelectionCriteria} from "../../utils/entities/contentProvider";
@Injectable({providedIn: 'root'})
export class CommunityService {
public community: BehaviorSubject<CommunityInfo> = new BehaviorSubject(null);
public communityId: string = null;
private promise: Promise<boolean> = null;
private promise: Promise<void> = null;
private subs = [];
constructor(private http: HttpClient) {}
@ -40,7 +41,7 @@ export class CommunityService {
getCommunity(communityId: string, refresh = false) {
if (this.communityId !== communityId || !this.community.value || refresh) {
this.communityId = communityId;
this.promise = new Promise<any>((resolve, reject) => {
this.promise = new Promise<void>((resolve, reject) => {
this.subs.push(this.getCommunityInfo(communityId).subscribe(community => {
this.community.next(community);
resolve();
@ -56,6 +57,7 @@ export class CommunityService {
async getCommunityAsync() {
await this.promise;
// this.clearSubscriptions();
return this.community.getValue();
}
@ -71,57 +73,59 @@ export class CommunityService {
return this.http.post(url, community, options);
}
public updateSubjects(subjects: string[], fos: string[], sdg: string[]) {
let communityInfo: CommunityInfo = this.community.value;
communityInfo.subjects = subjects;
communityInfo.fos = fos;
communityInfo.sdg = sdg;
this.community.next(communityInfo);
}
public updateAdvancedCriteria(selectionCriteria: SelectionCriteria) {
let communityInfo: CommunityInfo = this.community.value;
communityInfo.selectionCriteria = selectionCriteria;
this.community.next(communityInfo);
}
public parseCommunity(data: any): CommunityInfo {
const resData = Array.isArray(data) ? data[0] : data;
const community: CommunityInfo = new CommunityInfo();
community['title'] = resData.name;
community['shortTitle'] = resData.shortName;
community['communityId'] = resData.id;
community['queryId'] = resData.queryId;
community['logoUrl'] = resData.logoUrl;
community['description'] = resData.description;
community['date'] = resData.creationDate;
community['zenodoCommunity'] = resData.zenodoCommunity;
community['status'] = 'all';
community.title = resData.name;
community.shortTitle = resData.shortName;
community.communityId = resData.id;
community.queryId = resData.queryId;
community.logoUrl = resData.logoUrl;
community.description = resData.description;
community.date = resData.creationDate;
community.zenodoCommunity = resData.zenodoCommunity;
community.status = 'PUBLIC';
community.claim = resData.claim;
community.membership = resData.membership;
community.type = resData.type;
community.otherZenodoCommunities = resData.otherZenodoCommunities;
if (resData.hasOwnProperty('status')) {
community['status'] = resData.status;
const status = ['all', 'hidden', 'manager'];
if (status.indexOf(community['status']) === -1) {
community['status'] = 'hidden';
}
community.status = resData.status;
community.validateStatus();
}
if (resData.type != null) {
community['type'] = resData.type;
}
if (resData.managers != null) {
if (community['managers'] === undefined) {
community['managers'] = new Array<string>();
}
const managers = resData.managers;
const length = Array.isArray(managers) ? managers.length : 1;
for (let i = 0; i < length; i++) {
const manager = Array.isArray(managers) ? managers[i] : managers;
community.managers[i] = manager;
}
}
if (resData.subjects != null) {
if (community['subjects'] === undefined) {
community['subjects'] = new Array<string>();
}
const subjects = resData.subjects;
const length = Array.isArray(subjects) ? subjects.length : 1;
for (let i = 0; i < length; i++) {
const subject = Array.isArray(subjects) ? subjects[i] : subjects;
community.subjects[i] = subject;
}
community.subjects = Array.isArray(resData.subjects)?resData.subjects:[resData.subjects];
} else {
community.subjects = [];
}
if (resData.sdg != null) {
community.sdg = Array.isArray(resData.sdg)?resData.sdg:[resData.sdg];
} else {
community.sdg = [];
}
if (resData.fos != null) {
community.fos = Array.isArray(resData.fos)?resData.fos:[resData.fos];
} else {
community.fos = [];
}
if (resData.advancedConstraints != null) {
community.selectionCriteria = resData.advancedConstraints;
} else {
community.selectionCriteria = new SelectionCriteria();
}
return CommunityInfo.checkIsUpload(community);
}

View File

@ -1,5 +1,5 @@
import {StringUtils} from "../../utils/string-utils.class";
import {properties} from "../../../../environments/environment";
import {SelectionCriteria} from "../../utils/entities/contentProvider";
export class CommunityInfo {
title: string;
@ -13,11 +13,17 @@ export class CommunityInfo {
managers: string[];
date:Date;
subjects: string[];
status:string;
status:"all" | "manager" | "hidden" | "PUBLIC" | "RESTRICTED" | "PRIVATE";
claim: "all" | "managersOnly" | "membersOnly";
membership: "open" | "byInvitation";
zenodoCommunity:string;
otherZenodoCommunities: string[];
isUpload: boolean;
isSubscribed: boolean;
isManager: boolean;
fos: string[] = [];
sdg: string[] = []
selectionCriteria: SelectionCriteria;
public static checkIsUpload(response: CommunityInfo | CommunityInfo[]): any | any[] {
if (Array.isArray(response)) {
@ -29,5 +35,24 @@ export class CommunityInfo {
}
return response;
}
public isOpen() {
return !(this.membership && this.membership === 'byInvitation');
}
public isPublic(){
return this.status == "all" || this.status == "PUBLIC";
}
public isRestricted(){
return this.status == "manager" || this.status == "RESTRICTED";
}
public isPrivate(){
return this.status == "hidden" || this.status == "PRIVATE";
}
public validateStatus(){
if(!(this.isPrivate() || this.isRestricted() || this.isPublic())){
this.status = "PRIVATE";
}
}
}
// export const prodReadyCommunities = ["dh-ch", "ee", "fam", "mes", "ni", "covid-19", "dariah", "epos", "egi"];

View File

@ -1,20 +1,13 @@
import {filter, map, mergeMap, take} from 'rxjs/operators';
import {Injectable} from '@angular/core';
import {
ActivatedRouteSnapshot,
CanActivate,
CanActivateChild,
Router,
RouterStateSnapshot,
UrlTree
} from '@angular/router';
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
import {Observable, of} from 'rxjs';
import {Session} from '../../login/utils/helper.class';
import {LoginErrorCodes} from '../../login/utils/guardHelper.class';
import {UserManagementService} from "../../services/user-management.service";
@Injectable()
export class ConnectAdminLoginGuard implements CanActivate, CanActivateChild {
export class ConnectAdminLoginGuard {
constructor(private router: Router,
private userManagementService: UserManagementService) {
@ -22,8 +15,9 @@ export class ConnectAdminLoginGuard implements CanActivate, CanActivateChild {
check(community: string, path: string): Observable<boolean> | boolean {
let errorCode = LoginErrorCodes.NOT_LOGIN;
const authorized = this.userManagementService.getUserInfo(false).pipe(take(1), map(user => {
const authorized = this.userManagementService.getUserInfo().pipe(take(1), map(user => {
if (user) {
errorCode = LoginErrorCodes.NOT_ADMIN;
if (Session.isPortalAdministrator(user) || Session.isCommunityCurator(user) || Session.isManager('community', community, user)) {
return of(true);
}

View File

@ -22,7 +22,7 @@ export class ConnectCommunityGuard implements CanActivate, CanActivateChild {
check(community: string, url: string): Observable<boolean> | boolean {
return this.communityService.isCommunityType(community).pipe(take(1), tap(isCommunity => {
if (!isCommunity) {
this.router.navigate(['/error'], {queryParams: {'page': url}});
this.router.navigate([properties.errorLink], {queryParams: {'page': url}});
}
}));
}

View File

@ -10,6 +10,7 @@ import {
} from '@angular/router';
import {Observable, Subscription} from 'rxjs';
import {CommunityService} from '../community/community.service';
import {properties} from "../../../../environments/environment";
@Injectable()
export class ConnectRIGuard implements CanActivate, CanActivateChild {
@ -22,7 +23,7 @@ export class ConnectRIGuard implements CanActivate, CanActivateChild {
check(community: string, url: string): Observable<boolean> | boolean {
return this.communityService.isRIType(community).pipe(tap(authorized => {
if (!authorized) {
this.router.navigate(['/error'], {queryParams: {'page': url}});
this.router.navigate([properties.errorLink], {queryParams: {'page': url}});
}
}));
}

View File

@ -30,7 +30,7 @@ export class ConnectSubscriberGuard implements CanActivate, CanActivateChild {
} else {
community = ConnectHelper.getCommunityFromDomain(properties.domain);
}
const authorized = this.userManagementService.getUserInfo(false).pipe(take(1), map(user => {
const authorized = this.userManagementService.getUserInfo().pipe(take(1), map(user => {
if (user) {
if (Session.isSubscribedTo('community', community, user)) {
return of(true);

View File

@ -1,11 +1,5 @@
import { Injectable } from '@angular/core';
import {
Router,
CanActivate,
ActivatedRouteSnapshot,
RouterStateSnapshot,
CanLoad, Route, UrlSegment, CanActivateChild, UrlTree
} from '@angular/router';
import {Injectable} from '@angular/core';
import {ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree} from '@angular/router';
import {Observable} from 'rxjs';
import {ConnectHelper} from '../connectHelper';
@ -14,7 +8,7 @@ import {CommunityService} from "../community/community.service";
import {map} from "rxjs/operators";
@Injectable()
export class IsCommunity implements CanActivate, CanActivateChild {
export class IsCommunity {
constructor(private router: Router,
private communityService: CommunityService) {
@ -32,12 +26,12 @@ export class IsCommunity implements CanActivate, CanActivateChild {
if(community) {
return true;
} else {
this.router.navigate(['error'], {queryParams: {page: state.url}});
this.router.navigate([properties.errorLink], {queryParams: {page: state.url}});
return false;
}
}));
} else {
this.router.navigate(['error'], {queryParams: {page: state.url}});
this.router.navigate([properties.errorLink], {queryParams: {page: state.url}});
return false;
}
}

View File

@ -1,11 +1,17 @@
import {HttpParams} from '@angular/common/http';
import {properties} from "../../../environments/environment";
import {Session} from "../login/utils/helper.class";
import {CommunityInfo} from "./community/communityInfo";
export class ConnectHelper {
public static getCommunityFromDomain(domain: string): string{
if(properties.environment == "development") {
if(properties.dashboard === 'irish') {
return properties.adminToolsCommunity;
}
if(properties.environment == "development" &&
(properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community"
|| properties.adminToolsPortalType == "aggregator" || properties.adminToolsPortalType == "eosc")) {
domain = "covid-19.openaire.eu"; //for testing
}
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
@ -18,7 +24,7 @@ export class ConnectHelper {
if ( domain.indexOf('beta') !== -1) {
domain = domain.substr(domain.indexOf('.') + 1, domain.length);
domain = domain.substr(0, domain.indexOf('.'));
} else if (domain.indexOf('test.') !== -1) {
} else if (domain.indexOf('test.') !== -1 && !(properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community")) {
return null;
} else {
domain = domain.substr(0, domain.indexOf('.'));
@ -51,7 +57,12 @@ export class ConnectHelper {
}
public static isPrivate(community, user) {
return community && (community.status == "hidden" || (community.status == "manager" && !(Session.isPortalAdministrator(user) || Session.isCommunityCurator(user) || Session.isManager("community", community.communityId, user))))
public static isPrivate(community: CommunityInfo, user) {
return community && (community.isPrivate() || (community.isRestricted() && !(
Session.isPortalAdministrator(user) ||
Session.isCommunityCurator(user) ||
Session.isManager("community", community.communityId, user) ||
(!community.isOpen() && Session.isMember('community', community.communityId, user))
)))
}
}

View File

@ -7,15 +7,25 @@ import {map} from "rxjs/operators";
export class SearchCommunityProjectsService {
constructor(private http: HttpClient ) {}
searchProjects (properties:EnvProperties, pid: string):any {
let url = properties.communityAPI+pid+"/projects";
searchProjects (properties:EnvProperties, pid: string, page=1, size=500):any {
return this.searchProjectsWithPaging(properties,pid,page, size, null, null);
}
searchProjectsWithPaging (properties:EnvProperties, pid: string, page=1, size=500, searchFilter, funder, orderBy = "name"):any {
let params = funder ? ["funder="+ funder] :[];
if (searchFilter) {
params.push("searchFilter="+ searchFilter)
}
params.push("orderBy="+ orderBy);
let url = properties.communityAPI+pid+"/projects/"+ (page-1) + "/" + size + (params.length > 0?"?" + params.join("&"):"");
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
//.map(res => <any> res.json())
}
countTotalProjects(properties:EnvProperties,pid:string) {
let url = properties.communityAPI+pid+"/projects";
let url = properties.communityAPI+pid+"/projects/0/1";
return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
.pipe(map(res => res['length']));
.pipe(map(res => res['totalElements']));
}
getProjectFunders(properties:EnvProperties,pid:string) {
let url = properties.communityAPI+pid+"/funders";
return this.http.get<string[]>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
}
}

View File

@ -1,55 +0,0 @@
<div *ngIf="!hidden" class="">
<div *ngIf="showSaveResetButtons" class="uk-article-title custom-article-title">
User Email Preferences for Claims Notifications
</div>
<div *ngIf="userValidMessage.length > 0" class = "uk-alert uk-alert-danger uk-animation-fade" role="alert">
{{userValidMessage}}
</div>
<div *ngIf="savedMessage.length > 0" class="uk-alert uk-alert-success uk-animation-fade" role="alert">
{{savedMessage}}
</div>
<errorMessages [status]="[status]" [type]="'notification preferences'"></errorMessages>
<div *ngFor="let notification of notifications; let i=index" >
<!-- <div class="uk-accordion-title">Email preferences for {{preferencesFor}}: <strong>{{notification.openaireName}}</strong></div>-->
<!-- <div class="uk-accordion-content">-->
<form class="uk-form-horizontal"><!-- [formGroup]="myForm"-->
<!--[ngClass]="{'has-error':!myForm.controls.notify.valid && myForm.controls.notify.dirty}"-->
<div class="uk-margin uk-grid">
<div class=" inherit-color uk-width-medium"
title="Get e-mail notification when there are new user links related your community">Notify
for new user links:</div>
<mat-slide-toggle [checked]="notification.notify"
(change)="($event.source.checked = notification.notify);changeNotify(notification, !notification.notify, i)"></mat-slide-toggle>
</div>
<div *ngIf="notification.notify" [class]="notification.notify ? 'uk-margin' :
'uk-margin cursor-not-allowed'">
<div class="uk-form-label inherit-color">Frequency:</div>
<div class="uk-form-controls">
<select [class]="notification.notify ? 'uk-select' : 'uk-select uk-disabled'" id="form-horizontal-select"
[(ngModel)]="notification.frequency" (ngModelChange)="changeFrequency(i)" name="select_frequency">
<option [ngValue]="24" >Daily</option>
<option [ngValue]="48" >Every two days</option>
<option [ngValue]="168">Weekly</option>
</select>
</div>
</div>
<div *ngIf="showSaveResetButtons" class="uk-float-right">
<button type="submit" class="uk-button uk-button-primary" (click)="saveNotification(i)">Save Changes</button>
<button type="submit" class="uk-button" (click)="restoreNotification(i)">Reset</button>
</div>
</form>
</div>
<!-- </div>-->
<!-- </ul>-->
</div>

View File

@ -1,259 +0,0 @@
import {Component, Input} from '@angular/core';
import {Location} from '@angular/common';
import {ActivatedRoute, Router} from '@angular/router';
import {Session} from '../../login/utils/helper.class';
import {EnvProperties} from '../../utils/properties/env-properties';
import {MailPrefsService} from './mailPrefs.service';
import {ConnectHelper} from '../connectHelper';
import {ErrorCodes} from '../../utils/properties/errorCodes';
import {ErrorMessagesComponent} from '../../utils/errorMessages.component';
import {LoginErrorCodes} from '../../login/utils/guardHelper.class';
import {properties} from "../../../../environments/environment";
import {Subscriber} from "rxjs";
declare var UIkit: any;
@Component({
selector: 'mailPrefs',
templateUrl: 'mailPrefs.component.html',
providers:[MailPrefsService]
})
export class MailPrefsComponent {
properties:EnvProperties;
subscriptions = [];
@Input() communityId: string;
public preferencesFor: string = "community";
public status: number;
public notifications = [];
public initialNotifications = [];
public prefsChanged = {};
public hidden: boolean = true;
//public showForbiddenMessage:boolean = false;
public userValidMessage:string = "";
public savedMessage: string = "";
private errorCodes: ErrorCodes;
private errorMessages: ErrorMessagesComponent;
@Input() showSaveResetButtons: boolean = true;
constructor (private _mailPrefsService: MailPrefsService, private route: ActivatedRoute, private _router:Router, private location: Location) {
this.errorCodes = new ErrorCodes();
this.errorMessages = new ErrorMessagesComponent();
this.status = this.errorCodes.LOADING;
}
ngOnInit() {
this.properties = properties;
this.subscriptions.push(this.route.params.subscribe(params => {
this.hidden = true;
console.debug(this.communityId);
if(!this.communityId){
this.communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain);
}
if(!this.communityId) {
this.communityId = params['community'];
}
console.debug(this.communityId, params)
this.getEmailPreferences();
}));
}
getEmailPreferences() {
if(!Session.isLoggedIn()){
//this.userValidMessage = "User session has expired. Please login again.";
if(this.showSaveResetButtons) {
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
}
} else {
this.status = this.errorCodes.LOADING;
this.savedMessage = "";
if(this.communityId && this.communityId != "openaire") {
this.preferencesFor = "community";
this.subscriptions.push(this._mailPrefsService.getUserEmailPreferencesForCommunity(this.communityId, this.properties.claimsAPIURL).subscribe(
data => {
if(data.code == "204") {
this.status = this.errorCodes.NONE;
this.initialNotifications = [{notify: true, frequency:24, openaireId: this.communityId}];
} else {
this.initialNotifications = data.data;
}
this.notifications = JSON.parse(JSON.stringify( this.initialNotifications ));
this.status = this.errorCodes.DONE;
this.hidden = false;
},
err => {
this.hidden = false;
this.handleErrors(err);
this.handleError("Error getting user email preferences for community with id: "+this.communityId, err);
}
));
} else {
this.preferencesFor = "project";
this.subscriptions.push(this._mailPrefsService.getUserEmailPreferencesForOpenaire(this.properties.claimsAPIURL).subscribe(
data => {
if(data.code == "204") {
this.status = this.errorCodes.NONE;
} else {
this.initialNotifications = data.data;
this.notifications = JSON.parse(JSON.stringify( this.initialNotifications ));
//this.notifications = this.initialNotifications.map(x => Object.assign({}, x));
//this.notifications = this.initialNotifications;
this.status = this.errorCodes.DONE;
}
},
err => {
//console.info(err);
this.handleErrors(err);
this.handleError("Error getting user email preferences for openaire", err);
}
));
}
}
}
changeNotify(notification: any, checked: boolean, index: number) {
if(!Session.isLoggedIn()){
//this.userValidMessage = "User session has expired. Please login again.";
if(this.showSaveResetButtons) {
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
}
} else {
this.savedMessage = "";
this.status = this.errorCodes.DONE;
notification.notify = checked;
this.prefsChanged[index] = true;
}
}
changeFrequency(index: number) {
if(!Session.isLoggedIn()){
//this.userValidMessage = "User session has expired. Please login again.";
if(this.showSaveResetButtons) {
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
}
} else {
this.savedMessage = "";
this.status = this.errorCodes.DONE;
if(this.initialNotifications[index].frequency != this.notifications[index].frequency) {
this.prefsChanged[index] = true;
}
}
}
saveNotification(index: number) {
if(this.notifications.length > 0 && this.initialNotifications.length > 0) {
if(!Session.isLoggedIn()){
//this.userValidMessage = "User session has expired. Please login again.";
if(this.showSaveResetButtons) {
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
}
} else {
if(JSON.stringify(this.notifications[index]) != JSON.stringify(this.initialNotifications[index])) {
this.status = this.errorCodes.LOADING;
this.savedMessage = "";
this.subscriptions.push(this._mailPrefsService.saveUserEmailPreferences(this.notifications[index], this.properties.claimsAPIURL).subscribe(
data => {
this.initialNotifications[index] = JSON.parse(JSON.stringify( this.notifications[index] ));
this.status = this.errorCodes.DONE;
/*UIkit.notification({
message : '<strong>Your email preferences for '+this.notifications[index].openaireName+' have been successfully changed<strong>',
status : 'success',
timeout : 3000,
pos : 'top-center'
});*/
this.savedMessage = "Notification settings for claims saved!";
},
err => {
//console.log(err);
this.handleError("Error saving user email preferences: "+JSON.stringify(this.notifications[index]), err);
this.status = this.errorCodes.NOT_SAVED;
}
));
}
else {
/*UIkit.notification({
message : '<strong>No changes selected for '+this.notifications[index].openaireName+' email preferences<strong>',
status : 'primary',
timeout : 3000,
pos : 'top-center'
});*/
this.savedMessage = "Notification settings for claims saved!";
}
}
}
}
restoreNotification(index: number) {
if(!Session.isLoggedIn()){
//this.userValidMessage = "User session has expired. Please login again.";
if(this.showSaveResetButtons) {
this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
}
} else {
if(this.notifications.length > 0 && this.initialNotifications.length > 0) {
this.status = this.errorCodes.LOADING;
this.savedMessage = "";
this.notifications[index] = JSON.parse(JSON.stringify( this.initialNotifications[index] ));
this.status = this.errorCodes.DONE;
this.prefsChanged[index] = false;
}
}
}
/*
prefsChanged(index: number) : boolean {
if(this.notifications.length > 0 && this.initialNotifications.length > 0) {
if(JSON.stringify(this.notifications[index]) != JSON.stringify(this.initialNotifications[index])) {
return true;
}
}
return false;
}
*/
ngOnDestroy() {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) {
subscription.unsubscribe();
}
});
}
handleErrors(err){
//this.showErrorMessage = true;
//try{
var code = "";
if(!err.status) {
var error = err.json();
code = error.code;
} else {
code = err.status;
}
this.status = this.errorMessages.getErrorCode(code);
}
private handleError(message: string, error) {
console.error("User mail notification preferences Page (for claims): "+message, error);
}
//}catch (e) {
//console.log("Couldn't parse answer as json")
//this.showErrorMessage = true;
//}
}

View File

@ -8,46 +8,15 @@ export class MailPrefsService {
constructor(private http: HttpClient ) {}
getUserEmailPreferencesForCommunity (communityId:string, apiUrl:string):any {
let url = apiUrl +"users/notification"+"?communityId="+communityId;
return this.http.get(url, CustomOptions.getAuthOptions())
//.map(request => <any> request.json())
//.do(request => console.info("Get user email preferences for communityId= "+communityId ));
//.catch(this.handleError);
return this.http.get(apiUrl +"users/notification"+"?communityId="+communityId, CustomOptions.getAuthOptions())
}
getUserEmailPreferencesForOpenaire (apiUrl:string):any {
let url = apiUrl +"users/notification";
//var error: HttpErrorResponse = new HttpErrorResponse({"error": {"code": 204}, "status" : 204}); // doesn't work
//var response: Response = new Response({"body" : {"code":200, "data": []}, "status": 200, "headers": null, "url": "", "merge": null});
return this.http.get(url, CustomOptions.getAuthOptions())
//.timeoutWith(100, Observable.throw(response)) // goes to error
//.timeoutWith(100, Observable.of(response)) // goes to
//.do(request => console.info(request))
//.map(request => <any> request.json())
//.do(request => console.info("Get user email preferences for OpenAIRE" ));
//.catch(this.handleError);
return this.http.get(apiUrl +"users/notification", CustomOptions.getAuthOptions());
}
saveUserEmailPreferences (notification: any, apiUrl: string) {
let url = apiUrl +"users/notification/save";
let body = JSON.stringify( notification );
//console.warn('Json body: : '+body);
//let headers = new Headers({ 'Content-Type': 'application/json' });
//let options = new RequestOptions({ headers: headers });
return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody())
//.map(res => res.json())
//.do(request => console.info("Insert Response:"+request.status) );
//.catch(this.handleError);
}
private handleError (error: HttpErrorResponse) {
// in a real world app, we may send the error to some remote logging infrastructure
// instead of just logging it to the console
console.log(error);
return throwError(error || 'Server error');
let body = JSON.stringify(notification);
return this.http.post(apiUrl +"users/notification/save", body, CustomOptions.getAuthOptionsWithBody());
}
}

View File

@ -1,23 +0,0 @@
import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MailPrefsComponent } from './mailPrefs.component';
import { MailPrefsService } from './mailPrefs.service';
import {ErrorMessagesModule} from '../../utils/errorMessages.module';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
@NgModule({
imports: [
CommonModule, RouterModule, FormsModule, ReactiveFormsModule, ErrorMessagesModule, MatSlideToggleModule
],
declarations: [
MailPrefsComponent
],
providers:[MailPrefsService],
exports: [
MailPrefsComponent
]
})
export class MailPrefsModule { }

View File

@ -1,15 +0,0 @@
import {Injectable} from '@angular/core';
import {HttpClient} from "@angular/common/http";
import{EnvProperties} from '../../utils/properties/env-properties';
@Injectable()
export class SearchZenodoCommunitiesService {
constructor(private http: HttpClient ) {}
searchZCommunities (properties:EnvProperties, pid: string):any {
let url = properties.communityAPI+pid+"/zenodocommunities";
return this.http.get((properties.useCache)? (properties.cacheUrl+encodeURIComponent(url)): url);
//.map(res => <any> res.json())
}
}

View File

@ -16,12 +16,12 @@ export class ZenodoCommunitiesService {
//.map(res => <any> res.json())
.pipe(map(res => [this.parseZenodoCommunities(res['hits'].hits),res['hits'].total]));
}
getZenodoCommunityById(properties:EnvProperties, url: string, openaireId:string) {
getZenodoCommunityById(properties:EnvProperties, id: string) {
let url = properties.zenodoCommunities + "/" + id;
return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)) : url)
//.map(res => <any> res.json())
.pipe(map(res => {
var community = this.parseZenodoCommunity(res);
community["openaireId"]=openaireId;
return community;
}));
}
@ -40,14 +40,14 @@ export class ZenodoCommunitiesService {
parseZenodoCommunity(resData:any):ZenodoCommunityInfo {
var result: ZenodoCommunityInfo = new ZenodoCommunityInfo();
result['title'] = resData.title;
let metadata = resData["metadata"];
result['title'] = metadata.title;
result['id'] = resData.id;
result['description'] = resData.description;
result['link'] = resData.links.html;
result['logoUrl'] = resData.logo_url;
result['description'] = metadata.description;
result['link'] = resData.links.self_html;
result['logoUrl'] = resData.links.logo;
result['date'] = resData.updated;
result['page'] = resData.page;
result['page'] = metadata.page;
return result;
}

View File

@ -6,5 +6,4 @@ export class ZenodoCommunityInfo {
logoUrl: string;
date: Date;
page: string;
openaireId:string;
}

View File

@ -1,4 +0,0 @@
.uk-text-danger {
color: #b50000!important;
font-size: 12px;
}

View File

@ -1,90 +1,44 @@
<h3 *ngIf="formTitle" class="uk-margin-auto">{{formTitle}}</h3>
<div *ngIf="errorMessage" class="uk-width-1-1 uk-alert uk-alert-danger uk-text-center"
role="alert">{{errorMessage}}</div>
<div class="uk-margin-top" uk-grid [formGroup]="contactForm">
<div class="uk-margin-small uk-width-1-1 uk-text-danger uk-text-bold uk-margin-remove-bottom">
*Required fields
</div>
<div *ngIf="contactForm.get('name')" class="uk-width-1-2@s uk-margin-medium-top">
<h6 class="uk-text-bold uk-margin-small-bottom">
Name <span class="uk-text-danger uk-text-bold">*</span>
</h6>
<input class="uk-input" type="text" placeholder="Your name" formControlName="name"
[class.uk-form-danger]="contactForm.get('name').invalid && contactForm.get('name').touched">
</div>
<div *ngIf="contactForm.get('surname')" class="uk-width-1-2@s uk-margin-medium-top">
<h6 class="uk-text-bold uk-margin-small-bottom">
Surname <span class="uk-text-danger uk-text-bold">*</span>
</h6>
<input class="uk-input" type="text" placeholder="Your surname" formControlName="surname"
[class.uk-form-danger]="contactForm.get('surname').invalid && contactForm.get('surname').touched">
</div>
<div *ngIf="contactForm.get('email')" class="uk-width-1-2@s uk-margin-medium-top">
<h6 class="uk-text-bold uk-margin-small-bottom">
Email <span class="uk-text-danger uk-text-bold">*</span>
</h6>
<input class="uk-input" type="text" placeholder="Preferably your work email" formControlName="email"
[class.uk-form-danger]="contactForm.get('email').invalid && contactForm.get('email').touched">
</div>
<div *ngIf="contactForm.get('job')" class="uk-width-1-2@s uk-margin-medium-top">
<h6 class="uk-text-bold uk-margin-small-bottom">
Job Title <span class="uk-text-danger uk-text-bold">*</span>
</h6>
<input class="uk-input" type="text" placeholder="Your job title" formControlName="job"
[class.uk-form-danger]="contactForm.get('job').invalid && contactForm.get('job').touched">
</div>
<div *ngIf="contactForm.get('affiliation')" class="uk-width-1-2@s uk-margin-medium-top">
<h6 class="uk-text-bold uk-margin-small-bottom">
Affiliation <span class="uk-text-danger uk-text-bold">*</span>
</h6>
<input class="uk-input" type="text" placeholder="Your affiliation" formControlName="affiliation"
[class.uk-form-danger]="contactForm.get('affiliation').invalid && contactForm.get('affiliation').touched">
</div>
<div *ngIf="contactForm.get('community')" class="uk-width-1-2@s uk-margin-medium-top">
<div class="uk-width-1-1">
<h6 class="uk-text-bold uk-margin-small-bottom uk-text-nowrap">Research Community or Infrastructure <span class="uk-text-danger uk-text-bold">*</span></h6>
</div>
<input class="uk-input uk-width-1" type="text" placeholder="Your community name" formControlName="community"
[class.uk-form-danger]="contactForm.get('community').invalid && contactForm.get('community').touched">
</div>
<div *ngIf="contactForm.get('organization')" class="uk-width-1-2@s uk-margin-medium-top">
<h6 class="uk-text-bold uk-margin-small-bottom">Organization <span class="uk-text-danger uk-text-bold">*</span></h6>
<input class="uk-input uk-width-1-1" type="text" placeholder="Your organization" formControlName="organization"
[class.uk-form-danger]="contactForm.get('organization').invalid && contactForm.get('organization').touched">
</div>
<div *ngIf="contactForm.get('organizationType')" class="uk-width-1-2@s uk-margin-medium-top">
<h6 class="uk-text-bold uk-margin-small-bottom">Organization Type <span class="uk-text-danger uk-text-bold">*</span></h6>
<select class="uk-select uk-width-1-1" formControlName="organizationType">
<option [value]="''" hidden selected>Select your organization type</option>
<option *ngFor="let option of organizationTypes" [value]="option">{{option}}</option>
</select>
</div>
<div *ngIf="contactForm.get('subject')" class="uk-width-1-1@s uk-margin-medium-top">
<h6 class="uk-text-bold uk-margin-small-bottom">Subject <span class="uk-text-danger uk-text-bold">*</span></h6>
<input class="uk-input uk-width-1-1" type="text" placeholder="Your subject" formControlName="subject"
[class.uk-form-danger]="contactForm.get('subject').invalid && contactForm.get('subject').touched">
</div>
<div *ngIf="contactForm.get('message')" class="uk-width-1-1 uk-margin-medium-top">
<h6 class="uk-text-bold uk-margin-small-bottom">
Message <span class="uk-text-danger uk-text-bold">*</span>
</h6>
<textarea rows="4" class="uk-textarea" placeholder="Your message" formControlName="message"
[class.uk-form-danger]="contactForm.get('message').invalid && contactForm.get('message').touched">
</textarea>
</div>
<div *ngIf="contactForm.get('description')" class="uk-width-1-1 uk-margin-medium-top">
<h6 class="uk-text-bold uk-margin-small-bottom">
Description <span class="uk-text-danger uk-text-bold">*</span>
</h6>
<textarea rows="4" class="uk-textarea" placeholder="Your description" formControlName="description"
[class.uk-form-danger]="contactForm.get('description').invalid && contactForm.get('description').touched">
</textarea>
</div>
<div *ngIf="contactForm.get('recaptcha')" class="uk-width-1-2@s uk-margin-top">
<re-captcha (resolved)="handleRecaptcha($event)" [(siteKey)]="properties.reCaptchaSiteKey">
</re-captcha>
</div>
<div class="uk-margin-medium-top uk-width-1-1">
<button class="uk-button" [class.portal-button]="!buttonClass" [ngClass]="buttonClass" (click)="send()">Send</button>
<h1 *ngIf="formTitle" class="uk-margin-auto">{{formTitle}}</h1>
<ng-content select="[page-title]"></ng-content>
<ng-content select="[page-description]"></ng-content>
<div class="uk-child-width-1-1 uk-grid uk-grid-margin-large" [attr.uk-scrollspy-class]="scrollspy?'':null"
[class.uk-grid-column-small]="smallForm" [class.uk-child-width-1-2@s]="!smallForm" [formGroup]="contactForm" uk-grid>
<div *ngIf="contactForm.get('name')" input placeholder="Name"
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('name')"></div>
<div *ngIf="contactForm.get('surname')" input placeholder="Surname"
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('surname')"></div>
<div *ngIf="contactForm.get('email')" input placeholder="Email"
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('email')"></div>
<div *ngIf="contactForm.get('job')" input placeholder="Job Title"
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('job')"></div>
<div *ngIf="contactForm.get('affiliation')" input placeholder="Affiliation"
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('affiliation')"></div>
<div *ngIf="contactForm.get('community')" input placeholder="Research Community or Infrastructure"
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('community')"></div>
<div *ngIf="contactForm.get('organization')" input placeholder="Organization"
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('organization')"></div>
<div *ngIf="contactForm.get('organizationType')" input type="select" placeholder="Organization Type"
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('organizationType')" [options]="organizationTypes"></div>
<div *ngIf="contactForm.get('subject')" class="uk-width-1-1" input placeholder="Subject"
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('subject')"></div>
<div *ngIf="contactForm.get('message')" class="uk-width-1-1" input type="textarea" rows="4" placeholder="Comments"
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('message')"></div>
<div *ngIf="contactForm.get('description')" class="uk-width-1-1" input type="textarea" rows="4" placeholder="Description"
[inputClass]="'flat' + (smallForm?' x-small':'')" [formInput]="contactForm.get('description')"></div>
<div *ngIf="contactForm.get('recaptcha')" class="uk-flex uk-flex-center" [class.uk-width-1-1]="smallForm" [class.uk-flex-last@s]="!smallForm">
<re-captcha #captchaElem (resolved)="handleRecaptcha($event)" [siteKey]="properties.reCaptchaSiteKey"></re-captcha>
</div>
<div class="uk-flex uk-flex-center" [class.uk-width-1-1]="smallForm" [class.uk-flex-column]="!smallForm">
<div class="uk-flex uk-flex-center" [class.uk-flex-left@s]="!smallForm">
<button class="uk-button uk-text-uppercase uk-flex uk-flex-middle"
[class.uk-disabled]="contactForm.invalid || sending"
[class.uk-button-primary]="!buttonClass && contactForm.valid"
[ngClass]="(contactForm.valid?buttonClass:'')"
(click)="send()">
{{sendButton}}
<span *ngIf="sending" class="uk-icon uk-margin-small-left"><loading [top_margin]="false" [size]="'small'"
[color]="null"></loading></span>
</button>
</div>
</div>
</div>

View File

@ -1,28 +1,27 @@
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {Component, EventEmitter, Input, Output, ViewChild} from '@angular/core';
import {FormGroup} from '@angular/forms';
import {EnvProperties} from "../utils/properties/env-properties";
import {Observable} from "rxjs";
import {map, startWith} from "rxjs/operators";
import {properties} from "../../../environments/environment";
import {RecaptchaComponent} from "ng-recaptcha";
@Component({
selector: 'contact-us',
templateUrl: './contact-us.component.html',
styleUrls: ['contact-us.component.css']
templateUrl: './contact-us.component.html'
})
export class ContactUsComponent {
@Input()
public contactForm: FormGroup;
@Input() formTitle: string;
@Input() properties: EnvProperties;
@Input() public contactForm: FormGroup;
@Input() public formTitle: string;
@Input() public organizationTypes: string[];
@Input() public buttonClass: string;
@Input() public sendButton: string = "Send";
@Input() public smallForm: boolean = false;
@Input() public scrollspy: boolean = false;
@Input() public sending: boolean = false;
@Output() sendEmitter: EventEmitter<any> = new EventEmitter<any>();
@Input() errorMessage;
@Input()
public organizationTypes: string[];
@Input()
public right: boolean = true;
@Input()
public buttonClass: string;
@ViewChild('captchaElem') captchaElem: RecaptchaComponent;
public properties: EnvProperties = properties;
public send() {
this.sendEmitter.emit({
@ -33,4 +32,8 @@ export class ContactUsComponent {
public handleRecaptcha(captchaResponse: string) {
this.contactForm.get('recaptcha').setValue(captchaResponse);
}
public resetRecaptcha() {
this.captchaElem.reset();
}
}

View File

@ -6,11 +6,14 @@ import {ContactUsComponent} from './contact-us.component';
import {ReactiveFormsModule} from "@angular/forms";
import {MatAutocompleteModule} from "@angular/material/autocomplete";
import {RecaptchaModule} from "ng-recaptcha";
import {SafeHtmlPipeModule} from "../utils/pipes/safeHTMLPipe.module";
import {LoadingModule} from "../utils/loading/loading.module";
import {InputModule} from "../sharedComponents/input/input.module";
@NgModule({
imports: [
CommonModule, RouterModule,
ReactiveFormsModule, MatAutocompleteModule, RecaptchaModule],
ReactiveFormsModule, MatAutocompleteModule, RecaptchaModule, SafeHtmlPipeModule, LoadingModule, InputModule],
declarations: [
ContactUsComponent
],

View File

@ -1,108 +1,105 @@
<div page-content class="admin-pages">
<div page-content>
<div header>
<admin-tabs tab="class" header></admin-tabs>
<div *ngIf="!showLoading" class="uk-grid" uk-grid>
<div class="uk-width-1-1">
<ul class="uk-subnav uk-subnav-pill">
<li [class.uk-active]="filterForm.get('type').value === 'all'" class="uk-margin-small-bottom"><a
(click)="filterForm.get('type').setValue('all')"><span
class="title">All portals</span></a></li>
<li *ngFor="let type of portalUtils.portalTypes; let i=index"
[class.uk-active]="filterForm.get('type').value === type.value" class="uk-margin-small-bottom"><a
(click)="filterForm.get('type').setValue(type.value)"><span
class="title">{{type.label}}</span></a></li>
</ul>
</div>
<div class="uk-width-1-1 uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle uk-grid" uk-grid>
<div #searchInputComponent search-input [control]="filterForm.controls.keyword" [showSearch]="false"
placeholder="Search class"
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
[bordered]="true" colorClass="uk-text-secondary"
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
<div class="show-options">
<button class="uk-button uk-button-secondary">Bulk Actions</button>
<div uk-dropdown="mode: click">
<ul class="uk-nav uk-dropdown-nav"
[attr.uk-tooltip]="getSelectedDivIds().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
title="Select at least one class">
<li><a [class]="getSelectedDivIds().length == 0 ? 'uk-disabled' : ''"
(click)="confirmDeleteSelectedDivIds()"><i></i> Delete </a></li>
</ul>
</div>
</div>
<admin-tabs tab="class"></admin-tabs>
<ul class="uk-subnav uk-subnav-pill uk-margin-medium-top">
<li [class.uk-active]="filterForm.get('type').value === 'all'" class="uk-margin-small-bottom"><a
(click)="filterForm.get('type').setValue('all')"><span
class="title">All portals</span></a></li>
<li *ngFor="let type of portalUtils.portalTypes; let i=index"
[class.uk-active]="filterForm.get('type').value === type.value" class="uk-margin-small-bottom"><a
(click)="filterForm.get('type').setValue(type.value)"><span
class="title">{{type.label}}</span></a></li>
</ul>
</div>
<div actions>
<div class="uk-section-xsmall">
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle uk-grid" uk-grid>
<div search-input [disabled]="showLoading" [expandable]="true" [searchControl]="filterForm.get('keyword')" searchInputClass="outer" placeholder="Search class" class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
<div>
<a (click)="newDivId()"
class="uk-flex uk-flex-middle uk-text-uppercase">
<button class="large uk-icon-button uk-button-secondary">
<icon name="add"></icon>
</button>
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Add class</button>
</a>
<button class="uk-button uk-button-default uk-flex uk-flex-middle" (click)="newDivId()"
[disabled]="showLoading" [class.uk-disabled]="showLoading">
<icon name="add" [flex]="true"></icon>
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">Add class</span>
</button>
</div>
</div>
</div>
</div>
<div inner>
<div *ngIf="showLoading" class="uk-position-center">
<loading></loading>
</div>
<div *ngIf="!showLoading">
<table *ngIf="checkboxes.length > 0"class="uk-table uk-table-striped uk-table-large">
<thead class="uk-card-header">
<tr>
<th
class="uk-width-small"><input id="allDivIdCheckbox" type="checkbox"
(change)="toggleCheckBoxes($event)"></th>
<th>Name</th>
<th *ngIf="!selectedCommunityPid">Portal Type</th>
<th>Page</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let check of checkboxes; let i=index">
<td><input id="{{check.divId._id}}" class="checkBox" type="checkbox"
name="divIdscb[]" value="{{check.divId._id}}" [(ngModel)]="check.checked">
</td>
<td>
<div class="name" href="#">{{check.divId.name}}</div>
</td>
<td *ngIf="!selectedCommunityPid">
<div class="portalType" href="#">{{check.divId.portalType}}</div>
</td>
<td>
<div class="pages" href="#">
<span *ngFor="let page of check.divId.pages let i=index">{{page.name}}<span
*ngIf="i<(check.divId.pages.length-1)">, </span></span>
</div>
</td>
<td>
<div class="actions" href="#">
<icon class="clickable" name="edit" (click)="editDivId(i)"></icon>
<icon class="clickable uk-margin-small-left" [customClass]="'uk-text-danger'" name="remove" (click)="confirmDeleteDivId(check.divId._id)"></icon>
</div>
</td>
</tr>
</tbody>
</table>
<div *ngIf="checkboxes.length == 0"
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
<div>No classes found</div>
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
<div *ngIf="showLoading" class="uk-position-center">
<loading></loading>
</div>
<ng-container *ngIf="!showLoading">
<div *ngIf="checkboxes.length == 0"
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
<div>No classes found</div>
</div>
<table *ngIf="checkboxes.length > 0" class="uk-table uk-table-striped uk-table-large">
<thead>
<tr class="uk-child-width-1-5">
<th>
<label>
<input id="checkAll" type="checkbox" (click)="toggleCheckBoxes($event)" class="uk-checkbox"
[ngModel]="getSelectedDivIds().length ==checkboxes.length"/>
</label>
<span class="uk-margin-left">
<button class="uk-button uk-button-link" [class.uk-disabled]="getSelectedDivIds().length == 0" [disabled]="getSelectedDivIds().length == 0">
Bulk Actions ({{getSelectedDivIds().length}})
</button>
<div uk-dropdown="mode: click">
<ul class="uk-nav uk-dropdown-nav"
[attr.uk-tooltip]="getSelectedDivIds().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
title="Select at least one entity">
<li>
<a (click)="confirmDeleteSelectedDivIds()"><i></i>Delete</a>
</li>
</ul>
</div>
</span>
</th>
<th>Name</th>
<th *ngIf="!selectedCommunityPid">Portal Type</th>
<th>Page</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let check of checkboxes; let i=index">
<td><input id="{{check.divId._id}}" class="uk-checkbox" type="checkbox"
name="divIdscb[]" value="{{check.divId._id}}" [(ngModel)]="check.checked">
</td>
<td>
<div class="name" href="#">{{check.divId.name}}</div>
</td>
<td *ngIf="!selectedCommunityPid">
<div class="portalType" href="#">{{check.divId.portalType}}</div>
</td>
<td>
<div class="pages" href="#">
<span *ngFor="let page of check.divId.pages let i=index">{{page.name}}<span
*ngIf="i<(check.divId.pages.length-1)">, </span></span>
</div>
</td>
<td>
<div class="uk-flex uk-flex-middle">
<icon class="clickable" [flex]="true" name="edit" [customClass]="'uk-text-primary'" (click)="editDivId(i)"></icon>
<icon class="clickable uk-margin-small-left" [flex]="true" [customClass]="'uk-text-danger'" name="delete" (click)="confirmDeleteDivId(check.divId._id)"></icon>
</div>
</td>
</tr>
</tbody>
</table>
</ng-container>
</div>
</div>
</div>
<modal-alert #editModal (alertOutput)="divIdSaveConfirmed($event)"
[okDisabled]="classForm && (classForm.invalid || !classForm.dirty)">
[okDisabled]="classForm && (classForm.invalid || !classForm.dirty)" classTitle="uk-background-primary uk-light">
<form *ngIf="classForm" [formGroup]="classForm" class="uk-grid uk-child-width-1-1" uk-grid>
<div dashboard-input [formInput]="classForm.get('name')"
type="text" label="Class Name" placeholder="Write a name">
</div>
<div dashboard-input [formInput]="classForm.get('pages')" placeholder="Add a page"
type="chips" [options]="allPages" label="Pages">
</div>
<div dashboard-input type="select" label="Portal Type" placeholder="Choose a type"
[formInput]="classForm.get('portalType')" [options]="portalUtils.portalTypes"></div>
<div input [formInput]="classForm.get('name')" placeholder="Class Name"></div>
<div input [formInput]="classForm.get('pages')" placeholder="Pages" [options]="allPages" type="chips"></div>
<div input [formInput]="classForm.get('portalType')" placeholder="Portal Type" [options]="portalUtils.portalTypes" type="select"></div>
</form>
</modal-alert>
<modal-alert #deleteModal (alertOutput)="confirmedDeleteDivIds($event)"></modal-alert>
<modal-alert #deleteModal [overflowBody]="false" (alertOutput)="confirmedDeleteDivIds($event)" classTitle="uk-background-primary uk-light"></modal-alert>

View File

@ -1,7 +1,7 @@
import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from "@angular/router";
import {HelpContentService} from "../../services/help-content.service";
import {FormArray, FormBuilder, FormGroup, Validators} from "@angular/forms";
import {UntypedFormArray, UntypedFormBuilder, UntypedFormGroup, Validators} from "@angular/forms";
import {CheckDivId, DivId} from "../../utils/entities/adminTool/divId";
import {Page} from "../../utils/entities/adminTool/page";
import {EnvProperties} from '../../utils/properties/env-properties';
@ -11,42 +11,39 @@ import {properties} from "../../../../environments/environment";
import {PortalUtils} from "../portal/portalHelper";
import {AlertModal} from "../../utils/modal/alert";
import {Option} from "../../sharedComponents/input/input.component";
import {SearchInputComponent} from "../../sharedComponents/search-input/search-input.component";
import {Title} from "@angular/platform-browser";
declare var UIkit;
import {ClearCacheService} from "../../services/clear-cache.service";
import {NotificationHandler} from "../../utils/notification-handler";
@Component({
selector: 'divIds',
templateUrl: './divIds.component.html',
})
export class DivIdsComponent implements OnInit {
@ViewChild('editModal') editModal: AlertModal;
@ViewChild('deleteModal') deleteModal: AlertModal;
private selectedDivIds: string[] = [];
public checkboxes: CheckDivId[] = [];
public divIds: DivId[] = [];
public classForm: FormGroup;
public pagesCtrl: FormArray;
public classForm: UntypedFormGroup;
public pagesCtrl: UntypedFormArray;
private searchText: RegExp = new RegExp('');
public keyword: string = "";
public properties: EnvProperties = properties;
public formPages: Page[] = [];
public showLoading: boolean = true;
public filterForm: FormGroup;
public filterForm: UntypedFormGroup;
private subscriptions: any[] = [];
public allPages: Option[] = [];
selectedCommunityPid = null;
public portalUtils: PortalUtils = new PortalUtils();
private index: number;
public selectedKeyword: string;
@ViewChild('searchInputComponent') searchInputComponent: SearchInputComponent;
constructor(private element: ElementRef, private route: ActivatedRoute, private _router: Router,
private title: Title,
private _helpContentService: HelpContentService, private _fb: FormBuilder) {
private _helpContentService: HelpContentService, private _fb: UntypedFormBuilder,
private _clearCacheService: ClearCacheService) {
}
ngOnInit() {
@ -133,8 +130,6 @@ export class DivIdsComponent implements OnInit {
}
private confirmModalOpen() {
this.deleteModal.cancelButton = true;
this.deleteModal.okButton = true;
this.deleteModal.alertTitle = "Delete Confirmation";
this.deleteModal.message = "Are you sure you want to delete the selected class(es)?";
this.deleteModal.okButtonText = "Yes";
@ -146,12 +141,9 @@ export class DivIdsComponent implements OnInit {
this.subscriptions.push(this._helpContentService.deleteDivIds(this.selectedDivIds, this.properties.adminToolsAPIURL).subscribe(
_ => {
this.deleteDivIdsFromArray(this.selectedDivIds);
UIkit.notification('Classes have been <b>successfully deleted</b>', {
status: 'success',
timeout: 6000,
pos: 'bottom-right'
});
NotificationHandler.rise('Classes have been <b>successfully deleted</b>');
this.showLoading = false;
this._clearCacheService.clearCache("Class ids deleted");
},
error => this.handleUpdateError('System error deleting the selected classes', error)
));
@ -190,8 +182,6 @@ export class DivIdsComponent implements OnInit {
}
private divIdsModalOpen(title: string, yesBtn: string) {
this.editModal.cancelButton = true;
this.editModal.okButton = true;
this.editModal.okButtonLeft = false;
this.editModal.alertTitle = title;
this.editModal.okButtonText = yesBtn;
@ -200,28 +190,21 @@ export class DivIdsComponent implements OnInit {
public divIdSaveConfirmed(data: any) {
this.showLoading = true;
if (!this.classForm.value._id) {
this.subscriptions.push(this._helpContentService.saveDivId(<DivId>this.classForm.value, this.properties.adminToolsAPIURL).subscribe(
if (!this.classForm.getRawValue()._id) {
this.subscriptions.push(this._helpContentService.saveDivId(<DivId>this.classForm.getRawValue(), this.properties.adminToolsAPIURL).subscribe(
divId => {
this.divIdSavedSuccessfully(divId);
UIkit.notification('Class <b>' + divId.name + '</b> has been <b>successfully created</b>', {
status: 'success',
timeout: 6000,
pos: 'bottom-right'
});
NotificationHandler.rise('Class <b>' + divId.name + '</b> has been <b>successfully created</b>');
this._clearCacheService.clearCache("Class id saved");
},
error => this.handleUpdateError("System error creating class", error)
));
} else {
this.classForm.get('portalType').enable();
this.subscriptions.push(this._helpContentService.updateDivId(<DivId>this.classForm.value, this.properties.adminToolsAPIURL).subscribe(
this.subscriptions.push(this._helpContentService.updateDivId(<DivId>this.classForm.getRawValue(), this.properties.adminToolsAPIURL).subscribe(
divId => {
this.divIdUpdatedSuccessfully(divId);
UIkit.notification('Class <b>' + divId.name + '</b> has been <b>successfully updated</b>', {
status: 'success',
timeout: 6000,
pos: 'bottom-right'
});
NotificationHandler.rise('Class <b>' + divId.name + '</b> has been <b>successfully updated</b>');
this._clearCacheService.clearCache("Class id updated");
},
error => this.handleUpdateError("System error updating class", error)
));
@ -257,31 +240,22 @@ export class DivIdsComponent implements OnInit {
}
public filterDivIds(divId: DivId): boolean {
let textFlag = this.searchText.toString() == '' || (divId.name + ' ' + divId.portalType).match(this.searchText) != null;
return textFlag;
return this.searchText.toString() == '' || (divId.name + ' ' + divId.portalType).match(this.searchText) != null;
}
handleUpdateError(message: string, error) {
if (error == null) {
// this.formComponent.reset();
} else {
UIkit.notification(message, {
status: 'danger',
timeout: 6000,
pos: 'bottom-right'
});
handleUpdateError(message: string, error = null) {
if (error) {
console.log('Server responded: ' + error);
}
NotificationHandler.rise(message,'danger');
this.showLoading = false;
}
handleError(message: string, error) {
UIkit.notification(message, {
status: 'danger',
timeout: 6000,
pos: 'bottom-right'
});
console.log('Server responded: ' + error);
handleError(message: string, error = null) {
if (error) {
console.log('Server responded: ' + error);
}
NotificationHandler.rise(message,'danger');
this.showLoading = false;
}
@ -301,13 +275,4 @@ export class DivIdsComponent implements OnInit {
error => this.handleError('System error retrieving pages', error)
));
}
public onSearchClose() {
this.selectedKeyword = this.filterForm.get('keyword').value;
}
public reset() {
this.selectedKeyword = null;
this.searchInputComponent.reset()
}
}

View File

@ -6,34 +6,21 @@ import {AlertModalModule} from '../../utils/modal/alertModal.module';
import {DivIdsComponent} from './divIds.component';
import {AdminToolServiceModule} from "../../services/adminToolService.module";
import {InputModule} from "../../sharedComponents/input/input.module";
import {MatAutocompleteModule} from '@angular/material/autocomplete';
import { MatCheckboxModule } from "@angular/material/checkbox";
import { MatFormFieldModule } from "@angular/material/form-field";
import {MatChipsModule} from '@angular/material/chips';
import {AdminTabsModule} from "../sharedComponents/admin-tabs/admin-tabs.module";
import {PageContentModule} from "../sharedComponents/page-content/page-content.module";
import {ClassesRoutingModule} from "./classes-routing.module";
import {SearchInputModule} from "../../sharedComponents/search-input/search-input.module";
import {IconsModule} from "../../utils/icons/icons.module";
import {IconsService} from "../../utils/icons/icons.service";
import {add, edit, remove} from "../../utils/icons/icons";
import {LoadingModule} from "../../utils/loading/loading.module";
@NgModule({
imports: [
ClassesRoutingModule,
CommonModule, RouterModule, FormsModule,
AlertModalModule, ReactiveFormsModule, AdminToolServiceModule, InputModule, MatAutocompleteModule, MatFormFieldModule, MatChipsModule,
MatCheckboxModule, AdminTabsModule, PageContentModule, ClassesRoutingModule, SearchInputModule, IconsModule, LoadingModule
AlertModalModule, ReactiveFormsModule, AdminToolServiceModule, InputModule,
AdminTabsModule, PageContentModule, SearchInputModule, IconsModule, LoadingModule
],
declarations: [DivIdsComponent],
exports: [DivIdsComponent]
})
export class DivIdsModule {
constructor(private iconsService: IconsService) {
this.iconsService.registerIcons([add, edit, remove]);
}
}
export class DivIdsModule {}

View File

@ -1,89 +1,78 @@
<div page-content>
<div header>
<div class="uk-margin-top">
<a routerLink="../" [queryParams]=" { 'pageId': pageId }"
class="uk-text-secondary uk-text-uppercase uk-text-bold uk-text-small">
<span class="uk-icon-button uk-icon small uk-button-secondary">
<icon name="arrow_left"></icon>
</span>
<span class="space">
Go back to class help texts list
</span>
</a>
<div class="uk-section-xsmall uk-margin-top uk-container">
<div class="uk-flex-middle uk-grid" uk-grid>
<div class="uk-width-expand">
<a routerLink="../" [queryParams]=" { 'pageId': pageId }" class="uk-flex uk-flex-middle uk-h5 uk-link-reset">
<span class="uk-margin-right">
<icon name="west" ratio="1.7" [flex]="true"></icon>
</span>
<h1 *ngIf="page" class="uk-h5 uk-margin-remove">
{{page.name}} - {{pageHelpContent ? 'Update ' : 'Add new '}} class help text
<span *ngIf="myForm.dirty" class="uk-text-large"> (unsaved changes)</span>
</h1>
</a>
</div>
<div class="uk-width-auto">
<button class="uk-button uk-button-default uk-margin-right"
(click)="resetCustom()" [class.uk-disabled]="!myForm.dirty"
[disabled]="!myForm.dirty || showLoading">Reset
</button>
<button class="uk-button uk-button-primary" [class.uk-disabled]="myForm.invalid || !myForm.dirty || myForm.disabled"
(click)="saveCustom()" [disabled]="myForm.invalid ||!myForm.dirty || myForm.disabled || showLoading">Save
</button>
</div>
</div>
</div>
</div>
<div inner>
<div class="uk-card-header">
<div class="uk-flex uk-flex-middle uk-child-width-1-1 uk-child-width-1-2@m uk-grid" uk-grid>
<div>
<div class="uk-text-small uk-text-muted"> {{pageHelpContent ? 'Update ' : 'Add new '}} class help text</div>
<div>
<span *ngIf="page" class="uk-text-bold">{{page.name}}</span>
<span *ngIf="myForm.dirty"> (unsaved changes)</span>
<div class="uk-container">
<div *ngIf="myForm" style="min-height: 60vh"
class="uk-section uk-section-small uk-position-relative">
<div *ngIf="showLoading" class="uk-position-center">
<loading *ngIf="showLoading"></loading>
</div>
<form *ngIf="!showLoading" [formGroup]="myForm">
<div class="uk-width-1-2" *ngIf="classOptions.length > 0" input [formInput]="myForm.get('divId')" placeholder="Select Class" [options]="classOptions" type="select"></div>
<div class="form-group uk-margin-medium-top">
<span class="uk-text-bold uk-margin-small-right">Select Status (Enable/ disable)</span>
<mat-slide-toggle [checked]="myForm.get('isActive').value"
(change)="changeStatus()"
uk-tooltip="title:<div><div class='uk-text-bold'> Enable or disable help text to show or hide it from the dashboard</div></div>"
></mat-slide-toggle>
</div>
<div class="form-group uk-margin-large-top"
[ngClass]="{'has-error':!myForm.controls.content.valid &&
myForm.controls.content.dirty}" >
<div class="uk-text-bold uk-margin-bottom uk-flex uk-flex-middle">
<span class="uk-margin-small-right">Content</span>
<button class="uk-button uk-button-link uk-text-normal"><icon name="info" type="outlined" [flex]="true"></icon></button>
<div class="uk-dropdown uk-text-normal uk-width-medium uk-padding-small" uk-dropdown>
OpenAIRE style guide is based on <a href="https://getuikit.com/docs/introduction" target="_blank" class="uk-link custom-external">UIKit</a>.
You can find some usage examples
<a *ngIf="properties.dashboard == 'monitor'" routerLink="/theme" [queryParams]="parentClass?{parentClass: parentClass}:null"
target="_blank" class="uk-link custom-external">here</a>
<a *ngIf="properties.dashboard == 'connect'" [href] ="'https://'+(properties.environment == 'beta' ? 'beta.' : '')+this.portal+'.openaire.eu/theme'"
target="_blank" class="uk-link custom-external">here</a>
in order to style your content.
</div>
</div>
<div [ngClass]="parentClass">
<ckeditor #ckEditor (change)="contentChanged()"
[readonly]="false"
debounce="500"
[formControl]="myForm.get('content')"
[config]="{ extraAllowedContent: '* [uk-*](*) ; span', disallowedContent: 'script; *[on*]',
removeButtons: 'Save,NewPage,DocProps,Preview,Print,' +
'Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,' +
'CreateDiv,Flash,PageBreak,' +
'Subscript,Superscript,Anchor,Smiley,Iframe,Styles,Font,About,Language',
extraPlugins: 'divarea', height: 500}">
</ckeditor>
</div>
</div>
<div class=" uk-flex uk-flex-right">
<button (click)="resetCustom()" [disabled]="showLoading || !myForm.dirty"
class="uk-button uk-button-secondary outlined uk-margin-small-right">Reset
</button>
<button (click)="saveCustom()" class="uk-button uk-button-secondary uk-margin-small-right"
[disabled]="showLoading || !myForm.dirty || !myForm.valid ">Save
</button>
</div>
</div>
</form>
</div>
<div class="uk-card uk-card-default uk-position-relative " style="min-height: 60vh">
<div style="max-height: 60vh" class="uk-padding-large uk-overflow-auto">
<div *ngIf="errorMessage" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
<div class="uk-animation-fade uk-width-1-1" role="alert">
<div *ngIf="updateErrorMessage" class="uk-alert uk-alert-danger" role="alert">{{updateErrorMessage}}</div>
<div *ngIf="showLoading" class="uk-position-center">
<loading *ngIf="showLoading"></loading>
</div>
<form [formGroup]="myForm" [class.hidden]="showLoading">
<div class="uk-grid uk-child-width-1-2 ">
<div *ngIf="classOptions.length > 0" dashboard-input
[formInput]="myForm.get('divId')"
type="select" placeholder="Select Class"
label="Select Class" [options]="classOptions"
>
</div>
</div>
<div class="form-group uk-margin-top">
<span class="uk-text-bold uk-margin-small-right">Select Status (Enable/ disable)</span>
<mat-slide-toggle [checked]="myForm.get('isActive').value"
(change)="changeStatus()"
uk-tooltip="title:<div class='uk-padding-small uk-width-large'><div class='uk-text-bold '> Enable or disable help text to show or hide it from the dashboard</div></div>"
></mat-slide-toggle>
</div>
<div class="form-group uk-margin-large-top"
[ngClass]="{'has-error':!myForm.controls.content.valid &&
myForm.controls.content.dirty}" >
<label class="uk-text-bold">Content</label>
<div class="uk-margin-top">
<ckeditor (change)="contentChanged()"
[readonly]="false"
debounce="500"
[formControl]="myForm.get('content')"
[config]="{ extraAllowedContent: '* [uk-*](*) ; span', disallowedContent: 'script; *[on*]',
removeButtons: 'Save,NewPage,DocProps,Preview,Print,' +
'Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,' +
'CreateDiv,Flash,PageBreak,' +
'Subscript,Superscript,Anchor,Smiley,Iframe,Styles,Font,About,Language',
extraPlugins: 'divarea'}">
</ckeditor>
</div>
</div>
<input type="hidden" formControlName="_id">
</form>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,18 +1,15 @@
import {Component, Input, OnInit} from '@angular/core';
import {ChangeDetectorRef, Component, OnInit, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {UntypedFormBuilder, UntypedFormGroup, Validators} from '@angular/forms';
import {Page} from '../../utils/entities/adminTool/page';
import {HelpContentService} from '../../services/help-content.service';
import {EnvProperties} from '../../utils/properties/env-properties';
import {Session} from '../../login/utils/helper.class';
import {LoginErrorCodes} from '../../login/utils/guardHelper.class';
import {properties} from '../../../../environments/environment';
import {Subscriber, Subscription, zip} from 'rxjs';
import {HelperFunctions} from '../../utils/HelperFunctions.class';
import {DivHelpContent} from '../../utils/entities/adminTool/div-help-content';
declare var UIkit;
import {NotificationHandler} from "../../utils/notification-handler";
import {ClearCacheService} from "../../services/clear-cache.service";
import {CKEditorComponent} from "ng2-ckeditor";
@Component({
selector: 'class-content-form',
@ -20,34 +17,35 @@ declare var UIkit;
})
export class ClassContentFormComponent implements OnInit {
myForm: FormGroup;
myForm: UntypedFormGroup;
portal: string;
parentClass: string;
pageId: string;
pageContentId: string;
page: Page;
classOptions = [];
public properties: EnvProperties = properties;
public showLoading: boolean = true;
public errorMessage: string = '';
@Input() updateErrorMessage: string = '';
private subs: Subscription[] = [];
public pageHelpContent: DivHelpContent;
@ViewChild('ckEditor') ckEditor: CKEditorComponent;
constructor(private route: ActivatedRoute, private _router: Router, private _fb: FormBuilder, private _helpContentService: HelpContentService) {
constructor(private route: ActivatedRoute, private _router: Router, private _fb: UntypedFormBuilder,
private cdr: ChangeDetectorRef, private _helpContentService: HelpContentService,
private _clearCacheService: ClearCacheService) {
}
ngOnInit() {
this.subs.push(this.route.params.subscribe(params => {
this.portal = (this.route.snapshot.data.portal) ? this.route.snapshot.data.portal : this.route.snapshot.params[this.route.snapshot.data.param];
this.subs.push(this.route.queryParams.subscribe(params => {
this.pageId = params['pageId'];
this.myForm = this.form;
this.pageContentId = params['pageContentId'];
if (!this.pageId) {
this._router.navigate(['../'], {relativeTo: this.route});
}
this.getInfo(this.pageId);
}));
this.portal = (this.route.snapshot.data.portal) ? this.route.snapshot.data.portal : this.route.snapshot.params[this.route.snapshot.data.param];
this.parentClass = this.route.snapshot.data.parentClass;
this.subs.push(this.route.queryParams.subscribe(params => {
this.pageId = params['pageId'];
this.myForm = this.form;
this.pageContentId = params['pageContentId'];
if (!this.pageId) {
this._router.navigate(['../'], {relativeTo: this.route});
}
this.getInfo(this.pageId);
}));
}
@ -71,25 +69,44 @@ export class ClassContentFormComponent implements OnInit {
}
this.setOptions(results[1]);
if (!this.pageContentId) {
this.updateForm(null);
this.updateForm(null);
this.showLoading = false;
this.initCKEditor();
} else {
this.subs.push(this._helpContentService.getDivHelpContent( this.pageContentId, this.properties.adminToolsAPIURL, this.portal).subscribe(pageHelpContent=>{
this.pageHelpContent = pageHelpContent;
if (this.properties.adminToolsPortalType != this.page.portalType) {
this._router.navigate(['../'], {relativeTo: this.route});
}
this.updateForm(this.pageHelpContent);
this.showLoading = false;
},
this.subs.push(this._helpContentService.getDivHelpContent(this.pageContentId, this.properties.adminToolsAPIURL, this.portal).subscribe(pageHelpContent => {
this.pageHelpContent = pageHelpContent;
if (this.properties.adminToolsPortalType != this.page.portalType) {
this._router.navigate(['../'], {relativeTo: this.route});
}
this.updateForm(this.pageHelpContent);
this.showLoading = false;
this.initCKEditor();
},
error => {
this.handleError('System error retrieving content by id '+ this.pageContentId, error)
}));
this.handleError('System error retrieving content by id ' + this.pageContentId, error)
}));
}
}));
}
private initCKEditor() {
this.cdr.detectChanges();
if (this.ckEditor) {
this.ckEditor.instance.on('mode', () => {
let editor = this.ckEditor.instance;
if (editor.mode === 'source') {
let editable = editor.editable();
editable.attachListener(editable, 'input', () => {
this.myForm.get('content').setValue(editor.getData());
this.myForm.get('content').markAsDirty();
this.cdr.detectChanges();
});
}
});
}
}
private updateForm(pageHelpContent: DivHelpContent) {
this.pageHelpContent = pageHelpContent;
this.myForm = this.form;
@ -104,8 +121,8 @@ export class ClassContentFormComponent implements OnInit {
public setOptions(divIds) {
this.classOptions = [];
for(let divid of divIds){
this.classOptions.push({label:divid.name, value:divid._id});
for (let divid of divIds) {
this.classOptions.push({label: divid.name, value: divid._id});
}
}
@ -116,7 +133,7 @@ export class ClassContentFormComponent implements OnInit {
content: ['', Validators.required],
isActive: true,
portal: this.portal,
_id : '',
_id: '',
});
}
@ -127,49 +144,35 @@ export class ClassContentFormComponent implements OnInit {
content: ['', Validators.required],
isActive: true,
portal: '',
_id : '',
_id: '',
});
this.myForm.markAsPristine();
}
handleError(message: string, error) {
this.errorMessage = message;
console.error('Server responded: ' + error);
handleError(message: string, error = null) {
if (error) {
console.error('Server responded: ' + error);
}
NotificationHandler.rise(message, 'danger');
this.showLoading = false;
}
public saveCustom() {
if (!Session.isLoggedIn()) {
this._router.navigate(['/user-info'], {
queryParams: {
"errorCode": LoginErrorCodes.NOT_VALID,
"redirectUrl": this._router.url
}
});
if (this.myForm.valid) {
this.showLoading = true;
let pageHelpContent: DivHelpContent = this.myForm.getRawValue();
this.subs.push(this._helpContentService.insertOrUpdateDivHelpContent(pageHelpContent, this.properties.adminToolsAPIURL, this.portal).subscribe(
_ => {
this._router.navigate(['../'], {queryParams: {"pageId": this.pageId}, relativeTo: this.route});
NotificationHandler.rise('Page content has been <b>successfully updated</b>');
this.showLoading = false;
this._clearCacheService.clearCache("Class help text saved or updated");
},
err => this.handleUpdateError('System error saving page content', err)
));
} else {
if (this.myForm.valid) {
this.showLoading = true;
this.updateErrorMessage = "";
this.myForm.get('divId').enable();
let pageHelpContent: DivHelpContent = this.myForm.value;
this.subs.push(this._helpContentService.insertOrUpdateDivHelpContent(pageHelpContent, this.properties.adminToolsAPIURL, this.portal).subscribe(
_ => {
this._router.navigate(['../'], {queryParams: {"pageId": this.pageId}, relativeTo: this.route});
UIkit.notification('Page content has been <b>successfully updated</b>', {
status: 'success',
timeout: 6000,
pos: 'bottom-right'
});
this.showLoading = false;
},
err => this.handleUpdateError('System error saving page content', err)
));
} else {
this.showLoading = false;
this.errorMessage = "Please fill all required fields";
}
this.showLoading = false;
this.handleError('Please fill all required fields');
}
}
@ -180,10 +183,8 @@ export class ClassContentFormComponent implements OnInit {
}
handleUpdateError(message: string, error) {
this.updateErrorMessage = message;
console.error('Server responded: ' + error);
NotificationHandler.rise(message, 'danger');
this.showLoading = false;
}

View File

@ -10,25 +10,20 @@ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import {IconsModule} from '../../utils/icons/icons.module';
import {RouterModule} from '@angular/router';
import {LoadingModule} from '../../utils/loading/loading.module';
import {IconsService} from '../../utils/icons/icons.service';
import {arrow_left} from '../../utils/icons/icons';
import {ClassContentFormComponent} from './class-help-content-form.component';
import {ClassHelpContentFormRoutingModule} from './class-help-content-form-routing.module';
import {PageContentModule} from '../sharedComponents/page-content/page-content.module';
@NgModule({
imports: [
ClassHelpContentFormRoutingModule,
CommonModule, FormsModule, RouterModule,
SafeHtmlPipeModule, CKEditorModule,
AlertModalModule, ReactiveFormsModule, ClassHelpContentFormRoutingModule, AdminToolServiceModule, InputModule, MatSlideToggleModule, IconsModule, LoadingModule, PageContentModule
AlertModalModule, ReactiveFormsModule, AdminToolServiceModule, InputModule, MatSlideToggleModule, IconsModule, LoadingModule, PageContentModule
],
declarations: [
ClassContentFormComponent
],
exports: [ClassContentFormComponent]
})
export class ClassHelpContentFormModule {
constructor(private iconsService: IconsService) {
this.iconsService.registerIcons([arrow_left]);
}
}
export class ClassHelpContentFormModule {}

View File

@ -1,120 +1,87 @@
<div page-content>
<div header>
<div class="uk-text-bold">
<span *ngIf="selectedPageId && page">{{page.name}}</span>
</div>
<div class="uk-margin-top">
<a routerLink="../pages/" class="uk-text-secondary uk-text-uppercase uk-text-bold uk-text-small">
<span class="uk-icon-button small uk-icon uk-button-secondary">
<icon name="arrow_left"></icon>
</span>
<span class="space">
Back to pages list
</span>
</a>
</div>
<div class="uk-width-1-1 uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle uk-grid" uk-grid>
<div #searchInputComponent search-input [control]="filterForm" [showSearch]="false" placeholder="Search helptext"
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
[bordered]="true" colorClass="uk-text-secondary"
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
<div>
<a (click)="newPageContent()"
class="uk-flex uk-flex-middle uk-text-uppercase">
<button class="large uk-icon-button uk-button-secondary">
<icon name="add"></icon>
</button>
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Add new class help text
</button>
</a>
</div>
</div>
<div *ngIf="showLoading && checkboxes.length > 0"
class="uk-padding uk-padding-remove-bottom uk-padding-remove-top uk-margin-remove-top uk-margin-small-bottom uk-display-inline"
[attr.uk-tooltip]="getSelectedPageHelpContents().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
title="Select at least one help text"><input id="checkAll" type="checkbox" (click)="selectAll()"
[ngModel]="getSelectedPageHelpContents().length ==checkboxes.length"/>
<span *ngIf="getSelectedPageHelpContents().length > 0" class="uk-margin-left uk-text-muted">
{{getSelectedPageHelpContents().length}} pages selected </span>
<a class="uk-margin-left ">Actions </a>
<div uk-dropdown="mode: click">
<ul class="uk-nav uk-dropdown-nav"
[attr.uk-tooltip]="getSelectedPageHelpContents().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
title="Select at least one help text">
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
(click)="togglePageHelpContents(true,getSelectedPageHelpContents())"><i></i> Enable
</a></li>
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
(click)="togglePageHelpContents(false,getSelectedPageHelpContents())"><i></i> Disable
<div class="uk-section-xsmall uk-margin-top">
<div class="uk-flex-middle uk-grid" uk-grid>
<div class="uk-width-expand">
<a routerLink="../pages" class="uk-flex uk-flex-middle uk-h5 uk-link-reset">
<span class="uk-margin-right">
<icon name="west" ratio="1.7" [flex]="true"></icon>
</span>
<h1 *ngIf="page" class="uk-h5 uk-margin-remove">{{page.name}}</h1>
</a>
</li>
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
(click)="confirmDeleteSelectedPageHelpContents()"><i></i> Delete </a></li>
</ul>
</div>
<div search-input [disabled]="showLoading" [expandable]="true" [searchControl]="filterForm" searchInputClass="outer" placeholder="Search helptext" class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1">
</div>
<div>
<button (click)="newPageContent()" [disabled]="showLoading" [class.uk-disabled]="showLoading"
class="uk-flex uk-flex-middle uk-button uk-button-default">
<icon [flex]="true" name="add"></icon>
<span class="uk-margin-small-left">Add class help text</span>
</button>
</div>
</div>
</div>
</div>
<div inner>
<div *ngIf="showLoading" class="uk-position-center">
<loading></loading>
</div>
<div *ngIf="!showLoading">
<div *ngIf="checkboxes.length > 0" class="uk-margin-medium-bottom">
<ul class="uk-list pages">
<li *ngFor="let check of checkboxes; let i=index" class="uk-card uk-card-default uk-margin-bottom">
<div class="uk-grid uk-grid-divider uk-padding" uk-grid>
<div class="uk-width-4-5 uk-first-column ">
<div class="uk-grid uk-flex uk-flex-middle">
<div><input id="{{check.divHelpContent._id}}" class="checkBox" type="checkbox"
name="entitiescb[]" value="{{check.divHelpContent._id}}"
[(ngModel)]="check.checked">
</div>
<div class="uk-width-expand uk-margin-medium-bottom">
<div class="content multi-line-ellipsis lines-2">
<p>{{check.divHelpContent.content|htmlToString}}</p></div>
</div>
<div class="uk-grid uk-width-1-1 uk-margin-left">
<div class=" ">
<span
class="title">Class: </span>{{check.divHelpContent.divId.name ? check.divHelpContent.divId.name : check.divHelpContent.divId}}
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
<div *ngIf="showLoading" class="uk-position-center">
<loading></loading>
</div>
<ng-container *ngIf="!showLoading">
<div *ngIf="checkboxes.length == 0"
class="uk-card uk-card-default uk-padding-large uk-text-center uk-text-bold">
<div>No class help texts found</div>
</div>
<div *ngIf="checkboxes.length > 0">
<div class="uk-grid uk-child-width-1-2@l uk-child-width-1-1" uk-height-match=".uk-card-body" uk-grid>
<div *ngFor="let check of checkboxes; let i=index">
<div class="uk-card uk-card-default uk-margin-bottom">
<div class="uk-card-body">
<div class="uk-margin-medium-bottom">
<div class="multi-line-ellipsis lines-2">
<p>{{check.divHelpContent.content | htmlToString}}</p>
</div>
<div class=" ">
<span class="title uk-margin-small-right">Enable/disable: </span>
<mat-slide-toggle [checked]="check.divHelpContent.isActive"
(change)="($event.source.checked = check.divHelpContent.isActive);togglePageHelpContents(!check.divHelpContent.isActive,[check.divHelpContent._id])"
uk-tooltip="title:<div class='uk-padding-small uk-width-large'><div class='uk-text-bold '> Enable or disable help text to show or hide it from the dashboard</div></div>"
></mat-slide-toggle>
<div class="uk-text-small">
<span class="uk-text-meta">Class: </span>{{check.divHelpContent.divId.name ? check.divHelpContent.divId.name : check.divHelpContent.divId}}
</div>
</div>
</div>
</div>
<div class="uk-width-1-5 uk-first-column">
<div class=" uk-flex-center uk-flex">
<div class="actions" href="#">
<button (click)="editPageHelpContent(check.divHelpContent._id)" class="uk-button action uk-margin-top uk-flex uk-flex-middle">
<icon name="edit"></icon>
<span class="uk-margin-small-left">Edit</span>
</button>
<button (click)="confirmDeletePageHelpContent(check.divHelpContent._id)"
class="uk-button action uk-margin-top uk-flex uk-flex-middle">
<icon name="remove"></icon>
<span class="uk-margin-small-left">Delete</span>
</button>
<div class="uk-card-footer uk-padding-remove-vertical">
<div class="uk-grid uk-grid-small uk-flex-nowrap uk-grid-divider uk-flex-right" uk-grid>
<div>
<div class="uk-padding-small uk-padding-remove-horizontal">
<mat-slide-toggle [checked]="check.divHelpContent.isActive"
(change)="($event.source.checked = check.divHelpContent.isActive);togglePageHelpContents(!check.divHelpContent.isActive,[check.divHelpContent._id])"
uk-tooltip="title:<div><div class='uk-text-bold '> Enable or disable help text to show or hide it from the dashboard</div></div>">
<span class="uk-text-small">Enable</span>
</mat-slide-toggle>
</div>
</div>
<div><div class="uk-padding-small uk-padding-remove-horizontal">
<button class="uk-button uk-button-link uk-flex uk-flex-middle" (click)="editPageHelpContent(check.divHelpContent._id)">
<icon name="edit" [flex]="true"></icon>
<span class="uk-margin-xsmall-left"> Edit</span>
</button>
</div>
</div>
<div>
<div class="uk-padding-small uk-padding-remove-horizontal">
<button class="uk-button uk-button-link uk-flex uk-flex-middle"
(click)="confirmDeletePageHelpContent(check.divHelpContent._id)">
<icon name="delete" [flex]="true"></icon>
<span class="uk-margin-xsmall-left"> Delete</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
<div *ngIf="checkboxes.length == 0"
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
<div>No class help texts found</div>
</div>
</div>
</div>
</ng-container>
</div>
</div>
</div>
<modal-alert #AlertModalDeletePageHelpContents (alertOutput)="confirmedDeletePageHelpContents($event)"></modal-alert>
<modal-alert #AlertModalDeletePageHelpContents [overflowBody]="false" classTitle="uk-background-primary uk-light"
(alertOutput)="confirmedDeletePageHelpContents($event)"></modal-alert>

View File

@ -1,5 +1,5 @@
import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import {FormBuilder, FormControl, FormGroup} from '@angular/forms';
import {UntypedFormBuilder, UntypedFormControl, UntypedFormGroup} from '@angular/forms';
import {ActivatedRoute, Router} from '@angular/router';
import {HelpContentService} from '../../services/help-content.service';
import {PageHelpContentFilterOptions} from '../../utils/entities/adminTool/page-help-content';
@ -14,9 +14,8 @@ import {properties} from '../../../../environments/environment';
import {DomSanitizer} from '@angular/platform-browser';
import {SearchInputComponent} from '../../sharedComponents/search-input/search-input.component';
import {CheckDivHelpContent, DivHelpContent} from '../../utils/entities/adminTool/div-help-content';
declare var UIkit;
import {ClearCacheService} from "../../services/clear-cache.service";
import {NotificationHandler} from "../../utils/notification-handler";
@Component({
selector: 'class-help-contents',
@ -27,7 +26,7 @@ export class ClassHelpContentsComponent implements OnInit {
private selectedPageContents: string[] = [];
public checkboxes: CheckDivHelpContent[] = [];
public divHelpContents: DivHelpContent[] = [];
public formGroup: FormGroup;
public formGroup: UntypedFormGroup;
public pages: Page[];
public checkboxAll: boolean = false;
public filters: PageHelpContentFilterOptions = {id: '', active: null, text: new RegExp('')};
@ -40,12 +39,12 @@ export class ClassHelpContentsComponent implements OnInit {
public page: Page;
public properties: EnvProperties = properties;
public showLoading: boolean = true;
public filterForm: FormControl;
public filterForm: UntypedFormControl;
private subscriptions: any[] = [];
public selectedKeyword: string;
@ViewChild('searchInputComponent') searchInputComponent: SearchInputComponent;
constructor(private element: ElementRef, private route: ActivatedRoute, private router: Router, private _helpService: HelpContentService, private _fb: FormBuilder, private sanitizer: DomSanitizer) {
constructor(private element: ElementRef, private route: ActivatedRoute, private router: Router,
private _helpService: HelpContentService, private _fb: UntypedFormBuilder, private sanitizer: DomSanitizer,
private _clearCacheService: ClearCacheService) {
}
ngOnInit() {
@ -142,17 +141,9 @@ export class ClassHelpContentsComponent implements OnInit {
this.confirmModalOpen();
}
public confirmDeleteSelectedPageHelpContents() {
this.selectedPageContents = this.getSelectedPageHelpContents();
this.confirmModalOpen();
}
private confirmModalOpen() {
this.alertModalDeletePageHelpContents.cancelButton = true;
this.alertModalDeletePageHelpContents.okButton = true;
this.alertModalDeletePageHelpContents.alertTitle = 'Delete Confirmation';
this.alertModalDeletePageHelpContents.message = 'Are you sure you want to delete the selected page content(s)?';
this.alertModalDeletePageHelpContents.message = 'Are you sure you want to delete the selected class help text?';
this.alertModalDeletePageHelpContents.okButtonText = 'Yes';
this.alertModalDeletePageHelpContents.open();
}
@ -162,12 +153,9 @@ export class ClassHelpContentsComponent implements OnInit {
this.subscriptions.push(this._helpService.deleteDivHelpContents(this.selectedPageContents, this.properties.adminToolsAPIURL, this.portal).subscribe(
_ => {
this.deletePageHelpContentsFromArray(this.selectedPageContents);
UIkit.notification('Page content(s) has been <b>successfully deleted</b>', {
status: 'success',
timeout: 6000,
pos: 'bottom-right'
});
NotificationHandler.rise('Page content(s) has been <b>successfully deleted</b>');
this.showLoading = false;
this._clearCacheService.clearCache("Class text texts deleted");
},
error => this.handleUpdateError('System error deleting the selected page content(s)', error)
));
@ -201,31 +189,19 @@ export class ClassHelpContentsComponent implements OnInit {
}
public togglePageHelpContents(status: boolean, ids: string[]) {
if (!Session.isLoggedIn()) {
this.router.navigate(['/user-info'], {
queryParams: {
'errorCode': LoginErrorCodes.NOT_VALID,
'redirectUrl': this.router.url
this.subscriptions.push(this._helpService.toggleDivHelpContents(ids, status, this.properties.adminToolsAPIURL, this.portal).subscribe(
() => {
for (let id of ids) {
let i = this.checkboxes.findIndex(_ => _.divHelpContent._id == id);
this.checkboxes[i].divHelpContent.isActive = status;
}
});
} else {
this.subscriptions.push(this._helpService.toggleDivHelpContents(ids, status, this.properties.adminToolsAPIURL, this.portal).subscribe(
() => {
for (let id of ids) {
let i = this.checkboxes.findIndex(_ => _.divHelpContent._id == id);
this.checkboxes[i].divHelpContent.isActive = status;
}
this.countClassHelpContents();
this.applyCheck(false);
UIkit.notification('Page content(s) has been <b>successfully updated</b>', {
status: 'success',
timeout: 6000,
pos: 'bottom-right'
});
},
error => this.handleUpdateError('System error changing the status of the selected page content(s)', error)
));
}
this.countClassHelpContents();
this.applyCheck(false);
NotificationHandler.rise('Page content(s) has been <b>successfully updated</b>');
this._clearCacheService.clearCache("class help text's status changed");
},
error => this.handleUpdateError('System error changing the status of the selected page content(s)', error)
));
}
@ -250,23 +226,19 @@ export class ClassHelpContentsComponent implements OnInit {
this.applyFilter();
}
handleError(message: string, error) {
UIkit.notification(message, {
status: 'danger',
timeout: 6000,
pos: 'bottom-right'
});
console.log('Server responded: ' + error);
handleError(message: string, error = null) {
if(error) {
console.log('Server responded: ' + error);
}
NotificationHandler.rise(message, 'danger');
this.showLoading = false;
}
handleUpdateError(message: string, error) {
UIkit.notification(message, {
status: 'danger',
timeout: 6000,
pos: 'bottom-right'
});
console.log('Server responded: ' + error);
handleUpdateError(message: string, error = null) {
if(error) {
console.log('Server responded: ' + error);
}
NotificationHandler.rise(message, 'danger');
this.showLoading = false;
}
@ -278,15 +250,6 @@ export class ClassHelpContentsComponent implements OnInit {
});
}
public onSearchClose() {
this.selectedKeyword = this.filterForm.value;
}
public reset() {
this.selectedKeyword = null;
this.searchInputComponent.reset();
}
selectAll() {
let checked = (this.getSelectedPageHelpContents().length != this.checkboxes.length);
for (let check of this.checkboxes) {

View File

@ -6,13 +6,11 @@ import {ConnectAdminLoginGuard} from '../../connect/communityGuard/connectAdminL
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {AlertModalModule} from '../../utils/modal/alertModal.module';
import {SafeHtmlPipeModule} from '../../utils/pipes/safeHTMLPipe.module';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
import {AdminToolServiceModule} from '../../services/adminToolService.module';
import {InputModule} from '../../sharedComponents/input/input.module';
import {SearchInputModule} from '../../sharedComponents/search-input/search-input.module';
import {IconsModule} from '../../utils/icons/icons.module';
import {IconsService} from '../../utils/icons/icons.service';
import {add, arrow_left, edit, remove} from '../../utils/icons/icons';
import {LoadingModule} from '../../utils/loading/loading.module';
import {HTMLToStringPipeModule} from '../../utils/pipes/HTMLToStringPipe.module';
import {ClassHelpContentsRoutingModule} from './class-help-contents-routing.module';
@ -21,8 +19,9 @@ import {PageContentModule} from '../sharedComponents/page-content/page-content.m
@NgModule({
imports: [
ClassHelpContentsRoutingModule,
CommonModule, RouterModule, FormsModule, SafeHtmlPipeModule,
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, AdminToolServiceModule, InputModule, ClassHelpContentsRoutingModule,
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, AdminToolServiceModule, InputModule,
SearchInputModule, IconsModule, LoadingModule, HTMLToStringPipeModule, PageContentModule
],
declarations: [
@ -31,8 +30,4 @@ import {PageContentModule} from '../sharedComponents/page-content/page-content.m
providers: [IsCommunity, ConnectAdminLoginGuard],
exports: [ClassHelpContentsComponent]
})
export class ClassHelpContentsModule {
constructor(private iconsService: IconsService) {
this.iconsService.registerIcons([add, arrow_left, edit, remove])
}
}
export class ClassHelpContentsModule {}

View File

@ -1,123 +1,103 @@
<div page-content class="admin-pages">
<div header>
<admin-tabs tab="entity" [portal]="portal"></admin-tabs>
<div *ngIf="!showLoading" class="uk-grid" uk-grid>
<div class="uk-width-1-1">
<ul *ngIf="!isPortalAdministrator" class="uk-subnav uk-subnav-pill">
<li [class.uk-active]="filterForm.get('status').value === 'all'"><a
(click)="filterForm.get('status').setValue('all')"><span
class="title">All entities</span></a></li>
<li [class.uk-active]="filterForm.get('status').value === 'enabled'"><a
(click)="filterForm.get('status').setValue('enabled')"><span class="title">Enabled</span></a></li>
<li [class.uk-active]="filterForm.get('status').value === 'disabled'"><a
(click)="filterForm.get('status').setValue('disabled')"><span class="title">Disabled</span></a></li>
</ul>
</div>
<div class="uk-width-1-1 uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle uk-grid uk-margin-remove-top"
uk-grid>
<div #searchInputComponent search-input [control]="filterForm.controls.keyword" [showSearch]="false"
placeholder="Search entity"
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
[bordered]="true" colorClass="uk-text-secondary"
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
<div *ngIf="isPortalAdministrator">
<a (click)="newEntity()"
class="uk-flex uk-flex-middle uk-text-uppercase">
<button class="large uk-icon-button uk-button-secondary">
<icon name="add"></icon>
</button>
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Add entity</button>
</a>
</div>
</div>
</div>
<div *ngIf="!showLoading && checkboxes.length > 0"
class="uk-margin-remove-top uk-margin-small-left uk-margin-small-bottom uk-display-inline"
[attr.uk-tooltip]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : null"
title="Select at least one entity"><input id="checkAll" type="checkbox" (click)="selectAll()"
[ngModel]="getSelectedEntities().length ==checkboxes.length"/>
<span *ngIf="getSelectedEntities().length > 0" class="uk-margin-left uk-text-muted">
{{getSelectedEntities().length}} entities selected </span>
<a class="uk-margin-left ">Actions </a>
<div uk-dropdown="mode: click">
<ul class="uk-nav uk-dropdown-nav"
[attr.uk-tooltip]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
title="Select at least one entity">
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''"
(click)="toggleEntities(true,getSelectedEntities())"><i></i> Enable
</a></li>
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''"
(click)="toggleEntities(false,getSelectedEntities())"><i></i> Disable
</a>
</li>
<li *ngIf="isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''"
(click)="confirmDeleteSelectedEntities()"><i></i> Delete </a></li>
</ul>
</div>
</div>
</div>
<div page-content>
<div header>
<admin-tabs tab="entity" [portal]="portal" [type]="type"></admin-tabs>
<ul *ngIf="!isPortalAdministrator" class="uk-subnav uk-subnav-pill uk-margin-medium-top">
<li [class.uk-active]="filterForm.get('status').value === 'all'"><a
(click)="filterForm.get('status').setValue('all')"><span
class="title">All entities</span></a></li>
<li [class.uk-active]="filterForm.get('status').value === 'enabled'"><a
(click)="filterForm.get('status').setValue('enabled')"><span class="title">Enabled</span></a></li>
<li [class.uk-active]="filterForm.get('status').value === 'disabled'"><a
(click)="filterForm.get('status').setValue('disabled')"><span class="title">Disabled</span></a></li>
</ul>
</div>
<div actions>
<div class="uk-section-xsmall">
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle uk-grid" uk-grid>
<div search-input [expandable]="true" [searchControl]="filterForm.get('keyword')" searchInputClass="outer" placeholder="Search entity"
[disabled]="showLoading" class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
<div *ngIf="isPortalAdministrator">
<button class="uk-button uk-button-default uk-flex uk-flex-middle" (click)="newEntity()"
[disabled]="showLoading" [class.uk-disabled]="showLoading">
<icon name="add" [flex]="true"></icon>
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">Add entity</span>
</button>
</div>
</div>
</div>
</div>
<div inner>
<div *ngIf="showLoading" class="uk-position-center">
<loading></loading>
</div>
<div *ngIf="!showLoading">
<table *ngIf="checkboxes.length > 0 " class="uk-table uk-table-striped uk-table-hover uk-table-large">
<thead class="uk-card-header">
<tr>
<th class="uk-width-small"></th>
<th>Name</th>
<th *ngIf="!isPortalAdministrator">Status</th>
<th *ngIf="!isPortalAdministrator">Enable/Disable</th>
<th *ngIf="isPortalAdministrator">Actions</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let check of checkboxes; let i=index">
<td><input id="{{check.entity._id}}" class="checkBox" type="checkbox"
name="entitiescb[]" value="{{check.entity._id}}" [(ngModel)]="check.checked">
</td>
<td>
<div class="name" href="#">{{check.entity.name}}</div>
</td>
<td *ngIf="!isPortalAdministrator">
<div class="name" href="#">{{check.entity.isEnabled ? "Enabled" : "Disabled"}}</div>
</td>
<td *ngIf="!isPortalAdministrator">
<mat-slide-toggle [checked]="check.entity.isEnabled"
(change)="($event.source.checked = check.entity.isEnabled);toggleEntities(!check.entity.isEnabled,[check.entity._id])"
uk-tooltip="title:<div class='uk-padding-small uk-width-large'><div class='uk-text-bold '>Disable an entity to hide it from community dashboard portal.</div><div class=' uk-margin-top'>If an entity is disabled, all related search and advanced search pages will be hidden from the community dashborad and a message 'Can't find that page' will appear in case the url of that page is loaded. If the related page belongs to the menu the link will be removed from menu, too.</div></div>"
></mat-slide-toggle>
</td>
<td *ngIf="isPortalAdministrator">
<div class="actions" href="#">
<icon class="clickable" name="edit" (click)="editEntity(i)"></icon>
<icon class="clickable uk-margin-small-left" [customClass]="'uk-text-danger'" name="remove" (click)="confirmDeleteEntity(check.entity._id)"></icon>
</div>
</td>
</tr>
</tbody>
</table>
<div *ngIf="checkboxes.length == 0"
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
<div>No entities found</div>
</div>
</div>
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
<div *ngIf="showLoading" class="uk-position-center">
<loading></loading>
</div>
<ng-container *ngIf="!showLoading">
<div *ngIf="checkboxes.length == 0"
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-top uk-margin-bottom uk-text-bold">
<div>No entities found</div>
</div>
<table *ngIf="checkboxes.length > 0 " class="uk-table uk-table-striped uk-table-large">
<thead>
<tr class="uk-child-width-1-3">
<th *ngIf="!portal">
<label>
<input id="checkAll" type="checkbox" (click)="selectAll()" class="uk-checkbox"
[ngModel]="getSelectedEntities().length ==checkboxes.length"/>
</label>
<span class="uk-margin-left">
<button class="uk-button uk-button-link" [class.uk-disabled]="getSelectedEntities().length == 0" [disabled]="getSelectedEntities().length == 0">
Bulk Actions ({{getSelectedEntities().length}})
</button>
<div uk-dropdown="mode: click">
<ul class="uk-nav uk-dropdown-nav"
[attr.uk-tooltip]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
title="Select at least one entity">
<li *ngIf="isPortalAdministrator">
<a (click)="confirmDeleteSelectedEntities()"><i></i>Delete</a>
</li>
</ul>
</div>
</span>
</th>
<th>Name</th>
<th *ngIf="!isPortalAdministrator">Status</th>
<th *ngIf="isPortalAdministrator">Actions</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let check of checkboxes; let i=index">
<td *ngIf="!portal">
<input id="{{check.entity._id}}" class="uk-checkbox" type="checkbox"
name="entitiescb[]" value="{{check.entity._id}}" [(ngModel)]="check.checked">
</td>
<td>
<div class="name" href="#">{{check.entity.name}}</div>
</td>
<td *ngIf="!isPortalAdministrator">
<mat-slide-toggle [checked]="check.entity.isEnabled"
(change)="($event.source.checked = check.entity.isEnabled);toggleEntities(!check.entity.isEnabled,[check.entity._id])"
uk-tooltip="title:<div class='uk-padding-small uk-width-large'><div class='uk-text-bold '>Disable an entity to hide it from community dashboard portal.</div><div class=' uk-margin-top'>If an entity is disabled, all related search and advanced search pages will be hidden from the community dashborad and a message 'Can't find that page' will appear in case the url of that page is loaded. If the related page belongs to the menu the link will be removed from menu, too.</div></div>"
></mat-slide-toggle>
</td>
<td *ngIf="isPortalAdministrator">
<div class="uk-flex uk-flex-middle">
<icon class="clickable" [flex]="true" name="edit" [customClass]="'uk-text-primary'" (click)="editEntity(i)"></icon>
<icon class="clickable uk-margin-small-left" [flex]="true" [customClass]="'uk-text-danger'" name="delete" (click)="confirmDeleteEntity(check.entity._id)"></icon>
</div>
</td>
</tr>
</tbody>
</table>
</ng-container>
</div>
</div>
</div>
<modal-alert #editModal (alertOutput)="entitySaveConfirmed($event)"
[okDisabled]="entityForm && (entityForm.invalid || !entityForm.dirty)">
[okDisabled]="entityForm && (entityForm.invalid || !entityForm.dirty)" classTitle="uk-background-primary uk-light">
<form *ngIf="entityForm" [formGroup]="entityForm" class="uk-grid uk-child-width-1-1" uk-grid>
<div dashboard-input [formInput]="entityForm.get('name')"
type="text" placeholder="Write a name"
label="Entity Name">
</div>
<div dashboard-input [formInput]="entityForm.get('pid')"
type="text" placeholder="Write a pid"
label="Entity Pid">
</div>
<div input [formInput]="entityForm.get('name')" placeholder="Entity Name"></div>
<div input [formInput]="entityForm.get('pid')" placeholder="Entity Pid"></div>
</form>
</modal-alert>
<modal-alert #relatedPages (alertOutput)="continueToggling($event)"></modal-alert>
<modal-alert #deleteModal (alertOutput)="confirmedDeleteEntities($event)"></modal-alert>
<modal-alert #relatedPages [overflowBody]="false" (alertOutput)="continueToggling($event)" classTitle="uk-background-primary uk-light"></modal-alert>
<modal-alert #deleteModal [overflowBody]="false" (alertOutput)="confirmedDeleteEntities($event)" classTitle="uk-background-primary uk-light"></modal-alert>

View File

@ -1,7 +1,7 @@
import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {HelpContentService} from '../../services/help-content.service';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {UntypedFormBuilder, UntypedFormGroup, Validators} from '@angular/forms';
import {CheckEntity, Entity} from '../../utils/entities/adminTool/entity';
import {Portal} from '../../utils/entities/adminTool/portal';
import {EnvProperties} from '../../utils/properties/env-properties';
@ -10,11 +10,14 @@ import {UserManagementService} from '../../services/user-management.service';
import {Subscriber} from "rxjs";
import {properties} from "../../../../environments/environment";
import {AlertModal} from "../../utils/modal/alert";
import {SearchInputComponent} from "../../sharedComponents/search-input/search-input.component";
import {StringUtils} from "../../utils/string-utils.class";
import {Title} from "@angular/platform-browser";
declare var UIkit;
import {StakeholderService} from '../../monitor/services/stakeholder.service';
import {CommunityService} from "../../connect/community/community.service";
import {CommunityInfo} from "../../connect/community/communityInfo";
import {Stakeholder} from "../../monitor/entities/stakeholder";
import {ClearCacheService} from "../../services/clear-cache.service";
import {NotificationHandler} from "../../utils/notification-handler";
@Component({
selector: 'entities',
@ -31,13 +34,17 @@ export class EntitiesComponent implements OnInit {
public entities: Entity[] = [];
public entityForm: FormGroup;
public entityForm: UntypedFormGroup;
private searchText: RegExp = new RegExp('');
public keyword = '';
public communities: Portal[] = [];
public portal: string;
public type: any;
public name: string;
public entity: CommunityInfo | Stakeholder;
public showLogo: boolean = true;
public toggleIds: string[];
public toggleStatus: boolean;
@ -45,16 +52,17 @@ export class EntitiesComponent implements OnInit {
public showLoading = true;
public isPortalAdministrator = null;
public filterForm: FormGroup;
public filterForm: UntypedFormGroup;
private subscriptions: any[] = [];
private index: number;
public selectedKeyword: string;
@ViewChild('searchInputComponent') searchInputComponent: SearchInputComponent;
constructor(private element: ElementRef, private route: ActivatedRoute,
private _router: Router, private title: Title,
private _helpContentService: HelpContentService,
private userManagementService: UserManagementService, private _fb: FormBuilder) {
private userManagementService: UserManagementService, private _fb: UntypedFormBuilder,
private communityService: CommunityService,
private stakeholderService: StakeholderService,
private _clearCacheService: ClearCacheService) {
}
ngOnInit() {
@ -72,9 +80,28 @@ export class EntitiesComponent implements OnInit {
this.userManagementService.getUserInfo().subscribe(user => {
this.portal = (this.route.snapshot.data.portal) ? this.route.snapshot.data.portal : this.route.snapshot.params[this.route.snapshot.data.param];
if (this.route.snapshot.data.portal) {
this.name = StringUtils.capitalize(this.portal);
this.title.setTitle(StringUtils.capitalize(this.portal) + ' | Entities');
} else if (this.route.snapshot.params[this.route.snapshot.data.param]) {
this.title.setTitle(this.portal.toUpperCase() + ' | Entities');
this.type = this.route.snapshot.data.param;
if(this.route.snapshot.data.param === 'stakeholder') {
this.subscriptions.push(this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => {
if(stakeholder) {
this.name = stakeholder.name;
this.entity = stakeholder;
this.title.setTitle(this.name + ' | Entities');
}
}));
} else {
this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe(community => {
if(community) {
this.showLogo = false;
this.name = community.shortTitle;
this.entity = community;
this.title.setTitle(this.name + ' | Entities');
}
}));
}
} else {
this.title.setTitle('Administrator Dashboard | Entities');
}
@ -162,8 +189,6 @@ export class EntitiesComponent implements OnInit {
}
private confirmDeleteEntitiesModalOpen() {
this.deleteModal.cancelButton = true;
this.deleteModal.okButton = true;
this.deleteModal.alertTitle = 'Delete Confirmation';
this.deleteModal.message = 'Are you sure you want to delete the selected entity(-ies)?';
this.deleteModal.okButtonText = 'Yes';
@ -175,12 +200,10 @@ export class EntitiesComponent implements OnInit {
this._helpContentService.deleteEntities(this.selectedEntities, this.properties.adminToolsAPIURL).subscribe(
_ => {
this.deleteEntitiesFromArray(this.selectedEntities);
UIkit.notification('Entities have been <b>successfully deleted</b>', {
status: 'success',
timeout: 6000,
pos: 'bottom-right'
});
NotificationHandler.rise('Entities have been <b>successfully deleted</b>');
this.showLoading = false;
this._clearCacheService.clearCache("entities deleted");
this._clearCacheService.purgeBrowserCache("entities deleted", this.portal);
},
error => this.handleUpdateError('System error deleting the selected entities', error)
);
@ -207,8 +230,6 @@ export class EntitiesComponent implements OnInit {
}
private entitiesModalOpen(title: string, yesBtn: string) {
this.editModal.cancelButton = true;
this.editModal.okButton = true;
this.editModal.okButtonLeft = false;
this.editModal.alertTitle = title;
this.editModal.okButtonText = yesBtn;
@ -217,28 +238,24 @@ export class EntitiesComponent implements OnInit {
public entitySaveConfirmed(data: any) {
this.showLoading = true;
if (this.entityForm.value._id) {
if (this.entityForm.getRawValue()._id) {
this._helpContentService.updateEntity(
<Entity>this.entityForm.value, this.properties.adminToolsAPIURL).subscribe(
<Entity>this.entityForm.getRawValue(), this.properties.adminToolsAPIURL).subscribe(
entity => {
this.entityUpdatedSuccessfully(entity);
UIkit.notification('Entity <b>' + entity.name + '</b> has been <b>successfully updated</b>', {
status: 'success',
timeout: 6000,
pos: 'bottom-right'
});
NotificationHandler.rise('Entity <b>' + entity.name + '</b> has been <b>successfully updated</b>');
this._clearCacheService.clearCache("entity updated");
this._clearCacheService.purgeBrowserCache("entity updated", this.portal);
},
error => this.handleUpdateError('System error updating entity', error)
);
} else {
this._helpContentService.saveEntity(<Entity>this.entityForm.value, this.properties.adminToolsAPIURL).subscribe(
this._helpContentService.saveEntity(<Entity>this.entityForm.getRawValue(), this.properties.adminToolsAPIURL).subscribe(
entity => {
this.entitySavedSuccessfully(entity);
UIkit.notification('Entity <b>' + entity.name + '</b> has been <b>successfully created</b>', {
status: 'success',
timeout: 6000,
pos: 'bottom-right'
});
NotificationHandler.rise('Entity <b>' + entity.name + '</b> has been <b>successfully created</b>');
this._clearCacheService.clearCache("entity saved");
this._clearCacheService.purgeBrowserCache("entity saved", this.portal)
},
error => this.handleUpdateError('System error creating entity', error)
);
@ -278,18 +295,16 @@ export class EntitiesComponent implements OnInit {
return status == "all" || (status == "disabled" && !entity.isEnabled) || (status == "enabled" && entity.isEnabled);
}
handleError(message: string, error) {
UIkit.notification(message, {
status: 'danger',
timeout: 6000,
pos: 'bottom-right'
});
console.log('Server responded: ' + error);
handleError(message: string, error = null) {
if(error) {
console.log('Server responded: ' + error);
}
NotificationHandler.rise(message, 'danger');
this.showLoading = false;
}
handleUpdateError(message: string, error) {
if (error == null) {
handleUpdateError(message: string, error = null) {
if (!error) {
this.entityForm = this._fb.group({
pid: ['', Validators.required],
name: ['', Validators.required],
@ -297,13 +312,9 @@ export class EntitiesComponent implements OnInit {
_id: ''
});
} else {
UIkit.notification(message, {
status: 'danger',
timeout: 6000,
pos: 'bottom-right'
});
console.log('Server responded: ' + error);
}
NotificationHandler.rise(message, 'danger');
this.showLoading = false;
}
@ -319,8 +330,6 @@ export class EntitiesComponent implements OnInit {
}
private confirmRelatedPagesModalOpen() {
this.relatedPages.cancelButton = true;
this.relatedPages.okButton = true;
this.relatedPages.alertTitle = 'Warning';
this.relatedPages.message = "This action will affect all search pages related to this entity! Pages' status will change to entity's status! Do you want to continue?";
this.relatedPages.okButtonText = 'Yes';
@ -336,20 +345,13 @@ export class EntitiesComponent implements OnInit {
this.checkboxes[i].entity.isEnabled = this.toggleStatus;
}
this.applyCheck(false);
this._clearCacheService.clearCache("entity's status changed");
this._clearCacheService.purgeBrowserCache("entity's status changed", this.portal);
},
error => this.handleUpdateError('System error changing the status of the selected entity(-ies)', error)
);
}
public onSearchClose() {
this.selectedKeyword = this.filterForm.get('keyword').value;
}
public reset() {
this.selectedKeyword = null;
this.searchInputComponent.reset()
}
selectAll() {
let checked = (this.getSelectedEntities().length != this.checkboxes.length);
for (let check of this.checkboxes) {

View File

@ -12,20 +12,17 @@ import {AdminTabsModule} from "../sharedComponents/admin-tabs/admin-tabs.module"
import {EntitiesRoutingModule} from "./entities-routing.module";
import {SearchInputModule} from "../../sharedComponents/search-input/search-input.module";
import {IconsModule} from "../../utils/icons/icons.module";
import {IconsService} from "../../utils/icons/icons.service";
import {add, edit, remove} from "../../utils/icons/icons";
import {LoadingModule} from "../../utils/loading/loading.module";
import {LogoUrlPipeModule} from "../../utils/pipes/logoUrlPipe.module";
@NgModule({
imports: [
EntitiesRoutingModule,
CommonModule, RouterModule, FormsModule, AdminToolServiceModule,
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, InputModule, PageContentModule, AdminTabsModule, EntitiesRoutingModule, SearchInputModule, IconsModule, LoadingModule
AlertModalModule, ReactiveFormsModule, MatSlideToggleModule, InputModule, PageContentModule, AdminTabsModule, SearchInputModule, IconsModule, LoadingModule, LogoUrlPipeModule
],
declarations: [EntitiesComponent],
exports: [EntitiesComponent]
})
export class EntitiesModule {
constructor(private iconsService: IconsService) {
this.iconsService.registerIcons([add, edit, remove]);
}
}

View File

@ -1,87 +1,82 @@
<div page-content>
<div header>
<div class="uk-margin-top">
<a routerLink="../" [queryParams]=" { 'pageId': pageId }"
class="uk-text-secondary uk-text-uppercase uk-text-bold uk-text-small">
<span class="uk-icon-button uk-icon small uk-button-secondary">
<icon name="arrow_left"></icon>
</span>
<span class="space">
Go back to page help texts list
</span>
</a>
<div class="uk-section-xsmall uk-margin-top uk-container">
<div class="uk-flex-middle uk-grid" uk-grid>
<div class="uk-width-expand">
<a routerLink="../" [queryParams]=" { 'pageId': pageId }" class="uk-flex uk-flex-middle uk-h5 uk-link-reset">
<span class="uk-margin-right">
<icon name="west" ratio="1.7" [flex]="true"></icon>
</span>
<h1 *ngIf="page" class="uk-h5 uk-margin-remove">
{{page.name}} - {{pageHelpContent ? 'Update ' : 'Add new '}} page help text
<span *ngIf="myForm.dirty" class="uk-text-large"> (unsaved changes)</span>
</h1>
</a>
</div>
<div class="uk-width-auto">
<button class="uk-button uk-button-default uk-margin-right"
(click)="resetCustom()" [class.uk-disabled]="!myForm.dirty"
[disabled]="!myForm.dirty || showLoading">Reset
</button>
<button class="uk-button uk-button-primary" [class.uk-disabled]="myForm.invalid || !myForm.dirty || myForm.disabled"
(click)="saveCustom()" [disabled]="myForm.invalid ||!myForm.dirty || myForm.disabled || showLoading">Save
</button>
</div>
</div>
</div>
</div>
<div inner>
<div class="uk-card-header">
<div class="uk-flex uk-flex-middle uk-child-width-1-1 uk-child-width-1-2@m uk-grid" uk-grid>
<div>
<div class="uk-text-small uk-text-muted"> {{pageHelpContent ? 'Update ' : 'Add new '}} page help text</div>
<div>
<span *ngIf="page" class="uk-text-bold">{{page.name}}</span>
<span *ngIf="myForm.dirty"> (unsaved changes)</span>
<div class="uk-container">
<div *ngIf="myForm" style="min-height: 60vh"
class="uk-section uk-section-small uk-position-relative">
<div *ngIf="showLoading" class="uk-position-center">
<loading *ngIf="showLoading"></loading>
</div>
<form *ngIf="!showLoading" [formGroup]="myForm">
<div class="uk-grid uk-child-width-1-2">
<div *ngIf="placementsOptions.length > 0" input [formInput]="myForm.get('placement')"
placeholder="Select placement" [options]="placementsOptions" type="select"></div>
<div input [formInput]="myForm.get('order')" placeholder="Select order" [options]="orderOptions" type="select"></div>
</div>
<div class="form-group uk-margin-medium-top">
<span class="uk-text-bold uk-margin-small-right">Select Status (Enable/ disable)</span>
<mat-slide-toggle [checked]="myForm.get('isActive').value"
(change)="changeStatus()"
uk-tooltip="title:<div><div class='uk-text-bold'> Enable or disable help text to show or hide it from the dashboard</div></div>"
></mat-slide-toggle>
</div>
<div class="form-group uk-margin-large-top"
[ngClass]="{'has-error':!myForm.controls.content.valid &&
myForm.controls.content.dirty}">
<div class="uk-text-bold uk-margin-bottom uk-flex uk-flex-middle">
<span class="uk-margin-small-right">Content</span>
<button class="uk-button uk-button-link uk-text-normal"><icon name="info" type="outlined" [flex]="true"></icon></button>
<div class="uk-dropdown uk-text-normal uk-width-medium uk-padding-small" uk-dropdown>
OpenAIRE style guide is based on <a href="https://getuikit.com/docs/introduction" target="_blank" class="uk-link custom-external">UIKit</a>.
You can find some usage examples
<a *ngIf="properties.dashboard == 'monitor'" routerLink="/theme" [queryParams]="parentClass?{parentClass: parentClass}:null"
target="_blank" class="uk-link custom-external">here</a>
<a *ngIf="properties.dashboard == 'connect'" [href] ="'https://'+(properties.environment == 'beta' ? 'beta.' : '')+this.portal+'.openaire.eu/theme'"
target="_blank" class="uk-link custom-external">here</a>
in order to style your content.
</div>
</div>
<div [ngClass]="parentClass">
<ckeditor #ckEditor (change)="contentChanged()"
[readonly]="false"
debounce="500"
[formControl]="myForm.get('content')"
[config]="{ extraAllowedContent: '* [uk-*](*) ; span', disallowedContent: 'script; *[on*]',
removeButtons: 'Save,NewPage,DocProps,Preview,Print,' +
'Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,' +
'CreateDiv,Flash,PageBreak,' +
'Subscript,Superscript,Anchor,Smiley,Iframe,Styles,Font,About,Language',
extraPlugins: 'divarea', height: 500}">
</ckeditor>
</div>
</div>
<div class=" uk-flex uk-flex-right">
<button (click)="resetCustom()" [disabled]="showLoading || !myForm.dirty"
class="uk-button uk-button-secondary outlined uk-margin-small-right">Reset
</button>
<button (click)="saveCustom()" class="uk-button uk-button-secondary uk-margin-small-right"
[disabled]="showLoading || !myForm.dirty || myForm.invalid ">Save
</button>
</div>
</div>
</form>
</div>
<div class="uk-card uk-card-default uk-position-relative " style="min-height: 60vh">
<div style="max-height: 60vh" class="uk-padding-large uk-overflow-auto">
<div class="uk-animation-fade uk-width-1-1" role="alert">
<div *ngIf="showLoading" class="uk-position-center">
<loading *ngIf="showLoading"></loading>
</div>
<form [formGroup]="myForm" [class.hidden]="showLoading">
<div class="uk-grid uk-child-width-1-2 ">
<div *ngIf="placementsOptions.length > 0" dashboard-input
[formInput]="myForm.get('placement')"
type="select" placeholder="Select placement"
label="Select placement" [options]="placementsOptions"
>
</div>
<div dashboard-input [formInput]="myForm.get('order')"
type="select" placeholder="Select order"
label="Select order" [options]="orderOptions">
</div>
</div>
<div class="form-group uk-margin-top">
<div class="uk-text-bold uk-margin-medium-bottom">Select Status (Enable/ disable)</div>
<mat-slide-toggle [checked]="myForm.get('isActive').value"
(change)="changeStatus()"
uk-tooltip="title:<div class='uk-padding-small uk-width-large'><div class='uk-text-bold '> Enable or disable help text to show or hide it from the dashboard</div></div>"
></mat-slide-toggle>
</div>
<div class="form-group uk-margin-medium-top"
[ngClass]="{'has-error':!myForm.controls.content.valid &&
myForm.controls.content.dirty}">
<label class="uk-text-bold">Content</label>
<div class="uk-margin-top">
<ckeditor (change)="contentChanged()"
[readonly]="false"
debounce="500"
[formControl]="myForm.get('content')"
[config]="{ extraAllowedContent: '* [uk-*](*) ; span', disallowedContent: 'script; *[on*]',
removeButtons: 'Save,NewPage,DocProps,Preview,Print,' +
'Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,' +
'CreateDiv,Flash,PageBreak,' +
'Subscript,Superscript,Anchor,Smiley,Iframe,Styles,Font,About,Language',
extraPlugins: 'divarea'}">
</ckeditor>
</div>
</div>
<input type="hidden" formControlName="_id">
</form>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,6 +1,6 @@
import {Component, OnInit} from '@angular/core';
import {ChangeDetectorRef, Component, OnInit, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {UntypedFormBuilder, UntypedFormGroup, Validators} from '@angular/forms';
import {Page} from '../../utils/entities/adminTool/page';
import {HelpContentService} from '../../services/help-content.service';
import {EnvProperties} from '../../utils/properties/env-properties';
@ -8,8 +8,9 @@ import {properties} from '../../../../environments/environment';
import {Subscriber, Subscription, zip} from 'rxjs';
import {HelperFunctions} from '../../utils/HelperFunctions.class';
import {PageHelpContent} from '../../utils/entities/adminTool/page-help-content';
declare var UIkit;
import {ClearCacheService} from "../../services/clear-cache.service";
import {NotificationHandler} from "../../utils/notification-handler";
import {CKEditorComponent} from "ng2-ckeditor";
@Component({
selector: 'page-content-form',
@ -17,8 +18,9 @@ declare var UIkit;
})
export class PageContentFormComponent implements OnInit {
myForm: FormGroup;
myForm: UntypedFormGroup;
portal: string;
parentClass: string;
pageId: string;
pageContentId: string;
page: Page;
@ -28,23 +30,25 @@ export class PageContentFormComponent implements OnInit {
public showLoading: boolean = true;
private subs: Subscription[] = [];
public pageHelpContent: PageHelpContent;
@ViewChild('ckEditor') ckEditor: CKEditorComponent;
constructor(private route: ActivatedRoute, private _router: Router, private _fb: FormBuilder, private _helpContentService: HelpContentService) {
constructor(private route: ActivatedRoute, private _router: Router, private _fb: UntypedFormBuilder,
private cdr: ChangeDetectorRef, private _helpContentService: HelpContentService,
private _clearCacheService: ClearCacheService) {
}
ngOnInit() {
this.subs.push(this.route.params.subscribe(params => {
this.portal = (this.route.snapshot.data.portal) ? this.route.snapshot.data.portal : this.route.snapshot.params[this.route.snapshot.data.param];
this.subs.push(this.route.queryParams.subscribe(params => {
HelperFunctions.scroll();
this.pageId = params['pageId'];
this.myForm = this.form;
this.pageContentId = params['pageContentId'];
if (!this.pageId) {
this._router.navigate(['../'], {relativeTo: this.route});
}
this.getInfo(this.pageId);
}));
this.portal = (this.route.snapshot.data.portal) ? this.route.snapshot.data.portal : this.route.snapshot.params[this.route.snapshot.data.param];
this.parentClass = this.route.snapshot.data.parentClass;
this.subs.push(this.route.queryParams.subscribe(params => {
HelperFunctions.scroll();
this.pageId = params['pageId'];
this.myForm = this.form;
this.pageContentId = params['pageContentId'];
if (!this.pageId) {
this._router.navigate(['../'], {relativeTo: this.route});
}
this.getInfo(this.pageId);
}));
}
@ -66,16 +70,10 @@ export class PageContentFormComponent implements OnInit {
this._router.navigate(['../'], {relativeTo: this.route});
}
let countPageContents = results[1] ? results[1].length : 0;
console.log(results[1]);
for (let content of (results[1] as Array<PageHelpContent>)) {
// if(content.page['_id'] == pageId){
// countPageContents++;
if (this.pageContentId && this.pageContentId == content._id) {
this.pageHelpContent = content;
// this.pageHelpContent.page = pageId;
// this.pageHelpContent.portal = this.communityPid;
}
// }
}
this.setOptions(this.page, countPageContents + (this.pageHelpContent ? 0 : 1));
if (!this.pageContentId) {
@ -85,53 +83,30 @@ export class PageContentFormComponent implements OnInit {
this.updateForm(this.pageHelpContent);
}
this.showLoading = false;
this.initCKEditor();
},
error => this.handleError('System error retrieving page with id: ' + pageId, error)
));
}
/*private getPage(pageId: string) {
this.subs.push(this._helpContentService.getPageByPortal(pageId,this.properties.adminToolsAPIURL, this.communityPid).subscribe(
page => {
if(this.properties.adminToolsPortalType != page.portalType) {
this._router.navigate(['../'], {relativeTo: this.route});
} else {
this.page = page;
this.getPageContents(pageId);
}
},
error => this.handleError('System error retrieving page with id: '+pageId, error)
));
private initCKEditor() {
this.cdr.detectChanges();
if(this.ckEditor) {
this.ckEditor.instance.on('mode', () => {
let editor = this.ckEditor.instance;
if (editor.mode === 'source') {
let editable = editor.editable();
editable.attachListener(editable, 'input', () => {
this.myForm.get('content').setValue(editor.getData());
this.myForm.get('content').markAsDirty();
this.cdr.detectChanges();
});
}
});
}
}
private getPageContents(pageId: string) {
this.subs.push(this._helpContentService.getCommunityPageHelpContents(this.communityPid, this.properties.adminToolsAPIURL).subscribe(
pageHelpContents => {
let countPageContents = 1;
for (let content of (pageHelpContents as Array<PageHelpContent>)) {
if(content.page['_id'] == pageId){
countPageContents++;
}
}
this.setOptions(this.page, countPageContents);
if(!this.pageContentId) {
this.showLoading = false;
this.initFormWithSelectOptions();
}
},
error => this.handleError('System error retrieving page contents with id: ', error)
));
}
private getPageHelpContent(pageContentId: string) {
this.showLoading = true;
this.subs.push(this._helpContentService.getPageHelpContent(pageContentId as string, this.properties.adminToolsAPIURL, this.communityPid).subscribe(
pageHelpContent => {
this.updateForm(pageHelpContent);
this.showLoading = false;
},
error => this.handleError('System error retrieving page help content', error)));
}*/
private updateForm(pageHelpContent: PageHelpContent) {
this.pageHelpContent = pageHelpContent;
this.myForm = this.form;
@ -207,32 +182,24 @@ export class PageContentFormComponent implements OnInit {
this.myForm.markAsPristine();
}
handleError(message: string, error) {
UIkit.notification(message, {
status: 'danger',
timeout: 6000,
pos: 'bottom-right'
});
console.error('Server responded: ' + error);
handleError(message: string, error = null) {
if(error) {
console.error('Server responded: ' + error);
}
NotificationHandler.rise(message, 'danger');
this.showLoading = false;
}
public saveCustom() {
if (this.myForm.valid) {
this.showLoading = true;
this.myForm.get('order').enable();
this.myForm.get('placement').enable();
let pageHelpContent: PageHelpContent = this.myForm.value;
let pageHelpContent: PageHelpContent = this.myForm.getRawValue();
this.subs.push(this._helpContentService.savePageHelpContent(pageHelpContent, this.properties.adminToolsAPIURL, this.portal).subscribe(
_ => {
UIkit.notification('Page content has been <b>successfully ' + (this.pageContentId ? 'updated' : 'created') + '</b>', {
status: 'success',
timeout: 6000,
pos: 'bottom-right'
});
NotificationHandler.rise('Page content has been <b>successfully ' + (this.pageContentId ? 'updated' : 'created') + '</b>');
this._router.navigate(['../'], {queryParams: {"pageId": this.pageId}, relativeTo: this.route});
this.showLoading = false;
this._clearCacheService.clearCache("page help content saved");
},
err => this.handleUpdateError('System error saving page content', err)
));
@ -241,24 +208,17 @@ export class PageContentFormComponent implements OnInit {
}
}
public cancelCustom() {
this._router.navigate(['../'], {queryParams: {"pageId": this.pageId}, relativeTo: this.route});
}
public resetCustom() {
this.showLoading = true;
this.updateForm(this.pageHelpContent);
this.showLoading = false;
}
handleUpdateError(message: string, error) {
UIkit.notification(message, {
status: 'danger',
timeout: 6000,
pos: 'bottom-right'
});
console.error('Server responded: ' + error);
handleUpdateError(message: string, error = null) {
if(error) {
console.error('Server responded: ' + error);
}
NotificationHandler.rise(message, 'danger');
this.showLoading = false;
}

View File

@ -1,4 +1,4 @@
import { NgModule } from '@angular/core';
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {AlertModalModule} from '../../utils/modal/alertModal.module';
@ -8,27 +8,21 @@ import {PageContentFormComponent} from './page-help-content-form.component';
import {PageHelpContentFormRoutingModule} from './page-help-content-form-routing.module';
import {AdminToolServiceModule} from '../../services/adminToolService.module';
import {InputModule} from '../../sharedComponents/input/input.module';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import {IconsModule} from '../../utils/icons/icons.module';
import {PageContentModule} from '../sharedComponents/page-content/page-content.module';
import {RouterModule} from '@angular/router';
import {LoadingModule} from '../../utils/loading/loading.module';
import {IconsService} from '../../utils/icons/icons.service';
import {arrow_left} from '../../utils/icons/icons';
import {MatSlideToggleModule} from "@angular/material/slide-toggle";
@NgModule({
imports: [
PageHelpContentFormRoutingModule,
CommonModule, FormsModule, RouterModule,
SafeHtmlPipeModule, CKEditorModule,
AlertModalModule, ReactiveFormsModule, PageHelpContentFormRoutingModule, AdminToolServiceModule, InputModule, MatSlideToggleModule, IconsModule, PageContentModule, LoadingModule
AlertModalModule, ReactiveFormsModule, AdminToolServiceModule, InputModule, IconsModule, PageContentModule, LoadingModule, MatSlideToggleModule
],
declarations: [
PageContentFormComponent
],
exports: [PageContentFormComponent]
declarations: [PageContentFormComponent],
exports: [PageContentFormComponent]
})
export class PageHelpContentFormModule {
constructor(private iconsService: IconsService) {
this.iconsService.registerIcons([arrow_left]);
}
}

View File

@ -1,122 +1,90 @@
<div page-content>
<div header>
<div class="uk-text-bold">
<span *ngIf="selectedPageId && page">{{page.name}}</span>
</div>
<div class="uk-margin-top">
<a routerLink="../pages/" class="uk-text-secondary uk-text-uppercase uk-text-bold uk-text-small">
<span class="uk-icon-button small uk-icon uk-button-secondary">
<icon name="arrow_left"></icon>
</span>
<span class="space">
Back to pages list
</span>
</a>
</div>
<div class="uk-width-1-1 uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle uk-grid" uk-grid>
<div #searchInputComponent search-input [control]="filterForm" [showSearch]="false" placeholder="Search helptext"
[selected]="selectedKeyword" (closeEmitter)="onSearchClose()" (resetEmitter)="reset()"
[bordered]="true" colorClass="uk-text-secondary"
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
<div>
<a (click)="newPageContent()"
class="uk-flex uk-flex-middle uk-text-uppercase">
<button class="large uk-icon-button uk-button-secondary">
<icon name="add"></icon>
</button>
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Add new page help text
</button>
</a>
</div>
</div>
<div *ngIf="!showLoading && checkboxes.length > 0"
class="uk-padding uk-flex uk-padding-remove-bottom uk-padding-remove-top uk-margin-remove-top uk-margin-small-bottom uk-display-inline"
[attr.uk-tooltip]="getSelectedPageHelpContents().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
title="Select at least one help text"><input id="checkAll" type="checkbox" (click)="selectAll()"
[ngModel]="getSelectedPageHelpContents().length ==checkboxes.length"/>
<span *ngIf="getSelectedPageHelpContents().length > 0" class="uk-margin-left uk-text-muted">
{{getSelectedPageHelpContents().length}} pages selected </span>
<a class="uk-margin-left">Actions </a>
<div uk-dropdown="mode: click">
<ul class="uk-nav uk-dropdown-nav"
[attr.uk-tooltip]="getSelectedPageHelpContents().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
title="Select at least one help text">
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
(click)="togglePageHelpContents(true,getSelectedPageHelpContents())"><i></i> Enable
</a></li>
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
(click)="togglePageHelpContents(false,getSelectedPageHelpContents())"><i></i> Disable
<div class="uk-section-xsmall uk-margin-top">
<div class="uk-flex-middle uk-grid" uk-grid>
<div class="uk-width-expand">
<a routerLink="../pages" class="uk-flex uk-flex-middle uk-h5 uk-link-reset">
<span class="uk-margin-right">
<icon name="west" ratio="1.7" [flex]="true"></icon>
</span>
<h1 *ngIf="page" class="uk-h5 uk-margin-remove">{{page.name}}</h1>
</a>
</li>
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
(click)="confirmDeleteSelectedPageHelpContents()"><i></i> Delete </a></li>
</ul>
</div>
<div search-input [disabled]="showLoading" [expandable]="true" [searchControl]="filterForm" searchInputClass="outer" placeholder="Search helptext" class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1">
</div>
<div>
<button (click)="newPageContent()" [disabled]="showLoading" [class.uk-disabled]="showLoading"
class="uk-flex uk-flex-middle uk-button uk-button-default">
<icon [flex]="true" name="add"></icon>
<span class="uk-margin-small-left">Add page help text</span>
</button>
</div>
</div>
</div>
</div>
<div inner>
<div *ngIf="showLoading" class="uk-position-center">
<loading></loading>
</div>
<div *ngIf="!showLoading">
<div *ngIf="checkboxes.length > 0" class="uk-margin-medium-bottom">
<ul class="uk-list pages">
<li *ngFor="let check of checkboxes; let i=index" class="uk-card uk-card-default uk-margin-bottom">
<div class="uk-grid uk-grid-divider uk-padding" uk-grid>
<div class="uk-width-4-5 ">
<div class="uk-grid uk-flex uk-flex-middle">
<div><input id="{{check.pageHelpContent._id}}" class="checkBox" type="checkbox"
name="entitiescb[]" value="{{check.pageHelpContent._id}}" [(ngModel)]="check.checked">
</div>
<div class="uk-width-expand uk-margin-medium-bottom">
<div *ngIf="!selectedPageId">
<div class="page" href="#">{{check.pageHelpContent.page.name}}</div>
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
<div *ngIf="showLoading" class="uk-position-center">
<loading></loading>
</div>
<ng-container *ngIf="!showLoading">
<div *ngIf="checkboxes.length == 0"
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
<div>No page help texts found</div>
</div>
<div *ngIf="checkboxes.length > 0">
<div class="uk-grid uk-child-width-1-2@l uk-child-width-1-1" uk-height-match=".uk-card-body" uk-grid>
<div *ngFor="let check of checkboxes; let i=index">
<div class="uk-card uk-card-default uk-margin-bottom">
<div class="uk-card-body">
<div class="uk-margin-medium-bottom">
<div class="multi-line-ellipsis lines-2">
<p>{{check.pageHelpContent.content | htmlToString}}</p>
</div>
<div class="content multi-line-ellipsis lines-2">
<p>{{check.pageHelpContent.content|htmlToString}}</p></div>
</div>
<div class="uk-grid uk-width-1-1 uk-margin-left">
<div class=" ">
<span class="title">Placement: </span>{{check.pageHelpContent.placement}}
<div class="uk-text-small">
<span class="uk-text-meta">Placement: </span>{{check.pageHelpContent.placement}}
</div>
<div class=" ">
<span class="title">Order: </span>{{check.pageHelpContent.order}}
</div>
<div class=" ">
<span class="title uk-margin-small-right">Enable/disable: </span>
<mat-slide-toggle [checked]="check.pageHelpContent.isActive"
(change)="($event.source.checked = check.pageHelpContent.isActive);togglePageHelpContents(!check.pageHelpContent.isActive,[check.pageHelpContent._id])"
uk-tooltip="title:<div class='uk-padding-small uk-width-large'><div class='uk-text-bold '> Enable or disable help text to show or hide it from the dashboard</div></div>"
></mat-slide-toggle>
<div class="uk-text-small uk-margin-small-top">
<span class="uk-text-meta">Order: </span>{{check.pageHelpContent.order}}
</div>
</div>
</div>
</div>
<div class="uk-width-1-5">
<div class="uk-flex uk-flex-center uk-flex-column uk-height-1-1">
<div class="uk-flex uk-flex-center">
<div class="actions" href="#">
<button (click)="editPageHelpContent(check.pageHelpContent._id)" class="uk-button action uk-margin-top uk-flex uk-flex-middle">
<icon name="edit"></icon>
<span class="uk-margin-small-left">Edit</span>
</button>
<button (click)="confirmDeletePageHelpContent(check.pageHelpContent._id)" class="uk-button action uk-margin-top uk-flex uk-flex-middle">
<icon name="remove"></icon>
<span class="uk-margin-small-left">Delete</span>
<div class="uk-card-footer uk-padding-remove-vertical">
<div class="uk-grid uk-grid-small uk-flex-nowrap uk-grid-divider uk-flex-right" uk-grid>
<div>
<div class="uk-padding-small uk-padding-remove-horizontal">
<mat-slide-toggle [checked]="check.pageHelpContent.isActive"
(change)="($event.source.checked = check.pageHelpContent.isActive);togglePageHelpContents(!check.pageHelpContent.isActive,[check.pageHelpContent._id])"
uk-tooltip="title:<div><div class='uk-text-bold '> Enable or disable help text to show or hide it from the dashboard</div></div>">
<span class="uk-text-small">Enable</span>
</mat-slide-toggle>
</div>
</div>
<div><div class="uk-padding-small uk-padding-remove-horizontal">
<button class="uk-button uk-button-link uk-flex uk-flex-middle" (click)="editPageHelpContent(check.pageHelpContent._id)">
<icon name="edit" [flex]="true"></icon>
<span class="uk-margin-xsmall-left"> Edit</span>
</button>
</div>
</div>
<div>
<div class="uk-padding-small uk-padding-remove-horizontal">
<button class="uk-button uk-button-link uk-flex uk-flex-middle"
(click)="confirmDeletePageHelpContent(check.pageHelpContent._id)">
<icon name="delete" [flex]="true"></icon>
<span class="uk-margin-xsmall-left"> Delete</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
<div *ngIf="checkboxes.length == 0"
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
<div>No page help texts found</div>
</div>
</div>
</div>
</ng-container>
</div>
</div>
</div>
<modal-alert #AlertModalDeletePageHelpContents (alertOutput)="confirmedDeletePageHelpContents($event)"></modal-alert>
<modal-alert #AlertModalDeletePageHelpContents [overflowBody]="false" classTitle="uk-background-primary uk-light"
(alertOutput)="confirmedDeletePageHelpContents($event)"></modal-alert>

View File

@ -1,5 +1,5 @@
import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import {FormBuilder, FormControl, FormGroup} from '@angular/forms';
import {UntypedFormBuilder, UntypedFormControl, UntypedFormGroup} from '@angular/forms';
import {ActivatedRoute, Router} from '@angular/router';
import {HelpContentService} from '../../services/help-content.service';
import {
@ -7,18 +7,16 @@ import {
PageHelpContent,
PageHelpContentFilterOptions
} from '../../utils/entities/adminTool/page-help-content';
import {CheckPage, Page} from '../../utils/entities/adminTool/page';
import {Page} from '../../utils/entities/adminTool/page';
import {Portal} from '../../utils/entities/adminTool/portal';
import {EnvProperties} from '../../utils/properties/env-properties';
import {Session} from '../../login/utils/helper.class';
import {LoginErrorCodes} from '../../login/utils/guardHelper.class';
import {HelperFunctions} from '../../utils/HelperFunctions.class';
import {Subscriber} from 'rxjs';
import {properties} from '../../../../environments/environment';
import {DomSanitizer} from '@angular/platform-browser';
import {SearchInputComponent} from '../../sharedComponents/search-input/search-input.component';
declare var UIkit;
import {ClearCacheService} from "../../services/clear-cache.service";
import {NotificationHandler} from "../../utils/notification-handler";
@Component({
selector: 'page-help-contents',
@ -29,7 +27,7 @@ export class PageHelpContentsComponent implements OnInit {
private selectedPageContents: string[] = [];
public checkboxes: CheckPageHelpContent[] = [];
public pageHelpContents: PageHelpContent[] = [];
public formGroup: FormGroup;
public formGroup: UntypedFormGroup;
public pages: Page[];
public checkboxAll: boolean = false;
public filters: PageHelpContentFilterOptions = {id: '', active: null, text: new RegExp('')};
@ -42,12 +40,14 @@ export class PageHelpContentsComponent implements OnInit {
public page: Page;
public properties: EnvProperties = properties;
public showLoading: boolean = true;
public filterForm: FormControl;
public filterForm: UntypedFormControl;
private subscriptions: any[] = [];
public selectedKeyword: string;
@ViewChild('searchInputComponent') searchInputComponent: SearchInputComponent;
constructor(private element: ElementRef, private route: ActivatedRoute, private router: Router, private _helpService: HelpContentService, private _fb: FormBuilder, private sanitizer: DomSanitizer) {
constructor(private element: ElementRef, private route: ActivatedRoute, private router: Router,
private _helpService: HelpContentService, private _fb: UntypedFormBuilder, private sanitizer: DomSanitizer,
private _clearCacheService: ClearCacheService) {
}
ngOnInit() {
@ -152,8 +152,6 @@ export class PageHelpContentsComponent implements OnInit {
}
private confirmModalOpen() {
this.alertModalDeletePageHelpContents.cancelButton = true;
this.alertModalDeletePageHelpContents.okButton = true;
this.alertModalDeletePageHelpContents.alertTitle = 'Delete Confirmation';
this.alertModalDeletePageHelpContents.message = 'Are you sure you want to delete the selected page content(s)?';
this.alertModalDeletePageHelpContents.okButtonText = 'Yes';
@ -165,12 +163,9 @@ export class PageHelpContentsComponent implements OnInit {
this.subscriptions.push(this._helpService.deletePageHelpContents(this.selectedPageContents, this.properties.adminToolsAPIURL, this.portal).subscribe(
_ => {
this.deletePageHelpContentsFromArray(this.selectedPageContents);
UIkit.notification('Page content(s) has been <b>successfully deleted</b>', {
status: 'success',
timeout: 6000,
pos: 'bottom-right'
});
NotificationHandler.rise('Page content(s) has been <b>successfully deleted</b>');
this.showLoading = false;
this._clearCacheService.clearCache("Help texts deleted");
},
error => this.handleUpdateError('System error deleting the selected page content(s)', error)
));
@ -212,13 +207,10 @@ export class PageHelpContentsComponent implements OnInit {
let i = this.checkboxes.findIndex(_ => _.pageHelpContent._id == id);
this.checkboxes[i].pageHelpContent.isActive = status;
}
UIkit.notification('Page content(s) has been <b>successfully updated</b>', {
status: 'success',
timeout: 6000,
pos: 'bottom-right'
});
NotificationHandler.rise('Page content(s) has been <b>successfully updated</b>');
this.countPageHelpContents();
this.applyCheck(false);
this._clearCacheService.clearCache("Help text's status changed");
},
error => this.handleUpdateError('System error changing the status of the selected page content(s)', error)
));
@ -248,23 +240,19 @@ export class PageHelpContentsComponent implements OnInit {
this.applyFilter();
}
handleError(message: string, error) {
UIkit.notification(message, {
status: 'danger',
timeout: 6000,
pos: 'bottom-right'
});
console.log('Server responded: ' + error);
handleError(message: string, error = null) {
if(error) {
console.log('Server responded: ' + error);
}
NotificationHandler.rise(message, 'danger');
this.showLoading = false;
}
handleUpdateError(message: string, error) {
UIkit.notification(message, {
status: 'danger',
timeout: 6000,
pos: 'bottom-right'
});
console.log('Server responded: ' + error);
handleUpdateError(message: string, error = null) {
if(error) {
console.log('Server responded: ' + error);
}
NotificationHandler.rise(message, 'danger');
this.showLoading = false;
}

Some files were not shown because too many files have changed in this diff Show More