Skip to content
Snippets Groups Projects
Commit 2d46c1ad authored by mathias.chouet's avatar mathias.chouet
Browse files

Modules diagram: link to notes, if any

parent 94eb02a6
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,11 @@
<mat-card-header>
<mat-card-title>
<h1>{{ uitextTitle }}</h1>
<div id="show-notes" *ngIf="hasNotes">
<a routerLink="/properties">
{{ uitextShowNotes }}
</a>
</div>
</mat-card-title>
</mat-card-header>
......
......@@ -7,3 +7,17 @@
a.show-debug {
cursor: pointer;
}
mat-card-title {
#show-notes {
font-size: 16px;
font-weight: normal;
margin-top: -8px;
> a {
cursor: pointer;
font-size: .9em;
}
}
}
......@@ -74,6 +74,10 @@ export class ModulesDiagramComponent implements AfterContentInit, AfterViewCheck
return this.intlService.localizeText("INFO_DIAGRAM_CALCULATED_PARAM");
}
public get uitextShowNotes() {
return this.intlService.localizeText("INFO_DIAGRAM_SHOW_NOTES");
}
public ngAfterViewChecked() {
if (this.needsToInitSvgPanZoom) {
this.initSvgPanZoom();
......@@ -150,6 +154,10 @@ export class ModulesDiagramComponent implements AfterContentInit, AfterViewCheck
return Session.getInstance().getNumberOfNubs() > 0;
}
public get hasNotes(): boolean {
return !! Session.getInstance().documentation;
}
/**
* Builds a Mermaid graph text definition
*/
......
......@@ -95,6 +95,7 @@
"INFO_DIAGRAM_TITLE": "Calculation modules diagram",
"INFO_DIAGRAM_DRAWING_ERROR": "Error while drawing diagram",
"INFO_DIAGRAM_CALCULATED_PARAM": "calculated parameter",
"INFO_DIAGRAM_SHOW_NOTES": "Show notes",
"INFO_DIALOG_COMPUTED_VALUE_TITLE": "Edit initial value",
"INFO_DIALOG_EDIT_PAB_INTERPOLATION_BOUNDS": "between %s and %s",
"INFO_DIALOG_EDIT_PAB_N_DEVICES": "%s device(s)",
......
......@@ -95,6 +95,7 @@
"INFO_DIAGRAM_TITLE": "Diagramme des modules de calcul",
"INFO_DIAGRAM_DRAWING_ERROR": "Erreur lors du dessin du diagramme",
"INFO_DIAGRAM_CALCULATED_PARAM": "paramètre calculé",
"INFO_DIAGRAM_SHOW_NOTES": "Voir les notes",
"INFO_DIALOG_COMPUTED_VALUE_TITLE": "Modifier la valeur initiale",
"INFO_DIALOG_EDIT_PAB_INTERPOLATION_BOUNDS": "entre %s et %s",
"INFO_DIALOG_EDIT_PAB_N_DEVICES": "%s ouvrage(s)",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment