Skip to content

Commit 6d53319

Browse files
authored
Provide semantic explanation for custom table columns (eclipse-esmf#131)
Signed-off-by: Pavel Shalamkov <[email protected]>
1 parent cacdb25 commit 6d53319

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

Diff for: src/ng-generate/components/shared/methods/generation/extended-table.html.template

+24-2
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,34 @@
102102
<% if(options.enableVersionSupport) { %>
103103
<th data-test="custom-column-header" mat-header-cell *matHeaderCellDef mat-sort-header
104104
[resizeColumn]="true" [index]="<%= customColumnIndex %>" (dragging)='dragging = $event'>
105-
{{'<%= options.selectedModelTypeName.toLowerCase() %>.v<%= options.formatedAspectModelVersion %>.customColumn.<%= columnName %>' | transloco }}
105+
<span data-test="table-header-text">
106+
{{'<%= options.selectedModelTypeName.toLowerCase() %>.v<%= options.formatedAspectModelVersion %>.customColumn.<%= columnName %>' | transloco }}
107+
</span>
108+
<mat-icon
109+
class="table-header-icon material-icons"
110+
*ngIf="!headerTooltipsOff"
111+
[matTooltip]="'<%= options.selectedModelTypeName.toLowerCase() %>.v<%= options.formatedAspectModelVersion %>.<%= columnName %>.description' | transloco"
112+
(click)="$event.stopPropagation()"
113+
matTooltipClass="table-column-tooltip"
114+
matTooltipPosition="above"
115+
data-test="column-info-icon"
116+
>info_outlined</mat-icon>
106117
</th>
107118
<% } else { %>
108119
<th data-test="custom-column-header" mat-header-cell *matHeaderCellDef mat-sort-header
109120
[resizeColumn]="true" [index]="<%= customColumnIndex %>" (dragging)='dragging = $event'>
110-
{{ '<%= options.selectedModelTypeName.toLowerCase() %>.customColumn.<%= columnName %>' | transloco }}
121+
<span data-test="table-header-text">
122+
{{ '<%= options.selectedModelTypeName.toLowerCase() %>.customColumn.<%= columnName %>' | transloco }}
123+
</span>
124+
<mat-icon
125+
class="table-header-icon material-icons"
126+
*ngIf="!headerTooltipsOff"
127+
[matTooltip]="'<%= options.selectedModelTypeName.toLowerCase() %>.<%= columnName %>.description' | transloco"
128+
(click)="$event.stopPropagation()"
129+
matTooltipClass="table-column-tooltip"
130+
matTooltipPosition="above"
131+
data-test="column-info-icon"
132+
>info_outlined</mat-icon>
111133
</th>
112134
<% } %>
113135
<td data-test="custom-column-cell" mat-cell *matCellDef="let row">

0 commit comments

Comments
 (0)