Commit 66239a9a authored by naji's avatar naji
Browse files

Merge branch 'feat/test' into issue/problemes_metadonnee

parents 41ed1bc9 deb7d90f
......@@ -228,7 +228,7 @@ export class FileTreeMetadataComponent {
this.fileService.tabRootNode.subscribe(tabRootNode => {
if (tabRootNode){
let tabLabel = (<any>nodeNameToLabel)[tabRootNode.name];
this.breadcrumbDataMetadata = [{ label: this.onResolveName(tabLabel), node: tabRootNode}];
this.breadcrumbDataMetadata = [{ label: tabLabel, node: tabRootNode}];
if (tabRootNode.name !== breadCrumbNodeLabel){
if(node.parent){
if (node.parent.name!==tabRootNode.name){
......@@ -237,9 +237,9 @@ export class FileTreeMetadataComponent {
this.breadcrumbDataMetadata = this.breadcrumbDataMetadata.concat([ { label: '...' } ]);
}
}
this.breadcrumbDataMetadata = this.breadcrumbDataMetadata.concat([ { label: this.onResolveName(node.parent.name), node: node.parent } ]);
this.breadcrumbDataMetadata = this.breadcrumbDataMetadata.concat([ { label: node.parent.name, node: node.parent } ]);
}
this.breadcrumbDataMetadata = this.breadcrumbDataMetadata.concat([ { label: breadCrumbNodeLabel } ]);
this.breadcrumbDataMetadata = this.breadcrumbDataMetadata.concat([ { label: breadCrumbNodeLabel, node: node } ]);
}
}
}
......
......@@ -27,7 +27,7 @@
<div class="pastis-breadcrumb">
<ng-container *ngFor="let d of data; let last = last">
<span (click)="onClick(d, !last)">{{d.label | translate}}</span>
<span (click)="onClick(d, !last)">{{getLabel(d) | translate}}</span>
<i *ngIf="!last" class="material-icons px-2">trending_flat</i>
</ng-container>
</div>
......@@ -35,6 +35,8 @@
* knowledge of the CeCILL-C license and that you accept its terms.
*/
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { BreadcrumbDataMetadata } from '../../../profile/edit-profile/classes/breadcrumb';
import { PastisPopupMetadataLanguageService } from '../../pastis-popup-metadata-language/pastis-popup-metadata-language.service';
@Component({
selector: 'pastis-breadcrumb',
......@@ -49,6 +51,8 @@ export class PastisBreadcrumbComponent implements OnInit {
@Output()
public selected = new EventEmitter<any>();
constructor(private metadataLanguageService: PastisPopupMetadataLanguageService){}
ngOnInit() {
}
......@@ -57,4 +61,15 @@ export class PastisBreadcrumbComponent implements OnInit {
this.selected.emit(d);
}
}
getLabel(data:BreadcrumbDataMetadata): string {
if (data.node) {
if (!this.metadataLanguageService.sedaLanguage.getValue()) {
if (data.node.sedaData.NameFr){
return data.node.sedaData.NameFr;
}
}
}
return data.label;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment