diff --git a/claims/claim-utils/service/searchOrcid.service.ts b/claims/claim-utils/service/searchOrcid.service.ts
index 208ce16e..892dc77d 100644
--- a/claims/claim-utils/service/searchOrcid.service.ts
+++ b/claims/claim-utils/service/searchOrcid.service.ts
@@ -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;
diff --git a/claims/claim-utils/service/searchOrcidService.module.ts b/claims/claim-utils/service/searchOrcidService.module.ts
new file mode 100644
index 00000000..64b31c1d
--- /dev/null
+++ b/claims/claim-utils/service/searchOrcidService.module.ts
@@ -0,0 +1,19 @@
+import { NgModule} from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+import {SearchOrcidService} from "./searchOrcid.service";
+
+
+@NgModule({
+ imports: [
+ CommonModule, FormsModule
+ ],
+ declarations: [
+ ],
+ providers:[
+ SearchOrcidService
+],
+ exports: [
+ ]
+})
+export class SearchOrcidServiceModule { }
diff --git a/claims/claimsAdmin/claimsAdmin.component.ts b/claims/claimsAdmin/claimsAdmin.component.ts
index 8b142399..d1240a38 100644
--- a/claims/claimsAdmin/claimsAdmin.component.ts
+++ b/claims/claimsAdmin/claimsAdmin.component.ts
@@ -37,7 +37,6 @@ export class ClaimsAdminComponent {
@Input() isConnect: boolean = false;
@Input() externalPortalUrl: string;
@Input() claimsInfoURL: string;
- @Input() userInfoURL: string;
public user: User = null;
sub;
diff --git a/claims/directLinking/directLinking.component.ts b/claims/directLinking/directLinking.component.ts
index 229558ea..3fcd7537 100644
--- a/claims/directLinking/directLinking.component.ts
+++ b/claims/directLinking/directLinking.component.ts
@@ -29,7 +29,7 @@ export class DirectLinkingComponent {
// 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"];
sources: ClaimEntity[] = [];
inlineEntity: ClaimEntity = null;
validInput: boolean = null;//'true;
@@ -74,7 +74,7 @@ export class DirectLinkingComponent {
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);
@@ -110,9 +110,9 @@ export class DirectLinkingComponent {
return false;
} else if (this.type == "project" && this.showOptions.linkTo != "result") {
return false;
- } else if (["dataset", "publication", "software", "orp"].indexOf(this.type) != -1 && (["project", "context", "result"].indexOf(this.showOptions.linkTo) == -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", "orp"].indexOf(this.type) == -1) {
+ } else if (["project", "dataset", "publication", "software", "other"].indexOf(this.type) == -1) {
return false;
} else {
return true;
diff --git a/claims/linking/insertClaim/insertClaim.component.ts b/claims/linking/insertClaim/insertClaim.component.ts
index a2be4b98..d9314aeb 100644
--- a/claims/linking/insertClaim/insertClaim.component.ts
+++ b/claims/linking/insertClaim/insertClaim.component.ts
@@ -16,6 +16,7 @@ import {
import {UserManagementService} from "../../../services/user-management.service";
import {Subscriber, timer} from "rxjs";
import {map} from "rxjs/operators";
+import {LogService} from "../../../utils/log/log.service";
@Component({
selector: 'claim-insert',
@@ -59,7 +60,7 @@ import {map} from "rxjs/operators";
})
export class ClaimInsertComponent {
constructor(private claimService: ClaimsService, private _router: Router, private route: ActivatedRoute,
- private userManagementService: UserManagementService) {
+ private userManagementService: UserManagementService, private _logService: LogService) {
}
subscriptions = [];
ngOnDestroy() {
@@ -127,6 +128,7 @@ export class ClaimInsertComponent {
public feedRecordsJob;
public claims2Insert;
public records2Insert
+ infoToLog = [];
public insert() {
this.confirmOpen();
}
@@ -145,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();
@@ -190,10 +193,11 @@ export class ClaimInsertComponent {
} else if (entity.project) {
claims.push(ClaimInsertComponent.createProjectClaim(result, entity, user.email, dashboard));
}
-
+ 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) {
@@ -256,6 +260,12 @@ export class ClaimInsertComponent {
data => {
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.saveLocalStorage();
let timerSubscription = timer(0, 10000).pipe(
map(() => {
@@ -375,7 +385,7 @@ export class ClaimInsertComponent {
localStorage.removeItem(this.localStoragePrefix + "claimsJob");
localStorage.removeItem(this.localStoragePrefix + "feedRecordsJob");
- this._router.navigate(['/myclaims'], {queryParams: this.params});
+ this._router.navigate([this.properties.myClaimsLink], {queryParams: this.params});
}
}
diff --git a/claims/linking/insertClaim/insertClaim.module.ts b/claims/linking/insertClaim/insertClaim.module.ts
index 5b756a47..991ffc4a 100644
--- a/claims/linking/insertClaim/insertClaim.module.ts
+++ b/claims/linking/insertClaim/insertClaim.module.ts
@@ -6,10 +6,11 @@ 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, IconsModule
+ SharedModule, AlertModalModule, LoadingModalModule, ClaimServiceModule, IconsModule, LogServiceModule
],
declarations: [ClaimInsertComponent],
exports:[ ClaimInsertComponent]
diff --git a/claims/myClaims/myClaims.component.ts b/claims/myClaims/myClaims.component.ts
index 5f2369df..5e6d8833 100644
--- a/claims/myClaims/myClaims.component.ts
+++ b/claims/myClaims/myClaims.component.ts
@@ -30,7 +30,6 @@ import {Subscriber} from "rxjs";
export class MyClaimsComponent {
@Input() claimsInfoURL: string;
@Input() communityId:string;
- @Input() userInfoURL: string;
public user: User = null;
constructor(private userManagementService: UserManagementService, private _router: Router) {}
diff --git a/connect/connectHelper.ts b/connect/connectHelper.ts
index 14542fa2..18c60846 100644
--- a/connect/connectHelper.ts
+++ b/connect/connectHelper.ts
@@ -6,6 +6,9 @@ import {CommunityInfo} from "./community/communityInfo";
export class ConnectHelper {
public static getCommunityFromDomain(domain: string): string{
+ if(properties.dashboard === 'irish') {
+ return properties.adminToolsCommunity;
+ }
if(properties.environment == "development" &&
(properties.adminToolsPortalType == "connect" || properties.adminToolsPortalType == "community"
|| properties.adminToolsPortalType == "aggregator" || properties.adminToolsPortalType == "eosc")) {
diff --git a/dashboard/portal/portalHelper.ts b/dashboard/portal/portalHelper.ts
index bc08cd2a..3f915e10 100644
--- a/dashboard/portal/portalHelper.ts
+++ b/dashboard/portal/portalHelper.ts
@@ -1,17 +1,18 @@
import {Option} from "../../sharedComponents/input/input.component";
-import {StakeholderEntities} from "../../monitor/entities/stakeholder";
+import {StakeholderConfiguration} from "../../monitor-admin/utils/indicator-utils";
-export class PortalUtils{
+export class PortalUtils {
portalTypes: Option[] = [
{value: 'explore', label: 'Explore Portal'},
{value: 'connect', label: 'Connect portal'},
{value: 'monitor', label: 'Monitor portal'},
{value: 'community', label: 'Community Gateway'},
- {value: 'funder', label: StakeholderEntities.FUNDER + ' Dashboard'},
- {value: 'ri', label: StakeholderEntities.RI + ' Dashboard'},
- {value: 'organization', label: StakeholderEntities.ORGANIZATION + ' Dashboard'},
- {value: 'project', label: StakeholderEntities.PROJECT + ' Dashboard'}
+ {value: 'funder', label: StakeholderConfiguration.ENTITIES.funder + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
+ {value: 'ri', label: StakeholderConfiguration.ENTITIES.ri + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
+ {value: 'organization', label: StakeholderConfiguration.ENTITIES.organization + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
+ {value: 'project', label: StakeholderConfiguration.ENTITIES.project + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
+ {value: 'country', label: StakeholderConfiguration.ENTITIES.country + ' ' + StakeholderConfiguration.ENTITIES.stakeholder},
];
}
diff --git a/dashboard/sharedComponents/sidebar/sideBar.component.html b/dashboard/sharedComponents/sidebar/sideBar.component.html
index 9e772ea8..4d92e286 100644
--- a/dashboard/sharedComponents/sidebar/sideBar.component.html
+++ b/dashboard/sharedComponents/sidebar/sideBar.component.html
@@ -28,6 +28,9 @@
[class.hide-on-close]="backItem.icon">{{backItem.title}}
+
0" class="menu_section uk-margin-large-top" [class.mobile]="mobile" style="min-height: 30vh">
diff --git a/dashboard/sharedComponents/sidebar/sideBar.component.ts b/dashboard/sharedComponents/sidebar/sideBar.component.ts
index 0610d6f3..6de0037e 100644
--- a/dashboard/sharedComponents/sidebar/sideBar.component.ts
+++ b/dashboard/sharedComponents/sidebar/sideBar.component.ts
@@ -28,6 +28,7 @@ export class SideBarComponent implements OnInit, AfterViewInit, OnDestroy, OnCha
@Input() activeSubItem: string = '';
@Input() backItem: MenuItem = null;
@Input() queryParamsHandling;
+ @Input() logoURL: string;
@ViewChild("nav") nav: ElementRef;
@ViewChild("sidebar_offcanvas") sidebar_offcanvas: ElementRef;
public offset: number;
diff --git a/dashboard/sharedComponents/sidebar/sidebar-base.component.ts b/dashboard/sharedComponents/sidebar/sidebar-base.component.ts
new file mode 100644
index 00000000..0c2cd59f
--- /dev/null
+++ b/dashboard/sharedComponents/sidebar/sidebar-base.component.ts
@@ -0,0 +1,48 @@
+import {ChangeDetectorRef, Directive, OnInit} from "@angular/core";
+import {BaseComponent} from "../../../sharedComponents/base/base.component";
+import {MenuItem} from "../../../sharedComponents/menu";
+import {LayoutService} from "./layout.service";
+
+@Directive()
+export class SidebarBaseComponent extends BaseComponent implements OnInit {
+ hasSidebar: boolean = false;
+ hasInternalSidebar: boolean = false;
+ hasAdminMenu: boolean = false;
+ /**
+ * Menu Items
+ * */
+ sideBarItems: MenuItem[] = [];
+ adminMenuItems: MenuItem[] = [];
+ backItem: MenuItem = null;
+
+ protected layoutService: LayoutService;
+ protected cdr: ChangeDetectorRef;
+
+ constructor() {
+ super();
+ }
+
+ ngOnInit() {
+ this.subscriptions.push(this.layoutService.hasSidebar.subscribe(hasSidebar => {
+ this.hasSidebar = hasSidebar;
+ this.cdr.detectChanges();
+ }));
+ this.subscriptions.push(this.layoutService.hasInternalSidebar.subscribe(hasInternalSidebar => {
+ this.hasInternalSidebar = hasInternalSidebar;
+ this.cdr.detectChanges();
+ }));
+ this.subscriptions.push(this.layoutService.hasAdminMenu.subscribe(hasAdminMenu => {
+ this.hasAdminMenu = hasAdminMenu;
+ this.cdr.detectChanges();
+ }));
+ this.layoutService.setOpen(true);
+ }
+
+ public get open() {
+ return this.layoutService.open;
+ }
+
+ public get hover() {
+ return this.layoutService.hover;
+ }
+}
diff --git a/dashboard/users/role-users/role-users.component.ts b/dashboard/users/role-users/role-users.component.ts
index ac0961a9..cb53ed14 100644
--- a/dashboard/users/role-users/role-users.component.ts
+++ b/dashboard/users/role-users/role-users.component.ts
@@ -140,9 +140,8 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
updateLists() {
this.loadActive = true;
this.loadPending = true;
- this.subs.push(this.userRegistryService.getActive(this.type, this.id, this.role).subscribe(users => {
+ this.subs.push(this.userRegistryService.getActive(this.type, this.id, this.role, true).subscribe(users => {
this.active = users;
- // users.forEach(user => this.active.push(user));
this.filterActiveBySearch(this.filterForm.value.active);
this.loadActive = false;
this.exists = true;
@@ -154,7 +153,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
}
this.loadActive = false;
}));
- this.subs.push(this.userRegistryService.getPending(this.type, this.id, this.role).subscribe(users => {
+ this.subs.push(this.userRegistryService.getPending(this.type, this.id, this.role, true).subscribe(users => {
this.pending = users;
this.filterPendingBySearch(this.filterForm.value.pending);
this.loadPending = false;
@@ -206,8 +205,8 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
this.createRoleModal.okButtonLeft = false;
this.createRoleModal.okButtonText = 'Create';
this.roleFb = this.fb.group({
- name: this.fb.control(Role.mapType(this.type) + '.' + this.id, Validators.required),
- description: this.fb.control(Role.mapType(this.type) + ' ' + this.id, Validators.required)
+ name: this.fb.control(Role.roleName(this.type, this.id), Validators.required),
+ description: this.fb.control(Role.roleName(this.type, this.id), Validators.required)
});
setTimeout(() => {
this.roleFb.get('name').disable();
@@ -277,7 +276,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
if (!this.pending.includes(response.email)) {
this.pending.push(response.email);
}
- if(this.notificationFn) {
+ if(this.notificationFn && properties.notificationsAPIURL) {
return this.notificationService.sendNotification(this.notificationFn(this.name, response.email, this.role, response.invitation)).pipe(map(notification => {
return notification;
}), tap(() => {
diff --git a/dashboard/users/subscribers/subscribers.component.ts b/dashboard/users/subscribers/subscribers.component.ts
index 0d0cd490..5b7976e7 100644
--- a/dashboard/users/subscribers/subscribers.component.ts
+++ b/dashboard/users/subscribers/subscribers.component.ts
@@ -105,7 +105,7 @@ export class SubscribersComponent implements OnInit, OnDestroy, OnChanges {
updateList() {
this.loading = true;
- this.subs.push( this.userRegistryService.getActive(this.type, this.id, 'member').subscribe(users => {
+ this.subs.push( this.userRegistryService.getActive(this.type, this.id, 'member', true).subscribe(users => {
this.subscribers = users;
this.filterBySearch(this.filterForm.value.keyword);
this.loading = false;
diff --git a/error-interceptor.service.ts b/error-interceptor.service.ts
index 713949c3..701c6697 100644
--- a/error-interceptor.service.ts
+++ b/error-interceptor.service.ts
@@ -11,7 +11,7 @@ import * as url from "url";
@Injectable()
export class ErrorInterceptorService implements HttpInterceptor {
- private static UNAUTHORIZED_WHITELIST = [properties.userInfoUrl, properties.orcidAPIURL, properties.registryUrl? (properties.registryUrl + 'verification/'):null, properties.eoscDataTransferAPI].filter(value => !!value);
+ private static UNAUTHORIZED_WHITELIST = [properties.orcidAPIURL, properties.registryUrl? (properties.registryUrl + 'verification/'):null, properties.eoscDataTransferAPI].filter(value => !!value);
private url: string = null;
constructor(private router: Router) {
diff --git a/landingPages/feedback/feedback.component.html b/landingPages/feedback/feedback.component.html
index 837c76bc..9a569781 100644
--- a/landingPages/feedback/feedback.component.html
+++ b/landingPages/feedback/feedback.component.html
@@ -9,7 +9,8 @@
+ [year]="resultLandingInfo.date" [embargoEndDate]="resultLandingInfo.embargoEndDate"
+ [publiclyFunded]="resultLandingInfo.publiclyFunded" [projects]="resultLandingInfo.fundedByProjects">
- 0 || instance.years?.length > 0" class="uk-text-meta">
+
0 || instance.years?.length > 0 || instance.peerReviewed" class="uk-text-meta">
0" class="uk-text-capitalize">{{instance.types.join(" . ")}}
0 && instance.years?.length > 0"> .
0">{{instance.years.join(" . ")}}
+ 0 || instance.years?.length > 0) && instance.peerReviewed"> .
+ Peer-reviewed
License:
diff --git a/landingPages/landing-utils/entity-metadata.component.ts b/landingPages/landing-utils/entity-metadata.component.ts
index caad8627..d9e0cf98 100644
--- a/landingPages/landing-utils/entity-metadata.component.ts
+++ b/landingPages/landing-utils/entity-metadata.component.ts
@@ -31,22 +31,20 @@ import {RouterHelper} from "../../utils/routerHelper.class";
0">
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
{{entityType}}
0">
@@ -150,6 +148,9 @@ import {RouterHelper} from "../../utils/routerHelper.class";
Thematic
+
+ Publicly funded
+
0"
[attr.uk-tooltip]="projects.length > projectsLimit ? 'cls: uk-invisible' : 'pos: top; cls: uk-active'" title="Funded by">
@@ -246,6 +247,7 @@ export class EntityMetadataComponent {
@Input() type; // data provider landing
@Input() provenanceAction: string; // search result
@Input() relationName: string; // search result
+ @Input() publiclyFunded: boolean; // search result
@Input() projects: Project[];
@Input() organizations: Organization[];
@Input() subjects: string[];
diff --git a/landingPages/landing-utils/entity-metadata.module.ts b/landingPages/landing-utils/entity-metadata.module.ts
new file mode 100644
index 00000000..60fb36b3
--- /dev/null
+++ b/landingPages/landing-utils/entity-metadata.module.ts
@@ -0,0 +1,16 @@
+import {NgModule} from '@angular/core';
+import {CommonModule} from '@angular/common';
+import {EntityMetadataComponent} from './entity-metadata.component';
+import {IconsModule} from '../../utils/icons/icons.module';
+import {AlertModalModule} from '../../utils/modal/alertModal.module';
+import {ShowPublisherModule} from "./showPublisher.module";
+
+@NgModule({
+ imports: [
+ CommonModule, IconsModule, AlertModalModule, ShowPublisherModule
+ ],
+ declarations: [EntityMetadataComponent],
+ providers:[],
+ exports: [EntityMetadataComponent]
+})
+export class EntityMetadataModule { }
diff --git a/landingPages/landing-utils/landing-header/landing-header.component.ts b/landingPages/landing-utils/landing-header/landing-header.component.ts
index adfe3268..649a6ec1 100644
--- a/landingPages/landing-utils/landing-header/landing-header.component.ts
+++ b/landingPages/landing-utils/landing-header/landing-header.component.ts
@@ -21,7 +21,7 @@ import {AlertModal} from "../../../utils/modal/alert";
[languages]="languages" [programmingLanguages]="programmingLanguages"
[compatibility]="compatibility" [aggregationStatus]="aggregationStatus"
[thematic]="thematic" [type]="type" [prevPath]="prevPath"
- [countries]="countries" [projects]="projects"
+ [countries]="countries" [publiclyFunded]="publiclyFunded" [projects]="projects"
>
@@ -63,5 +63,6 @@ export class LandingHeaderComponent {
@Input() type; // data provider landing
@Input() prevPath: string = "";
@Input() countries;
+ @Input() publiclyFunded;
@Input() projects;
}
diff --git a/landingPages/landing-utils/landing-header/landing-header.module.ts b/landingPages/landing-utils/landing-header/landing-header.module.ts
index 9435afa8..2bca0be7 100644
--- a/landingPages/landing-utils/landing-header/landing-header.module.ts
+++ b/landingPages/landing-utils/landing-header/landing-header.module.ts
@@ -4,12 +4,12 @@ import {CommonModule} from "@angular/common";
import {LandingModule} from "../landing.module";
import {ShowAuthorsModule} from "../../../utils/authors/showAuthors.module";
import {IconsModule} from "src/app/openaireLibrary/utils/icons/icons.module";
-import {ShowPublisherModule} from "../showPublisher.module";
import {RouterModule} from "@angular/router";
import {ResultLandingUtilsModule} from "../resultLandingUtils.module";
+import {EntityMetadataModule} from "../entity-metadata.module";
@NgModule({
- imports: [CommonModule, LandingModule, ShowAuthorsModule, IconsModule, ShowPublisherModule, RouterModule, ResultLandingUtilsModule],
+ imports: [CommonModule, LandingModule, ShowAuthorsModule, IconsModule, RouterModule, ResultLandingUtilsModule, EntityMetadataModule],
declarations: [LandingHeaderComponent],
exports: [LandingHeaderComponent]
})
diff --git a/landingPages/landing-utils/parsingFunctions.class.ts b/landingPages/landing-utils/parsingFunctions.class.ts
index 112eb192..105c54cf 100644
--- a/landingPages/landing-utils/parsingFunctions.class.ts
+++ b/landingPages/landing-utils/parsingFunctions.class.ts
@@ -265,7 +265,8 @@ export class ParsingFunctions {
"types": [],
"years": [],
"license": "",
- "fulltext": ""
+ "fulltext": "",
+ "peerReviewed": null
};
if (instance.hasOwnProperty("hostedby")) {
@@ -358,6 +359,10 @@ export class ParsingFunctions {
if(instance.hasOwnProperty("fulltext")) {
available.fulltext = instance['fulltext'];
}
+
+ if(instance.hasOwnProperty("refereed") && instance.refereed.classname == "peerReviewed") {
+ available.peerReviewed = true;
+ }
hostedBy_collectedFrom.push(available);
}
diff --git a/landingPages/landing-utils/resultLandingUtils.module.ts b/landingPages/landing-utils/resultLandingUtils.module.ts
index 7ae62115..44a91f3c 100644
--- a/landingPages/landing-utils/resultLandingUtils.module.ts
+++ b/landingPages/landing-utils/resultLandingUtils.module.ts
@@ -9,7 +9,6 @@ import {ShowSubjectsComponent} from './showSubjects.component';
import {FundedByComponent} from './fundedBy.component';
import {AvailableOnComponent} from './availableOn.component';
import {TabTableComponent} from './tabTable.component';
-import {ShowPublisherComponent} from "./showPublisher.component";
import {ShowPublisherModule} from "./showPublisher.module";
import {RelatedToComponent} from "./relatedTo.component";
import {FosComponent} from "./fos.component";
@@ -17,13 +16,11 @@ import {SdgComponent} from "./sdg.component";
import {IconsModule} from "../../utils/icons/icons.module";
import {AlertModalModule} from "../../utils/modal/alertModal.module";
import { SearchInputModule } from '../../sharedComponents/search-input/search-input.module';
-import {EntityMetadataComponent} from "./entity-metadata.component";
import {IconsService} from "../../utils/icons/icons.service";
import {book, closed_access, cog, database, earth, open_access, unknown_access} from "../../utils/icons/icons";
import {FullScreenModalModule} from "../../utils/modal/full-screen-modal/full-screen-modal.module";
import {MobileDropdownModule} from "../../utils/mobile-dropdown/mobile-dropdown.module";
-
@NgModule({
imports: [
CommonModule, FormsModule, RouterModule, PagingModule, ShowPublisherModule, IconsModule, AlertModalModule,
@@ -32,15 +29,14 @@ import {MobileDropdownModule} from "../../utils/mobile-dropdown/mobile-dropdown.
declarations: [
ShowIdentifiersComponent,ShowSubjectsComponent,
FundedByComponent,AvailableOnComponent,TabTableComponent,
- RelatedToComponent, FosComponent, SdgComponent,
- EntityMetadataComponent
+ RelatedToComponent, FosComponent, SdgComponent
],
providers:[
],
exports: [
ShowIdentifiersComponent, ShowSubjectsComponent,
- FundedByComponent,AvailableOnComponent, TabTableComponent, ShowPublisherComponent,
- RelatedToComponent, FosComponent, SdgComponent, EntityMetadataComponent
+ FundedByComponent,AvailableOnComponent, TabTableComponent,
+ RelatedToComponent, FosComponent, SdgComponent
]
})
export class ResultLandingUtilsModule {
diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html
index b43476da..1d64f1f3 100644
--- a/landingPages/result/resultLanding.component.html
+++ b/landingPages/result/resultLanding.component.html
@@ -229,6 +229,7 @@
[publisher]="resultLandingInfo.publisher" [journal]="resultLandingInfo.journal"
[languages]="resultLandingInfo.languages" [programmingLanguages]="resultLandingInfo.programmingLanguages"
[prevPath]="prevPath" [countries]="resultLandingInfo.countries"
+ [publiclyFunded]="resultLandingInfo.publiclyFunded"
[projects]="resultLandingInfo.fundedByProjects">
@@ -454,6 +455,29 @@
+
+
+
+
+
+
+
+
+
{{resultLandingInfo.oaRoutes.oaColor}}
+
+
+
+
+
Published in a Diamond OA journal
+
+
+
+
+
0 && properties.adminToolsPortalType == 'eosc'
@@ -523,6 +547,7 @@
[date]="resultLandingInfo.dateofacceptance" [embargoEndDate]="resultLandingInfo.embargoEndDate"
[publisher]="resultLandingInfo.publisher" [journal]="resultLandingInfo.journal"
[languages]="resultLandingInfo.languages" [programmingLanguages]="resultLandingInfo.programmingLanguages"
+ [publiclyFunded]="resultLandingInfo.publiclyFunded" [projects]="resultLandingInfo.fundedByProjects"
[isMobile]="true" [prevPath]="prevPath">
@@ -540,6 +565,31 @@
+
+
+
+ Access Routes
+
+
+
+
+
+
+
+
{{resultLandingInfo.oaRoutes.oaColor}}
+
+
+
+
+
Published in a Diamond OA journal
+
+
+
+
+
diff --git a/landingPages/result/resultLanding.service.ts b/landingPages/result/resultLanding.service.ts
index d0f7060c..6c9b1d1d 100644
--- a/landingPages/result/resultLanding.service.ts
+++ b/landingPages/result/resultLanding.service.ts
@@ -142,6 +142,19 @@ export class ResultLandingService {
this.resultLandingInfo.publisher = data[0].publisher;
this.resultLandingInfo.description = this.parsingFunctions.parseDescription(data[0] && data[0].description ? data[0].description : []);
this.resultLandingInfo.embargoEndDate = data[0].embargoenddate ? Dates.getDate(data[0].embargoenddate) : null;
+
+ if(data[0].hasOwnProperty("publiclyfunded") && data[0].publiclyfunded) {
+ this.resultLandingInfo.publiclyFunded = data[0].publiclyfunded;
+ }
+ if((data[0].hasOwnProperty("isgreen") && data[0].isgreen)
+ || (data[0].hasOwnProperty("openaccesscolor") && data[0].openaccesscolor)
+ || (data[0].hasOwnProperty("isindiamondjournal") && data[0].isindiamondjournal)) {
+ this.resultLandingInfo.oaRoutes = {
+ "green": data[0].isgreen,
+ "oaColor": data[0].openaccesscolor,
+ "isInDiamondJournal":data[0].isindiamondjournal
+ };
+ }
}
if (data[0]['bestaccessright'] && data[0]['bestaccessright'].hasOwnProperty("classname")) {
@@ -325,11 +338,13 @@ export class ResultLandingService {
if (this.resultLandingInfo.fos) {
this.resultLandingInfo.fos.sort((a, b) => a.id.localeCompare(b.id));
}
- this.resultLandingInfo.sdg = subjectResults[4];
- if (this.resultLandingInfo.sdg) {
- this.resultLandingInfo.sdg.sort((a, b) => {
- return HelperFunctions.sortSDGs(a, b);
- })
+ if(properties.dashboard != "irish") {
+ this.resultLandingInfo.sdg = subjectResults[4];
+ if (this.resultLandingInfo.sdg) {
+ this.resultLandingInfo.sdg.sort((a, b) => {
+ return HelperFunctions.sortSDGs(a, b);
+ })
+ }
}
// if(!this.resultLandingInfo.eoscSubjects) {
diff --git a/login/user.component.ts b/login/user.component.ts
index f95adf67..08497f70 100644
--- a/login/user.component.ts
+++ b/login/user.component.ts
@@ -27,7 +27,6 @@ export class UserComponent {
public errorCode: string = "";
public redirectUrl: string = "";
public routerHelper: RouterHelper = new RouterHelper();
- public loginUrl;
public properties: EnvProperties = properties;
@Input() mainComponent = true;
@@ -40,7 +39,6 @@ export class UserComponent {
}
ngOnInit() {
- this.loginUrl = this.properties.loginUrl;
if (typeof document !== 'undefined') {
this.server = false;
this.userManagementsService.updateUserInfo( () => {
diff --git a/login/userMini.component.ts b/login/userMini.component.ts
index e8293086..87029003 100644
--- a/login/userMini.component.ts
+++ b/login/userMini.component.ts
@@ -122,12 +122,8 @@ export class UserMiniComponent implements OnInit, OnChanges {
public isAuthorized: boolean = false;
@Input() public mobileView: boolean = false;
public firstLetters: string = "";
- public server: boolean = true;
public routerHelper: RouterHelper = new RouterHelper();
@Input() userMenuItems;
- @Input() logInUrl;
- @Input() logOutUrl;
- @Input() cookieDomain;
@Input() notificationConfiguration: NotificationConfiguration;
@ViewChild('notificationsSidebar') notificationsSidebar: NotificationsSidebarComponent;
public showNotifications = false;
@@ -137,9 +133,6 @@ export class UserMiniComponent implements OnInit, OnChanges {
}
ngOnInit() {
- if (typeof document !== 'undefined') {
- this.server = false;
- }
this.initUser();
}
diff --git a/login/utils/helper.class.ts b/login/utils/helper.class.ts
index f33c67e6..92c2a62e 100644
--- a/login/utils/helper.class.ts
+++ b/login/utils/helper.class.ts
@@ -1,4 +1,5 @@
-import {stakeholderTypes} from "../../monitor/entities/stakeholder";
+import {StakeholderConfiguration} from "../../monitor-admin/utils/indicator-utils";
+
export class User {
email: string;
@@ -9,6 +10,7 @@ export class User {
expirationDate: number;
role: string[];
accessToken?: string;
+ orcid?: string;
refreshToken?: string;
constructor(info: any) {
@@ -22,6 +24,9 @@ export class User {
if(info.refreshToken) {
this.refreshToken = info.refreshToken;
}
+ if(info.orcid) {
+ this.orcid = info.orcid;
+ }
this.fullname = (info.name) ? info.name : "";
if (this.fullname == "") {
if (this.firstname != "") {
@@ -37,7 +42,7 @@ export class User {
this.role = [];
if (info.roles) {
info.roles.forEach(role => {
- this.role.push(role);
+ this.role.push(decodeURIComponent(role).replace('$$', '::'));
});
} else {
if (info.edu_person_entitlements) {
@@ -63,21 +68,32 @@ export class Session {
var cookie = COOKIE.getCookie(COOKIE.cookieName_id);
return (cookie != null && cookie != "");
}
-
+ public static clearReloadUrl() {
+ COOKIE.setCookie("reloadURLs", JSON.stringify([]), -1);
+ }
public static setReloadUrl(host: string, path: string, params: string, fragment: string) {
- var URL = {};
+ let URLs:any[] = this.getReloadUrl();
+ let URL = {};
URL["host"] = host;
URL["path"] = path;
URL["params"] = params;
URL["fragment"] = fragment;
- COOKIE.setCookie("reloadURL", JSON.stringify(URL), -1);
+ URLs.push(URL);
+ COOKIE.setCookie("reloadURLs", JSON.stringify(URLs), -1);
}
public static getReloadUrl() {
- var URL = COOKIE.getCookie("reloadURL");
- URL = JSON.parse(URL);
- return URL;
+ let URLs = COOKIE.getCookie("reloadURLs");
+ let array = JSON.parse(URLs);
+ return array?array:[];
+ }
+ public static popReloadUrl() {
+ let array = this.getReloadUrl();
+ let Url = array.length>0?array[0]:null;
+ COOKIE.setCookie("reloadURLs", JSON.stringify(array.slice(1)), -1);
+ return Url;
+
}
public static getParamsObj(params: string) {
@@ -100,7 +116,7 @@ export class Session {
}
public static isMonitorCurator(user: User): boolean {
- return stakeholderTypes.filter(stakeholderType => this.isTypeCurator(stakeholderType.value, user)).length > 0;
+ return StakeholderConfiguration.TYPES.filter(stakeholderType => this.isTypeCurator(stakeholderType.value, user)).length > 0;
}
public static isCommunityCurator(user: User): boolean {
@@ -112,7 +128,7 @@ export class Session {
}
public static isCurator(type: string, user: User): boolean {
- return (type === 'community' || stakeholderTypes.find(stakeholderType => stakeholderType.value == type)) && this.isTypeCurator(type, user);
+ return (type === 'community' || StakeholderConfiguration.TYPES.find(stakeholderType => stakeholderType.value == type)) && this.isTypeCurator(type, user);
}
public static isPortalAdministrator(user: User): boolean {
@@ -212,8 +228,11 @@ export class Role {
public static ANONYMOUS_USER = 'ROLE_ANONYMOUS';
public static USER_MANAGER = 'USER_MANAGER';
public static CURATOR_CLAIM = 'CURATOR_CLAIM';
-
-
+
+ public static roleName(type: string, id: string) {
+ return this.GROUP + this.mapType(type) + '.' + id;
+ }
+
public static mapType(type: string, communityMap: boolean = true): string {
if (type == "ri" && communityMap) {
type = "community";
diff --git a/monitor-admin/general/edit-stakeholder/edit-stakeholder.component.ts b/monitor-admin/general/edit-stakeholder/edit-stakeholder.component.ts
index f84f197d..72be3c8a 100644
--- a/monitor-admin/general/edit-stakeholder/edit-stakeholder.component.ts
+++ b/monitor-admin/general/edit-stakeholder/edit-stakeholder.component.ts
@@ -1,11 +1,8 @@
-import {Component, Input, OnDestroy, ViewChild} from "@angular/core";
+import {Component, Input, ViewChild} from "@angular/core";
import {Stakeholder} from "../../../monitor/entities/stakeholder";
import {UntypedFormBuilder, UntypedFormGroup, Validators} from "@angular/forms";
-import {StakeholderUtils} from "../../utils/indicator-utils";
import {Option} from "../../../sharedComponents/input/input.component";
import {Subscription} from "rxjs";
-import {EnvProperties} from "../../../utils/properties/env-properties";
-import {properties} from "src/environments/environment";
import {StakeholderService} from "../../../monitor/services/stakeholder.service";
import {UtilitiesService} from "../../../services/utilities.service";
import {Role, Session, User} from "../../../login/utils/helper.class";
@@ -16,121 +13,132 @@ import {NotificationUtils} from "../../../notifications/notification-utils";
import {Notification} from "../../../notifications/notifications";
import {NotificationHandler} from "../../../utils/notification-handler";
import {StatsProfilesService} from "../../utils/services/stats-profiles.service";
+import {StakeholderBaseComponent} from "../../utils/stakeholder-base.component";
@Component({
selector: 'edit-stakeholder',
template: `
-