Merge remote-tracking branch 'origin/develop' into plugins-functionality
This commit is contained in:
commit
a50d5dc509
|
@ -88,6 +88,10 @@ export class LayoutService {
|
||||||
* Handle it manually in the component, it doesn't use data
|
* Handle it manually in the component, it doesn't use data
|
||||||
* */
|
* */
|
||||||
private rootClassSubject: BehaviorSubject<string> = new BehaviorSubject<string>(null);
|
private rootClassSubject: BehaviorSubject<string> = new BehaviorSubject<string>(null);
|
||||||
|
/**
|
||||||
|
* Display help pop-up on non-admin pages. (default true for the rest of the pages)
|
||||||
|
* */
|
||||||
|
private hasHelpPopUpSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
|
@ -343,4 +347,12 @@ export class LayoutService {
|
||||||
this.rootClassSubject.next(value);
|
this.rootClassSubject.next(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get hasHelpPopUp(): Observable<boolean> {
|
||||||
|
return this.hasHelpPopUpSubject.asObservable();
|
||||||
|
}
|
||||||
|
|
||||||
|
setHasHelpPopUp(value: boolean) {
|
||||||
|
this.hasHelpPopUpSubject.next(value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -234,6 +234,7 @@ export class Role {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static mapType(type: string, communityMap: boolean = true): string {
|
public static mapType(type: string, communityMap: boolean = true): string {
|
||||||
|
type = type.replace(this.GROUP, '');
|
||||||
if (type == "ri" && communityMap) {
|
if (type == "ri" && communityMap) {
|
||||||
type = "community";
|
type = "community";
|
||||||
} else if (type == "organization") {
|
} else if (type == "organization") {
|
||||||
|
|
|
@ -93,6 +93,8 @@ export class RoleVerificationComponent extends BaseComponent implements OnInit,
|
||||||
public userInfoLinkPrefix = '';
|
public userInfoLinkPrefix = '';
|
||||||
@Input()
|
@Input()
|
||||||
public userInfoLink = null;
|
public userInfoLink = null;
|
||||||
|
@Input()
|
||||||
|
public relativeTo: ActivatedRoute = this._route;
|
||||||
public user: User;
|
public user: User;
|
||||||
public verification: any;
|
public verification: any;
|
||||||
public code: UntypedFormControl;
|
public code: UntypedFormControl;
|
||||||
|
@ -150,7 +152,7 @@ export class RoleVerificationComponent extends BaseComponent implements OnInit,
|
||||||
'errorCode': LoginErrorCodes.NOT_LOGIN,
|
'errorCode': LoginErrorCodes.NOT_LOGIN,
|
||||||
'redirectUrl': this._router.url
|
'redirectUrl': this._router.url
|
||||||
},
|
},
|
||||||
relativeTo: this._route
|
relativeTo: this.relativeTo
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if(this.isMember) {
|
} else if(this.isMember) {
|
||||||
|
|
|
@ -133,7 +133,14 @@ export class SearchResearchResultsService {
|
||||||
return this.http.get((properties.useLongCache && size == 0 && !params && (!refineQuery || !refineQuery.includes("fq="))) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
return this.http.get((properties.useLongCache && size == 0 && !params && (!refineQuery || !refineQuery.includes("fq="))) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
||||||
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties), RefineResultsUtils.parse(res['refineResults'], refineFields, "publication")]));
|
.pipe(map(res => [res['meta'].total, this.parseResults(resultType, res['results'], properties), RefineResultsUtils.parse(res['refineResults'], refineFields, "publication")]));
|
||||||
}
|
}
|
||||||
|
countResults(field:string,value:string): any {
|
||||||
|
let url = properties.utilsService + "/portals/countResults";
|
||||||
|
if (field && value) {
|
||||||
|
url += "?field=" + encodeURIComponent(field) + "&value="+encodeURIComponent(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.http.get((properties.useLongCache ) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
|
||||||
|
}
|
||||||
searchResultForEntity(resultType: string, params: string, page: number, size: number, properties: EnvProperties): any {
|
searchResultForEntity(resultType: string, params: string, page: number, size: number, properties: EnvProperties): any {
|
||||||
let link = properties.searchAPIURLLAst;
|
let link = properties.searchAPIURLLAst;
|
||||||
//let url = link+params+"/"+this.getEntityQueryName(resultType,true)+ "?format=json";
|
//let url = link+params+"/"+this.getEntityQueryName(resultType,true)+ "?format=json";
|
||||||
|
|
Loading…
Reference in New Issue