From a86c0db98c3b5f12b0f47532c5136234a5161f5d Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sun, 22 Jul 2018 15:03:12 +0200 Subject: bake : limit action links to defined controller methods --- app-from-scratch.sh | 6 +++++ fai_gestion/config/bake_extra.php | 2 +- .../src/Template/Bake/Element/form.twig | 27 ++++++++++++++++++++++ .../src/Template/Bake/Template/index.twig | 13 +++++++++-- .../src/Template/Bake/Template/view.twig | 14 ++++++++++- 5 files changed, 58 insertions(+), 4 deletions(-) diff --git a/app-from-scratch.sh b/app-from-scratch.sh index a438292..8dd51ba 100644 --- a/app-from-scratch.sh +++ b/app-from-scratch.sh @@ -377,3 +377,9 @@ git add ../app-from-scratch.sh plugins/CustomTheme/src/Template/Bake/Model/table git commit -m "bake: sort tables by default (with config) + allow ORDER BY hooks" # 28e5cfbde499b7d08649596d0f675ad8bba0143a +# bake : limit action links to defined controller methods +p=plugins/CustomTheme/src/Template/Bake +editor $p/Template/view.twig $p/Template/index.twig $p/Element/form.twig config/bake_extra.php +git add $p/Template/view.twig $p/Template/index.twig $p/Element/form.twig config/bake_extra.php +git add ../app-from-scratch.sh +git commit -m "bake : limit action links to defined controller methods" diff --git a/fai_gestion/config/bake_extra.php b/fai_gestion/config/bake_extra.php index eb29b3d..ec2fb0b 100644 --- a/fai_gestion/config/bake_extra.php +++ b/fai_gestion/config/bake_extra.php @@ -61,7 +61,7 @@ $controllerActions = [ 'EquipementModes' => [ ], 'Interesses' => [ 'index', 'view', 'add', 'edit', 'delete'], 'InteresseStatuts' => [ ], - 'Ippubliques' => [ 'index', 'view' ], # FIXME rename table to ip_publiques + 'IpPubliques' => [ 'index', 'view' ], #'LienFilaire' => [ ], # TODO in equipements ? #'LienRadio' => [ ], # TODO in equipements ? #'LienTunnel' => [ ], # TODO in equipements ? diff --git a/fai_gestion/plugins/CustomTheme/src/Template/Bake/Element/form.twig b/fai_gestion/plugins/CustomTheme/src/Template/Bake/Element/form.twig index 2ed5249..e48d107 100644 --- a/fai_gestion/plugins/CustomTheme/src/Template/Bake/Element/form.twig +++ b/fai_gestion/plugins/CustomTheme/src/Template/Bake/Element/form.twig @@ -13,6 +13,29 @@ * @license http://www.opensource.org/licenses/mit-license.php MIT License */ #} + + * Copyright 2016 Nicolas Goaziou + * + * This file is part of FAI Gestion forked from CHD Gestion. + * + * FAI Gestion is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * FAI Gestion is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with FAI Gestion. If not, see . + * + * Auto-generated code with CakePHP(tm) bake derived code. +**/ +?> {% set fields = Bake.filterFields(fields, schema, modelObject) %}