Revision 58632
Added by Konstantina Galouni almost 4 years ago
modules/uoa-connect-portal/trunk/src/app/community/community.component.html | ||
---|---|---|
185 | 185 |
|
186 | 186 |
</ng-template> |
187 | 187 |
|
188 |
<div class="publicationsSearchForm "> |
|
188 |
<div *ngIf="communityInfo && community" class="publicationsSearchForm ">
|
|
189 | 189 |
<div class="uk-container uk-container-large"> |
190 | 190 |
<div class="uk-margin-large-top"> |
191 | 191 |
<div *ngIf="community.title" class="uk-h2 uk-margin-remove"> |
modules/uoa-connect-portal/trunk/src/app/curators/curators.component.html | ||
---|---|---|
65 | 65 |
<span *ngIf="!affiliation.website_url"> |
66 | 66 |
<img [src]="affiliation.logo_url" [alt]="affiliation.name"> |
67 | 67 |
</span> |
68 |
<a *ngIf="affiliation.website_url" [href]="affiliation.website_url"> |
|
68 |
<a *ngIf="affiliation.website_url" |
|
69 |
target="_blank" [href]="urlPrefix(affiliation.website_url) + affiliation.website_url"> |
|
69 | 70 |
<img [src]="affiliation.logo_url" [alt]="affiliation.name"> |
70 | 71 |
</a> |
71 | 72 |
</div> |
modules/uoa-connect-portal/trunk/src/app/curators/curators.component.ts | ||
---|---|---|
12 | 12 |
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; |
13 | 13 |
import {PiwikHelper} from "../utils/piwikHelper"; |
14 | 14 |
import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component"; |
15 |
import {StringUtils} from "../openaireLibrary/utils/string-utils.class"; |
|
15 | 16 |
|
16 | 17 |
@Component({ |
17 | 18 |
selector: 'curators', |
... | ... | |
132 | 133 |
} |
133 | 134 |
} |
134 | 135 |
|
136 |
public urlPrefix(url: string): string { |
|
137 |
return StringUtils.urlPrefix(url); |
|
138 |
} |
|
139 |
|
|
135 | 140 |
private updateDescription(description: string) { |
136 | 141 |
this._meta.updateTag({content: description}, "name='description'"); |
137 | 142 |
this._meta.updateTag({content: description}, "property='og:description'"); |
modules/uoa-connect-portal/trunk/src/app/affiliations/affiliations.component.html | ||
---|---|---|
35 | 35 |
|
36 | 36 |
<div *ngFor="let affiliation of affiliations;"> |
37 | 37 |
<div class="uk-card communityCard"> |
38 |
<a *ngIf="affiliation.website_url" target="_blank" [href]="affiliation.website_url" class="affiliation-content"> |
|
38 |
<a *ngIf="affiliation.website_url" target="_blank" [href]="urlPrefix(affiliation.website_url) + affiliation.website_url" class="affiliation-content">
|
|
39 | 39 |
<ng-container *ngTemplateOutlet="card; context: { organization: affiliation, fullView: true}"></ng-container> |
40 | 40 |
</a> |
41 | 41 |
<span *ngIf="!affiliation.website_url" class="affiliation-content"> |
... | ... | |
60 | 60 |
[class]="'affiliation-element uk-width-1-'+(affiliations.length >= affiliationsInSlider ? affiliationsInSlider : affiliations.length)"> |
61 | 61 |
<div class="affiliation uk-flex uk-flex-middle uk-flex-center uk-padding-small" |
62 | 62 |
[attr.uk-tooltip]="(affiliation.name) ? affiliation.name : 'cls: uk-invisible'"> |
63 |
<a *ngIf="affiliation.website_url" target="_blank" [href]="affiliation.website_url" |
|
63 |
<a *ngIf="affiliation.website_url" target="_blank" [href]="urlPrefix(affiliation.website_url) + affiliation.website_url"
|
|
64 | 64 |
class="affiliation-content"> |
65 | 65 |
<ng-container |
66 | 66 |
*ngTemplateOutlet="card; context: { organization: affiliation, fullView: false}"></ng-container> |
modules/uoa-connect-portal/trunk/src/app/affiliations/affiliations.component.ts | ||
---|---|---|
8 | 8 |
import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; |
9 | 9 |
import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; |
10 | 10 |
import {PiwikHelper} from "../utils/piwikHelper"; |
11 |
import {StringUtils} from '../openaireLibrary/utils/string-utils.class'; |
|
11 | 12 |
|
12 | 13 |
@Component({ |
13 | 14 |
selector: 'affiliations', |
... | ... | |
83 | 84 |
} |
84 | 85 |
} |
85 | 86 |
|
87 |
public urlPrefix(url: string): string { |
|
88 |
return StringUtils.urlPrefix(url); |
|
89 |
} |
|
90 |
|
|
86 | 91 |
private updateDescription(description: string) { |
87 | 92 |
this._meta.updateTag({content: description}, "name='description'"); |
88 | 93 |
this._meta.updateTag({content: description}, "property='og:description'"); |
Also available in: Unified diff
[Trunk | Connect]:
1. affiliations.component & curators.component: In affiliations website_url, call method 'StringUtils.urlPrefix()' (add "//" prefix, when url does not start with protocol (http, https, //)).
2. community.component.html: [Bug fix] Add checks (<div *ngIf="communityInfo && community" class="publicationsSearchForm ">).