[Connect | Trunk]: Add urlPrefix on affiliations, curators and community logo
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@60582 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
87ffb845b7
commit
a17b8bb887
|
@ -5,7 +5,8 @@
|
|||
[ngClass]="(!fullView)?'uk-card-body':'uk-card-media-top uk-padding-small'">
|
||||
<div class="uk-align-center">
|
||||
<img *ngIf="organization.logo_url != null && organization.logo_url != '' "
|
||||
src="{{urlPrefix(organization.logo_url) + organization.logo_url}}" alt="{{(organization.name)?organization.name:''}} logo">
|
||||
[src]="organization.logo_url | urlPrefix"
|
||||
alt="{{(organization.name)?organization.name:''}} logo">
|
||||
<span *ngIf="organization.logo_url == null || organization.logo_url == ''" class="uk-icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" icon="image" ratio="2.5"><circle cx="16.1" cy="6.1"
|
||||
r="1.1"></circle><rect
|
||||
|
@ -35,7 +36,7 @@
|
|||
|
||||
<div *ngFor="let affiliation of affiliations;">
|
||||
<div class="uk-card portalSearchCard">
|
||||
<a *ngIf="affiliation.website_url" target="_blank" [href]="urlPrefix(affiliation.website_url) + affiliation.website_url" class="affiliation-content">
|
||||
<a *ngIf="affiliation.website_url" target="_blank" [href]="affiliation.website_url | urlPrefix" class="affiliation-content">
|
||||
<ng-container *ngTemplateOutlet="card; context: { organization: affiliation, fullView: true}"></ng-container>
|
||||
</a>
|
||||
<span *ngIf="!affiliation.website_url" class="affiliation-content">
|
||||
|
|
|
@ -88,10 +88,6 @@ export class AffiliationsComponent {
|
|||
this.affiliationService.clearSubscriptions();
|
||||
}
|
||||
|
||||
public urlPrefix(url: string): string {
|
||||
return StringUtils.urlPrefix(url);
|
||||
}
|
||||
|
||||
private updateDescription(description: string) {
|
||||
this._meta.updateTag({content: description}, "name='description'");
|
||||
this._meta.updateTag({content: description}, "property='og:description'");
|
||||
|
|
|
@ -10,11 +10,12 @@ import {CommonModule} from "@angular/common";
|
|||
import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
|
||||
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
|
||||
import {PiwikServiceModule} from "../openaireLibrary/utils/piwik/piwikService.module";
|
||||
import {UrlPrefixModule} from "../openaireLibrary/utils/pipes/url-prefix.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, RouterModule, Schema2jsonldModule, SEOServiceModule,
|
||||
PiwikServiceModule
|
||||
PiwikServiceModule, UrlPrefixModule
|
||||
],
|
||||
declarations: [
|
||||
AffiliationsComponent
|
||||
|
|
|
@ -15,6 +15,7 @@ import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component
|
|||
import {Subscriber} from "rxjs";
|
||||
import {CommunityService} from "./openaireLibrary/connect/community/community.service";
|
||||
import {CommunityInfo} from "./openaireLibrary/connect/community/communityInfo";
|
||||
import {StringUtils} from "./openaireLibrary/utils/string-utils.class";
|
||||
|
||||
@Component({
|
||||
//changeDetection: ChangeDetectionStrategy.Default,
|
||||
|
@ -175,7 +176,7 @@ export class AppComponent {
|
|||
this.community = {
|
||||
id: community.communityId,
|
||||
name: (community.shortTitle) ? community.shortTitle : community.title,
|
||||
logoUrl: community.logoUrl,
|
||||
logoUrl: (community.isUpload) ? (properties.utilsService + '/download/' + community.logoUrl):(StringUtils.urlPrefix(community.logoUrl) + community.logoUrl),
|
||||
description:community.description
|
||||
};
|
||||
this.header = {
|
||||
|
|
|
@ -12,7 +12,11 @@
|
|||
<div class="uk-card-media-top uk-padding uk-padding-remove-vertical uk-flex uk-flex-center uk-flex-middle">
|
||||
<a *ngIf="directLink" [href]="getCommunityPageUrl()" target="_blank">
|
||||
<div class="community">
|
||||
<img *ngIf="community.logoUrl != null && community.logoUrl != ''" src="{{community.logoUrl}}"
|
||||
<img *ngIf="community.logoUrl && community.isUpload && community.logoUrl != ''"
|
||||
[src]="properties.utilsService + '/download/' + community.logoUrl"
|
||||
alt="{{(community.title)?community.title:community.shortTitle}} logo">
|
||||
<img *ngIf="community.logoUrl && !community.isUpload && community.logoUrl != ''"
|
||||
[src]="community.logoUrl | urlPrefix"
|
||||
alt="{{(community.title)?community.title:community.shortTitle}} logo">
|
||||
<span *ngIf="community.logoUrl == null || community.logoUrl == ''" class="uk-icon">
|
||||
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="2.5"> <circle fill="none" stroke="#000"
|
||||
|
|
|
@ -8,11 +8,12 @@ import {BrowseCommunityComponent} from './browse-community.component';
|
|||
import {SearchFormModule} from '../../openaireLibrary/searchPages/searchUtils/searchForm.module';
|
||||
import {ManageModule} from '../../openaireLibrary/utils/manage/manage.module';
|
||||
import {AlertModalModule} from "../../openaireLibrary/utils/modal/alertModal.module";
|
||||
import {UrlPrefixModule} from "../../openaireLibrary/utils/pipes/url-prefix.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
SearchFormModule, ManageModule, AlertModalModule
|
||||
SearchFormModule, ManageModule, AlertModalModule, UrlPrefixModule
|
||||
],
|
||||
declarations: [
|
||||
BrowseCommunityComponent
|
||||
|
|
|
@ -56,11 +56,11 @@
|
|||
</div>
|
||||
<div *ngFor="let affiliation of curator.affiliations">
|
||||
<span *ngIf="!affiliation.website_url">
|
||||
<img [src]="urlPrefix(affiliation.logo_url) + affiliation.logo_url" [alt]="affiliation.name">
|
||||
<img [src]="affiliation.logo_url | urlPrefix" [alt]="affiliation.name">
|
||||
</span>
|
||||
<a *ngIf="affiliation.website_url"
|
||||
target="_blank" [href]="urlPrefix(affiliation.website_url) + affiliation.website_url">
|
||||
<img [src]="urlPrefix(affiliation.logo_url) + affiliation.logo_url" [alt]="affiliation.name">
|
||||
target="_blank" [href]="affiliation.website_url | urlPrefix">
|
||||
<img [src]="affiliation.logo_url | urlPrefix" [alt]="affiliation.name">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -132,10 +132,6 @@ export class CuratorsComponent {
|
|||
}
|
||||
}
|
||||
|
||||
public urlPrefix(url: string): string {
|
||||
return StringUtils.urlPrefix(url);
|
||||
}
|
||||
|
||||
private updateDescription(description: string) {
|
||||
this._meta.updateTag({content: description}, "name='description'");
|
||||
this._meta.updateTag({content: description}, "property='og:description'");
|
||||
|
|
|
@ -12,13 +12,14 @@ import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2js
|
|||
import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module";
|
||||
import {PiwikServiceModule} from "../openaireLibrary/utils/piwik/piwikService.module";
|
||||
import {BreadcrumbsModule} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.module";
|
||||
import {UrlPrefixModule} from "../openaireLibrary/utils/pipes/url-prefix.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule,
|
||||
CuratorsRoutingModule, AffiliationsModule, HelperModule,
|
||||
Schema2jsonldModule, SEOServiceModule, PiwikServiceModule,
|
||||
BreadcrumbsModule
|
||||
BreadcrumbsModule, UrlPrefixModule
|
||||
],
|
||||
declarations: [
|
||||
CuratorsComponent
|
||||
|
|
Loading…
Reference in New Issue