[ACA-968] Language Picker

This commit is contained in:
Cilibiu Bogdan
2017-11-02 18:48:37 +02:00
committed by Denys Vuika
parent c3f8724a23
commit 7007c735e4
4 changed files with 63 additions and 3 deletions

View File

@@ -16,7 +16,7 @@
*/
import { Component, OnInit, OnDestroy } from '@angular/core';
import { PeopleContentService } from 'ng2-alfresco-core';
import { PeopleContentService, AppConfigService } from 'ng2-alfresco-core';
import { Subscription } from 'rxjs/Rx';
@Component({
@@ -29,7 +29,10 @@ export class CurrentUserComponent implements OnInit, OnDestroy {
user: any = null;
constructor(private peopleApi: PeopleContentService) {}
constructor(
private peopleApi: PeopleContentService,
private appConfig: AppConfigService
) {}
ngOnInit() {
this.personSubscription = this.peopleApi.getCurrentPerson()
@@ -61,4 +64,8 @@ export class CurrentUserComponent implements OnInit, OnDestroy {
const { userFirstName: first, userLastName: last } = this;
return [ first[0], last[0] ].join('');
}
get showLanguagePicker() {
return this.appConfig.get('languagePicker') || false;
}
}