From 78043e3cccdf88981e79f14f3249c43a41211df7 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Mon, 23 Jul 2018 21:06:10 +0200 Subject: bake : action view/related items, limit to available actions. Bonus : don't display foreign key (if display here == view $id) --- .../plugins/CustomTheme/src/Template/Bake/Template/view.twig | 8 +++++++- .../plugins/CustomTheme/src/View/Helper/BakeExtraHelper.php | 11 +++-------- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'fai_gestion') 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 0b2dd28..17e7be0 100644 --- a/fai_gestion/plugins/CustomTheme/src/Template/Bake/Template/view.twig +++ b/fai_gestion/plugins/CustomTheme/src/Template/Bake/Template/view.twig @@ -149,7 +149,7 @@ {% for alias, details in relations %} {% set otherSingularVar = alias|variable %} {% set otherPluralHumanName = details.controller|underscore|humanize %} -{% set fields = BakeExtra.filterFieldsOther(details.fields, details.controller) %} +{% set fields = BakeExtra.filterFieldsOther(details.fields, details.controller, details.foreignKey) %}