[Library | Trunk]: Add urlPrefix on portal results

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60581 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2021-03-04 13:24:20 +00:00
parent 91eb91f7f7
commit 7ce7dc18cd
3 changed files with 5 additions and 4 deletions

View File

@ -4,7 +4,7 @@ import {properties} from "../../../environments/environment";
export class ConnectHelper {
public static getCommunityFromDomain(domain: string): string{
// domain = "beta.covid-19.openaire.eu"; //for testing
// domain = "beta.egi.openaire.eu"; //for testing
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
if (domain.indexOf('openaire.eu') === -1) {
return null;

View File

@ -25,7 +25,7 @@
<img *ngIf="result.logoUrl && result.logoUrl != '' && result.isUpload "
[src]="properties.utilsService + '/download/' + result.logoUrl"
alt="{{(result.title)?result.title:result.shortTitle}} logo">
<img *ngIf="result.logoUrl && result.logoUrl != '' && !result.isUpload " [src]="result.logoUrl"
<img *ngIf="result.logoUrl && result.logoUrl != '' && !result.isUpload " [src]="result.logoUrl | urlPrefix"
alt="{{(result.title)?result.title:result.shortTitle}} logo">
<span *ngIf="result.logoUrl == null || result.logoUrl == ''" class="uk-icon">
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="2.5"> <circle fill="none"
@ -48,7 +48,7 @@
<img *ngIf="result.logoUrl && result.logoUrl != '' && result.isUpload "
[src]="properties.utilsService + '/download/' + result.logoUrl"
alt="{{(result.title)?result.title:result.shortTitle}} logo">
<img *ngIf="result.logoUrl && result.logoUrl != '' && !result.isUpload " [src]="result.logoUrl"
<img *ngIf="result.logoUrl && result.logoUrl != '' && !result.isUpload " [src]="result.logoUrl | urlPrefix"
alt="{{(result.title)?result.title:result.shortTitle}} logo">
<span *ngIf="(result.logoUrl == null || result.logoUrl == '' )" class="uk-icon">
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="2.5"> <circle fill="none"

View File

@ -7,6 +7,7 @@ import {PortalSearchResultComponent} from "./portal-search-result.component";
import {AlertModalModule} from "../../utils/modal/alertModal.module";
import {ManageModule} from "../../utils/manage/manage.module";
import {IconsModule} from "../../utils/icons/icons.module";
import {UrlPrefixModule} from "../../utils/pipes/url-prefix.module";
// import {IconsService} from "../../utils/icons/icons.service";
// import {group, lock} from "../../utils/icons/icons";
@ -14,7 +15,7 @@ import {IconsModule} from "../../utils/icons/icons.module";
imports: [
CommonModule, FormsModule,
RouterModule, ErrorMessagesModule,
AlertModalModule, ManageModule, IconsModule
AlertModalModule, ManageModule, IconsModule, UrlPrefixModule
],
declarations: [
PortalSearchResultComponent