angular icon indicating copy to clipboard operation
angular copied to clipboard

[Question] Customizing or translating "EditGrid header template

Open dev-thinks opened this issue 4 years ago • 1 comments

Hello,

Is there a way to translating the header template content (component.label) in edit grid.

<div class="row"> {% util.eachComponent(components, function(component) { %} {% if (!component.hasOwnProperty('tableView') || component.tableView) { %} <div class="col-sm-2">{{ component.label }}</div> {% } %} {% }) %} </div>

This is the default header template am seeing. but label text is not passed through translate function.

  1. is there a way to call translate from here?
  2. or is there an option to access array of components from this template "src/templates/bootstrap3/editgrid/html.ejs"; so that i can customize the editgrid template

@travist Any insights into this really helpful, Thank you.

dev-thinks avatar Feb 19 '21 15:02 dev-thinks

This has probably been already fixed... Looking at header.ejs I can see the following default header template, which translates the EditGrid table header properly for me: <div class="row">{% ctx.util.eachComponent(ctx.components, function(component) { %}{% if (!component.hasOwnProperty('tableView') || component.tableView) { %}<div class="col-sm-2">{{ ctx.t(component.label) }}</div>{% } %}{% }) %}</div>

amileris avatar Jul 03 '22 09:07 amileris

Closing this thread as it is outdated. Please re-open if it is still relevant. Thank you for your contribution!

Sidiro23 avatar Feb 14 '24 14:02 Sidiro23