[Trunk | Library]:

1. env-properties.ts: Added property "footerGrantText?: string"
2. bottom.module.ts: Imported "HelperModule" (div help content added in footer)
3. bottom.component.ts: 
	a. Comment "grantAdvanceText" and "grantConnectText".
	b. If property "footerGrantText" is not set, get div help contents for "/" page route.
4. bottom.component.html: 
	a. If "properties.footerGrantText" is set, show it as html.
	b. Show div help contents for "footer" divId.


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@61039 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2021-05-24 22:15:50 +00:00
parent d79a202ed7
commit 4eca6ad584
4 changed files with 34 additions and 21 deletions

View File

@ -1,5 +1,6 @@
<ng-container *ngIf="shortView;else longView">
<div class="uk-padding uk-flex uk-flex-middle">
<div *ngIf="properties.footerGrantText || (divContents && divContents['footer']?.length > 0)"
class="uk-padding uk-flex uk-flex-middle">
<div *ngIf="showCommision" class="uk-width-1-2">
<div class="uk-flex uk-flex-middle">
<div>
@ -7,20 +8,16 @@
[src]="assetsPath + 'common/commission.jpg'"
alt="flag black white low" width="50" height="33">
</div>
<helper *ngIf="divContents && divContents['footer']?.length > 0"
[texts]="divContents['footer']"></helper>
<div class="uk-margin-left uk-visible@m">
<div *ngIf="!grantAdvance" class="">
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="grantConenctText"></span>
</div>
<div *ngIf="grantAdvance" class="">
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="grantAdvanceText"></span>
<div *ngIf="properties.footerGrantText" class="">
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="properties.footerGrantText"></span>
</div>
</div>
<div class="uk-margin-left uk-text-center uk-hidden@m">
<div *ngIf="!grantAdvance" class="">
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="grantConenctText"></span>
</div>
<div *ngIf="grantAdvance" class="">
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="grantAdvanceText"></span>
<div *ngIf="properties.footerGrantText" class="">
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="properties.footerGrantText"></span>
</div>
</div>
</div>
@ -37,7 +34,8 @@
<div [class]="'uk-container ' +(centered?'uk-container-small':'uk-container-expand') ">
<!-- <div class="uk-container uk-container-expand uk-margin-small">-->
<div [class]="(centered?'':'uk-grid uk-grid-collapse ') ">
<div id="footer#3" [class]="'uk-first-column uk-flex uk-flex-middle ' +
<div *ngIf="properties.footerGrantText || (divContents && divContents['footer']?.length > 0)"
id="footer#3" [class]="'uk-first-column uk-flex uk-flex-middle ' +
(centered?'uk-grid uk-margin-remove-right':'uk-margin-large-right uk-width-1-3@m')">
<div *ngIf="showOpenaire"
[class]="(centered?'uk-width-1-1 uk-width-1-4@m uk-text-center':'')">
@ -65,11 +63,10 @@
alt="flag black white low" width="50" height="33">
</div>
<div class="uk-margin-left">
<div *ngIf="!grantAdvance" class="">
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="grantConenctText"></span>
</div>
<div *ngIf="grantAdvance" class="">
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="grantAdvanceText"></span>
<helper *ngIf="divContents && divContents['footer']?.length > 0"
[texts]="divContents['footer']"></helper>
<div *ngIf="properties.footerGrantText" class="">
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="properties.footerGrantText"></span>
</div>
</div>
</div>

View File

@ -6,6 +6,7 @@ import { ConfigurationService } from '../utils/configuration/configuration.servi
import {EnvProperties} from "../utils/properties/env-properties";
import {Subscription} from "rxjs";
import {properties} from '../../../environments/environment';
import {HelperService} from "../utils/helper/helper.service";
@Component({
selector: 'bottom',
@ -24,8 +25,8 @@ export class BottomComponent {
// @Input() environment:string = "beta";
showPage ={};
@Input() grantAdvance:boolean = true;
grantAdvanceText = "OpenAIRE-Advance receives funding from the European Union's Horizon 2020 Research and Innovation programme under Grant Agreement No. 777541.";
grantConenctText = "OpenAIRE-Connect receives funding from the European Union's Horizon 2020 Research and Innovation programme under grant agreement No. 731011 and No. 777541.";
// grantAdvanceText = "OpenAIRE-Advance receives funding from the European Union's Horizon 2020 Research and Innovation programme under Grant Agreement No. 777541.";
// grantConenctText = "OpenAIRE-Connect receives funding from the European Union's Horizon 2020 Research and Innovation programme under grant agreement No. 731011 and No. 777541.";
@Input() properties:EnvProperties = properties;
@Input() darkBackground:boolean=true;
@Input() centered:boolean=false;
@ -33,11 +34,16 @@ grantConenctText = "OpenAIRE-Connect receives funding from the European Union's
sectionClass= "uk-section-primary";
subs: Subscription[] = [];
public divContents = null;
constructor(private config: ConfigurationService, private route: ActivatedRoute,) {
constructor(private config: ConfigurationService, private route: ActivatedRoute,
private helper: HelperService) {
}
ngOnInit() {
if(!properties.footerGrantText) {
this.getDivContents();
}
if(!this.darkBackground){
this.sectionClass= " footer-light-background";
}
@ -78,4 +84,12 @@ constructor(private config: ConfigurationService, private route: ActivatedRoute
}
return true;
}
private getDivContents() {
if (this.communityId) {
this.subs.push(this.helper.getDivHelpContents(this.properties, this.communityId, "/").subscribe(contents => {
this.divContents = contents;
}));
}
}
}

View File

@ -4,10 +4,11 @@ import { FormsModule } from '@angular/forms';
import { RouterModule } from "@angular/router";
import {BottomComponent} from './bottom.component';
import {HelperModule} from "../utils/helper/helper.module";
@NgModule({
imports: [
CommonModule, FormsModule, RouterModule
CommonModule, FormsModule, RouterModule, HelperModule
],
declarations: [

View File

@ -135,4 +135,5 @@ export interface EnvProperties {
sushiliteURL?: string;
notificationsAPIURL?: string;
myOrcidLinksPage?: string;
footerGrantText?: string;
}