diff options
Diffstat (limited to 'fai_gestion/plugins/CustomTheme/src/Template')
-rw-r--r-- | fai_gestion/plugins/CustomTheme/src/Template/Bake/Template/view.twig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fai_gestion/plugins/CustomTheme/src/Template/Bake/Template/view.twig b/fai_gestion/plugins/CustomTheme/src/Template/Bake/Template/view.twig index a5563bf..0b2dd28 100644 --- a/fai_gestion/plugins/CustomTheme/src/Template/Bake/Template/view.twig +++ b/fai_gestion/plugins/CustomTheme/src/Template/Bake/Template/view.twig @@ -149,19 +149,20 @@ {% for alias, details in relations %} {% set otherSingularVar = alias|variable %} {% set otherPluralHumanName = details.controller|underscore|humanize %} +{% set fields = BakeExtra.filterFieldsOther(details.fields, details.controller) %} <div class="related"> <h4><?= __('Related {{ otherPluralHumanName }}') ?></h4> <?php if (!empty(${{ singularVar }}->{{ details.property }})): ?> <table cellpadding="0" cellspacing="0"> <tr> -{% for field in details.fields %} +{% for field in fields %} <th scope="col"><?= __('{{ field|humanize }}') ?></th> {% endfor %} <th scope="col" class="actions"><?= __('Actions') ?></th> </tr> <?php foreach (${{ singularVar }}->{{ details.property }} as ${{ otherSingularVar }}): ?> <tr> -{% for field in details.fields %} +{% for field in fields %} <td><?= h(${{ otherSingularVar }}->{{ field }}) ?></td> {% endfor %} {% set otherPk = '$' ~ otherSingularVar ~ '->' ~ details.primaryKey[0] %} |