[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:
parent
d79a202ed7
commit
4eca6ad584
|
@ -1,5 +1,6 @@
|
||||||
<ng-container *ngIf="shortView;else longView">
|
<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 *ngIf="showCommision" class="uk-width-1-2">
|
||||||
<div class="uk-flex uk-flex-middle">
|
<div class="uk-flex uk-flex-middle">
|
||||||
<div>
|
<div>
|
||||||
|
@ -7,20 +8,16 @@
|
||||||
[src]="assetsPath + 'common/commission.jpg'"
|
[src]="assetsPath + 'common/commission.jpg'"
|
||||||
alt="flag black white low" width="50" height="33">
|
alt="flag black white low" width="50" height="33">
|
||||||
</div>
|
</div>
|
||||||
|
<helper *ngIf="divContents && divContents['footer']?.length > 0"
|
||||||
|
[texts]="divContents['footer']"></helper>
|
||||||
<div class="uk-margin-left uk-visible@m">
|
<div class="uk-margin-left uk-visible@m">
|
||||||
<div *ngIf="!grantAdvance" class="">
|
<div *ngIf="properties.footerGrantText" class="">
|
||||||
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="grantConenctText"></span>
|
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="properties.footerGrantText"></span>
|
||||||
</div>
|
|
||||||
<div *ngIf="grantAdvance" class="">
|
|
||||||
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="grantAdvanceText"></span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-left uk-text-center uk-hidden@m">
|
<div class="uk-margin-left uk-text-center uk-hidden@m">
|
||||||
<div *ngIf="!grantAdvance" class="">
|
<div *ngIf="properties.footerGrantText" class="">
|
||||||
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="grantConenctText"></span>
|
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="properties.footerGrantText"></span>
|
||||||
</div>
|
|
||||||
<div *ngIf="grantAdvance" class="">
|
|
||||||
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="grantAdvanceText"></span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -37,7 +34,8 @@
|
||||||
<div [class]="'uk-container ' +(centered?'uk-container-small':'uk-container-expand') ">
|
<div [class]="'uk-container ' +(centered?'uk-container-small':'uk-container-expand') ">
|
||||||
<!-- <div class="uk-container uk-container-expand uk-margin-small">-->
|
<!-- <div class="uk-container uk-container-expand uk-margin-small">-->
|
||||||
<div [class]="(centered?'':'uk-grid uk-grid-collapse ') ">
|
<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')">
|
(centered?'uk-grid uk-margin-remove-right':'uk-margin-large-right uk-width-1-3@m')">
|
||||||
<div *ngIf="showOpenaire"
|
<div *ngIf="showOpenaire"
|
||||||
[class]="(centered?'uk-width-1-1 uk-width-1-4@m uk-text-center':'')">
|
[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">
|
alt="flag black white low" width="50" height="33">
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-left">
|
<div class="uk-margin-left">
|
||||||
<div *ngIf="!grantAdvance" class="">
|
<helper *ngIf="divContents && divContents['footer']?.length > 0"
|
||||||
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="grantConenctText"></span>
|
[texts]="divContents['footer']"></helper>
|
||||||
</div>
|
<div *ngIf="properties.footerGrantText" class="">
|
||||||
<div *ngIf="grantAdvance" class="">
|
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="properties.footerGrantText"></span>
|
||||||
<span style="font-size: 8pt; line-height: 0.7!important;" [innerHtml]="grantAdvanceText"></span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { ConfigurationService } from '../utils/configuration/configuration.servi
|
||||||
import {EnvProperties} from "../utils/properties/env-properties";
|
import {EnvProperties} from "../utils/properties/env-properties";
|
||||||
import {Subscription} from "rxjs";
|
import {Subscription} from "rxjs";
|
||||||
import {properties} from '../../../environments/environment';
|
import {properties} from '../../../environments/environment';
|
||||||
|
import {HelperService} from "../utils/helper/helper.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'bottom',
|
selector: 'bottom',
|
||||||
|
@ -24,8 +25,8 @@ export class BottomComponent {
|
||||||
// @Input() environment:string = "beta";
|
// @Input() environment:string = "beta";
|
||||||
showPage ={};
|
showPage ={};
|
||||||
@Input() grantAdvance:boolean = true;
|
@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.";
|
// 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.";
|
// 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() properties:EnvProperties = properties;
|
||||||
@Input() darkBackground:boolean=true;
|
@Input() darkBackground:boolean=true;
|
||||||
@Input() centered:boolean=false;
|
@Input() centered:boolean=false;
|
||||||
|
@ -33,11 +34,16 @@ grantConenctText = "OpenAIRE-Connect receives funding from the European Union's
|
||||||
sectionClass= "uk-section-primary";
|
sectionClass= "uk-section-primary";
|
||||||
|
|
||||||
subs: Subscription[] = [];
|
subs: Subscription[] = [];
|
||||||
|
public divContents = null;
|
||||||
|
|
||||||
constructor(private config: ConfigurationService, private route: ActivatedRoute,) {
|
constructor(private config: ConfigurationService, private route: ActivatedRoute,
|
||||||
|
private helper: HelperService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
if(!properties.footerGrantText) {
|
||||||
|
this.getDivContents();
|
||||||
|
}
|
||||||
if(!this.darkBackground){
|
if(!this.darkBackground){
|
||||||
this.sectionClass= " footer-light-background";
|
this.sectionClass= " footer-light-background";
|
||||||
}
|
}
|
||||||
|
@ -78,4 +84,12 @@ constructor(private config: ConfigurationService, private route: ActivatedRoute
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private getDivContents() {
|
||||||
|
if (this.communityId) {
|
||||||
|
this.subs.push(this.helper.getDivHelpContents(this.properties, this.communityId, "/").subscribe(contents => {
|
||||||
|
this.divContents = contents;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,10 +4,11 @@ import { FormsModule } from '@angular/forms';
|
||||||
import { RouterModule } from "@angular/router";
|
import { RouterModule } from "@angular/router";
|
||||||
|
|
||||||
import {BottomComponent} from './bottom.component';
|
import {BottomComponent} from './bottom.component';
|
||||||
|
import {HelperModule} from "../utils/helper/helper.module";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule, FormsModule, RouterModule
|
CommonModule, FormsModule, RouterModule, HelperModule
|
||||||
|
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
|
|
|
@ -135,4 +135,5 @@ export interface EnvProperties {
|
||||||
sushiliteURL?: string;
|
sushiliteURL?: string;
|
||||||
notificationsAPIURL?: string;
|
notificationsAPIURL?: string;
|
||||||
myOrcidLinksPage?: string;
|
myOrcidLinksPage?: string;
|
||||||
|
footerGrantText?: string;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue