parent
24e10a00a4
commit
4790631da4
@ -0,0 +1,38 @@ |
||||
import {Component, Input} from "@angular/core"; |
||||
import {enterpriseEditionUrl} from "core-app/globals/constants.const"; |
||||
import {I18nService} from "core-app/modules/common/i18n/i18n.service"; |
||||
|
||||
@Component({ |
||||
selector: 'enterprise-banner', |
||||
template: ` |
||||
<div class="notification-box"> |
||||
<div class="notification-box--content"> |
||||
<p class="-bold" [textContent]="text.enterpriseFeature"></p> |
||||
<p [textContent]="textMessage"></p> |
||||
<a [href]="eeLink()" |
||||
target='blank' |
||||
[textContent]="linkMessage"></a> |
||||
</div> |
||||
</div> |
||||
` |
||||
}) |
||||
export class EnterpriseBannerComponent { |
||||
@Input() public textMessage:string; |
||||
@Input() public linkMessage:string; |
||||
@Input() public opReferrer:string; |
||||
|
||||
public text:any = { |
||||
enterpriseFeature: this.I18n.t('js.upsale.ee_only'), |
||||
} |
||||
|
||||
constructor(protected I18n:I18nService) { |
||||
} |
||||
|
||||
public eeLink() { |
||||
if (this.opReferrer) { |
||||
return enterpriseEditionUrl + '&op_referrer=' + this.opReferrer; |
||||
} else { |
||||
return enterpriseEditionUrl; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1 @@ |
||||
export const enterpriseEditionUrl = "https://www.openproject.org/enterprise-edition/?op_edtion=community-edition"; |
Loading…
Reference in new issue